Accepting request 425671 from home:zhangxiaofei:branches:GNOME:Factory
- Add gnome-settings-daemon-shutdown-with-power-button.patch: Bring back "shutdown" as a configurable choice for power button. Even though upstream removed it due to "too destructive" and recommends using a custom shortcut, we still need it for bare metal servers without keyboards attched (bsc#996342). Check bgo#753713, bgo#755953 to learn why upstream removed the power button actions. OBS-URL: https://build.opensuse.org/request/show/425671 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-settings-daemon?expand=0&rev=254
This commit is contained in:
parent
9c43936fa2
commit
6b4b8e11b8
39
gnome-settings-daemon-shutdown-with-power-button.patch
Normal file
39
gnome-settings-daemon-shutdown-with-power-button.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From 8b9b19bc4259b67822ed66f15f6cfac1284ced85 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Felix Zhang <fezhang@suse.com>
|
||||||
|
Date: Wed, 7 Sep 2016 20:14:04 +0800
|
||||||
|
Subject: [PATCH] shutdown with power key
|
||||||
|
|
||||||
|
---
|
||||||
|
data/gsd-enums.h | 1 +
|
||||||
|
plugins/media-keys/gsd-media-keys-manager.c | 3 +++
|
||||||
|
2 files changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/data/gsd-enums.h b/data/gsd-enums.h
|
||||||
|
index 4a0356a..710d58c 100644
|
||||||
|
--- a/data/gsd-enums.h
|
||||||
|
+++ b/data/gsd-enums.h
|
||||||
|
@@ -113,6 +113,7 @@ typedef enum
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
GSD_POWER_BUTTON_ACTION_NOTHING,
|
||||||
|
+ GSD_POWER_BUTTON_ACTION_SHUTDOWN,
|
||||||
|
GSD_POWER_BUTTON_ACTION_SUSPEND,
|
||||||
|
GSD_POWER_BUTTON_ACTION_HIBERNATE
|
||||||
|
} GsdPowerButtonActionType;
|
||||||
|
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
|
||||||
|
index d77ed10..6e0514d 100644
|
||||||
|
--- a/plugins/media-keys/gsd-media-keys-manager.c
|
||||||
|
+++ b/plugins/media-keys/gsd-media-keys-manager.c
|
||||||
|
@@ -1929,6 +1929,9 @@ do_config_power_button_action (GsdMediaKeysManager *manager,
|
||||||
|
|
||||||
|
action_type = g_settings_get_enum (manager->priv->power_settings, "power-button-action");
|
||||||
|
switch (action_type) {
|
||||||
|
+ case GSD_POWER_BUTTON_ACTION_SHUTDOWN:
|
||||||
|
+ do_config_power_action (manager, GSD_POWER_ACTION_SHUTDOWN, in_lock_screen);
|
||||||
|
+ break;
|
||||||
|
case GSD_POWER_BUTTON_ACTION_SUSPEND:
|
||||||
|
do_config_power_action (manager, GSD_POWER_ACTION_SUSPEND, in_lock_screen);
|
||||||
|
break;
|
||||||
|
--
|
||||||
|
2.6.6
|
||||||
|
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 7 12:44:12 UTC 2016 - fezhang@suse.com
|
||||||
|
|
||||||
|
- Add gnome-settings-daemon-shutdown-with-power-button.patch:
|
||||||
|
Bring back "shutdown" as a configurable choice for power button.
|
||||||
|
Even though upstream removed it due to "too destructive" and
|
||||||
|
recommends using a custom shortcut, we still need it for bare
|
||||||
|
metal servers without keyboards attched (bsc#996342).
|
||||||
|
Check bgo#753713, bgo#755953 to learn why upstream removed the
|
||||||
|
power button actions.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 26 11:55:29 UTC 2016 - dimstar@opensuse.org
|
Fri Aug 26 11:55:29 UTC 2016 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
@ -49,6 +49,8 @@ Patch24: sle-configure-timeout-blank.patch
|
|||||||
Patch29: gnome-settings-daemon-initial-keyboard.patch
|
Patch29: gnome-settings-daemon-initial-keyboard.patch
|
||||||
# PATCH-FIX-OPENSUSE gnome-settings-daemon-bring-back-updates-plugin.patch bsc#991024 sckang@suse.com -- Add the updates plugin back
|
# PATCH-FIX-OPENSUSE gnome-settings-daemon-bring-back-updates-plugin.patch bsc#991024 sckang@suse.com -- Add the updates plugin back
|
||||||
Patch31: gnome-settings-daemon-bring-back-updates-plugin.patch
|
Patch31: gnome-settings-daemon-bring-back-updates-plugin.patch
|
||||||
|
# PATCH-FIX-SLE gnome-settings-daemon-shutdown-with-power-key.patch bsc#996342 fezhang@suse.com -- Bring back the shutdown option for power key
|
||||||
|
Patch32: gnome-settings-daemon-shutdown-with-power-button.patch
|
||||||
BuildRequires: cups-devel
|
BuildRequires: cups-devel
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gnome-common
|
BuildRequires: gnome-common
|
||||||
@ -157,6 +159,9 @@ gnome-patch-translation-prepare
|
|||||||
%if 0%{?suse_version} == 1315
|
%if 0%{?suse_version} == 1315
|
||||||
%patch31 -p1
|
%patch31 -p1
|
||||||
%endif
|
%endif
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
%patch32 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?suse_version} == 1315
|
%if 0%{?suse_version} == 1315
|
||||||
|
Loading…
x
Reference in New Issue
Block a user