diff options
| author | glatzor@ubuntu.com <> | 2006-09-11 16:04:40 +0200 |
|---|---|---|
| committer | glatzor@ubuntu.com <> | 2006-09-11 16:04:40 +0200 |
| commit | d37a18474fd00a9cb3e57f13517628095c15bba7 (patch) | |
| tree | b99fa180e0c0d9eea4f7a8ef1d7264ca42a87dfb /DistUpgrade | |
| parent | bacc395f5e0e9ae48883d4cdd1258f98ee6d9b21 (diff) | |
| download | python-apt-d37a18474fd00a9cb3e57f13517628095c15bba7.tar.gz | |
* improve wording of some dialogs: no-longer-supported,
no-upgrades-avaiable and replace-conf-file
* introduce an abort method for the view to provide a visual feedback
that the upgrade was canceled
Diffstat (limited to 'DistUpgrade')
| -rw-r--r-- | DistUpgrade/DistUpgradeControler.py | 17 | ||||
| -rw-r--r-- | DistUpgrade/DistUpgradeView.py | 3 | ||||
| -rw-r--r-- | DistUpgrade/DistUpgradeViewGtk.py | 28 |
3 files changed, 29 insertions, 19 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index 02d25121..800590cb 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -485,15 +485,15 @@ class DistUpgradeControler(object): demoted = [pkg.name for pkg in installed_demotions] demoted.sort() logging.debug("demoted: '%s'" % " ".join(demoted)) - self._view.information(_("Some software no longer officially " - "supported"), - _("These installed packages are " - "no longer officially supported, " - "and are now only " - "community-supported ('universe').\n\n" - "If you don't have 'universe' enabled " + self._view.information(_("Support for some applications ended"), + _("Canonical Ltd. no longer provides " + "support for the following software " + "packages. You can still get support " + "from the community.\n\n" + "If you havn't enabled community " + "maintained software (universe), " "these packages will be suggested for " - "removal in the next step. "), + "removal in the next step."), "\n".join(demoted)) # mark packages that are now obsolete (and where not obsolete @@ -544,6 +544,7 @@ class DistUpgradeControler(object): self.aptcdrom.restoreBackup(self.sources_backup_ext) # generate a new cache self._view.updateStatus(_("Restoring original system state")) + self._view.abort() self.openCache() sys.exit(1) diff --git a/DistUpgrade/DistUpgradeView.py b/DistUpgrade/DistUpgradeView.py index 9fda83d4..d5b430b8 100644 --- a/DistUpgrade/DistUpgradeView.py +++ b/DistUpgrade/DistUpgradeView.py @@ -72,6 +72,9 @@ class DistUpgradeView(object): on the current view """ pass + def abort(): + """ provide a visual feedback that the upgrade was aborted """ + pass def setStep(self, step): """ we have 5 steps current for a upgrade: 1. Analyzing the system diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py index 5fd8d560..a61bbcaa 100644 --- a/DistUpgrade/DistUpgradeViewGtk.py +++ b/DistUpgrade/DistUpgradeViewGtk.py @@ -199,13 +199,10 @@ class GtkInstallProgressAdapter(InstallProgress): def conffile(self, current, new): logging.debug("got a conffile-prompt from dpkg for file: '%s'" % current) #self.expander.set_expanded(True) - prim = _("Replace configuration file\n'%s'?" % current) - sec = ("The configuration file %s was modified (by " - "you or by a script). An updated version is shipped " - "in this package. If you want to keep your current " - "version say 'Keep'. Do you want to replace the " - "current file and install the new package " - "maintainers version? " % current) + prim = _("Replace the customized configuration file\n'%s'?") % current + sec = _("You will loose all customizations, that have been made by " + "yourself or by a script, if you replace the file by its " + "latest version.") markup = "<span weight=\"bold\" size=\"larger\">%s </span> \n\n%s" % (prim, sec) self.parent.label_conffile.set_markup(markup) self.parent.dialog_conffile.set_transient_for(self.parent.window_main) @@ -410,7 +407,16 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): label = getattr(self,"label_step%i" % step) image.hide() label.hide() + def abort(self): + size = gtk.ICON_SIZE_MENU + step = self.step + image = getattr(self,"image_step%i" % step) + arrow = getattr(self,"arrow_step%i" % step) + image.set_from_stock(gtk.STOCK_NO, size) + image.show() + arrow.hide() def setStep(self, step): + self.step = step # first update the "last" step as completed size = gtk.ICON_SIZE_MENU attrlist=pango.AttrList() @@ -422,14 +428,13 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): image.set_from_stock(gtk.STOCK_YES, size) image.show() arrow.hide() + # show the an arrow for the current step and make the label bold image = getattr(self,"image_step%i" % step) label = getattr(self,"label_step%i" % step) arrow = getattr(self,"arrow_step%i" % step) arrow.show() image.hide() attr = pango.AttrWeight(pango.WEIGHT_BOLD, 0, -1) - # we can't make it bold here without layout changes in the view :( - #attr = pango.AttrStyle(pango.STYLE_ITALIC, 0, -1) attrlist.insert(attr) label.set_property("attributes",attrlist) @@ -508,8 +513,9 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): # 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.") + summary = _("Your system is up-to-date") + msg = _("There are no upgrades available for your system. " + "The upgrade will now be canceled.") self.error(summary, msg) return False |
