[gnome-tweak-tool] keymouse: Only show Overview Shortcut if GNOME Shell is running



commit 28569a4db951ecae361bff7becc210149f599ef0
Author: Jeremy Bicha <jbicha ubuntu com>
Date:   Sun Jun 11 19:41:43 2017 -0400

    keymouse: Only show Overview Shortcut if GNOME Shell is running

 gtweak/tweaks/tweak_group_keymouse.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_keymouse.py b/gtweak/tweaks/tweak_group_keymouse.py
index fbc9fe3..eedbf62 100644
--- a/gtweak/tweaks/tweak_group_keymouse.py
+++ b/gtweak/tweaks/tweak_group_keymouse.py
@@ -20,10 +20,13 @@ import os.path
 from gi.repository import GLib, Gtk, Gdk
 
 import gtweak
+from gtweak.gsettings import GSettingsSetting
+from gtweak.gshellwrapper import GnomeShellFactory
+from gtweak.tweaks.tweak_group_xkb import TypingTweakGroup
 from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, GSettingsSwitchTweakValue, 
_GSettingsTweak, Title, GSettingsComboEnumTweak, build_label_beside_widget, Tweak, UI_BOX_SPACING
 
-from gtweak.tweaks.tweak_group_xkb import TypingTweakGroup
-from gtweak.gsettings import GSettingsSetting
+_shell = GnomeShellFactory().get_shell()
+_shell_loaded = _shell is not None
 
 
 class KeyThemeSwitcher(GSettingsSwitchTweakValue):
@@ -199,7 +202,7 @@ class OverviewShortcutTweak(Gtk.Box, _GSettingsTweak):
     def __init__(self, **options):
         name = _("Overview Shortcut")
         Gtk.Box.__init__(self, orientation=Gtk.Orientation.HORIZONTAL, spacing=0)
-        _GSettingsTweak.__init__(self, name, "org.gnome.mutter", "overlay-key", **options)
+        _GSettingsTweak.__init__(self, name, "org.gnome.mutter", "overlay-key", loaded=_shell_loaded, 
**options)
 
         box_btn = Gtk.ButtonBox()
         box_btn.set_layout(Gtk.ButtonBoxStyle.EXPAND)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]