[master 1/2] Start hubs with the buttons insensitive.

dashea installerbot-noreply at redhat.com
Fri Aug 21 21:14:34 UTC 2015


From: David Shea <dshea at redhat.com>

Just because you can't see the buttons doesn't mean you can't click them
(because we attached keyboard shortcuts to them). With the progress hub,
this meant that hitting F12 would reboot in the middle of installing
packages, and in the case of the summary hub there was a potential race
between the hub being created and the button states being initialized.

Start the hubs with the all of the buttons insensitive, and let the code
that was mostly already there update the sensitivities as the status of
the hub changes.
---
 pyanaconda/ui/gui/hubs/progress.glade | 5 ++---
 pyanaconda/ui/gui/hubs/progress.py    | 1 +
 pyanaconda/ui/gui/hubs/summary.glade  | 6 ++----
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/pyanaconda/ui/gui/hubs/progress.glade b/pyanaconda/ui/gui/hubs/progress.glade
index b072e32..14471c8 100644
--- a/pyanaconda/ui/gui/hubs/progress.glade
+++ b/pyanaconda/ui/gui/hubs/progress.glade
@@ -23,9 +23,6 @@
                 <child>
                   <placeholder/>
                 </child>
-                <child>
-                  <placeholder/>
-                </child>
               </object>
             </child>
           </object>
@@ -149,6 +146,7 @@ Finish it and then click the Finish configuration button please.</property>
                                 <property name="label" translatable="yes" context="GUI|Progress">_Finish configuration</property>
                                 <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
+                                <property name="sensitive">False</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
                                 <property name="halign">end</property>
@@ -202,6 +200,7 @@ Go ahead and reboot to start using it!</property>
                                 <property name="label" translatable="yes" context="GUI|Progress">_Reboot</property>
                                 <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
+                                <property name="sensitive">False</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
                                 <property name="halign">end</property>
diff --git a/pyanaconda/ui/gui/hubs/progress.py b/pyanaconda/ui/gui/hubs/progress.py
index 47880e6..0922653 100644
--- a/pyanaconda/ui/gui/hubs/progress.py
+++ b/pyanaconda/ui/gui/hubs/progress.py
@@ -140,6 +140,7 @@ def _configuration_done(self):
 
         GLib.source_remove(self._rnotes_id)
         self._progressNotebook.set_current_page(1)
+        self.window.set_may_continue(True)
 
         iutil.ipmi_report(IPMI_FINISHED)
 
diff --git a/pyanaconda/ui/gui/hubs/summary.glade b/pyanaconda/ui/gui/hubs/summary.glade
index 88313c2..447d4ee 100644
--- a/pyanaconda/ui/gui/hubs/summary.glade
+++ b/pyanaconda/ui/gui/hubs/summary.glade
@@ -24,9 +24,6 @@
                 <child>
                   <placeholder/>
                 </child>
-                <child>
-                  <placeholder/>
-                </child>
               </object>
             </child>
           </object>
@@ -100,6 +97,7 @@
                 <property name="label" translatable="yes" context="GUI|Summary">_Begin Installation</property>
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
+                <property name="sensitive">False</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_underline">True</property>
@@ -127,8 +125,8 @@
             <property name="can_focus">False</property>
             <property name="margin_right">6</property>
             <property name="margin_bottom">6</property>
-            <property name="xalign">1</property>
             <property name="label" translatable="yes">We won't touch your disks until you click 'Begin Installation'.</property>
+            <property name="xalign">1</property>
             <attributes>
               <attribute name="font-desc" value="Cantarell Italic"/>
               <attribute name="foreground" value="#808080808080"/>


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/99313dd21d84436c8beef38ac7bfe48529102f5c


More information about the anaconda-patches mailing list