[virt-tools-list] [virt-manager] [PATCH 8/9] asyncjob: Add enable/update details methods
Radostin Stoyanov
rstoyanov1 at gmail.com
Thu Jun 22 14:54:05 UTC 2017
---
virtManager/asyncjob.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/virtManager/asyncjob.py b/virtManager/asyncjob.py
index 5386296..ead8d3a 100644
--- a/virtManager/asyncjob.py
+++ b/virtManager/asyncjob.py
@@ -182,6 +182,9 @@ class vmmAsyncJob(vmmGObjectUI):
self._error_info = None
self._data = None
+ self._details_widget = None
+ self._details_update_cb = None
+
self._is_pulsing = True
self._meter = None
@@ -345,3 +348,15 @@ class vmmAsyncJob(vmmGObjectUI):
self._set_stage_text(stage or _("Completed"))
self.widget("pbar").set_text(progress)
self.widget("pbar").set_fraction(1)
+
+ @idle_wrapper
+ def details_enable(self, new_widget, update_cb):
+ self.widget("details-box").add(new_widget)
+ self._details_widget = new_widget
+ self._details_update_cb = update_cb
+ new_widget.set_visible(True)
+ self.widget("details").set_visible(True)
+
+ @idle_wrapper
+ def details_update(self, data):
+ self._details_update_cb(self._details_widget, data)
--
2.9.4
More information about the virt-tools-list
mailing list