summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2013-02-13 12:15:30 +0100
committerMartin Sivak <msivak@redhat.com>2013-02-15 16:43:55 +0100
commit93968f776e9134ebc8b6e4b4c0e68a76d626aebd (patch)
treefb86ba5209b9e895c84a5f102c930b80836066ec
parent564124bc29408b2218e43c13048e9c0708d86441 (diff)
downloadanaconda-93968f776e9134ebc8b6e4b4c0e68a76d626aebd.tar.gz
anaconda-93968f776e9134ebc8b6e4b4c0e68a76d626aebd.tar.xz
anaconda-93968f776e9134ebc8b6e4b4c0e68a76d626aebd.zip
Wait for continueButton in KS mode if the user changed anything
This behaviour tries to minimize the "surprise factor" we have in the installer. When the user entered spoke, changed any data and then left the spoke, the installer gave him no chance for review or correcting the entered values. With this patch applied the Hub waits for a click on the continueButton if any user interaction happened before all the spokes were ready+completed.
-rw-r--r--pyanaconda/ui/gui/hubs/__init__.py36
1 files changed, 21 insertions, 15 deletions
diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py
index 39e8705f5..d7a91dd7c 100644
--- a/pyanaconda/ui/gui/hubs/__init__.py
+++ b/pyanaconda/ui/gui/hubs/__init__.py
@@ -34,6 +34,7 @@ from pyanaconda.ui import common
from pyanaconda.ui.gui import GUIObject
from pyanaconda.ui.gui.categories import collect_categories
from pyanaconda.ui.gui.spokes import StandaloneSpoke, collect_spokes
+from pyanaconda.ui.gui.utils import gtk_call_once
import logging
log = logging.getLogger("anaconda")
@@ -85,7 +86,11 @@ class Hub(GUIObject, common.Hub):
GUIObject.__init__(self, data)
common.Hub.__init__(self, data, storage, payload, instclass)
- self._autoContinue = False
+ # enable the autoContinue feature if we are in kickstart
+ # mode, but if the user interacts with the hub, it will be
+ # disabled again
+ self._autoContinue = flags.automatedInstall
+
self._incompleteSpokes = []
self._inSpoke = False
self._notReadySpokes = []
@@ -262,10 +267,7 @@ class Hub(GUIObject, common.Hub):
self.set_warning(self._checker.error_message)
self.window.show_all()
else:
- if flags.automatedInstall:
- msg = _("When all items marked with this icon are complete, installation will automatically continue.")
- else:
- msg = _("Please complete items marked with this icon before continuing to the next step.")
+ msg = _("Please complete items marked with this icon before continuing to the next step.")
self.set_warning(msg)
self.window.show_all()
@@ -330,9 +332,10 @@ class Hub(GUIObject, common.Hub):
if self.continuePossible:
if self._inSpoke:
- self._autoContinue = True
- elif q.empty():
- self.continueButton.emit("clicked")
+ self._autoContinue = False
+ elif self._autoContinue and q.empty():
+ # enqueue the emit to the Gtk message queue
+ gtk_call_once(self.continueButton.emit, "clicked")
elif code == communication.HUB_CODE_MESSAGE:
spoke.selector.set_property("status", args[1])
log.info("setting %s status to: %s" % (spoke, args[1]))
@@ -370,6 +373,15 @@ class Hub(GUIObject, common.Hub):
if selector:
selector.grab_focus()
+ # On automated kickstart installs, our desired behavior is to display
+ # the hub while background processes work, then skip to the progress
+ # hub immediately after everything's done.
+ # However if the user proves his intent to change the kickstarted
+ # values by entering any of the spokes, we need to disable the
+ # autoContinue feature and wait for the user to explicitly state
+ # that he is done configuring by pressing the continue button.
+ self._autoContinue = False
+
self._inSpoke = True
self._runSpoke(spoke)
self._inSpoke = False
@@ -388,10 +400,4 @@ class Hub(GUIObject, common.Hub):
self._on_spoke_clicked(self._spokes[dest].selector, None, self._spokes[dest])
- # On automated kickstart installs, our desired behavior is to display
- # the hub while background processes work, then skip to the progress
- # hub immediately after everything's done. However, this allows for
- # the possibility that the user will be on a hub when everything
- # finishes. We need to wait until they're done, and then continue.
- if self._autoContinue:
- self.continueButton.emit("clicked")
+