summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2013-04-23 13:18:21 -0400
committerCole Robinson <crobinso@redhat.com>2013-04-23 14:21:45 -0400
commitf84ccc0cf942e3a995717f69c9cbdb449319c0b2 (patch)
tree845ef184074cbac26f68bd1984aba65fa231921c
parent974867189dfe49f577ce3fb79b5b7b7a5edfd983 (diff)
downloadvirt-manager-f84ccc0cf942e3a995717f69c9cbdb449319c0b2.tar.gz
prefs: Remove preference for 'history length'
Also kinda pointless, and I've never heard of anyone actually tweaking it.
-rw-r--r--data/org.virt-manager.virt-manager.gschema.xml6
-rw-r--r--ui/vmm-preferences.ui137
-rw-r--r--virtManager/config.py13
-rw-r--r--virtManager/preferences.py7
4 files changed, 29 insertions, 134 deletions
diff --git a/data/org.virt-manager.virt-manager.gschema.xml b/data/org.virt-manager.virt-manager.gschema.xml
index fb6d500a..0e7d80b0 100644
--- a/data/org.virt-manager.virt-manager.gschema.xml
+++ b/data/org.virt-manager.virt-manager.gschema.xml
@@ -104,12 +104,6 @@
<description>The statistics update interval in seconds</description>
</key>
- <key name="history-length" type="i">
- <default>120</default>
- <summary>The statistics history length</summary>
- <description>The number of samples to keep in the statistics history</description>
-
- </key>
<key name="enable-disk-poll" type="b">
<default>false</default>
<summary>Poll disk i/o stats</summary>
diff --git a/ui/vmm-preferences.ui b/ui/vmm-preferences.ui
index 8ee94755..65324b3b 100644
--- a/ui/vmm-preferences.ui
+++ b/ui/vmm-preferences.ui
@@ -165,26 +165,11 @@
<object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">2</property>
+ <property name="n_rows">3</property>
<property name="n_columns">3</property>
<property name="column_spacing">3</property>
<property name="row_spacing">3</property>
<child>
- <object class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">samples</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -194,23 +179,6 @@
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="prefs-stats-history-len">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="adjustment">adjustment2</property>
- <property name="climb_rate">0.01</property>
- <signal name="value-changed" handler="on_prefs_stats_history_length_changed" swapped="no"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
@@ -231,21 +199,6 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Maintain h_istory of</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">prefs-stats-history-len</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -258,59 +211,19 @@
<property name="y_options"/>
</packing>
</child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label77">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">&lt;b&gt;Stats Options&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkTable" id="table2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">3</property>
- <property name="row_spacing">3</property>
<child>
- <object class="GtkCheckButton" id="prefs-stats-enable-net">
+ <object class="GtkLabel" id="label13">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0.5</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_prefs_stats_enable_net_toggled" swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Poll _Disk I/O</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">prefs-stats-enable-disk</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="x_options">GTK_EXPAND</property>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
@@ -319,14 +232,15 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="xalign">0.5</property>
+ <property name="xalign">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_prefs_stats_enable_disk_toggled" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_EXPAND</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="y_options"/>
</packing>
</child>
@@ -335,28 +249,31 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">_Network I/O</property>
+ <property name="label" translatable="yes">Poll _Network I/O</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">prefs-stats-enable-net</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label13">
+ <object class="GtkCheckButton" id="prefs-stats-enable-net">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">_Disk I/O</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">prefs-stats-enable-disk</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_prefs_stats_enable_net_toggled" swapped="no"/>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="y_options"/>
</packing>
</child>
@@ -365,10 +282,10 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label10">
+ <object class="GtkLabel" id="label77">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">&lt;b&gt;Enable Stats Polling&lt;/b&gt;</property>
+ <property name="label" translatable="yes">&lt;b&gt;Stats Options&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
@@ -376,7 +293,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
</object>
diff --git a/virtManager/config.py b/virtManager/config.py
index 6295596e..11181675 100644
--- a/virtManager/config.py
+++ b/virtManager/config.py
@@ -341,26 +341,17 @@ class vmmConfig(object):
# Stats history and interval length
+ def get_stats_history_length(self):
+ return 120
def get_stats_update_interval(self):
interval = self.conf.get("/stats/update-interval")
if interval < 1:
return 1
return interval
- def get_stats_history_length(self):
- history = self.conf.get("/stats/history-length")
- if history < 10:
- return 10
- return history
-
def set_stats_update_interval(self, interval):
self.conf.set("/stats/update-interval", interval)
- def set_stats_history_length(self, length):
- self.conf.set("/stats/history-length", length)
-
def on_stats_update_interval_changed(self, cb):
return self.conf.notify_add("/stats/update-interval", cb)
- def on_stats_history_length_changed(self, cb):
- return self.conf.notify_add("/stats/history-length", cb)
# Disable/Enable different stats polling
diff --git a/virtManager/preferences.py b/virtManager/preferences.py
index 346c3fac..2daed06b 100644
--- a/virtManager/preferences.py
+++ b/virtManager/preferences.py
@@ -37,7 +37,6 @@ class vmmPreferences(vmmGObjectUI):
self.refresh_view_system_tray()
self.refresh_update_interval()
- self.refresh_history_length()
self.refresh_console_accels()
self.refresh_console_scaling()
self.refresh_sound_local()
@@ -58,7 +57,6 @@ class vmmPreferences(vmmGObjectUI):
self.builder.connect_signals({
"on_prefs_system_tray_toggled" : self.change_view_system_tray,
"on_prefs_stats_update_interval_changed": self.change_update_interval,
- "on_prefs_stats_history_length_changed": self.change_history_length,
"on_prefs_console_accels_toggled": self.change_console_accels,
"on_prefs_console_scaling_changed": self.change_console_scaling,
"on_prefs_close_clicked": self.close,
@@ -104,9 +102,6 @@ class vmmPreferences(vmmGObjectUI):
def refresh_update_interval(self):
self.widget("prefs-stats-update-interval").set_value(
self.config.get_stats_update_interval())
- def refresh_history_length(self):
- self.widget("prefs-stats-history-len").set_value(
- self.config.get_stats_history_length())
def refresh_console_accels(self):
self.widget("prefs-console-accels").set_active(
@@ -262,8 +257,6 @@ class vmmPreferences(vmmGObjectUI):
def change_update_interval(self, src):
self.config.set_stats_update_interval(src.get_value_as_int())
- def change_history_length(self, src):
- self.config.set_stats_history_length(src.get_value_as_int())
def change_console_accels(self, src):
self.config.set_console_accels(src.get_active())