aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-03-08 15:26:49 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-03-08 15:26:49 +0100
commitaa4aeb40c5d5a91ad33bf3860d586a4c3bdd763e (patch)
tree5f0d8319d24fabc0c722d4067092c327ccbd256d
parent62774712e56dd018b8255be4a848d096709c7d44 (diff)
parent04290777475d93c06c412cf4156a34caf340ca1e (diff)
downloadayatana-indicator-session-aa4aeb40c5d5a91ad33bf3860d586a4c3bdd763e.tar.gz
ayatana-indicator-session-aa4aeb40c5d5a91ad33bf3860d586a4c3bdd763e.tar.bz2
ayatana-indicator-session-aa4aeb40c5d5a91ad33bf3860d586a4c3bdd763e.zip
Merge branch 'tari01-pr/read-lockscreen-shortcut-from-lomiri-schemas'
Attributes GH PR #72: https://github.com/AyatanaIndicators/ayatana-indicator-session/pull/72
-rw-r--r--src/service.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/service.c b/src/service.c
index 9d8f817..4e9fe8c 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1,6 +1,6 @@
/*
* Copyright 2013 Canonical Ltd.
- * Copyright 2021 Robert Tari
+ * Copyright 2021-2022 Robert Tari
*
* Authors:
* Charles Kerr <charles.kerr@canonical.com>
@@ -655,11 +655,16 @@ create_switch_section (IndicatorSessionService * self, int profile)
{
if (want_accel)
{
+ gchar *str = NULL;
+
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);
+ str = g_settings_get_string (p->keybinding_settings, "screensaver");
+
+ }
+ else if (ayatana_common_utils_is_lomiri())
+ {
+ str = g_settings_get_string (p->keybinding_settings, "lockscreen");
}
else
{
@@ -671,6 +676,12 @@ create_switch_section (IndicatorSessionService * self, int profile)
g_strfreev(lAccels);
}
}
+
+ if (str != NULL)
+ {
+ g_menu_item_set_attribute (item, "accel", "s", str);
+ g_free (str);
+ }
}
g_menu_append_item (menu, item);
@@ -1283,10 +1294,8 @@ indicator_session_service_init (IndicatorSessionService * self)
}
else if (ayatana_common_utils_is_lomiri())
{
- p->keybinding_settings = g_settings_new ("org.gnome.settings-daemon.plugins.media-keys");
+ p->keybinding_settings = g_settings_new ("com.lomiri.Shell.Shortcuts");
- /* Only use unity8 schema if it's installed; this avoids a hard dependency
- on unity8-schemas */
usage_mode_schema = g_settings_schema_source_lookup (g_settings_schema_source_get_default (),
usage_mode_schema_name, TRUE);
if (usage_mode_schema)