1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

trivial minor changes to indentation, text strings, etc.

This commit is contained in:
Jordan Lee 2011-01-18 00:31:05 +00:00
parent bc91935bd8
commit d3eb8c6ea4

View file

@ -451,7 +451,8 @@ onComboEnumChanged( GtkComboBox * combo_box, struct DetailsImpl * di )
static GtkWidget* static GtkWidget*
ratio_combo_new( void ) ratio_combo_new( void )
{ {
GtkWidget * w = gtr_combo_box_new_enum( _( "Use global settings" ), TR_RATIOLIMIT_GLOBAL, GtkWidget * w = gtr_combo_box_new_enum(
_( "Use global settings" ), TR_RATIOLIMIT_GLOBAL,
_( "Seed regardless of ratio" ), TR_RATIOLIMIT_UNLIMITED, _( "Seed regardless of ratio" ), TR_RATIOLIMIT_UNLIMITED,
_( "Stop seeding at ratio:" ), TR_RATIOLIMIT_SINGLE, _( "Stop seeding at ratio:" ), TR_RATIOLIMIT_SINGLE,
NULL ); NULL );
@ -462,7 +463,8 @@ ratio_combo_new( void )
static GtkWidget* static GtkWidget*
idle_combo_new( void ) idle_combo_new( void )
{ {
GtkWidget * w = gtr_combo_box_new_enum ( _( "Use global settings" ), TR_IDLELIMIT_GLOBAL, GtkWidget * w = gtr_combo_box_new_enum (
_( "Use global settings" ), TR_IDLELIMIT_GLOBAL,
_( "Seed regardless of activity" ), TR_IDLELIMIT_UNLIMITED, _( "Seed regardless of activity" ), TR_IDLELIMIT_UNLIMITED,
_( "Stop seeding if idle for N minutes:" ), TR_IDLELIMIT_SINGLE, _( "Stop seeding if idle for N minutes:" ), TR_IDLELIMIT_SINGLE,
NULL ); NULL );
@ -866,10 +868,10 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n )
if( n <= 0 ) if( n <= 0 )
str = no_torrent; str = no_torrent;
else { else {
uint64_t up = 0;
uint64_t down = 0;
char upstr[64]; char upstr[64];
char ratiostr[64]; char ratiostr[64];
uint64_t up = 0;
uint64_t down = 0;
for( i=0; i<n; ++i ) { for( i=0; i<n; ++i ) {
up += stats[i]->uploadedEver; up += stats[i]->uploadedEver;
down += stats[i]->downloadedEver; down += stats[i]->downloadedEver;
@ -1402,7 +1404,8 @@ refreshWebseedList( struct DetailsImpl * di, tr_torrent ** torrents, int n )
tr_formatter_speed_KBps( buf, speeds_KBps[j], sizeof( buf ) ); tr_formatter_speed_KBps( buf, speeds_KBps[j], sizeof( buf ) );
else else
*buf = '\0'; *buf = '\0';
gtk_list_store_set( store, &iter, WEBSEED_COL_DOWNLOAD_RATE_DOUBLE, speeds_KBps[j], gtk_list_store_set( store, &iter,
WEBSEED_COL_DOWNLOAD_RATE_DOUBLE, speeds_KBps[j],
WEBSEED_COL_DOWNLOAD_RATE_STRING, buf, WEBSEED_COL_DOWNLOAD_RATE_STRING, buf,
WEBSEED_COL_WAS_UPDATED, TRUE, WEBSEED_COL_WAS_UPDATED, TRUE,
-1 ); -1 );
@ -1431,7 +1434,7 @@ refreshWebseedList( struct DetailsImpl * di, tr_torrent ** torrents, int n )
} }
/* most of the time there are no webseeds... /* most of the time there are no webseeds...
if that's the case, don't waste space showing an empty list */ don't waste space showing an empty list */
if( total > 0 ) if( total > 0 )
gtk_widget_show( di->webseed_view ); gtk_widget_show( di->webseed_view );
else else
@ -1479,8 +1482,8 @@ onPeerViewQueryTooltip( GtkWidget * widget,
case 'K': s = _( "Peer has unchoked us, but we're not interested" ); break; case 'K': s = _( "Peer has unchoked us, but we're not interested" ); break;
case '?': s = _( "We unchoked this peer, but they're not interested" ); break; case '?': s = _( "We unchoked this peer, but they're not interested" ); break;
case 'E': s = _( "Encrypted connection" ); break; case 'E': s = _( "Encrypted connection" ); break;
case 'X': s = _( "Peer was discovered through Peer Exchange (PEX)" ); break; case 'X': s = _( "Peer was found through Peer Exchange (PEX)" ); break;
case 'H': s = _( "Peer was discovered through DHT" ); break; case 'H': s = _( "Peer was found through DHT" ); break;
case 'I': s = _( "Peer is an incoming connection" ); break; case 'I': s = _( "Peer is an incoming connection" ); break;
} }
if( s ) if( s )
@ -1523,13 +1526,8 @@ setPeerViewColumns( GtkTreeView * peer_view )
view_columns[n++] = PEER_COL_CLIENT; view_columns[n++] = PEER_COL_CLIENT;
/* remove any existing columns */ /* remove any existing columns */
{ while(( c = gtk_tree_view_get_column( peer_view, 0 )))
GList * l; gtk_tree_view_remove_column( peer_view, c );
GList * columns = gtk_tree_view_get_columns( peer_view );
for( l=columns; l!=NULL; l=l->next )
gtk_tree_view_remove_column( peer_view, l->data );
g_list_free( columns );
}
for( i=0; i<n; ++i ) for( i=0; i<n; ++i )
{ {
@ -2559,9 +2557,9 @@ gtr_torrent_details_dialog_new( GtkWindow * parent, TrCore * core )
void void
gtr_torrent_details_dialog_set_torrents( GtkWidget * w, GSList * ids ) gtr_torrent_details_dialog_set_torrents( GtkWidget * w, GSList * ids )
{ {
struct DetailsImpl * di = g_object_get_data( G_OBJECT( w ), DETAILS_KEY );
const int len = g_slist_length( ids );
char title[256]; char title[256];
const int len = g_slist_length( ids );
struct DetailsImpl * di = g_object_get_data( G_OBJECT( w ), DETAILS_KEY );
g_slist_free( di->ids ); g_slist_free( di->ids );
di->ids = g_slist_copy( ids ); di->ids = g_slist_copy( ids );