[gnome-tweaks/drop-app-menu-tweak: 4/4] top-bar: Drop ApplicationMenu tweak
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweaks/drop-app-menu-tweak: 4/4] top-bar: Drop ApplicationMenu tweak
- Date: Sun, 4 Aug 2019 22:39:18 +0000 (UTC)
commit 83a33a08dd14930e0ff4a1db26cee7d1e6740c09
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jun 14 13:23:12 2019 +0200
top-bar: Drop ApplicationMenu tweak
GNOME Shell no longer supports showing an external application menu,
so overriding the ShellShowsAppMenu GtkSetting no longer has any effect
other than breaking applications that still rely on the fallback UI
for the app menu (when falsely claiming that the shell was displaying
the menu).
https://gitlab.gnome.org/GNOME/gnome-tweaks/issues/204
gtweak/tweaks/tweak_group_top_bar.py | 48 +-----------------------------------
1 file changed, 1 insertion(+), 47 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_top_bar.py b/gtweak/tweaks/tweak_group_top_bar.py
index 1175db3..393337a 100644
--- a/gtweak/tweaks/tweak_group_top_bar.py
+++ b/gtweak/tweaks/tweak_group_top_bar.py
@@ -4,62 +4,16 @@
import gtweak
from gtweak.gshellwrapper import GnomeShellFactory
-from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, GetterSetterSwitchTweak, Title,
_GSettingsTweak
-from gtweak.utils import XSettingsOverrides
+from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, Title
_shell = GnomeShellFactory().get_shell()
_shell_loaded = _shell is not None
-class ApplicationMenuTweak(GetterSetterSwitchTweak):
- def __init__(self, **options):
- self._xsettings = XSettingsOverrides()
- name = _("Application Menu")
- GetterSetterSwitchTweak.__init__(self, name, **options)
-
- _GSettingsTweak.__init__(self,
- name,
- "org.gnome.desktop.wm.preferences",
- "button-layout",
- loaded=_shell_loaded,
- **options)
-
- def get_active(self):
- return self._xsettings.get_shell_shows_app_menu()
-
- def set_active(self, v):
- self._xsettings.set_shell_shows_app_menu(v)
-
- if v:
- self.notify_logout()
- return
- val = self.settings.get_string(self.key_name)
- if "appmenu" in val:
- self.notify_logout()
- return
- else:
- (left, colon, right) = val.partition(":")
-
- if "close" in right:
- rsplit = right.split(",")
- rsplit = [x for x in rsplit if x in ["minimize", "maximize", "close"]]
- rsplit.append("appmenu")
- rsplit.sort(key=lambda x: ["appmenu", "minimize", "maximize", "close"].index(x))
- self.settings.set_string(self.key_name, left + colon + ",".join(rsplit))
-
- else:
- rsplit = left.split(",")
- rsplit = [x for x in rsplit if x in ["minimize", "maximize", "close"]]
- rsplit.append("appmenu")
- rsplit.sort(key=lambda x: ["close", "minimize", "maximize", "appmenu"].index(x))
- self.settings.set_string(self.key_name, ",".join(rsplit) + colon + right)
- self.notify_logout()
-
TWEAK_GROUPS = [
ListBoxTweakGroup(_("Top Bar"),
# Requires patch from https://bugzilla.gnome.org/688320
GSettingsSwitchTweak(_("Activities Overview Hot Corner"),"org.gnome.shell", "enable-hot-corners",
loaded=_shell_loaded),
- ApplicationMenuTweak(),
GSettingsSwitchTweak(_("Battery Percentage"),"org.gnome.desktop.interface",
"show-battery-percentage", loaded=_shell_loaded),
Title(_("Clock"),"", loaded=_shell_loaded),
GSettingsSwitchTweak(_("Weekday"),"org.gnome.desktop.interface", "clock-show-weekday",
loaded=_shell_loaded),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]