Changeset 11546
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/main.c
r11521 r11546 340 340 341 341 { 342 const int total = tr_core_get_torrent_count( data->core );343 const int active = tr_core_get_active_torrent_count( data->core );342 const size_t total = tr_core_get_torrent_count( data->core ); 343 const size_t active = tr_core_get_active_torrent_count( data->core ); 344 344 action_sensitize( "pause-all-torrents", active != 0 ); 345 345 action_sensitize( "start-all-torrents", active != total ); … … 965 965 shouldConfirmBeforeExiting( struct cbdata * data ) 966 966 { 967 if( !pref_flag_get( PREF_KEY_ASKQUIT ) ) 968 return FALSE; 969 else { 970 struct counts_data counts; 971 getTorrentCounts( data, &counts ); 972 return counts.activeCount > 0; 973 } 967 return pref_flag_get( PREF_KEY_ASKQUIT ) 968 && tr_core_get_active_torrent_count( data->core ); 974 969 } 975 970 -
trunk/gtk/tr-core.c
r11538 r11546 1762 1762 } 1763 1763 1764 int1764 size_t 1765 1765 tr_core_get_torrent_count( TrCore * core ) 1766 1766 { … … 1768 1768 } 1769 1769 1770 int1770 size_t 1771 1771 tr_core_get_active_torrent_count( TrCore * core ) 1772 1772 { 1773 1773 GtkTreeIter iter; 1774 1774 GtkTreeModel * model = tr_core_model( core ); 1775 int activeCount = 0;1775 size_t activeCount = 0; 1776 1776 1777 1777 if( gtk_tree_model_get_iter_first( model, &iter ) ) do -
trunk/gtk/tr-core.h
r11114 r11546 84 84 tr_session * tr_core_session( TrCore * self ); 85 85 86 inttr_core_get_active_torrent_count( TrCore * self );87 88 inttr_core_get_torrent_count( TrCore * self );86 size_t tr_core_get_active_torrent_count( TrCore * self ); 87 88 size_t tr_core_get_torrent_count( TrCore * self ); 89 89 90 90 /******
Note: See TracChangeset
for help on using the changeset viewer.