Hello community, here is the log from the commit of package gnome-power-manager checked in at Tue Nov 25 16:18:20 CET 2008. -------- --- GNOME/gnome-power-manager/gnome-power-manager.changes 2008-11-07 16:58:05.000000000 +0100 +++ /mounts/work_src_done/STABLE/gnome-power-manager/gnome-power-manager.changes 2008-11-25 12:32:50.000000000 +0100 @@ -1,0 +2,7 @@ +Tue Nov 25 12:29:54 CET 2008 - hmacht@suse.de + +- gnome-power-manager-bnc446595-shutdown-dialog.patch: Use the + shutdown menu when power button is pressed instead of the logout + menu (bnc#446595) + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- gnome-power-manager-bnc446595-shutdown-dialog.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnome-power-manager.spec ++++++ --- /var/tmp/diff_new_pack.Z10207/_old 2008-11-25 16:18:07.000000000 +0100 +++ /var/tmp/diff_new_pack.Z10207/_new 2008-11-25 16:18:07.000000000 +0100 @@ -26,7 +26,7 @@ BuildRequires: libnotify-devel libwnck-devel notification-daemon BuildRequires: scrollkeeper update-desktop-files xmlto Version: 2.24.1 -Release: 5 +Release: 6 Url: http://gnome-power.sourceforge.net/ Group: System/GUI/GNOME License: GPL v2 or later @@ -37,6 +37,7 @@ Patch: gnome-power-manager-desktop.patch # PATCH-FIX-UPSTREAM gnome-power-manager-pk-sensitive.patch bnc435768 bgo558670 vuntz@novell.com -- Make defaults is not sensitive Patch1: gnome-power-manager-pk-sensitive.patch +Patch2: gnome-power-manager-bnc446595-shutdown-dialog.patch # PATCH-FIX-OPENSUSE gpm-zh_CN-translation.patch Patch8: gpm-zh_CN-translation.patch # PATCH-FEATURE-OPENSUSE gnome-power-manager-system-policy.patch -- acquire Policy Power interface @@ -116,6 +117,7 @@ #gnome-patch-translation-prepare %patch %patch1 -p1 +%patch2 -p1 # FIXME: patch8 doesn't apply. A Chinese speaker should determine whether we # want to keep our translation from previous versons of gnome-power-manager or # to use the one that now comes out of the box. @@ -189,6 +191,10 @@ %files lang -f %{name}.lang %changelog +* Tue Nov 25 2008 hmacht@suse.de +- gnome-power-manager-bnc446595-shutdown-dialog.patch: Use the + shutdown menu when power button is pressed instead of the logout + menu (bnc#446595) * Fri Nov 07 2008 vuntz@novell.com - Update gnome-power-manager-notify-idle-sleep.patch: better strings, and use a default compatible for upstream (will change ++++++ gnome-power-manager-bnc446595-shutdown-dialog.patch ++++++ Index: gnome-power-manager-2.24.1/src/gpm-manager.c =================================================================== --- gnome-power-manager-2.24.1.orig/src/gpm-manager.c +++ gnome-power-manager-2.24.1/src/gpm-manager.c @@ -74,6 +74,10 @@ static void gpm_manager_class_init ( static void gpm_manager_init (GpmManager *manager); static void gpm_manager_finalize (GObject *object); +#define GPM_SESSION_MANAGER_SERVICE "org.gnome.SessionManager" +#define GPM_SESSION_MANAGER_INTERFACE "org.gnome.SessionManager" +#define GPM_SESSION_MANAGER_PATH "/org/gnome/SessionManager" + #define GPM_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_MANAGER, GpmManagerPrivate)) #define GPM_MANAGER_RECALL_DELAY 1000*10 @@ -413,6 +417,34 @@ gpm_manager_action_hibernate (GpmManager } /** + * gpm_manager_logout_interactive: + **/ +static gboolean +gpm_manager_logout_interactive (GpmManager *manager) +{ + GError *error = NULL; + DBusGProxy *proxy; + DBusGConnection *connection; + + /* get session connection */ + connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error); + if (connection == NULL) { + egg_warning ("failed to do interactive shutdown: %s", error->message); + g_error_free (error); + return FALSE; + } + + /* contact the session manager */ + proxy = dbus_g_proxy_new_for_name (connection, GPM_SESSION_MANAGER_SERVICE, + GPM_SESSION_MANAGER_PATH, GPM_SESSION_MANAGER_INTERFACE); + + /* we have to use no reply, as the SM calls into g-p-m to get the can_suspend property */ + dbus_g_proxy_call_no_reply (proxy, "Shutdown", G_TYPE_INVALID); + g_object_unref (proxy); + return TRUE; +} + +/** * manager_policy_do: * @manager: This class instance * @policy: The policy that we should do, e.g. "suspend" @@ -460,9 +492,8 @@ manager_policy_do (GpmManager *manager, } else if (strcmp (action, ACTION_INTERACTIVE) == 0) { gpm_info_explain_reason (manager->priv->info, GPM_EVENT_NOTIFICATION, _("GNOME interactive logout."), reason); - gnome_client_request_save (gnome_master_client (), - GNOME_SAVE_GLOBAL, - TRUE, GNOME_INTERACT_ANY, FALSE, TRUE); + gpm_manager_logout_interactive (manager); + } else { egg_warning ("unknown action %s", action); } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org