diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-02-27 10:51:26 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-02-27 10:51:26 +0100 |
| commit | 7da55cd2547325f4bc70d9eed46994bbc23d0d86 (patch) | |
| tree | 75b3a618726ec0acc62f2cdd712f3064eb5debb1 | |
| parent | 8adf34a8f38e586c5a4639ab2ce558e1ab21d680 (diff) | |
| parent | 14a4901efed8583a329c09225b76855ff6bcb6e3 (diff) | |
| download | python-apt-7da55cd2547325f4bc70d9eed46994bbc23d0d86.tar.gz | |
* merged with sebi
| -rw-r--r-- | DistUpgrade/DistUpgrade.glade | 3 | ||||
| -rw-r--r-- | DistUpgrade/DistUpgradeViewGtk.py | 35 | ||||
| -rw-r--r-- | SoftwareProperties/SoftwareProperties.py | 81 | ||||
| -rw-r--r-- | SoftwareProperties/aptsources.py | 314 | ||||
| -rw-r--r-- | SoftwareProperties/dialog_add.py | 30 | ||||
| -rw-r--r-- | SoftwareProperties/dialog_sources_list.py | 19 | ||||
| -rw-r--r-- | TODO | 6 | ||||
| -rw-r--r-- | UpdateManager/Common/DistInfo.py | 5 | ||||
| -rw-r--r-- | UpdateManager/UpdateManager.py | 2 | ||||
| -rw-r--r-- | channels/Ubuntu.info.in | 6 | ||||
| -rw-r--r-- | data/SoftwareProperties.glade | 274 | ||||
| -rw-r--r-- | data/SoftwarePropertiesDialogs.glade | 33 |
12 files changed, 571 insertions, 237 deletions
diff --git a/DistUpgrade/DistUpgrade.glade b/DistUpgrade/DistUpgrade.glade index c28b20ad..e50476e2 100644 --- a/DistUpgrade/DistUpgrade.glade +++ b/DistUpgrade/DistUpgrade.glade @@ -586,12 +586,13 @@ <child> <widget class="GtkLabel" id="label_summary"> <property name="visible">True</property> + <property name="can_focus">True</property> <property name="label" translatable="yes"></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">True</property> - <property name="selectable">False</property> + <property name="selectable">True</property> <property name="xalign">0</property> <property name="yalign">0.5</property> <property name="xpad">0</property> diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py index 3697a49e..7298b31e 100644 --- a/DistUpgrade/DistUpgradeViewGtk.py +++ b/DistUpgrade/DistUpgradeViewGtk.py @@ -126,6 +126,7 @@ class GtkInstallProgressAdapter(InstallProgress): reaper.connect("child-exited", self.child_exited) # some options for dpkg to make it die less easily apt_pkg.Config.Set("DPkg::Options::","--force-overwrite") + def startUpdate(self): self.finished = False # FIXME: add support for the timeout @@ -161,15 +162,19 @@ class GtkInstallProgressAdapter(InstallProgress): def fork(self): pid = self.term.forkpty(envv=self.env) return pid + def child_exited(self, term, pid, status): self.apt_status = os.WEXITSTATUS(status) self.finished = True + def waitChild(self): while not self.finished: self.updateInterface() return self.apt_status + def finishUpdate(self): self.label_status.set_text("") + def updateInterface(self): InstallProgress.updateInterface(self) self.progress.set_fraction(self.percent/100.0) @@ -181,9 +186,6 @@ class GtkInstallProgressAdapter(InstallProgress): class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): " gtk frontend of the distUpgrade tool " - - - def __init__(self): # FIXME: i18n must be somewhere relative do this dir bindtextdomain("update-manager",os.path.join(os.getcwd(),"mo")) @@ -237,6 +239,7 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): self._terminal_lines = [] self._terminal_log = open("/var/log/dist-upgrade-term.log","w") return self._term + def _term_content_changed(self, term): " called when the *visible* part of the terminal changes " @@ -277,7 +280,6 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): attrlist.insert(attr) label.set_property("attributes",attrlist) - def error(self, summary, msg, extended_msg=None): self.dialog_error.set_transient_for(self.window_main) #self.expander_terminal.set_expanded(True) @@ -309,30 +311,41 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): pkgs_remove, "%s packages are going to be removed." %\ pkgs_remove, pkgs_remove) - msg +=" " + msg += " " if pkgs_inst > 0: msg += gettext.ngettext("%s new package is going to be "\ "installed." % pkgs_inst, "%s new packages are going to be "\ "installed." % pkgs_inst, pkgs_inst) - msg +=" " + msg += " " if pkgs_upgrade > 0: msg += gettext.ngettext("%s package is going to be upgraded." %\ pkgs_upgrade, "%s packages are going to be upgraded." %\ pkgs_upgrade, pkgs_upgrade) msg +=" " - if msg == "": + + if downloadSize > 0: + msg += _("You have to download a total of %s." %\ + apt_pkg.SizeToStr(downloadSize)) + + if (pkgs_upgrade + pkgs_inst + pkgs_remove) > 100: + msg += "\n\n%s" % _("The upgrade can take several hours and "\ + "cannot be canceled at any time later.") + + msg += "\n\n<b>%s</b>" % _("To prevent data loss close all open "\ + "applications and documents.") + + # Show an error if no actions are planned + if (pkgs_upgrade + pkgs_inst + pkgs_remove) < 1: # FIXME: this should go into DistUpgradeController summary = _("Could not find any upgrades") msg = _("Your system has already been upgraded.") self.error(summary, msg) return False - else: - msg += _("You have to download a total of %s." %\ - apt_pkg.SizeToStr(downloadSize)) + self.label_summary.set_markup("<big><b>%s</b></big>" % summary) - self.label_changes.set_text(msg) + self.label_changes.set_markup(msg) # fill in the details self.details_list.clear() for rm in self.toRemove: diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index 0e9a0f0d..f7f7f6f2 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -91,6 +91,7 @@ class SoftwareProperties(SimpleGladeApp): self.init_sourceslist() self.reload_sourceslist() + self.button_revert.set_sensitive(False) # internet update setings @@ -179,6 +180,10 @@ class SoftwareProperties(SimpleGladeApp): else: self.checkbutton_unattended.set_active(False) + # Backup the source list + self.sourceslist.clearBackup(".save") + self.sourceslist.backup(".save") + # apt-key stuff self.apt_key = apt_key() self.init_keyslist() @@ -204,8 +209,7 @@ class SoftwareProperties(SimpleGladeApp): file) res = dialog.run() if res == gtk.RESPONSE_OK: - self.reload_sourceslist() - self.modified = True + self.modified_sourceslist() def on_sources_drag_data_received(self, widget, context, x, y, selection, target_type, timestamp): @@ -225,13 +229,15 @@ class SoftwareProperties(SimpleGladeApp): self.treeview_sources.set_model(self.source_store) cell_desc = gtk.CellRendererText() - #cell_desc.set_property("xpad", 10) - #cell_desc.set_property("ypad", 10) + cell_desc.set_property("xpad", 2) + cell_desc.set_property("ypad", 2) col_desc = gtk.TreeViewColumn(_("Software Channel"), cell_desc, markup=COLUMN_DESC) - col_desc.set_max_width(500) + col_desc.set_max_width(1000) cell_toggle = gtk.CellRendererToggle() + cell_toggle.set_property("xpad", 2) + cell_toggle.set_property("ypad", 2) cell_toggle.connect('toggled', self.on_channel_toggled) col_active = gtk.TreeViewColumn(_("Active"), cell_toggle, active=COLUMN_ACTIVE) @@ -242,13 +248,27 @@ class SoftwareProperties(SimpleGladeApp): self.sourceslist = aptsources.SourcesList() self.matcher = aptsources.SourceEntryMatcher() + def on_channel_activate(self, treeview, path, column): + """Open the edit dialog if a channel was double clicked""" + self.on_edit_clicked(treeview) + + def on_treeview_sources_cursor_changed(self, treeview): + """Enable the buttons remove and edit if a channel is selected""" + sel = self.treeview_sources.get_selection() + (model, iter) = sel.get_selected() + if iter: + self.button_edit.set_sensitive(True) + self.button_remove.set_sensitive(True) + else: + self.button_edit.set_sensitive(False) + self.button_remove.set_sensitive(False) + def on_channel_toggled(self, cell_toggle, path): """Enable or disable the selected channel""" iter = self.source_store.get_iter((int(path),)) source_entry = self.source_store.get_value(iter, LIST_ENTRY_OBJ) source_entry.disabled = not source_entry.disabled - self.reload_sourceslist() - self.modified = True + self.modified_sourceslist() def init_keyslist(self): self.keys_store = gtk.ListStore(str) @@ -259,18 +279,30 @@ class SoftwareProperties(SimpleGladeApp): keys_col = gtk.TreeViewColumn("Key", tr, text=0) self.treeview2.append_column(keys_col) + def on_button_revert_clicked(self, button): + """Restore the source list from the startup of the dialog""" + self.sourceslist.restoreBackup(".save") + self.sourceslist.clearBackup(".save") + self.sourceslist.backup(".save") + self.sourceslist.refresh() + self.reload_sourceslist() + self.button_revert.set_sensitive(False) + + def modified_sourceslist(self): + """The sources list was changed and now needs to be saved and reloaded""" + self.button_revert.set_sensitive(True) + self.save_sourceslist() + self.reload_sourceslist() + def reload_sourceslist(self): self.source_store.clear() + self.sourceslist.check_for_endangered_dists() for source in self.sourceslist.list: if source.invalid: continue - (nice_type, nice_dist, nice_comps) = self.matcher.match(source) - - contents = "<b>%s</b>%s" % (nice_dist, nice_comps) - if source.type == "deb-src": - contents = "<b>%s</b> - %s %s" % (nice_dist, nice_type, nice_comps) + contents = self.sourceslist.render_source(source) self.source_store.append([not source.disabled, contents, source]) - + def reload_keyslist(self): self.keys_store.clear() for key in self.apt_key.list(): @@ -378,17 +410,17 @@ class SoftwareProperties(SimpleGladeApp): def save_sourceslist(self): #location = "/etc/apt/sources.list" #shutil.copy(location, location + ".save") - self.sourceslist.backup(".save") self.sourceslist.save() - + def on_add_clicked(self, widget): + """Open a dialog to add new channels""" dialog = dialog_add.dialog_add(self.window_main, self.sourceslist, self.datadir) if dialog.run() == gtk.RESPONSE_OK: - self.reload_sourceslist() - self.modified = True - + self.modified_sourceslist() + def on_edit_clicked(self, widget): + """Open a dialog to edit the currently selected dialog""" sel = self.treeview_sources.get_selection() (model, iter) = sel.get_selected() if not iter: @@ -397,17 +429,17 @@ class SoftwareProperties(SimpleGladeApp): dialog = dialog_edit.dialog_edit(self.window_main, self.sourceslist, source_entry, self.datadir) if dialog.run() == gtk.RESPONSE_OK: - self.reload_sourceslist() - self.modified = True - + self.modified_sourceslist() + def on_remove_clicked(self, widget): sel = self.treeview_sources.get_selection() (model, iter) = sel.get_selected() if iter: source = model.get_value(iter, LIST_ENTRY_OBJ) self.sourceslist.remove(source) - self.reload_sourceslist() - self.modified = True + self.modified_sourceslist() + self.button_edit.set_sensitive(False) + self.button_remove.set_sensitive(False) def add_key_clicked(self, widget): chooser = gtk.FileChooserDialog(title=_("Import key"), @@ -492,8 +524,7 @@ class SoftwareProperties(SimpleGladeApp): if line != "": full_path = "%s%s" % (apt_pkg.Config.FindDir("Dir::Etc"),saved_entry) self.sourceslist.list.append(aptsources.SourceEntry(line,full_path)) - self.reload_sourceslist() - self.modified = True + self.modified_sourceslist() # FIXME: move this into a different file diff --git a/SoftwareProperties/aptsources.py b/SoftwareProperties/aptsources.py index f751cf7c..532600fd 100644 --- a/SoftwareProperties/aptsources.py +++ b/SoftwareProperties/aptsources.py @@ -32,6 +32,8 @@ import os.path from UpdateManager.Common.DistInfo import DistInfo +(SOURCE_SECURITY, SOURCE_UPDATES, SOURCE_SYSTEM, SOURCE_BACKPORTS) = range(4) + # actual source.list entries class SourceEntry: @@ -234,9 +236,96 @@ class SourcesList: line = line + "\n" self.list.insert(pos, SourceEntry(line)) + def disable_components(self, comps, source_entry): + """Disable components of a source""" + comps_remove = set(comps) & set(source_entry.comps) + if len(comps_remove) >= len(source_entry.comps): + # disable the whole source + source_entry.disabled = True + elif len(comps_remove) > 0: + # Remove the sections from the original source + comps_new = set(source_entry.comps) - comps_remove + comps_write="" + for comp in comps_new: + comps_write += " %s" % comp + line = "%s %s %s %s" % (source.type, source.uri, source.dist, + comps_write) + if source.comment: + line += "# %s" % source.comment + line += "\n" + index = self.list.index(source_entry) + file = self.list[index].file + self.list[index] = SourceEntry(line, file) + + # Add a disabled line with the disabled comps after the + # original line + comps_write="" + for comp in comps_remove: + comps_write = " %s" % comp + line_disabled = "#%s %s %s %s" % (source.type, source.uri, source.dist, + comps_remove) + if source.comment: + line_disabled += "# %s" % source.comment + line_disabled += "\n" + self.list.insert[index+1](SourceEntry(line_disabled, file)) + + def remove_components(self, comps, source_entry): + """ Remove components of a source""" + # The components that need to be removed from the source + comps_remove = set(comps) & set(source_entry.comps) + if len(comps_remove) >= len(source_entry.comps): + # Delete the whole source if there are no comps left + self.list.remove(source_entry) + elif len(comps_remove) > 0: + # Remove the sections from the original source + comps_new = set(source_entry.comps) - comps_remove + comps_write = "" + for comp in comps_new: + comps_write += " %s" % comp + line = "%s %s %s %s" % (source.type, source.uri, source.dist, + comps_write) + if source.comment: + line += "# %s" % source.comment + line += "\n" + index = self.list.index(source_entry) + file = self.list[index].file + self.list[index] = SourceEntry(line, file) + + def render_source(self, source): + """Render a nice output to show the source in a treeview""" + (nice_type, nice_dist, nice_comps, special) = self.matcher.match(source) + + if special in (SOURCE_UPDATES, SOURCE_BACKPORTS, SOURCE_SECURITY): + contents = "<b>%s</b>" % nice_dist + elif special == SOURCE_SYSTEM: + contents = "<b>%s</b>" % nice_dist + if source.type in ("deb-src", "rpm-src"): + contents += " (%s)" % nice_type + for comp in nice_comps: + contents += "\n%s" % comp + else: + contents = "<b>%s</b>" % nice_dist + if source.type in ("deb-src", "rpm-src"): + contents += " (%s)" % nice_type + for comp in nice_comps: + contents += "%s" % comp + return contents + def remove(self, source_entry): self.list.remove(source_entry) + def clearBackup(self, backup_ext): + " remove backuped sources.list files based on the backup extension " + dir = apt_pkg.Config.FindDir("Dir::Etc") + file = apt_pkg.Config.Find("Dir::Etc::sourcelist") + if os.path.exists(dir+file+backup_ext): + os.remove(dir+file+backup_ext) + # now sources.list.d + partsdir = apt_pkg.Config.FindDir("Dir::Etc::sourceparts") + for file in glob.glob("%s/*.list" % partsdir): + if os.path.exists(file+backup_ext): + os.remove(file+backup_ext) + def restoreBackup(self, backup_ext): " restore sources.list files based on the backup extension " dir = apt_pkg.Config.FindDir("Dir::Etc") @@ -278,10 +367,90 @@ class SourcesList: files[source.file].write(source.str()) for f in files: files[f].close() + + def check_for_endangered_dists(self): + # To store the sources that provide updates + self.sources_updates = [] + # To store the sources that provide backports + self.sources_backports = [] + # To store the sources that provide securtiy fixes + self.sources_security = [] + # To store the activated components of each dist + self.system_comps = {} + + # The matcher searches sets the required special tags + self.matcher = SourceEntryMatcher() + + for source in self.list: + if source.invalid: + continue + (nice_type, nice_dist, nice_comps, special) = self.matcher.match(source) + #print "match: %s %s" % (source.dist, special) + + # Collect the components of an activated system dist + if special == SOURCE_SYSTEM and source.disabled != True: + if self.system_comps.has_key(source.dist): + current = self.system_comps[source.dist] + self.system_comps[source.dist] = (current | set(source.comps)) + else: + self.system_comps[source.dist] = set(source.comps) + + # Collect sources that provide updates + elif special == SOURCE_UPDATES: + self.sources_updates.append(source) + elif special == SOURCE_SECURITY: + self.sources_security.append(source) + elif special == SOURCE_BACKPORTS: + self.sources_backports.append(source) + + #print "\nSystem Compos: %s " % self.system_comps + + # Check if each security source contains all components of + # the same dist + self.check_updates(self.sources_security) + self.check_updates(self.sources_updates) + self.check_updates(self.sources_backports) + + def check_updates(self, updates): + modified = False + for source in updates: + #print "SecSource: %s" % source.dist + # Skip the "-security" and "-updates" from the dist + i = source.dist.find("-") + dist = source.dist[:i] + # Are there any active components for the dist? + if self.system_comps.has_key(dist): + comps_sys = self.system_comps[dist] + comps_sec = set(source.comps) + # Are there components without updates? + comps_endangered = comps_sys - comps_sec + #print "In Danger: %s " % comps_endangered + if len(comps_endangered) > 0: + # convert the set into a list + comps_write="" + for comp in comps_sys: + comps_write += " %s" % comp + # add all system components to the securtiy line + line = "%s %s %s %s" % (source.type, source.uri, source.dist, + comps_write) + if source.comment: + line += "# %s" % source.comment + line += "\n" + index = self.list.index(source) + file = self.list[index].file + self.list[index] = SourceEntry(line, file) + modified = True + else: + # FIXME: What to do if there are no system sources? + # To disable the security updates would be the best + # option, but what about people with a local mirror + # that fetch sec updates from the ubuntu servers + pass + return modified # templates for the add dialog class SourceEntryTemplate(SourceEntry): - def __init__(self,a_type,uri,dist,description,comps): + def __init__(self, a_type, uri, dist, description, comps): self.comps = [] self.comps_descriptions = [] self.type = a_type @@ -303,6 +472,8 @@ class SourceEntryTemplates: dinfo = DistInfo (base_dir=datadir+"channels/") + self.dist = dinfo.dist + for suite in dinfo.suites: comps = [] for comp in suite.components: @@ -323,12 +494,14 @@ class SourceEntryMatcher: self.description = a_descr class MatchDist: - def __init__(self,a_uri,a_dist, a_descr,l_comps, l_comps_descr): + def __init__(self, a_uri, a_dist, a_descr, l_comps, + l_comps_descr, special=None): self.uri = a_uri self.dist = a_dist self.description = a_descr self.comps = l_comps self.comps_descriptions = l_comps_descr + self.special = special def __init__(self): _ = gettext.gettext @@ -338,93 +511,142 @@ class SourceEntryMatcher: self.dist_list = [] + #UBUNTU ubuntu_comps = ["^main$","^restricted$","^universe$","^multiverse$"] ubuntu_comps_descr = [_("Officially supported"), _("Restricted copyright"), _("Community maintained (Universe)"), _("Non-free (Multiverse)")] # CDs + self.dist_list.append(self.MatchDist("cdrom:\[Ubuntu.*6.04", + ".*", + _("Cdrom with Ubuntu 6.04 'Dapper "\ + "Drake'"), + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SYSTEM)) self.dist_list.append(self.MatchDist("cdrom:\[Ubuntu.*5.10", ".*", - _("CD disk with Ubuntu 5.10 'Breezy Badger'"), - ubuntu_comps, ubuntu_comps_descr)) + _("Cdrom with Ubuntu 5.10 'Breezy "\ + "Badger'"), + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SYSTEM)) self.dist_list.append(self.MatchDist("cdrom:\[Ubuntu.*5.04", ".*", - _("CD disk with Ubuntu 5.04 \"Hoary Hedgehog\""), - ubuntu_comps, ubuntu_comps_descr)) + _("Cdrom with Ubuntu 5.04 'Hoary "\ + "Hedgehog'"), + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SYSTEM)) self.dist_list.append(self.MatchDist("cdrom:\[Ubuntu.*4.10", ".*", - _("CD disk with Ubuntu 4.10 \"Warty Warthog\""), - ubuntu_comps, ubuntu_comps_descr)) + _("Cdrom with Ubuntu 4.10 'Warty "\ + "Warthog'"), + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SYSTEM)) # URIs # Warty self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", "^warty$", "Ubuntu 4.10 'Warty Warthog'", - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SYSTEM)) self.dist_list.append(self.MatchDist(".*security.ubuntu.com/ubuntu", "^warty-security$", _("Ubuntu 4.10 Security Updates"), - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SECURITY)) self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", "^warty-security$", _("Ubuntu 4.10 Security Updates"), - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SECURITY)) + self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", + "^warty-backports$", + _("Ubuntu 4.10 Backports"), + ubuntu_comps, ubuntu_comps_descr, + SOURCE_BACKPORTS)) self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", "^warty-updates$", _("Ubuntu 4.10 Updates"), - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_UPDATES)) # Hoary self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", "^hoary-security$", _("Ubuntu 5.04 Security Updates"), - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SECURITY)) self.dist_list.append(self.MatchDist(".*security.ubuntu.com/ubuntu", "^hoary-security$", _("Ubuntu 5.04 Security Updates"), - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SECURITY)) self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", "^hoary$", "Ubuntu 5.04 'Hoary Hedgehog'", - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SYSTEM)) + self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", + "^hoary-backports$", + _("Ubuntu 5.04 Backports"), + ubuntu_comps, ubuntu_comps_descr, + SOURCE_BACKPORTS)) self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", "^hoary-updates$", _("Ubuntu 5.04 Updates"), - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_UPDATES)) # Breezy self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", "^breezy-security$", _("Ubuntu 5.10 Security Updates"), - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SECURITY)) self.dist_list.append(self.MatchDist(".*security.ubuntu.com/ubuntu", "^breezy-security$", _("Ubuntu 5.10 Security Updates"), - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SECURITY)) self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", "^breezy$", "Ubuntu 5.10 'Breezy Badger'", - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SYSTEM)) + self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", + "^breezy-backports$", + _("Ubuntu 5.10 Backports"), + ubuntu_comps, ubuntu_comps_descr, + SOURCE_BACKPORTS)) self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", "^breezy-updates$", _("Ubuntu 5.10 Updates"), - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_UPDATES)) # dapper self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", "^dapper-security$", _("Ubuntu 6.04 Security Updates"), - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SECURITY)) self.dist_list.append(self.MatchDist(".*security.ubuntu.com/ubuntu", "^dapper-security$", _("Ubuntu 6.04 Security Updates"), - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SECURITY)) self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", "^dapper$", "Ubuntu 6.04 'Dapper Drake'", - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_SYSTEM)) + self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", + "^dapper-backports$", + _("Ubuntu 6.04 Backports"), + ubuntu_comps, ubuntu_comps_descr, + SOURCE_BACKPORTS)) self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", "^dapper-updates$", _("Ubuntu 6.04 Updates"), - ubuntu_comps, ubuntu_comps_descr)) + ubuntu_comps, ubuntu_comps_descr, + SOURCE_UPDATES)) # DEBIAN @@ -439,50 +661,57 @@ class SourceEntryMatcher: self.dist_list.append(self.MatchDist(".*debian.org/debian", "^sarge$", _("Debian 3.1 'Sarge'"), - debian_comps, debian_comps_descr)) + debian_comps, debian_comps_descr, + SOURCE_SYSTEM)) self.dist_list.append(self.MatchDist(".*debian.org/debian", "^woody$", _("Debian 3.0 'Woody'"), - debian_comps, debian_comps_descr)) + debian_comps, debian_comps_descr, + SOURCE_SYSTEM)) # securtiy self.dist_list.append(self.MatchDist(".*security.debian.org", "^stable.*$", _("Debian Stable Security Updates"), - debian_comps, debian_comps_descr)) + debian_comps, debian_comps_descr, + SOURCE_SECURITY)) # dists by status self.dist_list.append(self.MatchDist(".*debian.org/debian", "^stable$", _("Debian Stable"), - debian_comps, debian_comps_descr)) + debian_comps, debian_comps_descr, + SOURCE_SYSTEM)) self.dist_list.append(self.MatchDist(".*debian.org/debian", "^testing$", _("Debian Testing"), - debian_comps, debian_comps_descr)) + debian_comps, debian_comps_descr, + SOURCE_SYSTEM)) self.dist_list.append(self.MatchDist(".*debian.org/debian", "^unstable$", _("Debian Unstable 'Sid'"), - debian_comps, debian_comps_descr)) + debian_comps, debian_comps_descr, + SOURCE_SYSTEM)) # non-us self.dist_list.append(self.MatchDist(".*debian.org/debian-non-US", "^stable.*$", _("Debian Non-US (Stable)"), - debian_comps, debian_comps_descr)) + debian_comps, debian_comps_descr, + SOURCE_SYSTEM)) self.dist_list.append(self.MatchDist(".*debian.org/debian-non-US", "^testing.*$", _("Debian Non-US (Testing)"), - debian_comps, debian_comps_descr)) + debian_comps, debian_comps_descr, + SOURCE_SYSTEM)) self.dist_list.append(self.MatchDist(".*debian.org/debian-non-US", "^unstable.*$", _("Debian Non-US (Unstable)"), - debian_comps, debian_comps_descr)) - + debian_comps, debian_comps_descr, + SOURCE_SYSTEM)) - - def match(self,source): _ = gettext.gettext # some sane defaults first + special = None type_description = source.type dist_description = source.uri + " " + source.dist # if there is a comment use it instead of the url @@ -498,23 +727,24 @@ class SourceEntryMatcher: type_description = _(t.description) break + comp_descriptions = [] for d in self.dist_list: #print "'%s'" %source.uri if re.match(d.uri, source.uri) and re.match(d.dist, source.dist): dist_description = d.description - comp_description = "" + comp_descriptions = [] + special = d.special for c in source.comps: found = False for i in range(len(d.comps)): if re.match(d.comps[i], c): - comp_description = comp_description+"\n"+d.comps_descriptions[i] + comp_descriptions.append(d.comps_descriptions[i]) found = True if found == False: - comp_description = comp_description+" "+c + comp_descriptions.append(c) break - - - return (type_description,dist_description,comp_description) + + return (type_description, dist_description, comp_descriptions, special) # some simple tests diff --git a/SoftwareProperties/dialog_add.py b/SoftwareProperties/dialog_add.py index effd9f24..a1ac713b 100644 --- a/SoftwareProperties/dialog_add.py +++ b/SoftwareProperties/dialog_add.py @@ -26,6 +26,7 @@ import os import gobject import gtk import gtk.glade +from gettext import gettext as _ import aptsources @@ -44,7 +45,9 @@ class dialog_add: self.main = widget = self.gladexml.get_widget("dialog_add") self.main.set_transient_for(self.parent) - + + self.vbox = self.gladexml.get_widget("vbox_comps") + # Setup the official channel widgets self.combo = self.gladexml.get_widget("combobox_what") self.gladexml.signal_connect("on_combobox_what_changed", self.on_combobox_what_changed, None) @@ -52,6 +55,11 @@ class dialog_add: self.combo.pack_start(cell, True) self.combo.add_attribute(cell, 'text', 0) self.fill_combo(self.combo) + self.label_dist = self.gladexml.get_widget("label_dist") + if self.templatelist.dist != "": + # TRANSLATORS: %s is the distribution name, eg. Ubuntu or Debian + self.label_dist.set_markup("<b>%s</b>" % \ + _("%s channels" % self.templatelist.dist)) # Setup the custom channel widgets self.entry = self.gladexml.get_widget("entry_source_line") @@ -96,7 +104,7 @@ class dialog_add: for check in self.comps: check.set_sensitive(state) self.official = state - self.button_add.set_sensitive(state) + self.count_comps() def fill_combo(self,combo): liststore = gtk.ListStore(gobject.TYPE_STRING,gobject.TYPE_PYOBJECT) @@ -107,8 +115,7 @@ class dialog_add: def on_combobox_what_changed(self, combobox, user): #print "on_combobox_what_changed" - vbox = self.gladexml.get_widget("vbox_comps") - vbox.foreach(lambda widget,vbox: vbox.remove(widget), vbox) + self.vbox.foreach(lambda widget,vbox: self.vbox.remove(widget), self.vbox) liststore = combobox.get_model() a_iter = liststore.iter_nth_child(None, combobox.get_active()) (name, template) = liststore.get(a_iter, 0,1) @@ -119,22 +126,31 @@ class dialog_add: checkbox = gtk.CheckButton(c.description) checkbox.set_active(c.on_by_default) checkbox.set_data("name",c.name) - vbox.pack_start(checkbox) + checkbox.connect("toggled", self.count_comps) + self.vbox.pack_start(checkbox) checkbox.show() self.comps.append(checkbox) + self.count_comps() def get_enabled_comps(self, checkbutton): if checkbutton.get_active(): self.selected_comps.append(checkbutton.get_data("name")) + def count_comps(self, *args): + button_add = self.gladexml.get_widget("button_add_channel") + self.selected_comps=[] + self.vbox.foreach(self.get_enabled_comps) + if len(self.selected_comps) > 0: + button_add.set_sensitive(True) + else: + button_add.set_sensitive(False) + def run(self): res = self.main.run() if res == gtk.RESPONSE_OK: # add repository if self.official == True: self.selected_comps = [] - vbox = self.gladexml.get_widget("vbox_comps") - vbox.foreach(self.get_enabled_comps) self.sourceslist.add(self.selected.type, self.selected.uri, self.selected.dist, diff --git a/SoftwareProperties/dialog_sources_list.py b/SoftwareProperties/dialog_sources_list.py index 9159d01f..a09542c8 100644 --- a/SoftwareProperties/dialog_sources_list.py +++ b/SoftwareProperties/dialog_sources_list.py @@ -39,6 +39,8 @@ class AddSourcesList: self.store = gtk.ListStore(gobject.TYPE_STRING) self.treeview.set_model(self.store) cell = gtk.CellRendererText() + cell.set_property("xpad", 2) + cell.set_property("ypad", 2) column = gtk.TreeViewColumn("Software Channel", cell, markup=0) column.set_max_width(500) self.treeview.append_column(column) @@ -49,35 +51,31 @@ class AddSourcesList: except: self.error() return - self.matcher = SourceEntryMatcher() # show the found channels or an error message if len(self.sources.list) > 0: self.button_close.hide() - found = False + counter = 0 for source in self.sources.list: if source.invalid or source.disabled: continue - found = True - (a_type, dist, comps) = self.matcher.match(source) - - line = "<b>%s</b> (%s)%s" %\ - (dist, a_type, comps) + counter = counter +1 + line = self.sources.render_source(source) self.store.append([line]) - if found == False: + if counter == 0: self.error() return header = gettext.ngettext("Add the following software channel?", "Add the following software channels?", - len(self.sources.list)) + counter) body = _("You can install software from a channel. Use "\ "trusted channels, only.") self.label.set_markup("<big><b>%s</b></big>\n\n%s" % (header, body)) self.button_add.set_use_underline(True) self.button_add.set_label(gettext.ngettext("_Add Channel", "_Add Channels", - len(self.sources.list))) + counter)) else: self.error() return @@ -118,5 +116,6 @@ class AddSourcesList: class SingleSourcesList(SourcesList): def __init__(self, file): + self.matcher = SourceEntryMatcher() self.list = [] self.load(file) @@ -3,4 +3,8 @@ - add download size to treeview - add /etc/apt/software-properties.d dir where the user can install matchers and templates -- handle cases like "deb http://bla/ dist sec1 sec2 # comment"
\ No newline at end of file +- handle cases like "deb http://bla/ dist sec1 sec2 # comment" +- rework the add channel/cdrom dialogs +- d'n'd for key files +- use one row per section and not one per channel in the treeview +- sort the sources by dist diff --git a/UpdateManager/Common/DistInfo.py b/UpdateManager/Common/DistInfo.py index df244a51..102b981c 100644 --- a/UpdateManager/Common/DistInfo.py +++ b/UpdateManager/Common/DistInfo.py @@ -22,6 +22,7 @@ import os import gettext +from os import getenv import ConfigParser _ = gettext.gettext @@ -51,6 +52,8 @@ class DistInfo: pipe.close() del pipe + self.dist = dist + dist_fname = "%s/%s.info" % (base_dir, dist) dist_file = open (dist_fname) if not dist_file: @@ -100,7 +103,7 @@ class DistInfo: if __name__ == "__main__": - d = DistInfo ("Debian", "../distribution-data") + d = DistInfo ("Debian", "../../channels") print d.changelogs_uri for suite in d.suites: print suite.name diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index 9aaad85d..590391b9 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -177,7 +177,7 @@ class UpdateList: #print "WARNING, keeping packages" msg = ("<big><b>%s</b></big>\n\n%s" % \ (_("Cannot install all available updates"), - _("Some updates require to remove further software. " + _("Some updates require the removal of further software. " "Use the function \"Smart Upgrade\" of the package manager " "\"Synaptic\" or run \"sudo apt-get dist-upgrade\" in a " "terminal to update your system completely."))) diff --git a/channels/Ubuntu.info.in b/channels/Ubuntu.info.in index 6422cbdb..00ccbfe4 100644 --- a/channels/Ubuntu.info.in +++ b/channels/Ubuntu.info.in @@ -3,7 +3,7 @@ _ChangelogURI: http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/chang Suite: dapper RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ -_Description: Ubuntu 6.04 "Dapper Drake" +_Description: Ubuntu 6.04 'Dapper Drake' Component: main Enabled: 1 _CompDescription: Oficially supported @@ -20,7 +20,7 @@ _CompDescription: Non-free (Multiverse) Suite: breezy RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ -_Description: Ubuntu 5.10 "Breezy Badger" +_Description: Ubuntu 5.10 'Breezy Badger' Component: main Enabled: 1 _CompDescription: Oficially supported @@ -71,7 +71,7 @@ _CompDescription: Non-free (Multiverse) Suite: hoary RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ -_Description: Ubuntu 5.04 "Hoary Hedgehog" +_Description: Ubuntu 5.04 'Hoary Hedgehog' Component: main Enabled: 1 _CompDescription: Oficially supported diff --git a/data/SoftwareProperties.glade b/data/SoftwareProperties.glade index 27f53404..9a5edbeb 100644 --- a/data/SoftwareProperties.glade +++ b/data/SoftwareProperties.glade @@ -5,7 +5,6 @@ <widget class="GtkWindow" id="window_main"> <property name="border_width">6</property> - <property name="width_request">580</property> <property name="height_request">400</property> <property name="visible">True</property> <property name="title" translatable="yes">Software Preferences</property> @@ -93,6 +92,8 @@ <property name="fixed_height_mode">False</property> <property name="hover_selection">False</property> <property name="hover_expand">False</property> + <signal name="row_activated" handler="on_channel_activate" last_modification_time="Sun, 26 Feb 2006 11:19:36 GMT"/> + <signal name="cursor_changed" handler="on_treeview_sources_cursor_changed" last_modification_time="Sun, 26 Feb 2006 11:49:45 GMT"/> </widget> </child> </widget> @@ -107,137 +108,169 @@ <widget class="GtkHBox" id="hbox6"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">6</property> + <property name="spacing">12</property> <child> - <widget class="GtkButton" id="button_add"> + <widget class="GtkHBox" id="hbox6"> <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-add</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_add_clicked" last_modification_time="Tue, 05 Jul 2005 01:31:37 GMT"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button_remove"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-remove</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_remove_clicked" last_modification_time="Tue, 05 Jul 2005 02:21:36 GMT"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button_edit"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-edit</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_edit_clicked" last_modification_time="Tue, 05 Jul 2005 02:18:34 GMT"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="homogeneous">False</property> + <property name="spacing">6</property> - <child> - <widget class="GtkButton" id="button_add_cdrom"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_button_add_cdrom_clicked" last_modification_time="Fri, 09 Dec 2005 17:39:58 GMT"/> + <child> + <widget class="GtkButton" id="button_add"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-add</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_add_clicked" last_modification_time="Tue, 05 Jul 2005 01:31:37 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> <child> - <widget class="GtkAlignment" id="alignment4"> + <widget class="GtkButton" id="button_add_cdrom"> <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> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button_add_cdrom_clicked" last_modification_time="Fri, 09 Dec 2005 17:39:58 GMT"/> <child> - <widget class="GtkHBox" id="hbox4"> + <widget class="GtkAlignment" id="alignment4"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</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="GtkImage" id="image1"> + <widget class="GtkHBox" id="hbox4"> <property name="visible">True</property> - <property name="stock">gtk-cdrom</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> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="stock">gtk-cdrom</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="label7"> + <property name="visible">True</property> + <property name="label" translatable="yes">Add _Cdrom</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> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label7"> - <property name="visible">True</property> - <property name="label" translatable="yes">Add _Cdrom</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> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button_remove"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-remove</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_remove_clicked" last_modification_time="Tue, 05 Jul 2005 02:21:36 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button_edit"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-edit</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_edit_clicked" last_modification_time="Tue, 05 Jul 2005 02:18:34 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> </child> </widget> <packing> <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button_revert"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-revert-to-saved</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button_revert_clicked" last_modification_time="Sun, 26 Feb 2006 09:39:55 GMT"/> + </widget> + <packing> + <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> @@ -608,43 +641,42 @@ <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="pack_type">GTK_PACK_END</property> </packing> </child> <child> - <widget class="GtkButton" id="button_auth_remove"> + <widget class="GtkButton" id="button_auth_add"> <property name="visible">True</property> + <property name="tooltip" translatable="yes">Import the public key from a trusted software provider</property> <property name="can_focus">True</property> - <property name="label">gtk-remove</property> - <property name="use_stock">True</property> + <property name="label">_Import Key File</property> + <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> - <signal name="clicked" handler="remove_key_clicked" last_modification_time="Tue, 05 Jul 2005 04:19:25 GMT"/> + <signal name="clicked" handler="add_key_clicked" last_modification_time="Tue, 05 Jul 2005 04:09:24 GMT"/> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> - <property name="pack_type">GTK_PACK_END</property> </packing> </child> <child> - <widget class="GtkButton" id="button_auth_add"> + <widget class="GtkButton" id="button_auth_remove"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Import the public key from a trusted software provider</property> <property name="can_focus">True</property> - <property name="label">_Import Key File</property> - <property name="use_underline">True</property> + <property name="label">gtk-remove</property> + <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> - <signal name="clicked" handler="add_key_clicked" last_modification_time="Tue, 05 Jul 2005 04:09:24 GMT"/> + <signal name="clicked" handler="remove_key_clicked" last_modification_time="Tue, 05 Jul 2005 04:19:25 GMT"/> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> - <property name="pack_type">GTK_PACK_END</property> </packing> </child> </widget> diff --git a/data/SoftwarePropertiesDialogs.glade b/data/SoftwarePropertiesDialogs.glade index 3e4be82f..ed350003 100644 --- a/data/SoftwarePropertiesDialogs.glade +++ b/data/SoftwarePropertiesDialogs.glade @@ -92,9 +92,9 @@ <signal name="toggled" handler="on_radiobutton_official_toggled" last_modification_time="Thu, 23 Feb 2006 10:03:57 GMT"/> <child> - <widget class="GtkLabel" id="label71"> + <widget class="GtkLabel" id="label_dist"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Official Ubuntu Channel</b></property> + <property name="label" translatable="yes"></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -181,21 +181,26 @@ </child> <child> - <widget class="GtkVBox" id="vbox_comps"> + <widget class="GtkVBox" id="vbox22"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <placeholder/> - </child> + <property name="spacing">0</property> <child> - <placeholder/> - </child> + <widget class="GtkVBox" id="vbox_comps"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">6</property> - <child> - <placeholder/> + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> </child> </widget> <packing> @@ -247,7 +252,7 @@ <child> <widget class="GtkLabel" id="label70"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Custom Channel</b></property> + <property name="label" translatable="yes"><b>Custom channel</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -591,7 +596,7 @@ The APT line contains the type, location and content of a repository, for exampl <widget class="GtkDialog" id="dialog_edit"> <property name="border_width">6</property> - <property name="title" translatable="yes">Edit Repository...</property> + <property name="title" translatable="yes">Edit Channel</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">True</property> |
