From e4f7575420eca0112e67db253d3c7837c3d31d1b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 18 Jan 2006 10:50:06 +0100 Subject: * SoftwareProperties: more HIGification --- SoftwareProperties/SoftwareProperties.py | 45 ++++++++++++++++++++++---------- data/SoftwareProperties.glade | 15 ++++++----- debian/changelog | 8 ++++-- 3 files changed, 45 insertions(+), 23 deletions(-) diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index 3572e8e8..6b992df7 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -78,18 +78,31 @@ class SoftwareProperties(SimpleGladeApp): self.init_sourceslist() self.reload_sourceslist() - - update_days = apt_pkg.Config.FindI(CONF_MAP["autoupdate"]) - - self.spinbutton_update_interval.set_value(update_days) + + # internet update setings + # this maps the key (combo-box-index) to the auto-update-interval value + # where (-1) means, no key + self.combobox_interval_mapping = { 0 : 1, + 1 : 2, + 2 : 7, + 3 : 14, + 4 : -1} + self.combobox_update_interval.set_active(0) + update_days = apt_pkg.Config.FindI(CONF_MAP["autoupdate"]) + for key in self.combobox_interval_mapping: + if self.combobox_interval_mapping[key] == update_days: + self.combobox_update_interval.set_active(key) + break if update_days >= 1: self.checkbutton_auto_update.set_active(True) + self.combobox_update_interval.set_sensitive(True) else: self.checkbutton_auto_update.set_active(False) - + self.combobox_update_interval.set_sensitive(False) + + # apt-key stuff self.apt_key = apt_key() - self.init_keyslist() self.reload_keyslist() @@ -139,17 +152,21 @@ class SoftwareProperties(SimpleGladeApp): self.keys_store.clear() for key in self.apt_key.list(): self.keys_store.append([key]) - + + def on_combobox_update_interval_changed(self, widget): + i = self.combobox_update_interval.get_active() + value = self.combobox_interval_mapping[i] + apt_pkg.Config.Set(CONF_MAP["autoupdate"], str(value)) + self.write_config() + def opt_autoupdate_toggled(self, widget): if self.checkbutton_auto_update.get_active(): - if self.spinbutton_update_interval.get_value() == 0: - self.spinbutton_update_interval.set_value(1) - value = "1" - else: - value = str(self.spinbutton_update_interval.get_value()) + self.combobox_update_interval.set_sensitive(True) + i = self.combobox_update_interval.get_active() + value = self.combobox_interval_mapping[i] else: - value = "0" - + self.combobox_update_interval.set_sensitive(False) + value = 0 apt_pkg.Config.Set(CONF_MAP["autoupdate"], str(value)) # FIXME: Write config options, apt_pkg should be able to do this. diff --git a/data/SoftwareProperties.glade b/data/SoftwareProperties.glade index c0400628..e682b885 100644 --- a/data/SoftwareProperties.glade +++ b/data/SoftwareProperties.glade @@ -310,21 +310,21 @@ 0 False - False + True - + True - every hour -twice a day -daily + daily every two days weekly - +every two weeks +custom False True + 0 @@ -468,7 +468,7 @@ weekly True - Revoke all imported keys and restore the default keys + Restore the default distribution keys True Restore _Defaults True @@ -599,6 +599,7 @@ weekly + True True True gtk-help diff --git a/debian/changelog b/debian/changelog index aa494289..ba733a42 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,11 @@ update-manager (0.42.1ubuntu1) dapper; urgency=low - * improved the HIG complicane more, removed some of the uglines - from the last version + * UpdateManagert: + improved the HIG complicane more, removed some of the uglines + from the last version (Malone #22090) + * SoftwareProperties: + improved the HIG complicane (Malone #28530) + (thanks to Sebastian Heinlein) -- Michael Vogt Tue, 17 Jan 2006 17:27:15 +0100 -- cgit v1.2.3