2016-09-18 21:58:23 +02:00
|
|
|
From 3d9c3ecda9c68039c309bfb6bfc93830c4a0e20e Mon Sep 17 00:00:00 2001
|
2016-09-08 13:48:17 +02:00
|
|
|
From: Felix Zhang <fezhang@suse.com>
|
2016-09-18 21:58:23 +02:00
|
|
|
Date: Mon, 12 Sep 2016 18:00:07 +0800
|
|
|
|
Subject: [PATCH] more power button actions
|
2016-09-08 13:48:17 +02:00
|
|
|
|
|
|
|
---
|
2016-09-18 21:58:23 +02:00
|
|
|
data/gsd-enums.h | 2 ++
|
|
|
|
plugins/media-keys/gsd-media-keys-manager.c | 6 ++++++
|
|
|
|
2 files changed, 8 insertions(+)
|
2016-09-08 13:48:17 +02:00
|
|
|
|
2019-10-04 17:46:22 +02:00
|
|
|
diff -urp gnome-settings-daemon-3.33.90.orig/data/gsd-enums.h gnome-settings-daemon-3.33.90/data/gsd-enums.h
|
|
|
|
--- gnome-settings-daemon-3.33.90.orig/data/gsd-enums.h 2019-08-05 18:40:19.000000000 -0500
|
|
|
|
+++ gnome-settings-daemon-3.33.90/data/gsd-enums.h 2019-08-31 19:45:22.123948132 -0500
|
|
|
|
@@ -105,6 +105,7 @@ typedef enum
|
2016-09-08 13:48:17 +02:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GSD_POWER_BUTTON_ACTION_NOTHING,
|
|
|
|
+ GSD_POWER_BUTTON_ACTION_SHUTDOWN,
|
|
|
|
GSD_POWER_BUTTON_ACTION_SUSPEND,
|
2017-09-12 22:01:35 +02:00
|
|
|
GSD_POWER_BUTTON_ACTION_HIBERNATE,
|
|
|
|
GSD_POWER_BUTTON_ACTION_INTERACTIVE
|
2019-10-04 17:46:22 +02:00
|
|
|
diff -urp gnome-settings-daemon-3.33.90.orig/plugins/media-keys/gsd-media-keys-manager.c gnome-settings-daemon-3.33.90/plugins/media-keys/gsd-media-keys-manager.c
|
|
|
|
--- gnome-settings-daemon-3.33.90.orig/plugins/media-keys/gsd-media-keys-manager.c 2019-08-31 19:31:09.939430941 -0500
|
|
|
|
+++ gnome-settings-daemon-3.33.90/plugins/media-keys/gsd-media-keys-manager.c 2019-08-31 19:45:22.127948152 -0500
|
|
|
|
@@ -2230,6 +2230,9 @@ do_config_power_button_action (GsdMediaK
|
2016-09-08 13:48:17 +02:00
|
|
|
|
2019-10-04 17:46:22 +02:00
|
|
|
action_type = g_settings_get_enum (priv->power_settings, "power-button-action");
|
2016-09-08 13:48:17 +02:00
|
|
|
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:
|
2019-10-04 17:46:22 +02:00
|
|
|
action = GSD_POWER_ACTION_SUSPEND;
|
2016-09-08 13:48:17 +02:00
|
|
|
break;
|