1
0

Accepting request 235058 from home:mgorse:branches:GNOME:Factory

- Rebased gnome-settings-daemon-notify-idle-resumed.patch.
  Also fixed a crash.

OBS-URL: https://build.opensuse.org/request/show/235058
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-settings-daemon?expand=0&rev=200
This commit is contained in:
Richard Brown 2014-05-28 11:59:19 +00:00 committed by Git OBS Bridge
parent 17aece255b
commit 2f012cc045
3 changed files with 35 additions and 33 deletions

View File

@ -1,10 +1,9 @@
Index: gnome-settings-daemon-3.9.3/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
===================================================================
--- gnome-settings-daemon-3.9.3.orig/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
+++ gnome-settings-daemon-3.9.3/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
@@ -106,5 +106,10 @@
<_summary>If we should show the recalled battery warning for a broken battery</_summary>
<_description>If we should show the recalled battery warning for a broken battery. Set this to false only if you know your battery is okay.</_description>
diff -ur gnome-settings-daemon-3.12.2.orig/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in gnome-settings-daemon-3.12.2/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
--- gnome-settings-daemon-3.12.2.orig/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in 2014-05-05 08:49:57.000000000 -0500
+++ gnome-settings-daemon-3.12.2/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in 2014-05-21 15:33:58.701265397 -0500
@@ -66,5 +66,10 @@
<summary>Battery critical low action</summary>
<description>The action to take when the battery is critically low.</description>
</key>
+ <key name="notify-idle-resumed" type="b">
+ <default>true</default>
@ -13,19 +12,18 @@ Index: gnome-settings-daemon-3.9.3/data/org.gnome.settings-daemon.plugins.power.
+ </key>
</schema>
</schemalist>
Index: gnome-settings-daemon-3.9.3/plugins/power/gsd-power-manager.c
===================================================================
--- gnome-settings-daemon-3.9.3.orig/plugins/power/gsd-power-manager.c
+++ gnome-settings-daemon-3.9.3/plugins/power/gsd-power-manager.c
@@ -183,6 +183,7 @@ struct GsdPowerManagerPrivate
diff -ur gnome-settings-daemon-3.12.2.orig/plugins/power/gsd-power-manager.c gnome-settings-daemon-3.12.2/plugins/power/gsd-power-manager.c
--- gnome-settings-daemon-3.12.2.orig/plugins/power/gsd-power-manager.c 2014-05-05 09:50:10.000000000 -0500
+++ gnome-settings-daemon-3.12.2/plugins/power/gsd-power-manager.c 2014-05-21 15:56:20.240296067 -0500
@@ -144,6 +144,7 @@
NotifyNotification *notification_ups_discharging;
NotifyNotification *notification_low;
NotifyNotification *notification_sleep_warning;
NotifyNotification *notification_logout_warning;
+ NotifyNotification *notification_resumed;
GsdPowerActionType sleep_action_type;
gboolean battery_is_low; /* laptop battery low, or UPS discharging */
@@ -208,6 +209,7 @@ struct GsdPowerManagerPrivate
@@ -169,6 +170,7 @@
gboolean inhibit_suspend_taken;
guint inhibit_lid_switch_timer_id;
gboolean is_virtual_machine;
@ -33,7 +31,7 @@ Index: gnome-settings-daemon-3.9.3/plugins/power/gsd-power-manager.c
/* Idles */
GnomeIdleMonitor *idle_monitor;
@@ -2339,6 +2341,49 @@ is_session_active (GsdPowerManager *mana
@@ -1375,6 +1377,49 @@
}
static void
@ -53,7 +51,7 @@ Index: gnome-settings-daemon-3.9.3/plugins/power/gsd-power-manager.c
+ return;
+
+ /* close any existing notification of this class */
+ notify_close_if_showing (manager->priv->notification_resumed);
+ notify_close_if_showing (&manager->priv->notification_resumed);
+
+ /* create a new notification */
+ create_notification (_("System resumed from sleep"),
@ -83,27 +81,18 @@ Index: gnome-settings-daemon-3.9.3/plugins/power/gsd-power-manager.c
idle_set_mode (GsdPowerManager *manager, GsdPowerIdleMode mode)
{
gboolean ret = FALSE;
@@ -2431,6 +2476,8 @@ idle_set_mode (GsdPowerManager *manager,
@@ -1466,6 +1511,7 @@
action_type = g_settings_get_enum (manager->priv->settings,
"sleep-inactive-ac-type");
}
+
+ manager->priv->last_idle_power_action = action_type;
do_power_action_type (manager, action_type);
/* turn on screen and restore user-selected brightness level */
@@ -2477,7 +2524,6 @@ idle_set_mode (GsdPowerManager *manager,
}
manager->priv->kbd_brightness_pre_dim = -1;
}
-
}
}
@@ -3252,6 +3298,12 @@ handle_resume_actions (GsdPowerManager *
notify_close_if_showing (&manager->priv->notification_ups_discharging);
main_battery_or_ups_low_changed (manager, FALSE);
@@ -2219,6 +2265,12 @@
static void
handle_resume_actions (GsdPowerManager *manager)
{
+ if (manager->priv->last_idle_power_action == GSD_POWER_ACTION_SUSPEND ||
+ manager->priv->last_idle_power_action == GSD_POWER_ACTION_HIBERNATE)
+ show_resumed_notification (manager);
@ -113,3 +102,11 @@ Index: gnome-settings-daemon-3.9.3/plugins/power/gsd-power-manager.c
/* ensure we turn the panel back on after resume */
backlight_enable (manager);
@@ -2228,6 +2280,7 @@
/* set up the delay again */
inhibit_suspend (manager);
+
}
static void

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed May 21 20:57:44 UTC 2014 - mgorse@suse.com
- Rebased gnome-settings-daemon-notify-idle-resumed.patch.
Also fixed a crash.
-------------------------------------------------------------------
Mon May 5 15:15:59 UTC 2014 - zaitor@opensuse.org

View File

@ -47,7 +47,7 @@ Patch2: gnome-settings-daemon-system-proxy-configuration.diff
Patch10: gnome-settings-daemon-bnc462640-mute-action.patch
# PATCH-FIX-OPENSUSE gnome-settings-daemon-stop-reload-proxy-settings.patch bnc689592#c1, bnc#538353 glin@suse.com -- Stop g-s-d poping up the authentication dialog for reloading the proxy settings
Patch17: gnome-settings-daemon-stop-reload-proxy-settings.patch
# PATCH-NEEDS-REBASE gnome-settings-daemon-notify-idle-resumed.patch bnc#439018 bnc#708182 bgo#575467 hpj@suse.com -- notify user about auto suspend when returning from sleep (WAS: PATCH-FEATURE-UPSTREAM)
# PATCH-FEATURE-UPSTREAM gnome-settings-daemon-notify-idle-resumed.patch bnc#439018 bnc#708182 bgo#575467 hpj@suse.com -- notify user about auto suspend when returning from sleep
Patch19: gnome-settings-daemon-notify-idle-resumed.patch
BuildRequires: cups-devel
BuildRequires: fdupes
@ -141,8 +141,7 @@ translation-update-upstream
#%%patch2 -p0
%patch10 -p0
%patch17 -p1
# Needs rebase
#patch19 -p1
%patch19 -p1
%build
autoreconf -f -i