diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-04-28 17:56:16 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-04-28 17:56:16 +0200 |
| commit | 34eb7395b42df46fe9caf53d107d212e39a7cdf8 (patch) | |
| tree | 62823d3f185a6f363c4d3e9fa551b74154ab16b4 | |
| parent | 17403f483aa261be15fd9620597d18c61da3a80c (diff) | |
| download | python-apt-34eb7395b42df46fe9caf53d107d212e39a7cdf8.tar.gz | |
* DistUpgrade/DistUpgradeView.py:
- added information() function
* DistUpgrade/DistUpgradeViewGtk.py:
- implemented gtk information() function
* DistUpgrade/DistUpgradeControler.py:
- inform the user about disabled third party sources
| -rw-r--r-- | DistUpgrade/DistUpgradeControler.py | 16 | ||||
| -rw-r--r-- | DistUpgrade/DistUpgradeView.py | 4 | ||||
| -rw-r--r-- | DistUpgrade/DistUpgradeViewGtk.py | 10 |
3 files changed, 27 insertions, 3 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index 3cf17c65..c486a407 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -77,6 +77,8 @@ class DistUpgradeControler(object): # list of valid mirrors that we can add valid_mirrors = self.config.getListFromFile("Sources","ValidMirrors") + self.sources_disabled = False + # look over the stuff we have foundToDist = False for entry in self.sources: @@ -105,12 +107,14 @@ class DistUpgradeControler(object): # disable all entries that are official but don't # point to either "to" or "from" dist entry.disabled = True + self.sources_disabled = True logging.debug("entry '%s' was disabled (unknown dist)" % entry) # it can only be one valid mirror, so we can break here break # disable anything that is not from a official mirror if not validMirror: entry.disabled = True + self.sources_disabled = True logging.debug("entry '%s' was disabled (unknown mirror)" % entry) return foundToDist @@ -123,7 +127,7 @@ class DistUpgradeControler(object): _("While scaning your repository " "information no mirror entry for " "the upgrade was found." - "This cam happen if you run a interal " + "This cam happen if you run a internal " "mirror or if the mirror information is " "out of date.\n\n" "Do you want to rewrite your " @@ -140,7 +144,7 @@ class DistUpgradeControler(object): prim = _("Generate default sources?") secon = _("After scanning your 'sources.list' no " "valid entry for '%s' was found.\n\n" - "Should the default entries for '%s' be " + "Should default entries for '%s' be " "added? If you select 'No' the update " "will cancel.") % (self.fromDist, self.toDist) if not self._view.askYesNoQuestion(prim, secon): @@ -175,6 +179,14 @@ class DistUpgradeControler(object): "resulted in a invalid file. Please " "report this as a bug.")) return False + + if self.sources_disabled: + self._view.information(_("Third party sources disabled"), + _("Some third party entries in your souces.list " + "where disabled. You can re-enable them " + "after the upgrade with the " + "'software-properties' tool or with synaptic." + )) return True def _logChanges(self): diff --git a/DistUpgrade/DistUpgradeView.py b/DistUpgrade/DistUpgradeView.py index 57b94636..99dedc6f 100644 --- a/DistUpgrade/DistUpgradeView.py +++ b/DistUpgrade/DistUpgradeView.py @@ -81,4 +81,6 @@ class DistUpgradeView(object): def error(self, summary, msg, extended_msg=None): " display a error " pass - + def information(self, summary, msg): + " display a information msg" + pass diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py index 561ab22c..69990fd5 100644 --- a/DistUpgrade/DistUpgradeViewGtk.py +++ b/DistUpgrade/DistUpgradeViewGtk.py @@ -373,6 +373,16 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): attrlist.insert(attr) label.set_property("attributes",attrlist) + def information(self, summary, msg): + msg = "<big><b>%s</b></big>\n\n%s" % (summary,msg) + dialog = gtk.MessageDialog(parent=self.window_main, + flags=gtk.DIALOG_MODAL, + type=gtk.MESSAGE_INFO, + buttons=gtk.BUTTONS_CLOSE) + dialog.set_markup(msg) + dialog.run() + dialog.destroy() + def error(self, summary, msg, extended_msg=None): self.dialog_error.set_transient_for(self.window_main) #self.expander_terminal.set_expanded(True) |
