diff options
author | Robert Tari <robert@tari.in> | 2022-01-20 17:06:53 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-01-27 12:30:26 +0100 |
commit | 838a9b3bd756762e22a3e2e4e5fb0fd9d264bb9c (patch) | |
tree | d90454a23f53a2e08a5984633965ca51862f2aa7 /src/service.c | |
parent | f62c629fff89371af4630ebe8bc74b8075fbf52a (diff) | |
download | ayatana-indicator-session-838a9b3bd756762e22a3e2e4e5fb0fd9d264bb9c.tar.gz ayatana-indicator-session-838a9b3bd756762e22a3e2e4e5fb0fd9d264bb9c.tar.bz2 ayatana-indicator-session-838a9b3bd756762e22a3e2e4e5fb0fd9d264bb9c.zip |
Read org.gnome.settings-daemon.plugins.media-keys screensaver as a list
Diffstat (limited to 'src/service.c')
-rw-r--r-- | src/service.c | 19 |
1 files 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); |