rpms/gnome-power-manager/devel gnome-power-manager-2.20.0-fix-idle-pm-actions.patch, NONE, 1.1 gnome-power-manager.spec, 1.101, 1.102
David Zeuthen (davidz)
fedora-extras-commits at redhat.com
Tue Oct 16 20:51:30 UTC 2007
Author: davidz
Update of /cvs/pkgs/rpms/gnome-power-manager/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24885
Modified Files:
gnome-power-manager.spec
Added Files:
gnome-power-manager-2.20.0-fix-idle-pm-actions.patch
Log Message:
* Tue Oct 16 2007 David Zeuthen <davidz at redhat.com> - 2.20.0-6
- When hibernate is triggered by system idle, avoid suspending
right after resuming from hibernate (#329541)
gnome-power-manager-2.20.0-fix-idle-pm-actions.patch:
--- NEW FILE gnome-power-manager-2.20.0-fix-idle-pm-actions.patch ---
--- gnome-power-manager-2.20.0.orig/src/gpm-manager.c (revision 2529)
+++ gnome-power-manager-2.20.0/src/gpm-manager.c (working copy)
@@ -747,6 +747,7 @@
gboolean on_ac;
gchar *action = NULL;
gboolean ret;
+ GError *error = NULL;
/* find if we are on AC power */
on_ac = gpm_ac_adapter_is_present (manager->priv->ac_adapter);
@@ -768,24 +769,30 @@
} else if (strcmp (action, ACTION_SUSPEND) == 0) {
gpm_info_explain_reason (manager->priv->info, GPM_EVENT_SUSPEND,
_("Suspending computer"), _("System idle"));
- ret = gpm_control_suspend (manager->priv->control, NULL);
+ ret = gpm_control_suspend (manager->priv->control, &error);
if (ret == FALSE) {
- gpm_warning ("cannot suspend, so trying hibernate");
- ret = gpm_control_hibernate (manager->priv->control, NULL);
+ gpm_warning ("cannot suspend (error: %s), so trying hibernate", error->message);
+ g_error_free (error);
+ error = NULL;
+ ret = gpm_control_hibernate (manager->priv->control, &error);
if (ret == FALSE) {
- gpm_warning ("cannot suspend or hibernate!");
+ gpm_warning ("cannot suspend or hibernate: %s", error->message);
+ g_error_free (error);
}
}
} else if (strcmp (action, ACTION_HIBERNATE) == 0) {
gpm_info_explain_reason (manager->priv->info, GPM_EVENT_HIBERNATE,
_("Hibernating computer"), _("System idle"));
- ret = gpm_control_hibernate (manager->priv->control, NULL);
+ ret = gpm_control_hibernate (manager->priv->control, &error);
if (ret == FALSE) {
- gpm_warning ("cannot hibernate, so trying suspend");
- ret = gpm_control_suspend (manager->priv->control, NULL);
+ gpm_warning ("cannot hibernate (error: %s), so trying suspend", error->message);
+ g_error_free (error);
+ error = NULL;
+ ret = gpm_control_suspend (manager->priv->control, &error);
if (ret == FALSE) {
- gpm_warning ("cannot suspend or hibernate!");
+ gpm_warning ("cannot suspend or hibernate: %s", error->message);
+ g_error_free (error);
}
}
}
Index: gnome-power-manager.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-power-manager/devel/gnome-power-manager.spec,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -r1.101 -r1.102
--- gnome-power-manager.spec 7 Oct 2007 01:36:08 -0000 1.101
+++ gnome-power-manager.spec 16 Oct 2007 20:50:57 -0000 1.102
@@ -5,7 +5,7 @@
Summary: GNOME Power Manager
Name: gnome-power-manager
Version: 2.20.0
-Release: 5%{?dist}
+Release: 6%{?dist}
License: GPLv2+ and GFDL+
Group: Applications/System
Source: http://download.gnome.org/sources/gnome-power-manager/2.20/gnome-power-manager-%{version}.tar.bz2
@@ -14,6 +14,8 @@
# https://bugzilla.redhat.com/show_bug.cgi?id=312761
Patch1: gnome-power-manager-2.20.0-expected-return-types.patch
Patch2: gnome-power-manager-2.20.0-use-gerror.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=329541
+Patch3: gnome-power-manager-2.20.0-fix-idle-pm-actions.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
URL: http://gnome-power.sourceforge.net/
BuildPrereq: libgnomeui-devel
@@ -52,6 +54,7 @@
%patch0 -p1 -b .no-background
%patch1 -p1 -b .expected-return-types
%patch2 -p1 -b .use-gerror
+%patch3 -p1 -b .fix-idle-pm-actions
%build
%configure \
@@ -126,6 +129,10 @@
%{_datadir}/gnome-2.0/ui/GNOME_InhibitApplet.xml
%changelog
+* Tue Oct 16 2007 David Zeuthen <davidz at redhat.com> - 2.20.0-6
+- When hibernate is triggered by system idle, avoid suspending
+ right after resuming from hibernate (#329541)
+
* Sat Oct 6 2007 Matthias Clasen <mclasen at redhat.com> - 2.20.0-5
- Fix a thinko in the previous patch (#321671)
More information about the fedora-extras-commits
mailing list