diff options
| author | Sebastian Heinlein <sebastian.heinlein@web.de> | 2006-01-25 14:32:38 +0100 |
|---|---|---|
| committer | Sebastian Heinlein <sebastian.heinlein@web.de> | 2006-01-25 14:32:38 +0100 |
| commit | 41a6ea707688e2e239ee75212888d01c219f39b1 (patch) | |
| tree | d3231336edc1158ad16aec1bcb3077bb5f413928 | |
| parent | 04314c42545fa783b12c9c7b7ec88200afa5e3f2 (diff) | |
| download | python-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"
| -rw-r--r-- | SoftwareProperties/SoftwareProperties.py | 25 | ||||
| -rw-r--r-- | UpdateManager/UpdateManager.py | 9 | ||||
| -rw-r--r-- | data/SoftwareProperties.glade | 7 | ||||
| -rw-r--r-- | data/UpdateManager.glade | 101 |
4 files changed, 100 insertions, 42 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, diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index 89f4989e..a4f8ed48 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -219,6 +219,7 @@ class UpdateManager(SimpleGladeApp): None, domain="update-manager") self.gnome_program = gnome.init("update-manager", "0.41") + self.window_main.set_sensitive(False) self.packages = [] self.dl_size = 0 @@ -423,9 +424,9 @@ class UpdateManager(SimpleGladeApp): if action == INSTALL: cmd.append("--set-selections") cmd.append("--progress-str") - cmd.append("%s" % _("The updates are being applied.")) + cmd.append("%s" % _("Please wait, this can take some time.")) cmd.append("--finish-str") - cmd.append("%s" % _("Upgrade is complete")) + cmd.append("%s" % _("Update is complete")) proc = subprocess.Popen(cmd, stdin=subprocess.PIPE) f = proc.stdin for s in self.packages: @@ -545,6 +546,7 @@ class UpdateManager(SimpleGladeApp): self.window_main.set_sensitive(False) # create a progress window that will swallow the synaptic progress bars win = gtk.Window() + win.set_property("type-hint", gtk.gdk.WINDOW_TYPE_HINT_DIALOG) win.set_title("") win.set_border_width(12) win.set_transient_for(self.window_main) @@ -880,9 +882,6 @@ class UpdateManager(SimpleGladeApp): self.meta.connect("new_dist_available",self.new_dist_available) self.meta.connect("dist_no_longer_supported",self.dist_no_longer_supported) - self.store.append([True, _("Initializing and getting list of updates..."), - None, None, None, None, None]) - while gtk.events_pending(): gtk.main_iteration() diff --git a/data/SoftwareProperties.glade b/data/SoftwareProperties.glade index 6bf1aa0f..edd12320 100644 --- a/data/SoftwareProperties.glade +++ b/data/SoftwareProperties.glade @@ -14,6 +14,7 @@ <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> + <property name="icon">update-manager.png</property> <property name="decorated">True</property> <property name="skip_taskbar_hint">False</property> <property name="skip_pager_hint">False</property> @@ -317,11 +318,7 @@ <child> <widget class="GtkComboBox" id="combobox_update_interval"> <property name="visible">True</property> - <property name="items" translatable="yes">daily -every two days -weekly -every two weeks -custom</property> + <property name="items" translatable="yes"></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"/> diff --git a/data/UpdateManager.glade b/data/UpdateManager.glade index 78e5cb79..58413506 100644 --- a/data/UpdateManager.glade +++ b/data/UpdateManager.glade @@ -16,7 +16,7 @@ <property name="decorated">True</property> <property name="skip_taskbar_hint">False</property> <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> <property name="urgency_hint">False</property> @@ -33,7 +33,7 @@ <property name="border_width">6</property> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">6</property> + <property name="spacing">12</property> <child> <widget class="GtkHBox" id="hbox3"> @@ -153,23 +153,6 @@ <property name="spacing">6</property> <child> - <widget class="GtkImage" id="image11"> - <property name="visible">True</property> - <property name="stock">gtk-dialog-info</property> - <property name="icon_size">3</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> <widget class="GtkLabel" id="label_new_release"> <property name="visible">True</property> <property name="label"></property> @@ -197,6 +180,7 @@ <child> <widget class="GtkButton" id="button_dist_upgrade"> <property name="visible">True</property> + <property name="tooltip" translatable="yes">Upgrade to a new version of Ubuntu</property> <property name="can_focus">True</property> <property name="label" translatable="yes">U_pgrade</property> <property name="use_underline">True</property> @@ -274,8 +258,8 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1</property> - <property name="yalign">0.5</property> + <property name="xalign">0</property> + <property name="yalign">0</property> <property name="xpad">0</property> <property name="ypad">0</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> @@ -293,6 +277,7 @@ <child> <widget class="GtkButton" id="button_install"> <property name="visible">True</property> + <property name="tooltip" translatable="yes">Install the seleceted updates</property> <property name="can_default">True</property> <property name="has_default">True</property> <property name="can_focus">True</property> @@ -715,7 +700,7 @@ <child> <widget class="GtkButton" id="button1"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Search for updates in the software channels</property> + <property name="tooltip" translatable="yes">Reload the latest information about updates</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> @@ -760,7 +745,7 @@ <child> <widget class="GtkLabel" id="label24"> <property name="visible">True</property> - <property name="label" translatable="yes">_Query</property> + <property name="label" translatable="yes">_Reload</property> <property name="use_underline">True</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -1434,11 +1419,73 @@ Need to get the changes from the central server</property> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">_Reload</property> - <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-8</property> + + <child> + <widget class="GtkAlignment" id="alignment7"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox17"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image13"> + <property name="visible">True</property> + <property name="stock">gtk-refresh</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label28"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Reload</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> </widget> </child> @@ -1491,9 +1538,9 @@ Need to get the changes from the central server</property> <widget class="GtkLabel" id="label27"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes"><b><big>You need to manually query for updates</big></b> + <property name="label" translatable="yes"><b><big>You need to manually reload the latest information about updates</big></b> -Your system does not search for updates automatically. You can configure this behavior in "System" -> "Administration" -> "Software Properties".</property> +Your system does not check for updates automatically. You can configure this behavior in "System" -> "Administration" -> "Software Properties".</property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> |
