Changeset 11464


Ignore:
Timestamp:
Dec 5, 2010, 6:30:28 PM (12 years ago)
Author:
charles
Message:

(2.0x gtk) backport r11344 for #3639 "Hibernation inhibition broke in transmission-gtk 2.00"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0x/gtk/tr-core.c

    r11113 r11464  
    14071407                                     G_TYPE_UINT, cookie,
    14081408                                     G_TYPE_INVALID /* senitnel - end of output args */ );
     1409
    14091410        if( success )
    14101411            tr_inf( "%s", _( "Disallowing desktop hibernation" ) );
     
    14801481maybeInhibitHibernation( TrCore * core )
    14811482{
    1482     /* inhibit if it's enabled *AND* all the torrents are paused */
    1483     const gboolean inhibit = pref_flag_get( PREF_KEY_INHIBIT_HIBERNATION )
    1484                           && ( tr_core_get_active_torrent_count( core ) == 0 );
    1485 
    1486     tr_core_set_hibernation_allowed( core, !inhibit );
     1483    /* hibernation is allowed if EITHER
     1484     * (a) the "inhibit" pref is turned off OR
     1485     * (b) there aren't any active torrents */
     1486    const gboolean hibernation_allowed = !pref_flag_get( PREF_KEY_INHIBIT_HIBERNATION )
     1487                                      || !tr_core_get_active_torrent_count( core );
     1488    tr_core_set_hibernation_allowed( core, hibernation_allowed );
    14871489}
    14881490
Note: See TracChangeset for help on using the changeset viewer.