From 22f2cef12e3cd8691615548edc630b96f4238b60 Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Wed, 1 Feb 2006 03:55:51 +0100 Subject: * Use gksu and not gksudo #30057 --- data/gnome-software-properties.desktop.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/gnome-software-properties.desktop.in b/data/gnome-software-properties.desktop.in index ef1547c4..c626869a 100644 --- a/data/gnome-software-properties.desktop.in +++ b/data/gnome-software-properties.desktop.in @@ -2,7 +2,7 @@ _Name=Software Properties _GenericName=Software Properties _Comment=Edit software sources and settings -Exec=gksudo /usr/bin/gnome-software-properties +Exec=gksu /usr/bin/gnome-software-properties Icon=update-manager.png Terminal=false MultipleArgs=false -- cgit v1.2.3 From 01d13b8c0c6e6c59cbf1b39c4d1c3f8b800e0094 Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Wed, 1 Feb 2006 04:17:53 +0100 Subject: * Compressed all image files - the saves about 4.5 MByte #30059 --- help/C/figures/authentication-add.png | Bin 303198 -> 42381 bytes help/C/figures/authentication.png | Bin 274684 -> 24064 bytes help/C/figures/download-progressbar.png | Bin 208318 -> 27554 bytes help/C/figures/failed-repos.png | Bin 243774 -> 28557 bytes help/C/figures/install-progress-terminal.png | Bin 451335 -> 41538 bytes help/C/figures/install-progress.png | Bin 133917 -> 14638 bytes help/C/figures/main-system-updates-available.png | Bin 277960 -> 48292 bytes .../main-system-updates-summary-details.png | Bin 368111 -> 52051 bytes help/C/figures/main-system-updates-summary.png | Bin 308065 -> 48278 bytes help/C/figures/main-system-uptodate.png | Bin 229559 -> 31064 bytes help/C/figures/main-view-monitor-update.png | Bin 471026 -> 53447 bytes help/C/figures/main-view-update-detail.png | Bin 356191 -> 48478 bytes help/C/figures/preferences-add-custom.png | Bin 150488 -> 20849 bytes help/C/figures/preferences-add.png | Bin 114050 -> 16862 bytes help/C/figures/preferences-edit.png | Bin 116045 -> 14607 bytes help/C/figures/preferences-repos-changeinfo.png | Bin 138955 -> 22734 bytes help/C/figures/preferences.png | Bin 341184 -> 49753 bytes help/C/figures/reload-package-info.png | Bin 250061 -> 31937 bytes help/C/figures/settings.png | Bin 206450 -> 32236 bytes help/C/figures/synaptic-toggle-install-view.png | Bin 319986 -> 31810 bytes 20 files changed, 0 insertions(+), 0 deletions(-) diff --git a/help/C/figures/authentication-add.png b/help/C/figures/authentication-add.png index 004b3fa1..cd3d189f 100644 Binary files a/help/C/figures/authentication-add.png and b/help/C/figures/authentication-add.png differ diff --git a/help/C/figures/authentication.png b/help/C/figures/authentication.png index 07227a2e..8601ccd9 100644 Binary files a/help/C/figures/authentication.png and b/help/C/figures/authentication.png differ diff --git a/help/C/figures/download-progressbar.png b/help/C/figures/download-progressbar.png index 9f096460..0cef6d51 100644 Binary files a/help/C/figures/download-progressbar.png and b/help/C/figures/download-progressbar.png differ diff --git a/help/C/figures/failed-repos.png b/help/C/figures/failed-repos.png index 01b0d0e9..68e688cc 100644 Binary files a/help/C/figures/failed-repos.png and b/help/C/figures/failed-repos.png differ diff --git a/help/C/figures/install-progress-terminal.png b/help/C/figures/install-progress-terminal.png index 06111c61..6f21faf8 100644 Binary files a/help/C/figures/install-progress-terminal.png and b/help/C/figures/install-progress-terminal.png differ diff --git a/help/C/figures/install-progress.png b/help/C/figures/install-progress.png index 699f6219..2ab7fa51 100644 Binary files a/help/C/figures/install-progress.png and b/help/C/figures/install-progress.png differ diff --git a/help/C/figures/main-system-updates-available.png b/help/C/figures/main-system-updates-available.png index 24dc5481..f4d9f1e6 100644 Binary files a/help/C/figures/main-system-updates-available.png and b/help/C/figures/main-system-updates-available.png differ diff --git a/help/C/figures/main-system-updates-summary-details.png b/help/C/figures/main-system-updates-summary-details.png index 08860ec1..2b635ce1 100644 Binary files a/help/C/figures/main-system-updates-summary-details.png and b/help/C/figures/main-system-updates-summary-details.png differ diff --git a/help/C/figures/main-system-updates-summary.png b/help/C/figures/main-system-updates-summary.png index fefea5dd..8d9b0103 100644 Binary files a/help/C/figures/main-system-updates-summary.png and b/help/C/figures/main-system-updates-summary.png differ diff --git a/help/C/figures/main-system-uptodate.png b/help/C/figures/main-system-uptodate.png index d8c10d5f..60394d06 100644 Binary files a/help/C/figures/main-system-uptodate.png and b/help/C/figures/main-system-uptodate.png differ diff --git a/help/C/figures/main-view-monitor-update.png b/help/C/figures/main-view-monitor-update.png index b8b2a80b..308a81ca 100644 Binary files a/help/C/figures/main-view-monitor-update.png and b/help/C/figures/main-view-monitor-update.png differ diff --git a/help/C/figures/main-view-update-detail.png b/help/C/figures/main-view-update-detail.png index d3f8f12c..4e05e272 100644 Binary files a/help/C/figures/main-view-update-detail.png and b/help/C/figures/main-view-update-detail.png differ diff --git a/help/C/figures/preferences-add-custom.png b/help/C/figures/preferences-add-custom.png index 97e709f6..1c7b5a89 100644 Binary files a/help/C/figures/preferences-add-custom.png and b/help/C/figures/preferences-add-custom.png differ diff --git a/help/C/figures/preferences-add.png b/help/C/figures/preferences-add.png index e77f7523..1f2cad19 100644 Binary files a/help/C/figures/preferences-add.png and b/help/C/figures/preferences-add.png differ diff --git a/help/C/figures/preferences-edit.png b/help/C/figures/preferences-edit.png index 5d713264..e3bc0d2b 100644 Binary files a/help/C/figures/preferences-edit.png and b/help/C/figures/preferences-edit.png differ diff --git a/help/C/figures/preferences-repos-changeinfo.png b/help/C/figures/preferences-repos-changeinfo.png index e1fbbd9e..b012afe0 100644 Binary files a/help/C/figures/preferences-repos-changeinfo.png and b/help/C/figures/preferences-repos-changeinfo.png differ diff --git a/help/C/figures/preferences.png b/help/C/figures/preferences.png index e59f2c29..eac98df9 100644 Binary files a/help/C/figures/preferences.png and b/help/C/figures/preferences.png differ diff --git a/help/C/figures/reload-package-info.png b/help/C/figures/reload-package-info.png index 76156b2e..f7ca3d93 100644 Binary files a/help/C/figures/reload-package-info.png and b/help/C/figures/reload-package-info.png differ diff --git a/help/C/figures/settings.png b/help/C/figures/settings.png index 2084c2ef..33bb325a 100644 Binary files a/help/C/figures/settings.png and b/help/C/figures/settings.png differ diff --git a/help/C/figures/synaptic-toggle-install-view.png b/help/C/figures/synaptic-toggle-install-view.png index be04d24e..c9de71be 100644 Binary files a/help/C/figures/synaptic-toggle-install-view.png and b/help/C/figures/synaptic-toggle-install-view.png differ -- cgit v1.2.3 From c6d126a887c61610227717eae43c24f732580500 Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Wed, 1 Feb 2006 05:27:46 +0100 Subject: * Move Internet updates to its own tab * Add option for autoclean (not working 100% :) * Add option for auto download (working) * Add option for unattended install (placeholder) --- SoftwareProperties/SoftwareProperties.py | 73 ++++++- data/SoftwareProperties.glade | 327 +++++++++++++++++++++---------- 2 files changed, 291 insertions(+), 109 deletions(-) diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index 8da70eee..21f42cf6 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -115,6 +115,43 @@ class SoftwareProperties(SimpleGladeApp): self.checkbutton_auto_update.set_active(False) self.combobox_update_interval.set_sensitive(False) + # Automatic removal of cached packages by age + self.combobox_delete_interval_mapping = { 0 : 7, + 1 : 14, + 2 : 31 } + + delete_days = apt_pkg.Config.FindI(CONF_MAP["max_age"]) + + self.combobox_delete_interval.append_text("After one week") + self.combobox_delete_interval.append_text("After two weeks") + self.combobox_delete_interval.append_text("After one month") + self.combobox_delete_interval.append_text("Immediatly") + + # If a custom period is defined add an corresponding entry + if not delete_days in self.combobox_delete_interval_mapping.values(): + if delete_days > 0 and CONF_MAP["autoclean"] != 0: + self.combobox_delete_interval.append_text(_("After %s days" + % delete_days)) + self.combobox_delete_interval_mapping[3] = delete_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 delete_days >= 1 and CONF_MAP["autoclean"] != 0: + self.checkbutton_auto_delete.set_active(True) + self.combobox_delete_interval.set_sensitive(True) + else: + self.checkbutton_auto_delete.set_active(False) + self.combobox_delete_interval.set_sensitive(False) + + # Autodownload + if CONF_MAP["autodownload"] == 1: + self.checkbutton_auto_download.set_active(True) + else: + self.checkbutton_auto_download.set_active(False) + # apt-key stuff self.apt_key = apt_key() self.init_keyslist() @@ -175,7 +212,7 @@ class SoftwareProperties(SimpleGladeApp): apt_pkg.Config.Set(CONF_MAP["autoupdate"], str(value)) self.write_config() - def opt_autoupdate_toggled(self, widget): + def on_opt_autoupdate_toggled(self, widget): if self.checkbutton_auto_update.get_active(): self.combobox_update_interval.set_sensitive(True) # if no frequency was specified use daily @@ -190,6 +227,40 @@ class SoftwareProperties(SimpleGladeApp): apt_pkg.Config.Set(CONF_MAP["autoupdate"], str(value)) # FIXME: Write config options, apt_pkg should be able to do this. self.write_config() + + def on_opt_autodownload_toggled(self, widget): + if self.checkbutton_auto_download.get_active(): + apt_pkg.Config.Set(CONF_MAP["autodownload"], str(1)) + else: + apt_pkg.Config.Set(CONF_MAP["autodownload"], str(0)) + # FIXME: Write config options, apt_pkg should be able to do this. + self.write_config() + + def on_combobox_delete_interval_changed(self, widget): + i = self.combobox_delete_interval.get_active() + value = self.combobox_delete_interval_mapping[i] + # Only write the key if it has changed + if not value == apt_pkg.Config.FindI(CONF_MAP["max_age"]): + apt_pkg.Config.Set(CONF_MAP["max_age"], str(value)) + self.write_config() + + def opt_autodelete_toggled(self, widget): + if self.checkbutton_auto_delete.get_active(): + self.combobox_delete_interval.set_sensitive(True) + # if no frequency was specified use daily + i = self.combobox_delete_interval.get_active() + if i == -1: + i = 0 + self.combobox_delete_interval.set_active(i) + value_maxage = self.combobox_delete_interval_mapping[i] + value_clean = 1 + apt_pkg.Config.Set(CONF_MAP["max_age"], str(value_clean)) + else: + self.combobox_delete_interval.set_sensitive(False) + value_clean = 0 + apt_pkg.Config.Set(CONF_MAP["autoclean"], str(value_clean)) + # FIXME: Write config options, apt_pkg should be able to do this. + self.write_config() def write_config(self): #print "write_config()" diff --git a/data/SoftwareProperties.glade b/data/SoftwareProperties.glade index 0a39a13f..9df03955 100644 --- a/data/SoftwareProperties.glade +++ b/data/SoftwareProperties.glade @@ -41,6 +41,224 @@ False False + + + 12 + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 6 + 0 + 12 + 0 + + + + True + False + 6 + + + + True + False + 6 + + + + True + True + _Check for updates automatically: + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + True + + + + + + True + + False + True + + + + 0 + True + True + + + + + 0 + False + False + + + + + + True + True + _Download updates in the backgound, but do not install them + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + + True + True + _Install new updates without confirmation + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + + True + False + 6 + + + + True + True + D_elete downloaded software files: + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + True + + + + + + True + + False + True + + + + 0 + True + True + + + + + 0 + False + True + + + + + + + + + + True + <b>Internet updates</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + False + True + + + + + + True + Internet Updates + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + 12 @@ -237,7 +455,7 @@ True - <b>Sources</b> + <b>Channels</b> False True GTK_JUSTIFY_LEFT @@ -263,113 +481,6 @@ True - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 6 - 0 - 12 - 0 - - - - True - False - 6 - - - - True - False - 6 - - - - True - True - Automatically check for updates: - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - False - True - - - - - - True - - False - True - - - - 0 - True - True - - - - - 0 - False - False - - - - - - - - - - True - <b>Internet updates</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - - False -- cgit v1.2.3 From 4155c6064c956a51876c25c20ad265e4c2f3466d Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Fri, 3 Feb 2006 13:34:43 +0100 Subject: * Use "host_window" instead of "window", since it is a gtk attribute * Set the deault icon of all windows in the code so that we also get the app icon on code generated dialogs * Do not show a "X" in the window decoation of dialogs - the dialog needs to be realized before - it is a HIG recommendation --- UpdateManager/GtkProgress.py | 11 ++++++++--- UpdateManager/UpdateManager.py | 10 +++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/UpdateManager/GtkProgress.py b/UpdateManager/GtkProgress.py index 704946c7..d11ca3e9 100644 --- a/UpdateManager/GtkProgress.py +++ b/UpdateManager/GtkProgress.py @@ -27,14 +27,17 @@ import apt_pkg from gettext import gettext as _ class GtkOpProgress(apt.OpProgress): - def __init__(self, window, progressbar, status, parent): + def __init__(self, host_window, progressbar, status, parent): self._parent = parent - self._window = window + self._window = host_window self._status = status self._progressbar = progressbar + # Do not show the close button + self._window.realize() + host_window.window.set_functions(gtk.gdk.FUNC_MOVE) #self._progressbar.set_pulse_step(0.01) #self._progressbar.pulse() - window.set_transient_for(parent) + self._window.set_transient_for(parent) def update(self, percent): #print percent #print self.Op @@ -66,6 +69,8 @@ class GtkFetchProgress(apt.progress.FetchProgress): self.progress = parent.progressbar_fetch self.window_fetch = parent.window_fetch self.window_fetch.set_transient_for(parent.window_main) + self.window_fetch.realize() + self.window_fetch.window.set_functions(gtk.gdk.FUNC_MOVE) # set summary if self.summary != "": self.summary.set_markup("%s \n\n%s" % diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index de77f041..dd9204c3 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -213,7 +213,13 @@ class UpdateList: class UpdateManager(SimpleGladeApp): def __init__(self, datadir): - + icons = gtk.icon_theme_get_default() + try: + logo=icons.load_icon("update-manager", 48, 0) + gtk.window_set_default_icon_list(logo) + except: + pass + self.datadir = datadir SimpleGladeApp.__init__(self, datadir+"glade/UpdateManager.glade", None, domain="update-manager") @@ -549,6 +555,8 @@ class UpdateManager(SimpleGladeApp): win = gtk.Window() win.set_property("type-hint", gtk.gdk.WINDOW_TYPE_HINT_DIALOG) win.set_title("") + win.realize() + win.window.set_functions(gtk.gdk.FUNC_MOVE) win.set_border_width(6) win.set_transient_for(self.window_main) win.set_position(gtk.WIN_POS_CENTER_ON_PARENT) -- cgit v1.2.3 From 99a65ab5e62498dc958c3f1e374dbd2bbf72e7c6 Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Fri, 3 Feb 2006 22:37:00 +0100 Subject: * Do not allow to close the main window until actions are performed and the main window is insenstive * Remove missing synaptic icon in the glade file. it only produces an error message in the terminal --- UpdateManager/UpdateManager.py | 14 +++++++++----- data/UpdateManager.glade | 1 - 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index dd9204c3..3eac6395 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -238,7 +238,7 @@ class UpdateManager(SimpleGladeApp): self.expander_details.connect("notify::expanded", self.activate_details) # useful exit stuff - self.window_main.connect("delete_event", lambda w, ev: self.exit()) + self.window_main.connect("delete_event", self.close) self.button_cancel.connect("clicked", lambda w: self.exit()) # the treeview (move into it's own code!) @@ -291,6 +291,13 @@ class UpdateManager(SimpleGladeApp): self.restore_state() + def close(self, widget, data=None): + if self.window_main.get_property("sensitive") is False: + return True + else: + self.exit() + + def set_changes_buffer(self, changes_buffer, text, name, srcpkg): changes_buffer.set_text("") lines = text.split("\n") @@ -564,9 +571,6 @@ class UpdateManager(SimpleGladeApp): win.set_property("skip-pager-hint", True) win.resize(400,200) win.set_resizable(False) - # prevent the window from closing with the delete button (there is - # a cancel button in the window) - win.connect("delete_event", lambda e,w: True); # create the socket socket = gtk.Socket() @@ -586,7 +590,7 @@ class UpdateManager(SimpleGladeApp): while gtk.events_pending(): gtk.main_iteration() self.fillstore() - self.window_main.set_sensitive(True) + self.window_main.set_sensitive(True) def toggled(self, renderer, path_string): """ a toggle button in the listview was toggled """ diff --git a/data/UpdateManager.glade b/data/UpdateManager.glade index 2258e394..c39b94b0 100644 --- a/data/UpdateManager.glade +++ b/data/UpdateManager.glade @@ -1053,7 +1053,6 @@ Need to get the changes from the central server False False False - synaptic.xpm True True True -- cgit v1.2.3