Select any connection added to the manager list.

This commit is contained in:
Cole Robinson 2009-02-15 17:36:36 -05:00
parent 7f0f02b91a
commit 3adb736c46

View File

@ -525,6 +525,7 @@ class vmmManager(gobject.GObject):
_iter = model.append(None, row)
path = model.get_path(_iter)
self.rows[conn.get_uri()] = model[path]
return _iter
def vm_removed(self, connection, uri, vmuuid):
vmlist = self.window.get_widget("vm-list")
@ -1131,7 +1132,8 @@ class vmmManager(gobject.GObject):
# add the connection to the treeModel
vmlist = self.window.get_widget("vm-list")
if not self.rows.has_key(conn.get_uri()):
self._append_connection(vmlist.get_model(), conn)
row = self._append_connection(vmlist.get_model(), conn)
vmlist.get_selection().select_iter(row)
def _remove_connection(self, engine, conn):
model = self.window.get_widget("vm-list").get_model()