diff options
-rwxr-xr-x | pyanaconda/keyboard.py | 5 | ||||
-rw-r--r-- | pyanaconda/ui/gui/spokes/welcome.py | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py index f4f4f7587..1350ecc74 100755 --- a/pyanaconda/keyboard.py +++ b/pyanaconda/keyboard.py @@ -420,6 +420,11 @@ class XklWrapper(object): return groups_names[state.group] + def is_valid_layout(self, layout): + """Return if given layout is valid layout or not""" + + return layout in self.name_to_show_str + def add_layout(self, layout): """ Method that tries to add a given layout to the current X configuration. diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py index 3fa3a63e2..95f24ef6c 100644 --- a/pyanaconda/ui/gui/spokes/welcome.py +++ b/pyanaconda/ui/gui/spokes/welcome.py @@ -64,6 +64,14 @@ class LanguageMixIn(object): if lang_timezone: self.data.timezone.timezone = lang_timezone + #remove all X layouts that are not valid X layouts (unsupported) + #from the ksdata + #XXX: could go somewhere else, but we need X running and we have + # XklWrapper instance here + for layout in self.data.keyboard.x_layouts: + if not self._xklwrapper.is_valid_layout(layout): + self.data.keyboard.x_layouts.remove(layout) + if self.data.keyboard.x_layouts: #do not add layouts if there are any specified in the kickstart return |