diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-01-27 12:31:16 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-01-27 12:31:16 +0100 |
commit | 50f9d8509881f041109a27de5452ac51a22112dc (patch) | |
tree | d90454a23f53a2e08a5984633965ca51862f2aa7 | |
parent | f62c629fff89371af4630ebe8bc74b8075fbf52a (diff) | |
parent | 838a9b3bd756762e22a3e2e4e5fb0fd9d264bb9c (diff) | |
download | ayatana-indicator-session-50f9d8509881f041109a27de5452ac51a22112dc.tar.gz ayatana-indicator-session-50f9d8509881f041109a27de5452ac51a22112dc.tar.bz2 ayatana-indicator-session-50f9d8509881f041109a27de5452ac51a22112dc.zip |
Merge branch 'tari01-pr/fix-gnome-screensaver-accelerator-key-type'
Attributes GH PR #66: https://github.com/AyatanaIndicators/ayatana-indicator-session/pull/66
-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); |