diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-11-23 17:35:10 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-11-23 17:35:10 +0100 |
commit | 796525b933045a6477f57a60aff394cdd5f62a32 (patch) | |
tree | f4bf777cdbcc222122eb577e8cbd22e91a47e170 | |
parent | 275ebbc1d04fd7095e850ed587aa73a410d35251 (diff) | |
parent | adec0ba6fc08f11455c065a7ef68a46c12e75a9d (diff) | |
download | ayatana-indicator-display-796525b933045a6477f57a60aff394cdd5f62a32.tar.gz ayatana-indicator-display-796525b933045a6477f57a60aff394cdd5f62a32.tar.bz2 ayatana-indicator-display-796525b933045a6477f57a60aff394cdd5f62a32.zip |
Merge branch 'tari01-pr/disable-rotation-on-desktops'
Attributes GH PR #68: https://github.com/AyatanaIndicators/ayatana-indicator-display/pull/68
-rw-r--r-- | src/rotation-lock.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/rotation-lock.cpp b/src/rotation-lock.cpp index 2bb03b3..1f0353f 100644 --- a/src/rotation-lock.cpp +++ b/src/rotation-lock.cpp @@ -292,15 +292,18 @@ private: GMenuItem* menu_item; menu = g_menu_new(); - section = g_menu_new(); - menu_item = g_menu_item_new(_("Rotation Lock"), "indicator.rotation-lock"); - 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)); - g_object_unref(section); - g_object_unref(menu_item); - if (ayatana_common_utils_is_lomiri() == FALSE) + if (ayatana_common_utils_is_lomiri()) + { + section = g_menu_new(); + menu_item = g_menu_item_new(_("Rotation Lock"), "indicator.rotation-lock"); + 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)); + g_object_unref(section); + g_object_unref(menu_item); + } + else { section = g_menu_new (); GIcon *pIconMin = g_themed_icon_new_with_default_fallbacks ("ayatana-indicator-display-colortemp-on"); |