mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
host: Make sure first object selected when conn connects
Previously it was dictated by what order we received conn signals in.
This commit is contained in:
parent
838baf6946
commit
49e3ea2cdf
@ -244,7 +244,6 @@ class vmmHost(vmmGObjectUI):
|
||||
self.memory_usage_graph.show()
|
||||
self.widget("performance-memory-align").add(self.memory_usage_graph)
|
||||
|
||||
|
||||
def show(self):
|
||||
logging.debug("Showing host details: %s", self.conn)
|
||||
vis = self.is_visible()
|
||||
@ -347,6 +346,8 @@ class vmmHost(vmmGObjectUI):
|
||||
_("Libvirt connection does not support interface management."))
|
||||
|
||||
if conn_active:
|
||||
uiutil.set_list_selection(self.widget("net-list"), 0)
|
||||
uiutil.set_list_selection(self.widget("interface-list"), 0)
|
||||
return
|
||||
|
||||
self.set_net_error_page(_("Connection not active."))
|
||||
|
@ -561,15 +561,17 @@ class vmmStorageList(vmmGObjectUI):
|
||||
self.widget("pool-add").set_sensitive(conn_active and
|
||||
self.conn.is_storage_capable())
|
||||
|
||||
if not conn_active:
|
||||
self._set_storage_error_page(_("Connection not active."))
|
||||
self._populate_pools()
|
||||
return
|
||||
|
||||
if not self.conn.is_storage_capable():
|
||||
if conn_active and not self.conn.is_storage_capable():
|
||||
self._set_storage_error_page(
|
||||
_("Libvirt connection does not support storage management."))
|
||||
|
||||
if conn_active:
|
||||
uiutil.set_list_selection(self.widget("pool-list"), 0)
|
||||
return
|
||||
|
||||
self._set_storage_error_page(_("Connection not active."))
|
||||
self._populate_pools()
|
||||
|
||||
def _pool_changed(self, pool):
|
||||
self._update_pool_row(pool.get_connkey())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user