Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:zhy20120210:failed_1
gnome-packagekit
gnome-packagekit-fate306966.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gnome-packagekit-fate306966.patch of Package gnome-packagekit
diff --git a/src/gpk-inhibit.c b/src/gpk-inhibit.c index e40ef5f..412e9fc 100644 --- a/src/gpk-inhibit.c +++ b/src/gpk-inhibit.c @@ -47,13 +47,13 @@ static void gpk_inhibit_finalize (GObject *object); #define GPK_INHIBIT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPK_TYPE_INHIBIT, GpkInhibitPrivate)) -#define GPM_DBUS_SERVICE "org.freedesktop.PowerManagement" -#define GPM_DBUS_PATH_INHIBIT "/org/freedesktop/PowerManagement/Inhibit" -#define GPM_DBUS_INTERFACE_INHIBIT "org.freedesktop.PowerManagement.Inhibit" +#define GS_DBUS_SERVICE "org.gnome.SessionManager" +#define GS_DBUS_PATH_INHIBIT "/org/gnome/SessionManager" +#define GS_DBUS_INTERFACE_INHIBIT "org.gnome.SessionManager" struct GpkInhibitPrivate { - DBusGProxy *proxy_gpm; + DBusGProxy *proxy; guint cookie; }; @@ -82,8 +82,8 @@ gpk_inhibit_create (GpkInhibit *inhibit) g_return_val_if_fail (PK_IS_INHIBIT (inhibit), FALSE); - if (inhibit->priv->proxy_gpm == NULL) { - egg_debug ("no connection to g-p-m"); + if (inhibit->priv->proxy == NULL) { + egg_debug ("no connection to gnome-session"); return FALSE; } @@ -94,11 +94,12 @@ gpk_inhibit_create (GpkInhibit *inhibit) } /* coldplug the battery state */ - ret = dbus_g_proxy_call (inhibit->priv->proxy_gpm, "Inhibit", &error, - /* TRANSLATORS: the program name that inhibited the suspend */ - G_TYPE_STRING, _("Software Update Applet"), + ret = dbus_g_proxy_call (inhibit->priv->proxy, "Inhibit", &error, + G_TYPE_STRING, "gpk-update-icon", /* app-id */ + G_TYPE_UINT, 0, /* xid */ /* TRANSLATORS: the reason why we've inhibited it */ - G_TYPE_STRING, _("A transaction that cannot be interrupted is running"), + G_TYPE_STRING, _("A transaction that cannot be interrupted is running"), /* reason */ + G_TYPE_UINT, 7, /* flags */ G_TYPE_INVALID, G_TYPE_UINT, &inhibit->priv->cookie, G_TYPE_INVALID); @@ -120,8 +121,8 @@ gpk_inhibit_remove (GpkInhibit *inhibit) g_return_val_if_fail (PK_IS_INHIBIT (inhibit), FALSE); - if (inhibit->priv->proxy_gpm == NULL) { - egg_debug ("no connection to g-p-m"); + if (inhibit->priv->proxy == NULL) { + egg_debug ("no connection to gnome-session"); return FALSE; } @@ -132,7 +133,7 @@ gpk_inhibit_remove (GpkInhibit *inhibit) } /* coldplug the battery state */ - ret = dbus_g_proxy_call (inhibit->priv->proxy_gpm, "UnInhibit", &error, + ret = dbus_g_proxy_call (inhibit->priv->proxy, "Uninhibit", &error, G_TYPE_UINT, inhibit->priv->cookie, G_TYPE_INVALID, G_TYPE_INVALID); @@ -164,12 +165,12 @@ gpk_inhibit_init (GpkInhibit *inhibit) return; } - /* use gnome-power-manager for the session inhibit stuff */ - inhibit->priv->proxy_gpm = dbus_g_proxy_new_for_name_owner (connection, - GPM_DBUS_SERVICE, GPM_DBUS_PATH_INHIBIT, - GPM_DBUS_INTERFACE_INHIBIT, &error); + /* use gnome-session for the session inhibit stuff */ + inhibit->priv->proxy = dbus_g_proxy_new_for_name_owner (connection, + GS_DBUS_SERVICE, GS_DBUS_PATH_INHIBIT, + GS_DBUS_INTERFACE_INHIBIT, &error); if (error != NULL) { - egg_warning ("Cannot connect to gnome-power-manager: %s", error->message); + egg_warning ("Cannot connect to gnome-session: %s", error->message); g_error_free (error); } } @@ -188,7 +189,7 @@ gpk_inhibit_finalize (GObject *object) inhibit = GPK_INHIBIT (object); g_return_if_fail (inhibit->priv != NULL); - g_object_unref (inhibit->priv->proxy_gpm); + g_object_unref (inhibit->priv->proxy); G_OBJECT_CLASS (gpk_inhibit_parent_class)->finalize (object); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor