[PATCHv2] Add warning to keyboard spoke on live installations (#886463)

Vratislav Podzimek vpodzime at redhat.com
Mon Dec 17 13:17:18 UTC 2012


On live installations we do not change runtime keyboard configuration
because desktop enviromnets provide their tools for that. We should give
the user a hint on that.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/ui/gui/spokes/keyboard.glade | 50 +++++++++++++++++++++++++++++++--
 pyanaconda/ui/gui/spokes/keyboard.py    |  4 +++
 2 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/keyboard.glade b/pyanaconda/ui/gui/spokes/keyboard.glade
index 9ca9aaf..2f00a7f 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.glade
+++ b/pyanaconda/ui/gui/spokes/keyboard.glade
@@ -215,7 +215,6 @@
                   <object class="GtkLabel" id="pickLayoutLabel">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="margin_bottom">24</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Which keyboard layouts would you like to use on this system?  You may move any layout to the top of the list to select it as the default.</property>
                     <property name="wrap">True</property>
@@ -232,9 +231,56 @@
                   </packing>
                 </child>
                 <child>
+                  <object class="GtkBox" id="warningBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="no_show_all">True</property>
+                    <property name="margin_right">20</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage" id="warningImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="no_show_all">True</property>
+                        <property name="stock">gtk-dialog-warning</property>
+                        <property name="icon-size">1</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="liveWarningLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Changes here will only apply to the installed system. Use the desktop's tool to configure the keyboard for the installation process.</property>
+                        <property name="wrap">True</property>
+                        <attributes>
+                          <attribute name="font-desc" value="Cantarell 12"/>
+                          <attribute name="weight" value="normal"/>
+                          <attribute name="scale" value="1"/>
+                        </attributes>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
                   <object class="GtkBox" id="box2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="margin_top">24</property>
                     <property name="hexpand">True</property>
                     <property name="vexpand">True</property>
                     <property name="spacing">30</property>
@@ -479,7 +525,7 @@
                   <packing>
                     <property name="expand">True</property>
                     <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="position">2</property>
                   </packing>
                 </child>
               </object>
diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py
index 81d59e2..f0ba40a 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.py
+++ b/pyanaconda/ui/gui/spokes/keyboard.py
@@ -286,6 +286,10 @@ class KeyboardSpoke(NormalSpoke):
     def initialize(self):
         NormalSpoke.initialize(self)
 
+        if flags.can_touch_runtime_system("hide runtime keyboard configuration "
+                                          "warning"):
+            self.builder.get_object("warningBox").hide()
+
         # We want to store layouts' names but show layouts as
         # 'language (description)'.
         layoutColumn = self.builder.get_object("layoutColumn")
-- 
1.7.11.7



More information about the anaconda-patches mailing list