From f84ccc0cf942e3a995717f69c9cbdb449319c0b2 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 23 Apr 2013 13:18:21 -0400 Subject: prefs: Remove preference for 'history length' Also kinda pointless, and I've never heard of anyone actually tweaking it. --- data/org.virt-manager.virt-manager.gschema.xml | 6 -- ui/vmm-preferences.ui | 137 +++++-------------------- virtManager/config.py | 13 +-- virtManager/preferences.py | 7 -- 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 @@ The statistics update interval in seconds - - 120 - The statistics history length - The number of samples to keep in the statistics history - - false Poll disk i/o stats 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,25 +165,10 @@ True False - 2 + 3 3 3 3 - - - True - False - 0 - samples - - - 2 - 3 - 1 - 2 - - - True @@ -194,23 +179,6 @@ 2 3 - - - - - - True - True - - adjustment2 - 0.01 - - - - 1 - 2 - 1 - 2 GTK_FILL @@ -230,21 +198,6 @@ - - - True - False - 0 - Maintain h_istory of - True - prefs-stats-history-len - - - 1 - 2 - - - True @@ -258,59 +211,19 @@ - - - - - - - True - False - <b>Stats Options</b> - True - - - - - False - False - 0 - - - - - True - False - 0 - none - - - True - False - 12 - - - True - False - 2 - 2 - 3 - 3 - + True - True - False - 0.5 - True - + False + 0 + Poll _Disk I/O + True + prefs-stats-enable-disk - 1 - 2 1 2 - GTK_EXPAND + GTK_FILL @@ -319,14 +232,15 @@ True True False - 0.5 + 0 True 1 - 2 - GTK_EXPAND + 3 + 1 + 2 @@ -335,28 +249,31 @@ True False 0 - _Network I/O + Poll _Network I/O True prefs-stats-enable-net - 1 - 2 + 2 + 3 GTK_FILL - + True - False + True + False 0 - _Disk I/O - True - prefs-stats-enable-disk + True + - GTK_FILL + 1 + 3 + 2 + 3 @@ -365,10 +282,10 @@ - + True False - <b>Enable Stats Polling</b> + <b>Stats Options</b> True @@ -376,7 +293,7 @@ False False - 1 + 0 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()) -- cgit v1.2.1