Accepting request 235670 from GNOME:Factory

- Rebased gnome-settings-daemon-notify-idle-resumed.patch.
  Also fixed a crash. (forwarded request 235058 from RBrownCCB)

OBS-URL: https://build.opensuse.org/request/show/235670
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-settings-daemon?expand=0&rev=106
This commit is contained in:
Stephan Kulow 2014-06-01 16:54:50 +00:00 committed by Git OBS Bridge
commit b4503611ac
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 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.9.3.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 2014-05-21 15:33:58.701265397 -0500
+++ gnome-settings-daemon-3.9.3/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in @@ -66,5 +66,10 @@
@@ -106,5 +106,10 @@ <summary>Battery critical low action</summary>
<_summary>If we should show the recalled battery warning for a broken battery</_summary> <description>The action to take when the battery is critically low.</description>
<_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>
</key> </key>
+ <key name="notify-idle-resumed" type="b"> + <key name="notify-idle-resumed" type="b">
+ <default>true</default> + <default>true</default>
@ -13,19 +12,18 @@ Index: gnome-settings-daemon-3.9.3/data/org.gnome.settings-daemon.plugins.power.
+ </key> + </key>
</schema> </schema>
</schemalist> </schemalist>
Index: gnome-settings-daemon-3.9.3/plugins/power/gsd-power-manager.c 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.9.3.orig/plugins/power/gsd-power-manager.c +++ gnome-settings-daemon-3.12.2/plugins/power/gsd-power-manager.c 2014-05-21 15:56:20.240296067 -0500
+++ gnome-settings-daemon-3.9.3/plugins/power/gsd-power-manager.c @@ -144,6 +144,7 @@
@@ -183,6 +183,7 @@ struct GsdPowerManagerPrivate NotifyNotification *notification_ups_discharging;
NotifyNotification *notification_low; NotifyNotification *notification_low;
NotifyNotification *notification_sleep_warning; NotifyNotification *notification_sleep_warning;
NotifyNotification *notification_logout_warning;
+ NotifyNotification *notification_resumed; + NotifyNotification *notification_resumed;
GsdPowerActionType sleep_action_type; GsdPowerActionType sleep_action_type;
gboolean battery_is_low; /* laptop battery low, or UPS discharging */ gboolean battery_is_low; /* laptop battery low, or UPS discharging */
@@ -208,6 +209,7 @@ struct GsdPowerManagerPrivate @@ -169,6 +170,7 @@
gboolean inhibit_suspend_taken; gboolean inhibit_suspend_taken;
guint inhibit_lid_switch_timer_id; guint inhibit_lid_switch_timer_id;
gboolean is_virtual_machine; gboolean is_virtual_machine;
@ -33,7 +31,7 @@ Index: gnome-settings-daemon-3.9.3/plugins/power/gsd-power-manager.c
/* Idles */ /* Idles */
GnomeIdleMonitor *idle_monitor; GnomeIdleMonitor *idle_monitor;
@@ -2339,6 +2341,49 @@ is_session_active (GsdPowerManager *mana @@ -1375,6 +1377,49 @@
} }
static void static void
@ -53,7 +51,7 @@ Index: gnome-settings-daemon-3.9.3/plugins/power/gsd-power-manager.c
+ return; + return;
+ +
+ /* close any existing notification of this class */ + /* 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 a new notification */
+ create_notification (_("System resumed from sleep"), + 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) idle_set_mode (GsdPowerManager *manager, GsdPowerIdleMode mode)
{ {
gboolean ret = FALSE; 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, action_type = g_settings_get_enum (manager->priv->settings,
"sleep-inactive-ac-type"); "sleep-inactive-ac-type");
} }
+
+ manager->priv->last_idle_power_action = action_type; + manager->priv->last_idle_power_action = action_type;
do_power_action_type (manager, action_type); do_power_action_type (manager, action_type);
/* turn on screen and restore user-selected brightness level */ /* turn on screen and restore user-selected brightness level */
@@ -2477,7 +2524,6 @@ idle_set_mode (GsdPowerManager *manager, @@ -2219,6 +2265,12 @@
} static void
manager->priv->kbd_brightness_pre_dim = -1; handle_resume_actions (GsdPowerManager *manager)
} {
-
}
}
@@ -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);
+ if (manager->priv->last_idle_power_action == GSD_POWER_ACTION_SUSPEND || + if (manager->priv->last_idle_power_action == GSD_POWER_ACTION_SUSPEND ||
+ manager->priv->last_idle_power_action == GSD_POWER_ACTION_HIBERNATE) + manager->priv->last_idle_power_action == GSD_POWER_ACTION_HIBERNATE)
+ show_resumed_notification (manager); + 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 */ /* ensure we turn the panel back on after resume */
backlight_enable (manager); 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 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 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 # 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 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 Patch19: gnome-settings-daemon-notify-idle-resumed.patch
BuildRequires: cups-devel BuildRequires: cups-devel
BuildRequires: fdupes BuildRequires: fdupes
@ -141,8 +141,7 @@ translation-update-upstream
#%%patch2 -p0 #%%patch2 -p0
%patch10 -p0 %patch10 -p0
%patch17 -p1 %patch17 -p1
# Needs rebase %patch19 -p1
#patch19 -p1
%build %build
autoreconf -f -i autoreconf -f -i