Ignore:
Timestamp:
Dec 20, 2010, 12:19:59 PM (12 years ago)
Author:
charles
Message:

(2.0x) backport #3837, #3838, #3834, #3719, #3826 to the 2.0x branch

File:
1 edited

Legend:

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

    r11007 r11551  
    8585    GSList            * details;
    8686    GtkTreeSelection  * sel;
    87     GtkWidget         * quit_dialog;
     87    gpointer            quit_dialog;
    8888};
    8989
     
    348348
    349349    {
    350         const int total = tr_core_get_torrent_count( data->core );
    351         const int active = tr_core_get_active_torrent_count( data->core );
     350        const size_t total = tr_core_get_torrent_count( data->core );
     351        const size_t active = tr_core_get_active_torrent_count( data->core );
    352352        action_sensitize( "pause-all-torrents", active != 0 );
    353353        action_sensitize( "start-all-torrents", active != total );
     
    808808shouldConfirmBeforeExiting( struct cbdata * data )
    809809{
    810     if( !pref_flag_get( PREF_KEY_ASKQUIT ) )
    811         return FALSE;
    812     else {
    813         struct counts_data counts;
    814         getTorrentCounts( data, &counts );
    815         return counts.activeCount > 0;
    816     }
     810    return pref_flag_get( PREF_KEY_ASKQUIT )
     811        && tr_core_get_active_torrent_count( data->core );
    817812}
    818813
     
    823818        wannaquit( cbdata );
    824819    else {
    825         if( cbdata->quit_dialog == NULL )
     820        if( cbdata->quit_dialog == NULL ) {
    826821            cbdata->quit_dialog = askquit( cbdata->core, cbdata->wind, wannaquit, cbdata );
     822            g_object_add_weak_pointer( G_OBJECT( cbdata->quit_dialog ), &cbdata->quit_dialog );
     823        }
    827824        gtk_window_present( GTK_WINDOW( cbdata->quit_dialog ) );
    828825    }
Note: See TracChangeset for help on using the changeset viewer.