1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

(gtk) #1073: Too many queries to disable Desktop hibernation

This commit is contained in:
Charles Kerr 2008-07-06 00:56:19 +00:00
parent 857cf6ad00
commit deca1f60ff

View file

@ -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
}