aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRatchanan Srirattanamet <ratchanan@ubports.com>2022-12-15 14:30:20 +0700
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-12-15 21:59:24 +0100
commit853f224f3562708068727f6dfc2a514090e9c815 (patch)
tree08c0a6bfcaae45950f65d9daf96ba6f894ae35a1
parent59f1574888865b4f0d0b14af76817a7c5fc5d111 (diff)
downloadayatana-indicator-display-853f224f3562708068727f6dfc2a514090e9c815.tar.gz
ayatana-indicator-display-853f224f3562708068727f6dfc2a514090e9c815.tar.bz2
ayatana-indicator-display-853f224f3562708068727f6dfc2a514090e9c815.zip
src/rotation-lock.cpp: make MenuItem QMenuModel-compatible
In a similar way as [1], make the rotation lock MenuItem QMenuModel- compatible by specifying a target in it. [1] https://github.com/AyatanaIndicators/ayatana-indicator-bluetooth/pull/40
-rw-r--r--src/rotation-lock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rotation-lock.cpp b/src/rotation-lock.cpp
index 1f0353f..ac57e2b 100644
--- a/src/rotation-lock.cpp
+++ b/src/rotation-lock.cpp
@@ -232,7 +232,7 @@ private:
menu = g_menu_new();
section = g_menu_new();
- menu_item = g_menu_item_new(_("Rotation Lock"), "indicator.rotation-lock");
+ menu_item = g_menu_item_new(_("Rotation Lock"), "indicator.rotation-lock(true)");
g_menu_item_set_attribute(menu_item, "x-ayatana-type", "s", "org.ayatana.indicator.switch");
g_menu_append_item(section, menu_item);
g_menu_append_section(menu, NULL, G_MENU_MODEL(section));
@@ -296,7 +296,7 @@ private:
if (ayatana_common_utils_is_lomiri())
{
section = g_menu_new();
- menu_item = g_menu_item_new(_("Rotation Lock"), "indicator.rotation-lock");
+ menu_item = g_menu_item_new(_("Rotation Lock"), "indicator.rotation-lock(true)");
g_menu_item_set_attribute(menu_item, "x-ayatana-type", "s", "org.ayatana.indicator.switch");
g_menu_append_item(section, menu_item);
g_menu_append_section(menu, NULL, G_MENU_MODEL(section));