From: "Brian C. Lane" bcl@redhat.com
Modify the continueButton to exit (allowing the anaconda exitHandler to take control) if it is the last action. The button is expected to be setup so that it is clear to the user what will happen (eg. REBOOT).
This also fixes the display of the quitDialog when rebooting.
Add a click of the final button when kickstarting with reboot or shutdown.
halt also works, but requires a new version of pykickstart. Previously the halt command was not working, it would set action to KS_SHUTDOWN and there was no way for KS_WAIT to be set. --- pyanaconda/ui/gui/__init__.py | 4 ++-- pyanaconda/ui/gui/hubs/progress.py | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py index 3d2fff9..253de02 100644 --- a/pyanaconda/ui/gui/__init__.py +++ b/pyanaconda/ui/gui/__init__.py @@ -136,9 +136,9 @@ class GraphicalUserInterface(UserInterface): ### SIGNAL HANDLING METHODS ### def _on_continue_clicked(self): - # If we're on the last screen, clicking Continue is the same as clicking Quit. + # If we're on the last screen, clicking Continue quits. if len(self._actions) == 1: - self._on_quit_clicked() + sys.exit(0) return
# If the current action wants us to jump to an arbitrary point ahead, diff --git a/pyanaconda/ui/gui/hubs/progress.py b/pyanaconda/ui/gui/hubs/progress.py index 2eb1b75..bc0fad1 100644 --- a/pyanaconda/ui/gui/hubs/progress.py +++ b/pyanaconda/ui/gui/hubs/progress.py @@ -31,6 +31,8 @@ import os
from pyanaconda.localeinfo import expandLangs from pyanaconda.product import productName +from pyanaconda.flags import flags +from pykickstart.constants import KS_WAIT, KS_SHUTDOWN, KS_REBOOT
from pyanaconda.ui.gui.hubs import Hub from pyanaconda.ui.gui.utils import gdk_threaded @@ -81,6 +83,11 @@ class ProgressHub(Hub): GLib.source_remove(self._rnotes_id)
self._progressNotebook.next_page() + + # kickstart install, continue automatically if reboot or shutdown selected + if flags.automatedInstall and self.data.reboot.action in [KS_REBOOT, KS_SHUTDOWN]: + self.continueButton.emit("clicked") + return False
q.task_done() @@ -145,7 +152,7 @@ class ProgressHub(Hub): args=(self.storage, self.payload, self.data, self.instclass)))
@property - def quitButton(self): + def continueButton(self): return self.builder.get_object("rebootButton")
def _init_progress_bar(self, steps):
halt also works, but requires a new version of pykickstart. Previously the halt command was not working, it would set action to KS_SHUTDOWN and there was no way for KS_WAIT to be set.
If you've got a patch, don't be shy.
pyanaconda/ui/gui/__init__.py | 4 ++-- pyanaconda/ui/gui/hubs/progress.py | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-)
This looks fine to me.
- Chris
anaconda-patches@lists.fedorahosted.org