Ignore:
Timestamp:
Dec 20, 2010, 12:26:18 PM (11 years ago)
Author:
charles
Message:

backport #3837, #3838, #3834, #3719, #3826 to the 2.1x branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1x/gtk/main.c

    r11368 r11552  
    8686    GSList            * details;
    8787    GtkTreeSelection  * sel;
    88     GtkWidget         * quit_dialog;
     88    gpointer            quit_dialog;
    8989};
    9090
     
    337337
    338338    {
    339         const int total = tr_core_get_torrent_count( data->core );
    340         const int active = tr_core_get_active_torrent_count( data->core );
     339        const size_t total = tr_core_get_torrent_count( data->core );
     340        const size_t active = tr_core_get_active_torrent_count( data->core );
    341341        action_sensitize( "pause-all-torrents", active != 0 );
    342342        action_sensitize( "start-all-torrents", active != total );
     
    837837shouldConfirmBeforeExiting( struct cbdata * data )
    838838{
    839     if( !pref_flag_get( PREF_KEY_ASKQUIT ) )
    840         return FALSE;
    841     else {
    842         struct counts_data counts;
    843         getTorrentCounts( data, &counts );
    844         return counts.activeCount > 0;
    845     }
     839    return pref_flag_get( PREF_KEY_ASKQUIT )
     840        && tr_core_get_active_torrent_count( data->core );
    846841}
    847842
     
    852847        wannaquit( cbdata );
    853848    else {
    854         if( cbdata->quit_dialog == NULL )
     849        if( cbdata->quit_dialog == NULL ) {
    855850            cbdata->quit_dialog = askquit( cbdata->core, cbdata->wind, wannaquit, cbdata );
     851            g_object_add_weak_pointer( G_OBJECT( cbdata->quit_dialog ), &cbdata->quit_dialog );
     852        }
    856853        gtk_window_present( GTK_WINDOW( cbdata->quit_dialog ) );
    857854    }
Note: See TracChangeset for help on using the changeset viewer.