[PATCH 1/3] Change layouts ordering in X configuration when changed on the spoke

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

 



Since we have a text entry for testing layouts, people testing their
layouts settings will expect to have the ordering of the layouts in X
same as in the tree view (store).
---
 pyanaconda/ui/gui/spokes/keyboard.py |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py
index 85fb7cd..04b23b6 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.py
+++ b/pyanaconda/ui/gui/spokes/keyboard.py
@@ -266,6 +266,7 @@ class KeyboardSpoke(NormalSpoke):
             return
 
         store.swap(cur, prev)
+        self._flush_layouts_to_X()
         selection.emit("changed")
 
     def on_down_clicked(self, button):
@@ -279,6 +280,7 @@ class KeyboardSpoke(NormalSpoke):
             return
 
         store.swap(cur, nxt)
+        self._flush_layouts_to_X()
         selection.emit("changed")
 
     def on_preview_clicked(self, button):
@@ -330,3 +332,13 @@ class KeyboardSpoke(NormalSpoke):
         else:
             self._addLayout(self._store, "us")
 
+    def _flush_layouts_to_X(self):
+        layouts_list = list()
+
+        itr = self._store.get_iter_first()
+        while itr:
+            layouts_list.append(self._store[itr][0])
+            itr = self._store.iter_next(itr)
+
+        self._xkl_wrapper.replace_layouts(layouts_list)
+
-- 
1.7.4.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux