rpms/gnome-power-manager/devel gpm-fix-buttons.patch, NONE, 1.1 gnome-power-manager.spec, 1.132, 1.133

Richard Hughes rhughes at fedoraproject.org
Fri Oct 24 11:15:23 UTC 2008


Author: rhughes

Update of /cvs/pkgs/rpms/gnome-power-manager/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32250

Modified Files:
	gnome-power-manager.spec 
Added Files:
	gpm-fix-buttons.patch 
Log Message:
* Fri Oct 24 2008 Richard Hughes  <rhughes at redhat.com> - 2.24.1-2
- Backport some patches from trunk to fix:
 - Duplicate buttons from X and HAL
 - Use the Sessionmanager rather than the old gnome_client_request_save
 - Ignore policy actions when the session is not active


gpm-fix-buttons.patch:

--- NEW FILE gpm-fix-buttons.patch ---
Index: src/gpm-button.c
===================================================================
--- src/gpm-button.c	(revision 3032)
+++ src/gpm-button.c	(working copy)
@@ -50,6 +50,7 @@
 	GdkScreen		*screen;
 	GdkWindow		*window;
 	GHashTable		*hash_to_hal;
+	GHashTable		*emit_x_hash;
 	gboolean		 lid_is_closed;
 	HalGManager		*hal_manager; /* remove when input events is in the kernel */
 	HalGDevicestore		*hal_devicestore;
@@ -75,6 +76,7 @@
 	guint keycode;
 	gchar *key;
 	gchar *keycode_str;
+	gpointer value;
 
 	if (xev->type != KeyPress) {
 		return GDK_FILTER_CONTINUE;
@@ -94,9 +96,17 @@
 		return GDK_FILTER_CONTINUE;
 	}
 
-	egg_debug ("Key %i mapped to HAL key %s", keycode, key);
+	egg_debug ("Key %i mapped to key %s", keycode, key);
 	g_signal_emit (button, signals [BUTTON_PRESSED], 0, key);
 
+	/* As we are watching HAL and X, potentially we could get notified about
+	 * the same button press twice.
+	 * Keep a list of buttons seen in X, so we can filter then from the
+	 * HAL signal emission */
+	value = g_hash_table_lookup (button->priv->emit_x_hash, (gpointer) key);
+	if (value == NULL)
+		g_hash_table_insert (button->priv->emit_x_hash, (gpointer) g_strdup (key), GINT_TO_POINTER(1));
+
 	return GDK_FILTER_REMOVE;
 }
 
@@ -261,6 +271,7 @@
 	gchar *type = NULL;
 	gboolean state;
 	const char *atype;
+	gpointer value;
 
 	g_return_if_fail (device != NULL);
 	g_return_if_fail (details != NULL);
@@ -309,17 +320,17 @@
 		button->priv->lid_is_closed = FALSE;
 	}
 
-	/* the names changed in 0.5.8 */
-	if (strcmp (type, GPM_BUTTON_BRIGHT_UP_DEP) == 0) {
-		atype = GPM_BUTTON_BRIGHT_UP;
-	} else if (strcmp (type, GPM_BUTTON_BRIGHT_DOWN_DEP) == 0) {
-		atype = GPM_BUTTON_BRIGHT_DOWN;
+	/* have we already got this from X? */
+	value = g_hash_table_lookup (button->priv->emit_x_hash, (gpointer) atype);
+	if (value != NULL) {
+		egg_debug ("avoiding duplicate key, as already shown in X");
+		goto out;
 	}
 
 	/* we now emit all buttons, even the ones we don't know */
 	egg_debug ("emitting button-pressed : %s", atype);
 	g_signal_emit (button, signals [BUTTON_PRESSED], 0, atype);
-
+out:
 	g_free (type);
 }
 
@@ -480,6 +491,7 @@
 	button->priv->window = gdk_screen_get_root_window (button->priv->screen);
 
 	button->priv->hash_to_hal = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+	button->priv->emit_x_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
 
 	button->priv->lid_is_closed = FALSE;
 
@@ -537,6 +549,7 @@
 	g_object_unref (button->priv->hal_devicestore);
 
 	g_hash_table_unref (button->priv->hash_to_hal);
+	g_hash_table_unref (button->priv->emit_x_hash);
 
 	G_OBJECT_CLASS (gpm_button_parent_class)->finalize (object);
 }
Index: src/gpm-manager.c
===================================================================
--- src/gpm-manager.c	(revision 3032)
+++ src/gpm-manager.c	(working copy)
@@ -43,6 +43,8 @@
 #include <libhal-gpower.h>
 #include <libhal-gmanager.h>
 
+#include "egg-console-kit.h"
+
 #include "gpm-ac-adapter.h"
 #include "gpm-button.h"
 #include "gpm-conf.h"
@@ -77,6 +79,10 @@
 #define GPM_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_MANAGER, GpmManagerPrivate))
 #define GPM_MANAGER_RECALL_DELAY		1000*10
 
+#define GPM_SESSION_MANAGER_SERVICE	"org.gnome.SessionManager"
+#define GPM_SESSION_MANAGER_INTERFACE	"org.gnome.SessionManager"
+#define GPM_SESSION_MANAGER_PATH	"/org/gnome/SessionManager"
+
 struct GpmManagerPrivate
 {
 	GpmAcAdapter		*ac_adapter;
@@ -98,6 +104,7 @@
 
 	/* interactive services */
 	GpmBacklight		*backlight;
+	EggConsoleKit		*console;
 	GpmSrvBrightnessKbd	*srv_brightness_kbd;
 	GpmSrvScreensaver 	*srv_screensaver;
 };
@@ -413,6 +420,34 @@
 }
 
 /**
+ * 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 +495,7 @@
 	} 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);
 	}
@@ -799,6 +832,12 @@
 		 GpmIdleMode mode,
 		 GpmManager *manager)
 {
+	/* ConsoleKit says we are not on active console */
+	if (!egg_console_kit_is_active (manager->priv->console)) {
+		egg_debug ("ignoring as not on active console");
+		return;
+	}
+
 	/* Ignore timeout events when the lid is closed, as the DPMS is
 	 * already off, and we don't want to perform policy actions or re-enable
 	 * the screen when the user moves the mouse on systems that do not
@@ -960,6 +999,12 @@
 {
 	egg_debug ("Button press event type=%s", type);
 
+	/* ConsoleKit says we are not on active console */
+	if (!egg_console_kit_is_active (manager->priv->console)) {
+		egg_debug ("ignoring as not on active console");
+		return;
+	}
+
 	if (strcmp (type, GPM_BUTTON_POWER) == 0) {
 		power_button_pressed (manager);
 
@@ -999,6 +1044,12 @@
 	gboolean event_when_closed;
 	gboolean power_save;
 
+	/* ConsoleKit says we are not on active console */
+	if (!egg_console_kit_is_active (manager->priv->console)) {
+		egg_debug ("ignoring as not on active console");
+		return;
+	}
+
 	egg_debug ("Setting on-ac: %d", on_ac);
 
 	gpm_manager_sync_policy_sleep (manager);
@@ -1644,6 +1695,16 @@
 }
 
 /**
+ * gpm_manager_console_kit_active_changed_cb:
+ **/
+static void
+gpm_manager_console_kit_active_changed_cb (EggConsoleKit *console, gboolean active, GpmManager *manager)
+{
+	egg_debug ("console now %s", active ? "active" : "inactive");
+	/* FIXME: do we need to do policy actions when we switch? */
+}
+
+/**
  * gpm_manager_init:
  * @manager: This class instance
  **/
@@ -1664,6 +1725,11 @@
 	/* do some actions even when killed */
 	g_atexit (gpm_manager_at_exit);
 
+	/* don't apply policy when not active */
+	manager->priv->console = egg_console_kit_new ();
+	g_signal_connect (manager->priv->console, "active-changed",
+			  G_CALLBACK (gpm_manager_console_kit_active_changed_cb), manager);
+
 	/* this is a singleton, so we keep a master copy open here */
 	manager->priv->prefs_server = gpm_prefs_server_new ();
 
@@ -1831,6 +1897,7 @@
 	g_object_unref (manager->priv->srv_screensaver);
 	g_object_unref (manager->priv->prefs_server);
 	g_object_unref (manager->priv->control);
+	g_object_unref (manager->priv->console);
 
 	/* optional gobjects */
 	if (manager->priv->button) {
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 3032)
+++ src/Makefile.am	(working copy)
@@ -139,6 +139,8 @@
 	egg-color.h					\
 	egg-debug.h					\
 	egg-debug.c					\
+	egg-console-kit.h				\
+	egg-console-kit.c				\
 	gpm-dpms.h					\
 	gpm-dpms.c					\
 	gpm-notify.h					\
--- /dev/null	2008-10-24 09:29:42.373333065 +0100
+++ src/egg-console-kit.h	2008-10-24 11:52:44.000000000 +0100
@@ -0,0 +1,61 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EGG_CONSOLE_KIT_H
+#define __EGG_CONSOLE_KIT_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define EGG_TYPE_CONSOLE_KIT		(egg_console_kit_get_type ())
+#define EGG_CONSOLE_KIT(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), EGG_TYPE_CONSOLE_KIT, EggConsoleKit))
+#define EGG_CONSOLE_KIT_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), EGG_TYPE_CONSOLE_KIT, EggConsoleKitClass))
+#define EGG_IS_CONSOLE_KIT(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), EGG_TYPE_CONSOLE_KIT))
+#define EGG_IS_CONSOLE_KIT_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), EGG_TYPE_CONSOLE_KIT))
+#define EGG_CONSOLE_KIT_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), EGG_TYPE_CONSOLE_KIT, EggConsoleKitClass))
+#define EGG_CONSOLE_KIT_ERROR		(egg_console_kit_error_quark ())
+#define EGG_CONSOLE_KIT_TYPE_ERROR	(egg_console_kit_error_get_type ())
+
+typedef struct EggConsoleKitPrivate EggConsoleKitPrivate;
+
+typedef struct
+{
+	 GObject		 parent;
+	 EggConsoleKitPrivate	*priv;
+} EggConsoleKit;
+
+typedef struct
+{
+	GObjectClass	parent_class;
+	void		(* active_changed)		(EggConsoleKit	*console,
+							 gboolean	 active);
+} EggConsoleKitClass;
+
+GType		 egg_console_kit_get_type	  	(void) G_GNUC_CONST;
+EggConsoleKit	*egg_console_kit_new			(void);
+gboolean	 egg_console_kit_is_local		(EggConsoleKit	*console);
+gboolean	 egg_console_kit_is_active		(EggConsoleKit	*console);
+
+G_END_DECLS
+
+#endif /* __EGG_CONSOLE_KIT_H */
+
--- /dev/null	2008-10-24 09:29:42.373333065 +0100
+++ src/egg-console-kit.c	2008-10-24 11:52:42.000000000 +0100
@@ -0,0 +1,249 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2006-2008 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <glib.h>
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus.h>
+
+#include "egg-debug.h"
+#include "egg-console-kit.h"
+
+static void     egg_console_kit_class_init	(EggConsoleKitClass	*klass);
+static void     egg_console_kit_init		(EggConsoleKit		*console_kit);
+static void     egg_console_kit_finalize	(GObject		*object);
+
+#define EGG_CONSOLE_KIT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EGG_TYPE_CONSOLE_KIT, EggConsoleKitPrivate))
+
+#define CONSOLEKIT_NAME			"org.freedesktop.ConsoleKit"
+#define CONSOLEKIT_PATH			"/org/freedesktop/ConsoleKit"
+#define CONSOLEKIT_INTERFACE		"org.freedesktop.ConsoleKit"
+
+#define CONSOLEKIT_MANAGER_PATH	 	"/org/freedesktop/ConsoleKit/Manager"
+#define CONSOLEKIT_MANAGER_INTERFACE    "org.freedesktop.ConsoleKit.Manager"
+#define CONSOLEKIT_SEAT_INTERFACE       "org.freedesktop.ConsoleKit.Seat"
+#define CONSOLEKIT_SESSION_INTERFACE    "org.freedesktop.ConsoleKit.Session"
+
+struct EggConsoleKitPrivate
+{
+	DBusGConnection		*connection;
+	DBusGProxy		*proxy_manager;
+	DBusGProxy		*proxy_session;
+	gchar			*session_id;
+};
+
+enum {
+	EGG_CONSOLE_KIT_ACTIVE_CHANGED,
+	EGG_CONSOLE_KIT_LAST_SIGNAL
+};
+
+static guint signals [EGG_CONSOLE_KIT_LAST_SIGNAL] = { 0 };
+G_DEFINE_TYPE (EggConsoleKit, egg_console_kit, G_TYPE_OBJECT)
+
+/**
+ * egg_console_kit_is_local:
+ *
+ * Return value: Returns whether the session is local
+ **/
+gboolean
+egg_console_kit_is_local (EggConsoleKit *console)
+{
+	gboolean ret;
+	gboolean value = FALSE;
+	GError *error = NULL;
+
+	g_return_val_if_fail (EGG_IS_CONSOLE_KIT (console), FALSE);
+	g_return_val_if_fail (console->priv->proxy_session != NULL, FALSE);
+
+	/* is our session local */
+	ret = dbus_g_proxy_call (console->priv->proxy_session, "IsLocal", &error, G_TYPE_INVALID,
+				 G_TYPE_BOOLEAN, &value, G_TYPE_INVALID);
+	if (!ret) {
+		g_warning ("IsLocal failed: %s", error->message);
+		g_error_free (error);
+		goto out;
+	}
+
+	/* return value only if we successed */
+	ret = value;
+out:
+	return ret;
+}
+
+/**
+ * egg_console_kit_is_active:
+ *
+ * Return value: Returns whether the session is active on the Seat that it is attached to.
+ **/
+gboolean
+egg_console_kit_is_active (EggConsoleKit *console)
+{
+	gboolean ret = FALSE;
+	gboolean value = FALSE;
+	GError *error = NULL;
+
+	g_return_val_if_fail (EGG_IS_CONSOLE_KIT (console), FALSE);
+	g_return_val_if_fail (console->priv->proxy_session != NULL, FALSE);
+
+	/* is our session active */
+	ret = dbus_g_proxy_call (console->priv->proxy_session, "IsActive", &error, G_TYPE_INVALID,
+				 G_TYPE_BOOLEAN, &value, G_TYPE_INVALID);
+	if (!ret) {
+		g_warning ("IsActive failed: %s", error->message);
+		g_error_free (error);
+		goto out;
+	}
+
+	/* return value only if we successed */
+	ret = value;
+out:
+	return ret;
+}
+
+/**
+ * egg_console_kit_active_changed_cb:
+ **/
+static void
+egg_console_kit_active_changed_cb (DBusGProxy *proxy, gboolean active, EggConsoleKit *console)
+{
+	egg_debug ("emitting active: %i", active);
+	g_signal_emit (console, signals [EGG_CONSOLE_KIT_ACTIVE_CHANGED], 0, active);
+}
+
+/**
+ * egg_console_kit_class_init:
+ * @klass: The EggConsoleKitClass
+ **/
+static void
+egg_console_kit_class_init (EggConsoleKitClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	object_class->finalize = egg_console_kit_finalize;
+	g_type_class_add_private (klass, sizeof (EggConsoleKitPrivate));
+	signals [EGG_CONSOLE_KIT_ACTIVE_CHANGED] =
+		g_signal_new ("active-changed",
+			      G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
+			      G_STRUCT_OFFSET (EggConsoleKitClass, active_changed),
+			      NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN,
+			      G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
+}
+
+/**
+ * egg_console_kit_init:
+ **/
+static void
+egg_console_kit_init (EggConsoleKit *console)
+{
+	gboolean ret;
+	GError *error = NULL;
+	guint32 pid;
+
+	console->priv = EGG_CONSOLE_KIT_GET_PRIVATE (console);
+	console->priv->proxy_manager = NULL;
+	console->priv->session_id = NULL;
+
+	/* connect to D-Bus */
+	console->priv->connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
+	if (console->priv->connection == NULL) {
+		egg_warning ("Failed to connect to the D-Bus daemon: %s", error->message);
+		g_error_free (error);
+		goto out;
+	}
+
+	/* connect to ConsoleKit */
+	console->priv->proxy_manager =
+		dbus_g_proxy_new_for_name (console->priv->connection, CONSOLEKIT_NAME,
+					   CONSOLEKIT_MANAGER_PATH, CONSOLEKIT_MANAGER_INTERFACE);
+	if (console->priv->proxy_manager == NULL) {
+		egg_warning ("cannot connect to ConsoleKit");
+		goto out;
+	}
+
+	/* get the session we are running in */
+	pid = getpid ();
+	ret = dbus_g_proxy_call (console->priv->proxy_manager, "GetSessionForUnixProcess", &error,
+				 G_TYPE_UINT, pid,
+				 G_TYPE_INVALID,
+				 DBUS_TYPE_G_OBJECT_PATH, &console->priv->session_id,
+				 G_TYPE_INVALID);
+	if (!ret) {
+		egg_warning ("Failed to get session for pid %i: %s", pid, error->message);
+		g_error_free (error);
+		goto out;
+	}
+	egg_debug ("ConsoleKit session ID: %s", console->priv->session_id);
+
+	/* connect to session */
+	console->priv->proxy_session =
+		dbus_g_proxy_new_for_name (console->priv->connection, CONSOLEKIT_NAME,
+					   console->priv->session_id, CONSOLEKIT_SESSION_INTERFACE);
+	if (console->priv->proxy_session == NULL) {
+		egg_warning ("cannot connect to: %s", console->priv->session_id);
+		goto out;
+	}
+	dbus_g_proxy_add_signal (console->priv->proxy_session, "ActiveChanged", G_TYPE_BOOLEAN, G_TYPE_INVALID);
+	dbus_g_proxy_connect_signal (console->priv->proxy_session, "ActiveChanged",
+				     G_CALLBACK (egg_console_kit_active_changed_cb), console, NULL);
+
+out:
+	return;
+}
+
+/**
+ * egg_console_kit_finalize:
+ * @object: The object to finalize
+ **/
+static void
+egg_console_kit_finalize (GObject *object)
+{
+	EggConsoleKit *console;
+
+	g_return_if_fail (EGG_IS_CONSOLE_KIT (object));
+
+	console = EGG_CONSOLE_KIT (object);
+
+	g_return_if_fail (console->priv != NULL);
+	if (console->priv->proxy_manager != NULL)
+		g_object_unref (console->priv->proxy_manager);
+	if (console->priv->proxy_session != NULL)
+		g_object_unref (console->priv->proxy_session);
+	g_free (console->priv->session_id);
+
+	G_OBJECT_CLASS (egg_console_kit_parent_class)->finalize (object);
+}
+
+/**
+ * egg_console_kit_new:
+ *
+ * Return value: a new EggConsoleKit object.
+ **/
+EggConsoleKit *
+egg_console_kit_new (void)
+{
+	EggConsoleKit *console;
+	console = g_object_new (EGG_TYPE_CONSOLE_KIT, NULL);
+	return EGG_CONSOLE_KIT (console);
+}
+


Index: gnome-power-manager.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-power-manager/devel/gnome-power-manager.spec,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -r1.132 -r1.133
--- gnome-power-manager.spec	22 Oct 2008 11:52:00 -0000	1.132
+++ gnome-power-manager.spec	24 Oct 2008 11:14:51 -0000	1.133
@@ -5,13 +5,16 @@
 Summary: GNOME Power Manager
 Name: gnome-power-manager
 Version: 2.24.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+ and GFDL
 Group: Applications/System
 Source: http://download.gnome.org/sources/gnome-power-manager/2.24/gnome-power-manager-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 URL: http://www.gnome.org/projects/gnome-power-manager/
 
+# Backported from trunk
+Patch0:    gpm-fix-buttons.patch
+
 BuildRequires: libgnomeui-devel
 BuildRequires: libglade2-devel
 BuildRequires: libwnck-devel
@@ -50,6 +53,7 @@
 
 %prep
 %setup -q
+%patch0 -p0
 
 %build
 %configure \
@@ -154,6 +158,12 @@
 %{_datadir}/gnome-2.0/ui/GNOME_InhibitApplet.xml
 
 %changelog
+* Fri Oct 24 2008 Richard Hughes  <rhughes at redhat.com> - 2.24.1-2
+- Backport some patches from trunk to fix:
+ - Duplicate buttons from X and HAL
+ - Use the Sessionmanager rather than the old gnome_client_request_save
+ - Ignore policy actions when the session is not active
+
 * Wed Oct 22 2008 Richard Hughes  <rhughes at redhat.com> - 2.24.1-1
 - Update to 2.24.1
 




More information about the fedora-extras-commits mailing list