summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SoftwareProperties/SoftwareProperties.py45
-rw-r--r--data/SoftwareProperties.glade15
-rw-r--r--debian/changelog8
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 @@
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="combobox1">
+ <widget class="GtkComboBox" id="combobox_update_interval">
<property name="visible">True</property>
- <property name="items" translatable="yes">every hour
-twice a day
-daily
+ <property name="items" translatable="yes">daily
every two days
weekly
-</property>
+every two weeks
+custom</property>
<property name="add_tearoffs">False</property>
<property name="focus_on_click">True</property>
+ <signal name="changed" handler="on_combobox_update_interval_changed" last_modification_time="Wed, 18 Jan 2006 09:43:34 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -468,7 +468,7 @@ weekly
<child>
<widget class="GtkButton" id="button_auth_restor">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Revoke all imported keys and restore the default keys</property>
+ <property name="tooltip" translatable="yes">Restore the default distribution keys</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Restore _Defaults</property>
<property name="use_underline">True</property>
@@ -599,6 +599,7 @@ weekly
<child>
<widget class="GtkButton" id="button_help">
+ <property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-help</property>
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 <michael.vogt@ubuntu.com> Tue, 17 Jan 2006 17:27:15 +0100