mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
(gtk) #1073: Too many queries to disable Desktop hibernation
This commit is contained in:
parent
857cf6ad00
commit
deca1f60ff
1 changed files with 8 additions and 2 deletions
|
@ -60,6 +60,7 @@ struct TrCorePrivate
|
|||
#endif
|
||||
gboolean inhibit_allowed;
|
||||
gboolean have_inhibit_cookie;
|
||||
gboolean dbus_error;
|
||||
guint inhibit_cookie;
|
||||
GtkTreeModel * model;
|
||||
tr_handle * handle;
|
||||
|
@ -1011,9 +1012,14 @@ tr_core_set_hibernation_allowed( TrCore * core, gboolean allowed )
|
|||
core->priv->have_inhibit_cookie = FALSE;
|
||||
}
|
||||
|
||||
if( !allowed && !core->priv->have_inhibit_cookie )
|
||||
if( !allowed &&
|
||||
!core->priv->have_inhibit_cookie &&
|
||||
!core->priv->dbus_error )
|
||||
{
|
||||
core->priv->have_inhibit_cookie = gtr_inhibit_hibernation( &core->priv->inhibit_cookie );
|
||||
if( gtr_inhibit_hibernation( &core->priv->inhibit_cookie ) )
|
||||
core->priv->have_inhibit_cookie = TRUE;
|
||||
else
|
||||
core->priv->dbus_error = TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue