[node-patches] Change in ovirt-node[master]: ui: Disable Reboot and force redraw
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Fri Feb 22 12:18:08 UTC 2013
Fabian Deutsch has uploaded a new change for review.
Change subject: ui: Disable Reboot and force redraw
......................................................................
ui: Disable Reboot and force redraw
The reboot button at the dn of the installer is disabled as long as the
installation hasn't finished.
Additionally we need to redraw the screen if we updated it from outside
of the mainloop.
Change-Id: Iacc649b76049158297b8972ade42131048030c3f
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/installer/progress_page.py
M scripts/tui/src/ovirt/node/ui/__init__.py
2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/10/12310/1
diff --git a/scripts/tui/src/ovirt/node/installer/progress_page.py b/scripts/tui/src/ovirt/node/installer/progress_page.py
index c18b56f..83e264d 100644
--- a/scripts/tui/src/ovirt/node/installer/progress_page.py
+++ b/scripts/tui/src/ovirt/node/installer/progress_page.py
@@ -83,6 +83,7 @@
return self.progress_plugin.logger
def run(self):
+ self.progress_plugin.widgets["action.reboot"].enabled(False)
time.sleep(0.3) # Give the UI some time to build
transaction = self.__build_transaction()
@@ -110,6 +111,11 @@
log.text("Exception: %s" % repr(e))
self.logger.debug(traceback.format_exc())
raise
+ finally:
+ self.progress_plugin.widgets["action.reboot"].enabled(True)
+
+ # We enforce a redraw, because this the non-mainloop thread
+ self.progress_plugin.application.ui.force_redraw()
def __build_transaction(self):
tx = utils.Transaction("Installation")
diff --git a/scripts/tui/src/ovirt/node/ui/__init__.py b/scripts/tui/src/ovirt/node/ui/__init__.py
index 29e3cbf..dc8350f 100644
--- a/scripts/tui/src/ovirt/node/ui/__init__.py
+++ b/scripts/tui/src/ovirt/node/ui/__init__.py
@@ -699,6 +699,9 @@
self.add_update("There were no changes, nothing to do.")
self._close_button.enabled(True)
+ # We enforce a redraw, because this the non-mainloop thread
+ self.plugin.application.ui.force_redraw()
+
def __run_transaction(self):
try:
self.add_update("Checking pre-conditions ...")
--
To view, visit http://gerrit.ovirt.org/12310
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacc649b76049158297b8972ade42131048030c3f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list