From deeda106c15acd64244132a77c3346c68f85657b Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 20 Aug 2020 14:21:19 -0400 Subject: [PATCH] createpool: Remove pool-created callback The intent is this would select the newly created pool in the UI after the user creates it. With async events though this is racy and doesn't tend to work as expected. It's fixable but it would likely require hanging around for a period of time waiting for the signal to fire, which takes more work. Just drop it Signed-off-by: Cole Robinson --- virtManager/createpool.py | 10 ---------- virtManager/hoststorage.py | 7 ------- 2 files changed, 17 deletions(-) diff --git a/virtManager/createpool.py b/virtManager/createpool.py index b2b039a0..37603f0c 100644 --- a/virtManager/createpool.py +++ b/virtManager/createpool.py @@ -19,10 +19,6 @@ from .xmleditor import vmmXMLEditor class vmmCreatePool(vmmGObjectUI): - __gsignals__ = { - "pool-created": (vmmGObjectUI.RUN_FIRST, None, [str]), - } - def __init__(self, conn): vmmGObjectUI.__init__(self, "createpool.ui", "vmm-create-pool") self.conn = conn @@ -329,10 +325,6 @@ class vmmCreatePool(vmmGObjectUI): # Object install # ################## - def _pool_added_cb(self, src, connkey, created_name): - if connkey == created_name: - self.emit("pool-created", connkey) - def _finish_cb(self, error, details, pool): self.reset_finish_cursor() @@ -341,8 +333,6 @@ class vmmCreatePool(vmmGObjectUI): self.err.show_err(error, details=details) else: - self.conn.connect_once("pool-added", self._pool_added_cb, - pool.name) self.conn.schedule_priority_tick(pollpool=True) self.close() diff --git a/virtManager/hoststorage.py b/virtManager/hoststorage.py index ca3a0b26..ecdd4561 100644 --- a/virtManager/hoststorage.py +++ b/virtManager/hoststorage.py @@ -486,7 +486,6 @@ class vmmHostStorage(vmmGObjectUI): try: if self._addpool is None: self._addpool = vmmCreatePool(self.conn) - self._addpool.connect("pool-created", self._pool_created_cb) self._addpool.show(self.topwin) except Exception as e: self.err.show_err(_("Error launching pool wizard: %s") % str(e)) @@ -632,12 +631,6 @@ class vmmHostStorage(vmmGObjectUI): def _vol_list_row_activated_cb(self, src, treeiter, viewcol): self.emit("volume-chosen", self._current_vol()) - def _pool_created_cb(self, src, connkey): - # The pool list will have already been updated, since this - # signal arrives only after pool-added. So all we do here is - # select the pool we just created. - uiutil.set_list_selection(self.widget("pool-list"), connkey) - def _vol_created_cb(self, src, pool_connkey, volname): # The vol list will have already been updated, since this # signal arrives only after pool-refreshed. So all we do here is