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 <crobinso@redhat.com>
This commit is contained in:
parent
f61bf516df
commit
deeda106c1
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue