summaryrefslogtreecommitdiff
path: root/SoftwareProperties
diff options
context:
space:
mode:
authorSebastian Heinlein <sebastian.heinlein@web.de>2006-01-25 14:32:38 +0100
committerSebastian Heinlein <sebastian.heinlein@web.de>2006-01-25 14:32:38 +0100
commit41a6ea707688e2e239ee75212888d01c219f39b1 (patch)
treed3231336edc1158ad16aec1bcb3077bb5f413928 /SoftwareProperties
parent04314c42545fa783b12c9c7b7ec88200afa5e3f2 (diff)
downloadpython-apt-41a6ea707688e2e239ee75212888d01c219f39b1.tar.gz
SoftwareProperties:
* Allow a custom configuration for automatic internet udpates * Wording: "Choose a key-file" -> "Import key" (Import is the label on the button) * use the update-manager icon in the window list UpdateManager: * set window_main to unsensitive at the startup * Wording in the synaptic dialog: - "The updates are being applied." -> "Please wait, this can take some time." - "Upgrade is complete" -> "Update is complete" * set synapitc dialog to type-hint "dialog" and not "normal" * set the main_window to type-hint "dialog" and not "normal" * do not write a status message to treeview_updates during startup "Initializing and getting list of updates..." * Nicer wording in the dialog_manual_update: "You need to manually reload the latest information about updates" "Your system does not check for updates automatically. You can configure this behavior in "System" -> "Administration" -> "Software Properties"
Diffstat (limited to 'SoftwareProperties')
-rw-r--r--SoftwareProperties/SoftwareProperties.py25
1 files changed, 20 insertions, 5 deletions
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py
index 6b992df7..edcd407d 100644
--- a/SoftwareProperties/SoftwareProperties.py
+++ b/SoftwareProperties/SoftwareProperties.py
@@ -86,14 +86,27 @@ class SoftwareProperties(SimpleGladeApp):
self.combobox_interval_mapping = { 0 : 1,
1 : 2,
2 : 7,
- 3 : 14,
- 4 : -1}
+ 3 : 14 }
self.combobox_update_interval.set_active(0)
+
update_days = apt_pkg.Config.FindI(CONF_MAP["autoupdate"])
+
+ self.combobox_update_interval.append_text("Daily")
+ self.combobox_update_interval.append_text("Every Two Days")
+ self.combobox_update_interval.append_text("Weekly")
+ self.combobox_update_interval.append_text("Every Two Weeks")
+
+ # If a custom period is defined add an corresponding entry
+ if not update_days in self.combobox_interval_mapping.values():
+ self.combobox_update_interval.append_text(_("Every %s Days"
+ % update_days))
+ self.combobox_interval_mapping[4] = update_days
+
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)
@@ -156,8 +169,10 @@ class SoftwareProperties(SimpleGladeApp):
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()
+ # Only wirte the key if it has changed
+ if not value == apt_pkg.Config.FindI(CONF_MAP["autoupdate"]):
+ 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():
@@ -234,7 +249,7 @@ class SoftwareProperties(SimpleGladeApp):
self.modified = True
def add_key_clicked(self, widget):
- chooser = gtk.FileChooserDialog(title=_("Choose a key-file"),
+ chooser = gtk.FileChooserDialog(title=_("Import key"),
parent=self.window_main,
buttons=(gtk.STOCK_CANCEL,
gtk.RESPONSE_REJECT,