Changeset 11344


Ignore:
Timestamp:
Oct 21, 2010, 8:04:00 PM (11 years ago)
Author:
charles
Message:

(trunk gtk) "hibernation inhibition broke in transmission-2.00" -- fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/tr-core.c

    r11258 r11344  
    14211421                                     G_TYPE_UINT, cookie,
    14221422                                     G_TYPE_INVALID /* senitnel - end of output args */ );
     1423
    14231424        if( success )
    14241425            tr_inf( "%s", _( "Disallowing desktop hibernation" ) );
     
    14941495maybeInhibitHibernation( TrCore * core )
    14951496{
    1496     /* inhibit if it's enabled *AND* all the torrents are paused */
    1497     const gboolean inhibit = pref_flag_get( PREF_KEY_INHIBIT_HIBERNATION )
    1498                           && ( tr_core_get_active_torrent_count( core ) == 0 );
    1499 
    1500     tr_core_set_hibernation_allowed( core, !inhibit );
     1497    /* hibernation is allowed if EITHER
     1498     * (a) the "inhibit" pref is turned off OR
     1499     * (b) there aren't any active torrents */
     1500    const gboolean hibernation_allowed = !pref_flag_get( PREF_KEY_INHIBIT_HIBERNATION )
     1501                                      || !tr_core_get_active_torrent_count( core );
     1502    tr_core_set_hibernation_allowed( core, hibernation_allowed );
    15011503}
    15021504
Note: See TracChangeset for help on using the changeset viewer.