mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
manager: Remove option to hide VM status column.
Not sure why anyone would want to, it's a pretty fundamental piece of information.
This commit is contained in:
parent
8958f6df80
commit
4693e3e3f8
@ -1,18 +1,5 @@
|
||||
<gconfschemafile>
|
||||
<schemalist>
|
||||
<schema>
|
||||
<key>/schemas/apps/::PACKAGE::/vmlist-fields/status</key>
|
||||
<applyto>/apps/::PACKAGE::/vmlist-fields/status</applyto>
|
||||
<owner>::PACKAGE::</owner>
|
||||
<type>bool</type>
|
||||
<default>1</default>
|
||||
|
||||
<locale name="C">
|
||||
<short>Show run state in summary</short>
|
||||
<long>Show the run state field in the domain list summary view</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/::PACKAGE::/vmlist-fields/stats-type</key>
|
||||
<applyto>/apps/::PACKAGE::/vmlist-fields/stats-type</applyto>
|
||||
|
@ -233,16 +233,9 @@ class vmmConfig:
|
||||
# Suggest gconf syncs, so that the unset dirs are fully removed
|
||||
self.conf.suggest_sync()
|
||||
|
||||
def is_vmlist_status_visible(self):
|
||||
return self.conf.get_bool(self.conf_dir + "/vmlist-fields/status")
|
||||
|
||||
def get_vmlist_stats_type(self):
|
||||
return self.conf.get_int(self.conf_dir + "/vmlist-fields/stats_type")
|
||||
|
||||
|
||||
def set_vmlist_status_visible(self, state):
|
||||
self.conf.set_bool(self.conf_dir + "/vmlist-fields/status", state)
|
||||
|
||||
def set_vmlist_stats_type(self, val):
|
||||
self.conf.set_int(self.conf_dir + "/vmlist-fields/stats_type", val)
|
||||
|
||||
@ -278,9 +271,6 @@ class vmmConfig:
|
||||
self.conf.set_value(self.conf_dir + "/paths/default-%s-path" % _type,
|
||||
folder)
|
||||
|
||||
def on_vmlist_status_visible_changed(self, callback):
|
||||
self.conf.notify_add(self.conf_dir + "/vmlist-fields/status", callback)
|
||||
|
||||
def on_vmlist_stats_type_changed(self, callback):
|
||||
self.conf.notify_add(self.conf_dir + "/vmlist-fields/stats_type",
|
||||
callback)
|
||||
|
@ -159,11 +159,8 @@ class vmmManager(gobject.GObject):
|
||||
|
||||
self.prepare_vmlist()
|
||||
|
||||
self.config.on_vmlist_status_visible_changed(self.toggle_status_visible_widget)
|
||||
self.config.on_vmlist_stats_type_changed(self.stats_toggled_config)
|
||||
|
||||
self.window.get_widget("menu_view_status").set_active(self.config.is_vmlist_status_visible())
|
||||
|
||||
# Register callbacks with the global stats enable/disable values
|
||||
# that disable the associated vmlist widgets if reporting is disabled
|
||||
self.config.on_stats_enable_disk_poll_changed(self.enable_polling,
|
||||
@ -316,8 +313,6 @@ class vmmManager(gobject.GObject):
|
||||
self.connmenu.show()
|
||||
|
||||
self.window.signal_autoconnect({
|
||||
"on_menu_view_status_activate" : self.toggle_status_visible_conf,
|
||||
|
||||
"on_menu_view_stats_disk_toggled" : (self.stats_toggled,
|
||||
cfg.STATS_DISK),
|
||||
"on_menu_view_stats_network_toggled" : (self.stats_toggled,
|
||||
@ -811,7 +806,6 @@ class vmmManager(gobject.GObject):
|
||||
statusCol.pack_start(status_txt, False)
|
||||
statusCol.add_attribute(status_txt, 'text', ROW_STATUS)
|
||||
statusCol.add_attribute(status_icon, 'pixbuf', ROW_STATUS_ICON)
|
||||
statusCol.set_visible(self.config.is_vmlist_status_visible())
|
||||
|
||||
cpuUsage_img = CellRendererSparkline()
|
||||
cpuUsage_img.set_property("reversed", True)
|
||||
@ -838,14 +832,6 @@ class vmmManager(gobject.GObject):
|
||||
def vmlist_network_usage_sorter(self, model, iter1, iter2):
|
||||
return cmp(model.get_value(iter1, ROW_HANDLE).network_traffic_rate(), model.get_value(iter2, ROW_HANDLE).network_traffic_rate())
|
||||
|
||||
def toggle_status_visible_conf(self, menu):
|
||||
self.config.set_vmlist_status_visible(menu.get_active())
|
||||
|
||||
def toggle_status_visible_widget(self, ignore1, ignore2, ignore3, ignore4):
|
||||
vmlist = self.window.get_widget("vm-list")
|
||||
col = vmlist.get_column(COL_STATUS)
|
||||
col.set_visible(self.config.is_vmlist_status_visible())
|
||||
|
||||
def enable_polling(self, ignore1, ignore2, conf_entry, userdata):
|
||||
if userdata == cfg.STATS_DISK:
|
||||
widgn = "menu_view_stats_disk"
|
||||
|
@ -196,42 +196,6 @@
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="menu_view_domain_id">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Domain ID</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<signal name="activate" handler="on_menu_view_domain_id_activate"/>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="menu_view_status">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Status</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<signal name="activate" handler="on_menu_view_status_activate"/>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="menu_view_virtual_cpus">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">CPUs</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<signal name="activate" handler="on_menu_view_virtual_cpus_activate"/>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="menu_view_memory_usage">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Memory Usage</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<signal name="activate" handler="on_menu_view_memory_usage_activate"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
Loading…
Reference in New Issue
Block a user