[gnome-power-manager/f15/master] Fix #679083

Matthias Clasen mclasen at fedoraproject.org
Tue May 3 16:07:29 UTC 2011


commit 4d11e62ed87fdc4f434db1cf4ef123ee8a4123ca
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Tue May 3 12:07:15 2011 -0400

    Fix #679083

 ...-idle-manually-update-the-status-property.patch |   33 ++++++++++++++++++++
 gnome-power-manager.spec                           |    9 +++++-
 2 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/0001-gpm-idle-manually-update-the-status-property.patch b/0001-gpm-idle-manually-update-the-status-property.patch
new file mode 100644
index 0000000..13cbdee
--- /dev/null
+++ b/0001-gpm-idle-manually-update-the-status-property.patch
@@ -0,0 +1,33 @@
+From 09185d4247656ff37bcbbcffe013c4d038603f2b Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Mon, 2 May 2011 19:18:58 -0400
+Subject: [PATCH] gpm-idle: manually update the status property
+
+gnome-session doesn't emit PropertyChanged since it uses dbus-glib,
+therefore we need to manually update the cached property when
+receiving a SessionChanged signal.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=679083
+---
+ src/gpm-idle.c |    5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/src/gpm-idle.c b/src/gpm-idle.c
+index 04225fc..0f2f1ee 100644
+--- a/src/gpm-idle.c
++++ b/src/gpm-idle.c
+@@ -424,6 +424,11 @@ gpm_idle_dbus_signal_cb (GDBusProxy *proxy, const gchar *sender_name, const gcha
+ 		return;
+ 	}
+ 	if (g_strcmp0 (signal_name, "StatusChanged") == 0) {
++                guint status;
++
++                g_variant_get (parameters, "(u)", &status);
++                g_dbus_proxy_set_cached_property (proxy, "status",
++                                                  g_variant_new ("u", status));
+ 		g_debug ("Received gnome session status change");
+ 		gpm_idle_evaluate (idle);
+ 		return;
+-- 
+1.7.5
+
diff --git a/gnome-power-manager.spec b/gnome-power-manager.spec
index 9c3d6a1..e0839ae 100644
--- a/gnome-power-manager.spec
+++ b/gnome-power-manager.spec
@@ -1,12 +1,15 @@
 Summary: GNOME power management service
 Name: gnome-power-manager
 Version: 3.0.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+ and GFDL
 Group: Applications/System
 Source: http://download.gnome.org/sources/gnome-power-manager/2.91/gnome-power-manager-%{version}.tar.bz2
 URL: http://projects.gnome.org/gnome-power-manager/
 
+# upstream fix
+Patch0: 0001-gpm-idle-manually-update-the-status-property.patch
+
 BuildRequires: scrollkeeper
 BuildRequires: gnome-doc-utils >= 0.3.2
 BuildRequires: desktop-file-utils
@@ -38,6 +41,7 @@ displaying icons and handling user callbacks in an interactive GNOME session.
 
 %prep
 %setup -q
+%patch0 -p1 -b .idle-status
 
 %build
 %configure --disable-scrollkeeper
@@ -93,6 +97,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 %{_sysconfdir}/xdg/autostart/*.desktop
 
 %changelog
+* Tue May  3 2011 Matthias Clasen <mclasen at redhat.com> - 3.0.0-2
+- React to session idle status changes (#679083)
+
 * Mon Apr 04 2011 Richard Hughes <rhughes at redhat.com> - 3.0.0-1
 - New upstream version.
 


More information about the scm-commits mailing list