1
0

Accepting request 1130901 from home:rjain:branches:GNOME:Factory

submission from rjain

OBS-URL: https://build.opensuse.org/request/show/1130901
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-settings-daemon?expand=0&rev=411
This commit is contained in:
Dominique Leuenberger 2023-12-05 07:40:32 +00:00 committed by Git OBS Bridge
parent ebd79cffc2
commit 720592740a
4 changed files with 43 additions and 45 deletions

View File

@ -1,7 +1,7 @@
Index: b/plugins/media-keys/gsd-media-keys-manager.c Index: gnome-settings-daemon-45.0/plugins/media-keys/gsd-media-keys-manager.c
=================================================================== ===================================================================
--- a/plugins/media-keys/gsd-media-keys-manager.c --- gnome-settings-daemon-45.0.orig/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c +++ gnome-settings-daemon-45.0/plugins/media-keys/gsd-media-keys-manager.c
@@ -350,7 +350,7 @@ get_key_string (MediaKey *key) @@ -350,7 +350,7 @@ get_key_string (MediaKey *key)
else if (key->custom_path != NULL) else if (key->custom_path != NULL)
return g_strdup_printf ("custom:%s", key->custom_path); return g_strdup_printf ("custom:%s", key->custom_path);
@ -20,10 +20,10 @@ Index: b/plugins/media-keys/gsd-media-keys-manager.c
array = g_ptr_array_new (); array = g_ptr_array_new ();
g_ptr_array_add (array, binding); g_ptr_array_add (array, binding);
Index: b/plugins/rfkill/rfkill-glib.c Index: gnome-settings-daemon-45.0/plugins/rfkill/rfkill-glib.c
=================================================================== ===================================================================
--- a/plugins/rfkill/rfkill-glib.c --- gnome-settings-daemon-45.0.orig/plugins/rfkill/rfkill-glib.c
+++ b/plugins/rfkill/rfkill-glib.c +++ gnome-settings-daemon-45.0/plugins/rfkill/rfkill-glib.c
@@ -268,7 +268,7 @@ op_to_string (unsigned int op) @@ -268,7 +268,7 @@ op_to_string (unsigned int op)
case RFKILL_OP_CHANGE_ALL: case RFKILL_OP_CHANGE_ALL:
return "CHANGE_ALL"; return "CHANGE_ALL";
@ -33,10 +33,10 @@ Index: b/plugins/rfkill/rfkill-glib.c
} }
} }
Index: b/plugins/xsettings/xsettings-manager.c Index: gnome-settings-daemon-45.0/plugins/xsettings/xsettings-manager.c
=================================================================== ===================================================================
--- a/plugins/xsettings/xsettings-manager.c --- gnome-settings-daemon-45.0.orig/plugins/xsettings/xsettings-manager.c
+++ b/plugins/xsettings/xsettings-manager.c +++ gnome-settings-daemon-45.0/plugins/xsettings/xsettings-manager.c
@@ -271,7 +271,7 @@ xsettings_get_typecode (GVariant *value) @@ -271,7 +271,7 @@ xsettings_get_typecode (GVariant *value)
case G_VARIANT_CLASS_TUPLE: case G_VARIANT_CLASS_TUPLE:
return XSETTINGS_TYPE_COLOR; return XSETTINGS_TYPE_COLOR;

View File

@ -1,16 +1,7 @@
From 3d9c3ecda9c68039c309bfb6bfc93830c4a0e20e Mon Sep 17 00:00:00 2001 Index: gnome-settings-daemon-45.0/data/gsd-enums.h
From: Felix Zhang <fezhang@suse.com> ===================================================================
Date: Mon, 12 Sep 2016 18:00:07 +0800 --- gnome-settings-daemon-45.0.orig/data/gsd-enums.h
Subject: [PATCH] more power button actions +++ gnome-settings-daemon-45.0/data/gsd-enums.h
---
data/gsd-enums.h | 2 ++
plugins/media-keys/gsd-media-keys-manager.c | 6 ++++++
2 files changed, 8 insertions(+)
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 @@ -105,6 +105,7 @@ typedef enum
typedef enum typedef enum
{ {
@ -19,14 +10,15 @@ diff -urp gnome-settings-daemon-3.33.90.orig/data/gsd-enums.h gnome-settings-dae
GSD_POWER_BUTTON_ACTION_SUSPEND, GSD_POWER_BUTTON_ACTION_SUSPEND,
GSD_POWER_BUTTON_ACTION_HIBERNATE, GSD_POWER_BUTTON_ACTION_HIBERNATE,
GSD_POWER_BUTTON_ACTION_INTERACTIVE GSD_POWER_BUTTON_ACTION_INTERACTIVE
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 Index: gnome-settings-daemon-45.0/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 --- gnome-settings-daemon-45.0.orig/plugins/media-keys/gsd-media-keys-manager.c
@@ -2230,6 +2230,9 @@ do_config_power_button_action (GsdMediaK +++ gnome-settings-daemon-45.0/plugins/media-keys/gsd-media-keys-manager.c
@@ -2053,6 +2053,9 @@ do_config_power_button_action (GsdMediaK
}
action_type = g_settings_get_enum (priv->power_settings, "power-button-action");
switch (action_type) { switch (action_type) {
+ case GSD_POWER_BUTTON_ACTION_SHUTDOWN: + case GSD_POWER_BUTTON_ACTION_SHUTDOWN:
+ do_config_power_action (manager, GSD_POWER_ACTION_SHUTDOWN, in_lock_screen); + do_config_power_action (manager, GSD_POWER_ACTION_SHUTDOWN, in_lock_screen);
+ break; + break;
case GSD_POWER_BUTTON_ACTION_SUSPEND: case GSD_POWER_BUTTON_ACTION_SUSPEND:

View File

@ -1,10 +1,10 @@
Index: gnome-settings-daemon-41.0/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in Index: gnome-settings-daemon-45.0/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
=================================================================== ===================================================================
--- gnome-settings-daemon-41.0.orig/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in --- gnome-settings-daemon-45.0.orig/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
+++ gnome-settings-daemon-41.0/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in +++ gnome-settings-daemon-45.0/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
@@ -41,6 +41,11 @@ @@ -41,6 +41,11 @@
<summary>Power button action</summary> <summary>Power button action</summary>
<description>The action to take when the system power button is pressed. This action is hard-coded (and the setting ignored) on virtual machines (power off) and tablets (suspend).</description> <description>The action to take when the system power button is pressed. Virtual machines only honor the 'nothing' action, and will shutdown otherwise. Tablets always suspend, ignoring all the other action options.</description>
</key> </key>
+ <key name="notify-idle-resumed" type="b"> + <key name="notify-idle-resumed" type="b">
+ <default>true</default> + <default>true</default>
@ -14,27 +14,27 @@ Index: gnome-settings-daemon-41.0/data/org.gnome.settings-daemon.plugins.power.g
<key name="power-saver-profile-on-low-battery" type="b"> <key name="power-saver-profile-on-low-battery" type="b">
<default>true</default> <default>true</default>
<summary>Enable power-saver profile when battery is low</summary> <summary>Enable power-saver profile when battery is low</summary>
Index: gnome-settings-daemon-41.0/plugins/power/gsd-power-manager.c Index: gnome-settings-daemon-45.0/plugins/power/gsd-power-manager.c
=================================================================== ===================================================================
--- gnome-settings-daemon-41.0.orig/plugins/power/gsd-power-manager.c --- gnome-settings-daemon-45.0.orig/plugins/power/gsd-power-manager.c
+++ gnome-settings-daemon-41.0/plugins/power/gsd-power-manager.c +++ gnome-settings-daemon-45.0/plugins/power/gsd-power-manager.c
@@ -164,6 +164,7 @@ struct _GsdPowerManager @@ -165,6 +165,7 @@ struct _GsdPowerManager
NotifyNotification *notification_ups_discharging; NotifyNotification *notification_ups_discharging;
NotifyNotification *notification_low; NotifyNotification *notification_low;
NotifyNotification *notification_sleep_warning; NotifyNotification *notification_sleep_warning;
+ NotifyNotification *notification_resumed; + NotifyNotification *notification_resumed;
GsdPowerActionType sleep_action_type; GsdPowerActionType sleep_action_type;
GHashTable *devices_notified_ht; /* key = serial str, value = UpDeviceLevel */ GHashTable *devices_notified_ht; /* key = serial str, value = UpDeviceLevel */
gboolean battery_is_low; /* battery low, or UPS discharging */ gboolean battery_is_low; /* battery low, or UPS discharging */
@@ -205,6 +206,7 @@ struct _GsdPowerManager @@ -206,6 +207,7 @@ struct _GsdPowerManager
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;
+ GsdPowerActionType last_idle_power_action; + GsdPowerActionType last_idle_power_action;
/* Idles */ /* Idles */
GnomeIdleMonitor *idle_monitor; GnomeIdleMonitor *idle_monitor;
@@ -1744,6 +1746,49 @@ is_session_active (GsdPowerManager *mana @@ -1730,6 +1732,49 @@ is_session_active (GsdPowerManager *mana
} }
static void static void
@ -84,24 +84,23 @@ Index: gnome-settings-daemon-41.0/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;
@@ -1824,6 +1869,7 @@ idle_set_mode (GsdPowerManager *manager, @@ -1810,6 +1855,7 @@ idle_set_mode (GsdPowerManager *manager,
action_type = g_settings_get_enum (manager->settings, action_type = g_settings_get_enum (manager->settings,
"sleep-inactive-ac-type"); "sleep-inactive-ac-type");
} }
+ manager->last_idle_power_action = action_type; + manager->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 */
@@ -2777,6 +2823,12 @@ handle_suspend_actions (GsdPowerManager @@ -2784,6 +2830,11 @@ handle_suspend_actions (GsdPowerManager
static void static void
handle_resume_actions (GsdPowerManager *manager) handle_resume_actions (GsdPowerManager *manager)
{ {
+ if (manager->last_idle_power_action == GSD_POWER_ACTION_SUSPEND || + if (manager->last_idle_power_action == GSD_POWER_ACTION_SUSPEND ||
+ manager->last_idle_power_action == GSD_POWER_ACTION_HIBERNATE) + manager->last_idle_power_action == GSD_POWER_ACTION_HIBERNATE)
+ show_resumed_notification (manager); + show_resumed_notification (manager);
+ +
+ manager->last_idle_power_action = GSD_POWER_ACTION_NOTHING; + manager->last_idle_power_action = GSD_POWER_ACTION_NOTHING;
+
/* ensure we turn the panel back on after resume */ /* ensure we turn the panel back on after resume */
backlight_enable (manager); backlight_enable (manager);

View File

@ -19,6 +19,13 @@ Thu Oct 26 08:40:13 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
- Add 538816ff42f682fc4b541810ca107486abab9976.patch: smartcard: - Add 538816ff42f682fc4b541810ca107486abab9976.patch: smartcard:
Steal error when propagating through GTask. Steal error when propagating through GTask.
-------------------------------------------------------------------
Wed Oct 18 03:01:27 UTC 2023 - Rahul Jain <rahul.jain@suse.com>
- Rebase patches on gnome-settings-daemon 45(bsc#1216073)
+ Patch1000:gnome-settings-daemon-notify-idle-resumed.patch
+ Patch1001:gnome-settings-daemon-more-power-button-actions.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Sep 16 15:31:51 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com> Sat Sep 16 15:31:51 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>