aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2022-03-04 10:31:55 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-03-08 15:26:10 +0100
commit04290777475d93c06c412cf4156a34caf340ca1e (patch)
tree5f0d8319d24fabc0c722d4067092c327ccbd256d
parent62774712e56dd018b8255be4a848d096709c7d44 (diff)
downloadayatana-indicator-session-04290777475d93c06c412cf4156a34caf340ca1e.tar.gz
ayatana-indicator-session-04290777475d93c06c412cf4156a34caf340ca1e.tar.bz2
ayatana-indicator-session-04290777475d93c06c412cf4156a34caf340ca1e.zip
src/service.c: Read Lomiri's lockscreen shortcut from lomiri-schemas
-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)