connection: Drop vm-added emission on connect
We don't use this for most other signals and it's kind of unexpected
This commit is contained in:
parent
3187078f10
commit
6959a41ff2
|
@ -338,15 +338,6 @@ class vmmConnection(vmmGObject):
|
|||
return 0
|
||||
return self._hostinfo[2]
|
||||
|
||||
def connect(self, name, callback, *args):
|
||||
handle_id = vmmGObject.connect(self, name, callback, *args)
|
||||
|
||||
if name == "vm-added":
|
||||
for vm in self.list_vms():
|
||||
self.emit("vm-added", vm.get_connkey())
|
||||
|
||||
return handle_id
|
||||
|
||||
|
||||
##########################
|
||||
# URI + hostname helpers #
|
||||
|
|
|
@ -102,10 +102,8 @@ class vmmInspection(vmmGObject):
|
|||
if conn and not (conn.is_remote()) and not (uri in self._conns):
|
||||
self._conns[uri] = conn
|
||||
conn.connect("vm-added", self.vm_added)
|
||||
# No need to push the VMs of the newly added
|
||||
# connection manually into the queue, as the above
|
||||
# connect() will emit vm-added signals for all of
|
||||
# its VMs.
|
||||
for vm in conn.list_vms():
|
||||
self.vm_added(conn, vm.get_connkey())
|
||||
elif obj[0] == "conn_removed":
|
||||
uri = obj[1]
|
||||
del self._conns[uri]
|
||||
|
|
|
@ -673,6 +673,9 @@ class vmmManager(vmmGObjectUI):
|
|||
conn.connect("resources-sampled", self.conn_row_updated)
|
||||
conn.connect("state-changed", self.conn_state_changed)
|
||||
|
||||
for vm in conn.list_vms():
|
||||
self.vm_added(conn, vm.get_connkey())
|
||||
|
||||
def remove_conn(self, engine_ignore, uri):
|
||||
# Called from engine.py signal conn-removed
|
||||
|
||||
|
|
Loading…
Reference in New Issue