[gnome-tweak-tool] Show all XKB options except the ones in control center



commit 7582bab3dd1b5f7c47f6a86c96578623b1e9cef4
Author: Rui Matos <tiagomatos gmail com>
Date:   Tue Jan 15 18:08:51 2013 +0100

    Show all XKB options except the ones in control center
    
    Upstream xkeyboard-config changed the 'eurosign' XKB option name to
    'currencysign'. Black listing the names that we don't want to show
    and otherwise showing everything makes us able to work with both old
    and new xkeyboard-config versions.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691381

 gtweak/tweaks/tweak_typing.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_typing.py b/gtweak/tweaks/tweak_typing.py
index e248568..e93512b 100644
--- a/gtweak/tweaks/tweak_typing.py
+++ b/gtweak/tweaks/tweak_typing.py
@@ -97,8 +97,8 @@ class TypingTweakGroup(TweakGroup):
 
     XKB_GSETTINGS_SCHEMA = "org.gnome.desktop.input-sources"
     XKB_GSETTINGS_NAME = "xkb-options"
-    XKB_OPTIONS = ("ctrl","grp_led","keypad","kpdl","caps","altwin","compat","eurosign",
-                   "lv5","nbsp","japan","esperanto","terminate")
+    # These are configurable in gnome-control-center
+    XKB_OPTIONS_BLACKLIST = {"lv3","Compose key"}
 
     def __init__(self):
         TweakGroup.__init__(self, TWEAK_GROUP_TYPING)
@@ -116,7 +116,7 @@ class TypingTweakGroup(TweakGroup):
             logging.warning("Typing missing GnomeDesktop.gir with Xkb support")
         finally:
             if ok:
-                for opt in self.XKB_OPTIONS:
+                for opt in set(self._xkb_info.get_all_option_groups()) - self.XKB_OPTIONS_BLACKLIST:
                     self._option_objects.append(
                             _XkbOption(opt, self._kbdsettings, self._xkb_info)
                     )



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