From 838a9b3bd756762e22a3e2e4e5fb0fd9d264bb9c Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Thu, 20 Jan 2022 17:06:53 +0100 Subject: Read org.gnome.settings-daemon.plugins.media-keys screensaver as a list --- src/service.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/service.c b/src/service.c index 25e909f..c5ddbbb 100644 --- a/src/service.c +++ b/src/service.c @@ -655,9 +655,22 @@ create_switch_section (IndicatorSessionService * self, int profile) { if (want_accel) { - gchar * str = g_settings_get_string (p->keybinding_settings, "screensaver"); - g_menu_item_set_attribute (item, "accel", "s", str); - g_free (str); + if (ayatana_common_utils_is_mate()) + { + gchar * str = g_settings_get_string (p->keybinding_settings, "screensaver"); + g_menu_item_set_attribute (item, "accel", "s", str); + g_free (str); + } + else + { + gchar **lAccels = g_settings_get_strv(p->keybinding_settings, "screensaver"); + + if (lAccels != NULL) + { + g_menu_item_set_attribute(item, "accel", "s", lAccels[0]); + g_strfreev(lAccels); + } + } } g_menu_append_item (menu, item); -- cgit v1.2.3