[PATCH 1/3] Return all layouts the XklWrapper knows about (#883555)

Vratislav Podzimek vpodzime at redhat.com
Thu May 16 10:49:39 UTC 2013


Some layouts are not gathered through languages (e.g. Croatian) because the
metadata has bugs or missing information. But even if we gather them through
countries, we should allow user selecting them. The table for mapping layout
names to their descriptions has all layouts the XklWrapper knows about.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/keyboard.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
index 03b0455..06bc683 100755
--- a/pyanaconda/keyboard.py
+++ b/pyanaconda/keyboard.py
@@ -457,9 +457,7 @@ class XklWrapper(object):
     def get_available_layouts(self):
         """A generator yielding layouts (no need to store them as a bunch)"""
 
-        for lang_desc, variants in sorted(self._language_keyboard_variants.items()):
-            for layout in variants:
-                yield layout.name
+        return self.name_to_show_str.iterkeys()
 
     def get_switching_options(self):
         """Method returning list of available layout switching options"""
-- 
1.7.11.7



More information about the anaconda-patches mailing list