mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
(trunk) one of the least interesting commits ever: remove trailing spaces from source code lines...
This commit is contained in:
+1
-1
@@ -1258,7 +1258,7 @@ printDetails( tr_benc * top )
|
||||
if( tr_bencDictFindInt( t, "seedRatioMode", &i))
|
||||
{
|
||||
switch( i ) {
|
||||
case TR_RATIOLIMIT_GLOBAL:
|
||||
case TR_RATIOLIMIT_GLOBAL:
|
||||
printf( " Ratio Limit: Default\n" );
|
||||
break;
|
||||
case TR_RATIOLIMIT_SINGLE:
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ str_has_suffix( const char *str, const char *suffix )
|
||||
{
|
||||
const size_t str_len = strlen( str );
|
||||
const size_t suffix_len = strlen( suffix );
|
||||
|
||||
|
||||
if( str_len < suffix_len )
|
||||
return FALSE;
|
||||
|
||||
|
||||
+1
-1
@@ -1576,7 +1576,7 @@ setPeerViewColumns( GtkTreeView * peer_view )
|
||||
c = gtk_tree_view_column_new_with_attributes( t, r, "text", col, NULL );
|
||||
sort_col = PEER_COL_BLOCKS_UPLOADED_COUNT_INT;
|
||||
break;
|
||||
|
||||
|
||||
case PEER_COL_REQS_CANCELLED_BY_CLIENT_COUNT_STRING:
|
||||
r = gtk_cell_renderer_text_new( );
|
||||
c = gtk_tree_view_column_new_with_attributes( t, r, "text", col, NULL );
|
||||
|
||||
+3
-3
@@ -103,11 +103,11 @@ favicon_web_done_cb( tr_session * session UNUSED,
|
||||
|
||||
gtr_idle_add( favicon_web_done_idle_cb, fav );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gtr_get_favicon( tr_session * session,
|
||||
const char * host,
|
||||
GFunc pixbuf_ready_func,
|
||||
const char * host,
|
||||
GFunc pixbuf_ready_func,
|
||||
gpointer pixbuf_ready_func_data )
|
||||
{
|
||||
GdkPixbuf * pixbuf = favicon_load_from_cache( host );
|
||||
|
||||
+4
-4
@@ -315,7 +315,7 @@ category_filter_model_update( GtkTreeStore * store )
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* cleanup */
|
||||
g_ptr_array_free( hosts, TRUE );
|
||||
g_hash_table_unref( hosts_hash );
|
||||
@@ -515,7 +515,7 @@ category_combo_box_new( GtkTreeModel * tmodel )
|
||||
gtk_cell_layout_set_attributes( GTK_CELL_LAYOUT( c ), r,
|
||||
"pixbuf", CAT_FILTER_COL_PIXBUF,
|
||||
NULL );
|
||||
|
||||
|
||||
|
||||
r = gtk_cell_renderer_text_new( );
|
||||
gtk_cell_layout_pack_start( GTK_CELL_LAYOUT( c ), r, FALSE );
|
||||
@@ -913,7 +913,7 @@ filter_entry_changed( GtkEditable * e, gpointer filter_model )
|
||||
{
|
||||
char * pch;
|
||||
char * folded;
|
||||
|
||||
|
||||
pch = gtk_editable_get_chars( e, 0, -1 );
|
||||
folded = g_utf8_casefold( pch, -1 );
|
||||
g_object_set_data_full( filter_model, TEXT_KEY, folded, g_free );
|
||||
@@ -1065,7 +1065,7 @@ gtr_filter_bar_new( tr_session * session, GtkTreeModel * tmodel, GtkTreeModel **
|
||||
GtkWidget * w = gtk_radio_menu_item_new_with_label ( sl, name );
|
||||
sl = gtk_radio_menu_item_get_group( GTK_RADIO_MENU_ITEM( w ) );
|
||||
g_object_set_data( G_OBJECT( w ), TEXT_MODE_KEY, GINT_TO_POINTER( i ) );
|
||||
g_signal_connect( w, "toggled", G_CALLBACK( filter_text_toggled_cb ), data->filter_model );
|
||||
g_signal_connect( w, "toggled", G_CALLBACK( filter_text_toggled_cb ), data->filter_model );
|
||||
gtk_menu_shell_append( GTK_MENU_SHELL( menu ), w );
|
||||
gtk_widget_show( w );
|
||||
}
|
||||
|
||||
+3
-3
@@ -139,16 +139,16 @@ tr_icon_new( TrCore * core)
|
||||
gtk_icon_info_free ( icon_info );
|
||||
icon_name = icon_is_builtin ? MY_NAME : TRAY_ICON;
|
||||
}
|
||||
|
||||
|
||||
indicator = app_indicator_new( MY_NAME, icon_name, APP_INDICATOR_CATEGORY_SYSTEM_SERVICES );
|
||||
app_indicator_set_status( indicator, APP_INDICATOR_STATUS_ACTIVE );
|
||||
w = action_get_widget( "/icon-popup" );
|
||||
app_indicator_set_menu( indicator, GTK_MENU ( w ) );
|
||||
|
||||
g_object_set_data( G_OBJECT( indicator ), "tr-core", core );
|
||||
|
||||
|
||||
return indicator;
|
||||
}
|
||||
}
|
||||
#else
|
||||
gpointer
|
||||
tr_icon_new( TrCore * core )
|
||||
|
||||
+2
-2
@@ -663,7 +663,7 @@ gtr_priority_combo_set_value( GtkWidget * w, tr_priority_t value )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tr_priority_t
|
||||
gtr_priority_combo_get_value( GtkWidget * w )
|
||||
{
|
||||
@@ -836,7 +836,7 @@ gtr_unrecognized_url_dialog( GtkWidget * parent, const char * url )
|
||||
if( gtr_is_magnet_link( url ) && ( strstr( url, xt ) == NULL ) )
|
||||
{
|
||||
g_string_append_printf( gstr, "\n \n" );
|
||||
g_string_append_printf( gstr, _( "This magnet link appears to be intended for something other than BitTorrent. BitTorrent magnet links have a section containing \"%s\"." ), xt );
|
||||
g_string_append_printf( gstr, _( "This magnet link appears to be intended for something other than BitTorrent. BitTorrent magnet links have a section containing \"%s\"." ), xt );
|
||||
}
|
||||
|
||||
gtk_message_dialog_format_secondary_text( GTK_MESSAGE_DIALOG( w ), "%s", gstr->str );
|
||||
|
||||
@@ -887,7 +887,7 @@ tr_announcerResetTorrent( tr_announcer * announcer, tr_torrent * tor )
|
||||
tr_tier ** tiers = (tr_tier**) tr_ptrArrayPeek( &tor->tiers->tiers, &n );
|
||||
for( i=0; i<n; ++i ) {
|
||||
tr_tier * tier = tiers[i];
|
||||
if( !tier->wasCopied )
|
||||
if( !tier->wasCopied )
|
||||
tierAddAnnounce( tier, STARTED, now );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ test1( void )
|
||||
check( (int)tr_historyGet( h, 22000, 15000 ) == 2 )
|
||||
check( (int)tr_historyGet( h, 22000, 20000 ) == 2 )
|
||||
tr_historyFree( h );
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -365,7 +365,7 @@ tr_netBindTCPImpl( const tr_address * addr, tr_port port, tr_bool suppressMsgs,
|
||||
fmt = _( "Couldn't bind port %d on %s: %s" );
|
||||
else
|
||||
fmt = _( "Couldn't bind port %d on %s: %s (%s)" );
|
||||
|
||||
|
||||
tr_err( fmt, port, tr_ntop_non_ts( addr ), tr_strerror( err ), hint );
|
||||
}
|
||||
tr_netCloseSocket( fd );
|
||||
|
||||
@@ -798,7 +798,7 @@ isInEndgame( Torrent * t )
|
||||
|
||||
/**
|
||||
* This function is useful for sanity checking,
|
||||
* but is too expensive even for nightly builds...
|
||||
* but is too expensive even for nightly builds...
|
||||
* let's leave it disabled but add an easy hook to compile it back in
|
||||
*/
|
||||
#if 0
|
||||
@@ -2437,7 +2437,7 @@ rechokeDownloads( Torrent * t )
|
||||
bad[badCount++] = peer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
t->interestedCount = 0;
|
||||
|
||||
/* We've decided (1) how many peers to be interested in,
|
||||
@@ -2463,7 +2463,7 @@ rechokeDownloads( Torrent * t )
|
||||
}
|
||||
|
||||
/*fprintf( stderr, "num interested: %d\n", t->interestedCount );*/
|
||||
|
||||
|
||||
/* cleanup */
|
||||
tr_free( untested );
|
||||
tr_free( good );
|
||||
@@ -2915,7 +2915,6 @@ reconnectTorrent( Torrent * t )
|
||||
tr_free( mustClose );
|
||||
|
||||
/* decide how many peers can we try to add in this pass */
|
||||
|
||||
maxCandidates = maxPerPulse;
|
||||
if( tr_announcerHasBacklog( t->manager->session->announcer ) )
|
||||
maxCandidates /= 2;
|
||||
|
||||
@@ -483,7 +483,7 @@ loadProgress( tr_benc * dict,
|
||||
}
|
||||
else err = "Couldn't find 'have' or 'bitfield'";
|
||||
if( err != NULL )
|
||||
{
|
||||
{
|
||||
tr_torrentUncheck( tor );
|
||||
tr_tordbg( tor, "Torrent needs to be verified - %s", err );
|
||||
}
|
||||
|
||||
@@ -1211,7 +1211,7 @@ turtleCheckClock( tr_session * s, struct tr_turtle_info * t )
|
||||
}
|
||||
|
||||
/* Called after the turtle's fields are loaded from an outside source.
|
||||
* It initializes the implementation fields
|
||||
* It initializes the implementation fields
|
||||
* and turns on turtle mode if the clock settings say to. */
|
||||
static void
|
||||
turtleBootstrap( tr_session * session, struct tr_turtle_info * turtle )
|
||||
|
||||
@@ -222,7 +222,7 @@ tr_torrentSetMetadataPiece( tr_torrent * tor, int piece, const void * data, in
|
||||
|
||||
tr_bencFree( &newMetainfo );
|
||||
}
|
||||
|
||||
|
||||
tr_bencFree( &infoDict );
|
||||
tr_free( path );
|
||||
}
|
||||
|
||||
@@ -554,7 +554,7 @@ void tr_sessionSetProxyPassword( tr_session * session,
|
||||
***
|
||||
**/
|
||||
|
||||
/** @brief Used by tr_sessionGetStats() and tr_sessionGetCumulativeStats() to give bandwidth statistics */
|
||||
/** @brief Used by tr_sessionGetStats() and tr_sessionGetCumulativeStats() to give bandwidth statistics */
|
||||
typedef struct tr_session_stats
|
||||
{
|
||||
float ratio; /* TR_RATIO_INF, TR_RATIO_NA, or total up/down */
|
||||
@@ -1043,7 +1043,7 @@ enum
|
||||
|
||||
/**
|
||||
* @brief Tell transmsision where to find this torrent's local data.
|
||||
*
|
||||
*
|
||||
* if move_from_previous_location is `true', the torrent's incompleteDir
|
||||
* will be clobberred s.t. additional files being added will be saved
|
||||
* to the torrent's downloadDir.
|
||||
@@ -1491,7 +1491,7 @@ typedef struct
|
||||
|
||||
/* which tier this tracker is in */
|
||||
int tier;
|
||||
|
||||
|
||||
/* used to match to a tr_tracker_info */
|
||||
uint32_t id;
|
||||
}
|
||||
|
||||
@@ -939,7 +939,7 @@ tr_urlIsValidTracker( const char * url )
|
||||
tr_bool valid;
|
||||
char * scheme = NULL;
|
||||
|
||||
valid = isValidURLChars( url )
|
||||
valid = isValidURLChars( url )
|
||||
&& !tr_urlParse( url, -1, &scheme, NULL, NULL, NULL )
|
||||
&& ( scheme != NULL )
|
||||
&& ( !strcmp(scheme,"http") || !strcmp(scheme,"https") );
|
||||
@@ -955,7 +955,7 @@ tr_urlIsValid( const char * url )
|
||||
tr_bool valid;
|
||||
char * scheme = NULL;
|
||||
|
||||
valid = isValidURLChars( url )
|
||||
valid = isValidURLChars( url )
|
||||
&& !tr_urlParse( url, -1, &scheme, NULL, NULL, NULL )
|
||||
&& ( scheme != NULL )
|
||||
&& ( !strcmp(scheme,"http") || !strcmp(scheme,"https") || !strcmp(scheme,"ftp") || !strcmp(scheme,"sftp") );
|
||||
|
||||
Reference in New Issue
Block a user