Changeset 11695


Ignore:
Timestamp:
Jan 18, 2011, 12:31:05 AM (11 years ago)
Author:
jordan
Message:

trivial minor changes to indentation, text strings, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/details.c

    r11693 r11695  
    452452ratio_combo_new( void )
    453453{
    454     GtkWidget * w = gtr_combo_box_new_enum( _( "Use global settings" ),       TR_RATIOLIMIT_GLOBAL,
    455                                             _( "Seed regardless of ratio" ),  TR_RATIOLIMIT_UNLIMITED,
    456                                             _( "Stop seeding at ratio:" ),    TR_RATIOLIMIT_SINGLE,
    457                                             NULL );
     454    GtkWidget * w = gtr_combo_box_new_enum(
     455        _( "Use global settings" ),       TR_RATIOLIMIT_GLOBAL,
     456        _( "Seed regardless of ratio" ),  TR_RATIOLIMIT_UNLIMITED,
     457        _( "Stop seeding at ratio:" ),    TR_RATIOLIMIT_SINGLE,
     458        NULL );
    458459    g_object_set_data_full( G_OBJECT( w ), ARG_KEY, g_strdup( "seedRatioMode" ), g_free );
    459460    return w;
     
    463464idle_combo_new( void )
    464465{
    465     GtkWidget * w = gtr_combo_box_new_enum ( _( "Use global settings" ),                 TR_IDLELIMIT_GLOBAL,
    466                                              _( "Seed regardless of activity" ),         TR_IDLELIMIT_UNLIMITED,
    467                                              _( "Stop seeding if idle for N minutes:" ), TR_IDLELIMIT_SINGLE,
    468                                              NULL );
     466    GtkWidget * w = gtr_combo_box_new_enum (
     467        _( "Use global settings" ),                 TR_IDLELIMIT_GLOBAL,
     468        _( "Seed regardless of activity" ),         TR_IDLELIMIT_UNLIMITED,
     469        _( "Stop seeding if idle for N minutes:" ), TR_IDLELIMIT_SINGLE,
     470        NULL );
    469471    g_object_set_data_full( G_OBJECT( w ), ARG_KEY, g_strdup( "seedIdleMode" ), g_free );
    470472    return w;
     
    867869        str = no_torrent;
    868870    else {
     871        char upstr[64];
     872        char ratiostr[64];
    869873        uint64_t up = 0;
    870874        uint64_t down = 0;
    871         char upstr[64];
    872         char ratiostr[64];
    873875        for( i=0; i<n; ++i ) {
    874876            up += stats[i]->uploadedEver;
     
    12351237
    12361238    gtk_list_store_set( store, iter,
    1237                         PEER_COL_PROGRESS, (int)( 100.0 * peer->progress ),
    1238                         PEER_COL_UPLOAD_REQUEST_COUNT_INT, peer->pendingReqsToClient,
    1239                         PEER_COL_UPLOAD_REQUEST_COUNT_STRING, up_count,
    1240                         PEER_COL_DOWNLOAD_REQUEST_COUNT_INT, peer->pendingReqsToPeer,
    1241                         PEER_COL_DOWNLOAD_REQUEST_COUNT_STRING, down_count,
    1242                         PEER_COL_DOWNLOAD_RATE_DOUBLE, peer->rateToClient_KBps,
    1243                         PEER_COL_DOWNLOAD_RATE_STRING, down_speed,
    1244                         PEER_COL_UPLOAD_RATE_DOUBLE, peer->rateToPeer_KBps,
    1245                         PEER_COL_UPLOAD_RATE_STRING, up_speed,
    1246                         PEER_COL_FLAGS, peer->flagStr,
    1247                         PEER_COL_WAS_UPDATED, TRUE,
    1248                         PEER_COL_BLOCKS_DOWNLOADED_COUNT_INT, (int)peer->blocksToClient,
    1249                         PEER_COL_BLOCKS_DOWNLOADED_COUNT_STRING, blocks_to_client,
    1250                         PEER_COL_BLOCKS_UPLOADED_COUNT_INT, (int)peer->blocksToPeer,
    1251                         PEER_COL_BLOCKS_UPLOADED_COUNT_STRING, blocks_to_peer,
    1252                         PEER_COL_REQS_CANCELLED_BY_CLIENT_COUNT_INT, (int)peer->cancelsToPeer,
    1253                         PEER_COL_REQS_CANCELLED_BY_CLIENT_COUNT_STRING, cancelled_by_client,
    1254                         PEER_COL_REQS_CANCELLED_BY_PEER_COUNT_INT, (int)peer->cancelsToClient,
    1255                         PEER_COL_REQS_CANCELLED_BY_PEER_COUNT_STRING, cancelled_by_peer,
    1256                         -1 );
     1239        PEER_COL_PROGRESS, (int)( 100.0 * peer->progress ),
     1240        PEER_COL_UPLOAD_REQUEST_COUNT_INT, peer->pendingReqsToClient,
     1241        PEER_COL_UPLOAD_REQUEST_COUNT_STRING, up_count,
     1242        PEER_COL_DOWNLOAD_REQUEST_COUNT_INT, peer->pendingReqsToPeer,
     1243        PEER_COL_DOWNLOAD_REQUEST_COUNT_STRING, down_count,
     1244        PEER_COL_DOWNLOAD_RATE_DOUBLE, peer->rateToClient_KBps,
     1245        PEER_COL_DOWNLOAD_RATE_STRING, down_speed,
     1246        PEER_COL_UPLOAD_RATE_DOUBLE, peer->rateToPeer_KBps,
     1247        PEER_COL_UPLOAD_RATE_STRING, up_speed,
     1248        PEER_COL_FLAGS, peer->flagStr,
     1249        PEER_COL_WAS_UPDATED, TRUE,
     1250        PEER_COL_BLOCKS_DOWNLOADED_COUNT_INT, (int)peer->blocksToClient,
     1251        PEER_COL_BLOCKS_DOWNLOADED_COUNT_STRING, blocks_to_client,
     1252        PEER_COL_BLOCKS_UPLOADED_COUNT_INT, (int)peer->blocksToPeer,
     1253        PEER_COL_BLOCKS_UPLOADED_COUNT_STRING, blocks_to_peer,
     1254        PEER_COL_REQS_CANCELLED_BY_CLIENT_COUNT_INT, (int)peer->cancelsToPeer,
     1255        PEER_COL_REQS_CANCELLED_BY_CLIENT_COUNT_STRING, cancelled_by_client,
     1256        PEER_COL_REQS_CANCELLED_BY_PEER_COUNT_INT, (int)peer->cancelsToClient,
     1257        PEER_COL_REQS_CANCELLED_BY_PEER_COUNT_STRING, cancelled_by_peer,
     1258        -1 );
    12571259}
    12581260
     
    14031405            else
    14041406                *buf = '\0';
    1405             gtk_list_store_set( store, &iter, WEBSEED_COL_DOWNLOAD_RATE_DOUBLE, speeds_KBps[j],
    1406                                               WEBSEED_COL_DOWNLOAD_RATE_STRING, buf,
    1407                                               WEBSEED_COL_WAS_UPDATED, TRUE,
    1408                                               -1 );
     1407            gtk_list_store_set( store, &iter,
     1408                WEBSEED_COL_DOWNLOAD_RATE_DOUBLE, speeds_KBps[j],
     1409                WEBSEED_COL_DOWNLOAD_RATE_STRING, buf,
     1410                WEBSEED_COL_WAS_UPDATED, TRUE,
     1411                -1 );
    14091412            gtk_tree_path_free( p );
    14101413        }
     
    14321435
    14331436    /* most of the time there are no webseeds...
    1434        if that's the case, don't waste space showing an empty list */
     1437       don't waste space showing an empty list */
    14351438    if( total > 0 )
    14361439        gtk_widget_show( di->webseed_view );
     
    14801483                case '?': s = _( "We unchoked this peer, but they're not interested" ); break;
    14811484                case 'E': s = _( "Encrypted connection" ); break;
    1482                 case 'X': s = _( "Peer was discovered through Peer Exchange (PEX)" ); break;
    1483                 case 'H': s = _( "Peer was discovered through DHT" ); break;
     1485                case 'X': s = _( "Peer was found through Peer Exchange (PEX)" ); break;
     1486                case 'H': s = _( "Peer was found through DHT" ); break;
    14841487                case 'I': s = _( "Peer is an incoming connection" ); break;
    14851488            }
     
    15241527
    15251528    /* remove any existing columns */
    1526     {
    1527         GList * l;
    1528         GList * columns = gtk_tree_view_get_columns( peer_view );
    1529         for( l=columns; l!=NULL; l=l->next )
    1530             gtk_tree_view_remove_column( peer_view, l->data );
    1531         g_list_free( columns );
    1532     }
     1529    while(( c = gtk_tree_view_get_column( peer_view, 0 )))
     1530        gtk_tree_view_remove_column( peer_view, c );
    15331531
    15341532    for( i=0; i<n; ++i )
     
    21972195
    21982196        d = gtk_dialog_new_with_buttons( title, win,
    2199                                          GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
    2200                                          GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
    2201                                          GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
    2202                                          NULL );
     2197                GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
     2198                GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
     2199                GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
     2200                NULL );
    22032201        g_signal_connect( d, "response", G_CALLBACK( on_edit_trackers_response ), data );
    22042202
     
    25602558gtr_torrent_details_dialog_set_torrents( GtkWidget * w, GSList * ids )
    25612559{
     2560    char title[256];
     2561    const int len = g_slist_length( ids );
    25622562    struct DetailsImpl * di = g_object_get_data( G_OBJECT( w ), DETAILS_KEY );
    2563     const int len = g_slist_length( ids );
    2564     char title[256];
    25652563
    25662564    g_slist_free( di->ids );
Note: See TracChangeset for help on using the changeset viewer.