[node-patches] Change in ovirt-node[master]: Make the transactionprogressdialog set an event when it's done

rbarry at redhat.com rbarry at redhat.com
Sun Jul 26 17:53:18 UTC 2015


Ryan Barry has uploaded a new change for review.

Change subject: Make the transactionprogressdialog set an event when it's done
......................................................................

Make the transactionprogressdialog set an event when it's done

Opening other dialogs (from the hosted engine page, for example)
immediately overwrites what the TUI is doing, and there's no
convenient way to wait. For cases when we want to (like running
transactions), we can use threading.Event events to wait

Change-Id: I4bc11b09a50ee166f7701c4af1e7c1ab2e333b98
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/ui/__init__.py
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/04/44004/1

diff --git a/src/ovirt/node/ui/__init__.py b/src/ovirt/node/ui/__init__.py
index bddacd8..dcf2ed4 100644
--- a/src/ovirt/node/ui/__init__.py
+++ b/src/ovirt/node/ui/__init__.py
@@ -21,6 +21,7 @@
 from ovirt.node import base
 from ovirt.node.utils import console, security
 from ovirt.node.exceptions import InvalidData
+import threading
 
 """
 This contains abstract UI Elements
@@ -913,6 +914,12 @@
 
         self._close_button = CloseButton("button.close")
         self.buttons = [self._close_button]
+        self.buttons[0].on_activate.connect(self._clear_event)
+        self.event = threading.Event()
+
+    def _clear_event(self, *args, **kwargs):
+        self.event.set()
+        self.event.clear()
 
     def add_update(self, txt):
         self.texts.append(txt)


-- 
To view, visit https://gerrit.ovirt.org/44004
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4bc11b09a50ee166f7701c4af1e7c1ab2e333b98
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list