Merge lp:~kubuntu-packagers/ubuntu-release-upgrader/qt5 into lp:ubuntu-release-upgrader
- qt5
- Merge into trunk
Proposed by
Harald Sitter
Status: | Merged |
---|---|
Merged at revision: | 2863 |
Proposed branch: | lp:~kubuntu-packagers/ubuntu-release-upgrader/qt5 |
Merge into: | lp:ubuntu-release-upgrader |
Diff against target: |
2003 lines (+798/-641) (has conflicts) 11 files modified
DistUpgrade/DistUpgradeFetcherKDE.py (+159/-111) DistUpgrade/DistUpgradeViewKDE.py (+59/-66) DistUpgrade/QUrlOpener.py (+80/-0) DistUpgrade/dialog_changes.ui (+107/-133) DistUpgrade/dialog_error.ui (+70/-88) DistUpgrade/dialog_release_notes.ui (+24/-20) DistUpgrade/fetch-progress.ui (+25/-56) DistUpgrade/window_main.ui (+173/-166) debian/changelog (+87/-0) debian/control (+2/-1) do-release-upgrade (+12/-0) Text conflict in debian/changelog |
To merge this branch: | bzr merge lp:~kubuntu-packagers/ubuntu-release-upgrader/qt5 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kubuntu Developers | Pending | ||
Jonathan Riddell | Pending | ||
Review via email: mp+229620@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Rohan Garg (rohangarg) wrote : | # |
Revision history for this message
Dmitry Shachnev (mitya57) : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'DistUpgrade/DistUpgradeFetcherKDE.py' | |||
2 | --- DistUpgrade/DistUpgradeFetcherKDE.py 2014-05-02 13:07:42 +0000 | |||
3 | +++ DistUpgrade/DistUpgradeFetcherKDE.py 2014-08-05 13:50:46 +0000 | |||
4 | @@ -2,6 +2,7 @@ | |||
5 | 2 | # -*- Mode: Python; indent-tabs-mode: nil; tab-width: 4; coding: utf-8 -*- | 2 | # -*- Mode: Python; indent-tabs-mode: nil; tab-width: 4; coding: utf-8 -*- |
6 | 3 | # | 3 | # |
7 | 4 | # Copyright (c) 2008 Canonical Ltd | 4 | # Copyright (c) 2008 Canonical Ltd |
8 | 5 | # Copyright (c) 2014 Harald Sitter <apachelogger@kubuntu.org> | ||
9 | 5 | # | 6 | # |
10 | 6 | # Author: Jonathan Riddell <jriddell@ubuntu.com> | 7 | # Author: Jonathan Riddell <jriddell@ubuntu.com> |
11 | 7 | # | 8 | # |
12 | @@ -18,58 +19,100 @@ | |||
13 | 18 | # You should have received a copy of the GNU General Public License | 19 | # You should have received a copy of the GNU General Public License |
14 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 20 | 21 | ||
21 | 21 | from PyKDE4.kdecore import ki18n, KAboutData, KCmdLineOptions, KCmdLineArgs | 22 | try: |
22 | 22 | from PyKDE4.kdeui import KIcon, KMessageBox, KApplication, KStandardGuiItem | 23 | # 14.04 has a broken pyqt5, so don't even try to import it and require |
23 | 23 | from PyQt4.QtCore import QDir, QTimer | 24 | # pyqt4. |
24 | 24 | from PyQt4.QtGui import QDialog, QDialogButtonBox | 25 | # In 14.04 various signals in pyqt5 can not be connected because it thinks |
25 | 25 | from PyQt4 import uic | 26 | # the signal does not exist or has an incompatible signature. Since this |
26 | 27 | # potentially renders the GUI entirely broken and pyqt5 was not actively | ||
27 | 28 | # used back then it is fair to simply require qt4 on trusty systems. | ||
28 | 29 | from .utils import get_dist | ||
29 | 30 | if get_dist() == 'trusty': | ||
30 | 31 | raise ImportError | ||
31 | 32 | |||
32 | 33 | from PyQt5 import uic | ||
33 | 34 | from PyQt5.QtCore import * | ||
34 | 35 | from PyQt5.QtGui import * | ||
35 | 36 | from PyQt5.QtWidgets import * | ||
36 | 37 | except ImportError: | ||
37 | 38 | from PyKDE4.kdecore import ki18n, KAboutData, KCmdLineOptions, KCmdLineArgs | ||
38 | 39 | from PyKDE4.kdeui import KIcon, KMessageBox, KApplication, KStandardGuiItem | ||
39 | 40 | from PyQt4.QtCore import QDir, QTimer | ||
40 | 41 | from PyQt4.QtGui import QDialog, QDialogButtonBox | ||
41 | 42 | from PyQt4 import uic | ||
42 | 26 | 43 | ||
43 | 27 | import apt_pkg | 44 | import apt_pkg |
44 | 28 | import sys | 45 | import sys |
45 | 29 | 46 | ||
48 | 30 | from .utils import inhibit_sleep, allow_sleep | 47 | from DistUpgrade.utils import inhibit_sleep, allow_sleep |
49 | 31 | from .DistUpgradeFetcherCore import DistUpgradeFetcherCore | 48 | from DistUpgrade.DistUpgradeFetcherCore import DistUpgradeFetcherCore |
50 | 32 | from gettext import gettext as _ | 49 | from gettext import gettext as _ |
51 | 33 | from urllib.request import urlopen | 50 | from urllib.request import urlopen |
52 | 34 | from urllib.error import HTTPError | 51 | from urllib.error import HTTPError |
53 | 35 | import os | 52 | import os |
54 | 36 | 53 | ||
55 | 37 | from .MetaRelease import MetaReleaseCore | ||
56 | 38 | import apt | 54 | import apt |
57 | 39 | 55 | ||
58 | 56 | from .QUrlOpener import QUrlOpener | ||
59 | 57 | |||
60 | 58 | # TODO: uifile resolution is an utter mess and should be revised globally for | ||
61 | 59 | # both the fetcher and the upgrader GUI. | ||
62 | 60 | |||
63 | 61 | # TODO: make this a singleton | ||
64 | 62 | # We have no globally constructed QApplication available so we need to | ||
65 | 63 | # make sure that one is created when needed. Since from a module POV | ||
66 | 64 | # this can be happening in any order of the two classes this function takes care | ||
67 | 65 | # of it for the classes, the classes only hold a ref to the qapp returned | ||
68 | 66 | # to prevent it from getting GC'd, so in essence this is a singleton scoped to | ||
69 | 67 | # the longest lifetime of an instance from the Qt GUI. Since the lifetime is | ||
70 | 68 | # pretty much equal to the process' one we might as well singleton up. | ||
71 | 69 | def _ensureQApplication(): | ||
72 | 70 | if not QApplication.instance(): | ||
73 | 71 | app = QApplication(["ubuntu-release-upgrader"]) | ||
74 | 72 | # Try to load default Qt translations so we don't have to worry about | ||
75 | 73 | # QStandardButton translations. | ||
76 | 74 | # FIXME: make sure we dep on l10n | ||
77 | 75 | translator = QTranslator(app) | ||
78 | 76 | if PYQT_VERSION >= 0x50000: | ||
79 | 77 | translator.load(QLocale.system(), 'qt', '_', '/usr/share/qt5/translations') | ||
80 | 78 | else: | ||
81 | 79 | translator.load(QLocale.system(), 'qt', '_', '/usr/share/qt4/translations') | ||
82 | 80 | app.installTranslator(translator) | ||
83 | 81 | return app | ||
84 | 82 | return QApplication.instance() | ||
85 | 83 | |||
86 | 84 | # Qt 5 vs. KDELibs4 compat functions | ||
87 | 85 | def _warning(text): | ||
88 | 86 | if PYQT_VERSION >= 0x50000: | ||
89 | 87 | QMessageBox.warning(None, "", text) | ||
90 | 88 | else: | ||
91 | 89 | KMessageBox.sorry(None, text, "") | ||
92 | 90 | |||
93 | 91 | def _icon(name): | ||
94 | 92 | if PYQT_VERSION >= 0x50000: | ||
95 | 93 | return QIcon.fromTheme(name) | ||
96 | 94 | else: | ||
97 | 95 | return KIcon(name) | ||
98 | 40 | 96 | ||
99 | 41 | class DistUpgradeFetcherKDE(DistUpgradeFetcherCore): | 97 | class DistUpgradeFetcherKDE(DistUpgradeFetcherCore): |
128 | 42 | """A small application run by Adept to download, verify | 98 | |
129 | 43 | and run the dist-upgrade tool""" | 99 | def __init__(self, new_dist, progress, parent, datadir): |
130 | 44 | 100 | DistUpgradeFetcherCore.__init__(self, new_dist, progress) | |
131 | 45 | def __init__(self, useDevelopmentRelease=False, useProposed=False): | 101 | |
132 | 46 | self.useDevelopmentRelease = useDevelopmentRelease | 102 | self.app = _ensureQApplication() |
133 | 47 | self.useProposed = useProposed | 103 | self.app.setWindowIcon(_icon("system-software-update")) |
134 | 48 | metaRelease = MetaReleaseCore(useDevelopmentRelease, useProposed) | 104 | |
135 | 49 | metaRelease.downloaded.wait() | 105 | self.datadir = datadir |
136 | 50 | if metaRelease.new_dist is None and __name__ == "__main__": | 106 | |
137 | 51 | sys.exit() | 107 | QUrlOpener().setupUrlHandles() |
138 | 52 | elif metaRelease.new_dist is None: | 108 | |
139 | 53 | return | 109 | QApplication.processEvents() |
112 | 54 | |||
113 | 55 | self.progressDialogue = QDialog() | ||
114 | 56 | if os.path.exists("fetch-progress.ui"): | ||
115 | 57 | self.APPDIR = QDir.currentPath() | ||
116 | 58 | else: | ||
117 | 59 | self.APPDIR = "/usr/share/ubuntu-release-upgrader" | ||
118 | 60 | |||
119 | 61 | uic.loadUi(self.APPDIR + "/fetch-progress.ui", self.progressDialogue) | ||
120 | 62 | self.progressDialogue.setWindowIcon(KIcon("system-software-update")) | ||
121 | 63 | self.progressDialogue.setWindowTitle(_("Upgrade")) | ||
122 | 64 | self.progress = KDEAcquireProgressAdapter( | ||
123 | 65 | self.progressDialogue.installationProgress, | ||
124 | 66 | self.progressDialogue.installingLabel, | ||
125 | 67 | None) | ||
126 | 68 | DistUpgradeFetcherCore.__init__(self, metaRelease.new_dist, | ||
127 | 69 | self.progress) | ||
140 | 70 | 110 | ||
141 | 71 | def error(self, summary, message): | 111 | def error(self, summary, message): |
143 | 72 | KMessageBox.sorry(None, message, summary) | 112 | if PYQT_VERSION >= 0x50000: |
144 | 113 | QMessageBox.critical(None, summary, message) | ||
145 | 114 | else: | ||
146 | 115 | KMessageBox.sorry(None, message, summary) | ||
147 | 73 | 116 | ||
148 | 74 | def runDistUpgrader(self): | 117 | def runDistUpgrader(self): |
149 | 75 | inhibit_sleep() | 118 | inhibit_sleep() |
150 | @@ -80,73 +123,103 @@ | |||
151 | 80 | self.script + " --frontend=DistUpgradeViewKDE"]) | 123 | self.script + " --frontend=DistUpgradeViewKDE"]) |
152 | 81 | else: | 124 | else: |
153 | 82 | os.execv(self.script, | 125 | os.execv(self.script, |
156 | 83 | [self.script] + ["--frontend=DistUpgradeViewKDE"] + | 126 | [self.script, "--frontend=DistUpgradeViewKDE" + self.run_options]) |
155 | 84 | self.run_options) | ||
157 | 85 | # we shouldn't come to this point, but if we do, undo our | 127 | # we shouldn't come to this point, but if we do, undo our |
158 | 86 | # inhibit sleep | 128 | # inhibit sleep |
159 | 87 | allow_sleep() | 129 | allow_sleep() |
160 | 88 | 130 | ||
161 | 89 | def showReleaseNotes(self): | 131 | def showReleaseNotes(self): |
162 | 90 | # FIXME: care about i18n! (append -$lang or something) | 132 | # FIXME: care about i18n! (append -$lang or something) |
174 | 91 | self.dialogue = QDialog() | 133 | # TODO: ^ what is this supposed to mean? |
175 | 92 | uic.loadUi(self.APPDIR + "/dialog_release_notes.ui", self.dialogue) | 134 | self.dialog = QDialog() |
176 | 93 | upgradeButton = self.dialogue.buttonBox.button(QDialogButtonBox.Ok) | 135 | uic.loadUi(self.datadir + "/dialog_release_notes.ui", self.dialog) |
177 | 94 | upgradeButton.setText(_("Upgrade")) | 136 | upgradeButton = self.dialog.buttonBox.button(QDialogButtonBox.Ok) |
178 | 95 | upgradeButton.setIcon(KIcon("dialog-ok")) | 137 | upgradeButton.setText(_("&Upgrade")) |
179 | 96 | cancelButton = self.dialogue.buttonBox.button(QDialogButtonBox.Cancel) | 138 | upgradeButton.setIcon(_icon("dialog-ok")) |
180 | 97 | cancelButton.setIcon(KIcon("dialog-cancel")) | 139 | cancelButton = self.dialog.buttonBox.button(QDialogButtonBox.Cancel) |
181 | 98 | self.dialogue.setWindowTitle(_("Release Notes")) | 140 | cancelButton.setText(_("&Cancel")) |
182 | 99 | self.dialogue.show() | 141 | cancelButton.setIcon(_icon("dialog-cancel")) |
183 | 100 | if self.new_dist.releaseNotesURI is not None: | 142 | self.dialog.setWindowTitle(_("Release Notes")) |
184 | 101 | uri = self._expandUri(self.new_dist.releaseNotesURI) | 143 | self.dialog.show() |
185 | 144 | if self.new_dist.releaseNotesHtmlUri is not None: | ||
186 | 145 | uri = self._expandUri(self.new_dist.releaseNotesHtmlUri) | ||
187 | 102 | # download/display the release notes | 146 | # download/display the release notes |
189 | 103 | # FIXME: add some progress reporting here | 147 | # TODO: add some progress reporting here |
190 | 104 | result = None | 148 | result = None |
191 | 105 | try: | 149 | try: |
192 | 106 | release_notes = urlopen(uri) | 150 | release_notes = urlopen(uri) |
193 | 107 | notes = release_notes.read().decode("UTF-8", "replace") | 151 | notes = release_notes.read().decode("UTF-8", "replace") |
196 | 108 | self.dialogue.scrolled_notes.setText(notes) | 152 | self.dialog.scrolled_notes.setText(notes) |
197 | 109 | result = self.dialogue.exec_() | 153 | result = self.dialog.exec_() |
198 | 110 | except HTTPError: | 154 | except HTTPError: |
199 | 111 | primary = "<span weight=\"bold\" size=\"larger\">%s</span>" % \ | 155 | primary = "<span weight=\"bold\" size=\"larger\">%s</span>" % \ |
200 | 112 | _("Could not find the release notes") | 156 | _("Could not find the release notes") |
201 | 113 | secondary = _("The server may be overloaded. ") | 157 | secondary = _("The server may be overloaded. ") |
203 | 114 | KMessageBox.sorry(None, primary + "<br />" + secondary, "") | 158 | self._warning(primary + "<br />" + secondary) |
204 | 115 | except IOError: | 159 | except IOError: |
205 | 116 | primary = "<span weight=\"bold\" size=\"larger\">%s</span>" % \ | 160 | primary = "<span weight=\"bold\" size=\"larger\">%s</span>" % \ |
206 | 117 | _("Could not download the release notes") | 161 | _("Could not download the release notes") |
207 | 118 | secondary = _("Please check your internet connection.") | 162 | secondary = _("Please check your internet connection.") |
209 | 119 | KMessageBox.sorry(None, primary + "<br />" + secondary, "") | 163 | self._warning(primary + "<br />" + secondary) |
210 | 120 | # user clicked cancel | 164 | # user clicked cancel |
211 | 121 | if result == QDialog.Accepted: | 165 | if result == QDialog.Accepted: |
212 | 122 | self.progressDialogue.show() | ||
213 | 123 | return True | 166 | return True |
214 | 124 | if __name__ == "__main__": | ||
215 | 125 | KApplication.kApplication().exit(1) | ||
216 | 126 | if self.useDevelopmentRelease or self.useProposed: | ||
217 | 127 | #FIXME why does KApplication.kApplication().exit() crash but | ||
218 | 128 | # this doesn't? | ||
219 | 129 | sys.exit() | ||
220 | 130 | return False | 167 | return False |
221 | 131 | 168 | ||
222 | 169 | # FIXME: largely code copy from ReleaseNotesViewer which imports GTK. | ||
223 | 170 | @pyqtSlot(QUrl) | ||
224 | 171 | def openUrl(self, url): | ||
225 | 172 | url = url.toString() | ||
226 | 173 | import subprocess | ||
227 | 174 | """Open the specified URL in a browser""" | ||
228 | 175 | # Find an appropiate browser | ||
229 | 176 | if os.path.exists("/usr/bin/kde-open"): | ||
230 | 177 | command = ["kde-open", url] | ||
231 | 178 | elif os.path.exists("/usr/bin/xdg-open"): | ||
232 | 179 | command = ["xdg-open", url] | ||
233 | 180 | elif os.path.exists("/usr/bin/exo-open"): | ||
234 | 181 | command = ["exo-open", url] | ||
235 | 182 | elif os.path.exists('/usr/bin/gnome-open'): | ||
236 | 183 | command = ['gnome-open', url] | ||
237 | 184 | else: | ||
238 | 185 | command = ['x-www-browser', url] | ||
239 | 186 | # Avoid to run the browser as user root | ||
240 | 187 | if os.getuid() == 0 and 'SUDO_USER' in os.environ: | ||
241 | 188 | command = ['sudo', '-u', os.environ['SUDO_USER']] + command | ||
242 | 189 | subprocess.Popen(command) | ||
243 | 132 | 190 | ||
244 | 133 | class KDEAcquireProgressAdapter(apt.progress.base.AcquireProgress): | 191 | class KDEAcquireProgressAdapter(apt.progress.base.AcquireProgress): |
249 | 134 | def __init__(self, progress, label, parent): | 192 | def __init__(self, parent, datadir, label): |
250 | 135 | self.progress = progress | 193 | self.app = _ensureQApplication() |
251 | 136 | self.label = label | 194 | self.dialog = QDialog() |
252 | 137 | self.parent = parent | 195 | |
253 | 196 | uiFile = os.path.join(datadir, "fetch-progress.ui") | ||
254 | 197 | uic.loadUi(uiFile, self.dialog) | ||
255 | 198 | self.dialog.setWindowTitle(_("Upgrade")) | ||
256 | 199 | self.dialog.installingLabel.setText(label) | ||
257 | 200 | self.dialog.buttonBox.rejected.connect(self.abort) | ||
258 | 201 | |||
259 | 202 | # This variable is used as return value for AcquireProgress pulses. | ||
260 | 203 | # Setting it to False will abort the Acquire and consequently the | ||
261 | 204 | # entire fetcher. | ||
262 | 205 | self._continue = True | ||
263 | 206 | |||
264 | 207 | QApplication.processEvents() | ||
265 | 208 | |||
266 | 209 | def abort(self): | ||
267 | 210 | self._continue = False | ||
268 | 138 | 211 | ||
269 | 139 | def start(self): | 212 | def start(self): |
272 | 140 | self.label.setText(_("Downloading additional package files...")) | 213 | self.dialog.installingLabel.setText(_("Downloading additional package files...")) |
273 | 141 | self.progress.setValue(0) | 214 | self.dialog.installationProgress.setValue(0) |
274 | 215 | self.dialog.show() | ||
275 | 142 | 216 | ||
276 | 143 | def stop(self): | 217 | def stop(self): |
278 | 144 | pass | 218 | self.dialog.hide() |
279 | 145 | 219 | ||
280 | 146 | def pulse(self, owner): | 220 | def pulse(self, owner): |
281 | 147 | apt.progress.base.AcquireProgress.pulse(self, owner) | 221 | apt.progress.base.AcquireProgress.pulse(self, owner) |
284 | 148 | self.progress.setValue((self.current_bytes + self.current_items) / | 222 | self.dialog.installationProgress.setValue((self.current_bytes + self.current_items) / float(self.total_bytes + self.total_items) * 100) |
283 | 149 | float(self.total_bytes + self.total_items)) | ||
285 | 150 | current_item = self.current_items + 1 | 223 | current_item = self.current_items + 1 |
286 | 151 | if current_item > self.total_items: | 224 | if current_item > self.total_items: |
287 | 152 | current_item = self.total_items | 225 | current_item = self.total_items |
288 | @@ -158,47 +231,22 @@ | |||
289 | 158 | else: | 231 | else: |
290 | 159 | label_text += _("File %s of %s") % ( | 232 | label_text += _("File %s of %s") % ( |
291 | 160 | self.current_items, self.total_items) | 233 | self.current_items, self.total_items) |
295 | 161 | self.label.setText(label_text) | 234 | self.dialog.installingLabel.setText(label_text) |
296 | 162 | KApplication.kApplication().processEvents() | 235 | QApplication.processEvents() |
297 | 163 | return True | 236 | return self._continue |
298 | 164 | 237 | ||
299 | 165 | def mediaChange(self, medium, drive): | 238 | def mediaChange(self, medium, drive): |
300 | 166 | msg = _("Please insert '%s' into the drive '%s'") % (medium, drive) | 239 | msg = _("Please insert '%s' into the drive '%s'") % (medium, drive) |
309 | 167 | #change = QMessageBox.question(None, _("Media Change"), msg, | 240 | if PYQT_VERSION >= 0x50000: |
310 | 168 | # QMessageBox.Ok, QMessageBox.Cancel) | 241 | change = QMessageBox.question(None, _("Media Change"), msg, |
311 | 169 | change = KMessageBox.questionYesNo(None, _("Media Change"), | 242 | QMessageBox.Ok, QMessageBox.Cancel) |
312 | 170 | _("Media Change") + "<br>" + msg, | 243 | if change == QMessageBox.Ok: |
313 | 171 | KStandardGuiItem.ok(), | 244 | return True |
314 | 172 | KStandardGuiItem.cancel()) | 245 | else: |
315 | 173 | if change == KMessageBox.Yes: | 246 | change = KMessageBox.questionYesNo(None, _("Media Change"), |
316 | 174 | return True | 247 | _("Media Change") + "<br>" + msg, |
317 | 248 | KStandardGuiItem.ok(), | ||
318 | 249 | KStandardGuiItem.cancel()) | ||
319 | 250 | if change == KMessageBox.Yes: | ||
320 | 251 | return True | ||
321 | 175 | return False | 252 | return False |
322 | 176 | |||
323 | 177 | if __name__ == "__main__": | ||
324 | 178 | |||
325 | 179 | appName = "dist-upgrade-fetcher" | ||
326 | 180 | catalog = "" | ||
327 | 181 | programName = ki18n("Dist Upgrade Fetcher") | ||
328 | 182 | version = "0.3.4" | ||
329 | 183 | description = ki18n("Dist Upgrade Fetcher") | ||
330 | 184 | license = KAboutData.License_GPL | ||
331 | 185 | copyright = ki18n("(c) 2008 Canonical Ltd") | ||
332 | 186 | text = ki18n("none") | ||
333 | 187 | homePage = "https://launchpad.net/ubuntu-release-upgrader" | ||
334 | 188 | bugEmail = "" | ||
335 | 189 | |||
336 | 190 | aboutData = KAboutData(appName, catalog, programName, version, description, | ||
337 | 191 | license, copyright, text, homePage, bugEmail) | ||
338 | 192 | |||
339 | 193 | aboutData.addAuthor(ki18n("Jonathan Riddell"), ki18n("Author")) | ||
340 | 194 | |||
341 | 195 | options = KCmdLineOptions() | ||
342 | 196 | |||
343 | 197 | KCmdLineArgs.init(sys.argv, aboutData) | ||
344 | 198 | KCmdLineArgs.addCmdLineOptions(options) | ||
345 | 199 | |||
346 | 200 | app = KApplication() | ||
347 | 201 | fetcher = DistUpgradeFetcherKDE() | ||
348 | 202 | QTimer.singleShot(10, fetcher.run) | ||
349 | 203 | |||
350 | 204 | app.exec_() | ||
351 | 205 | 253 | ||
352 | === modified file 'DistUpgrade/DistUpgradeViewKDE.py' | |||
353 | --- DistUpgrade/DistUpgradeViewKDE.py 2014-05-02 13:07:42 +0000 | |||
354 | +++ DistUpgrade/DistUpgradeViewKDE.py 2014-08-05 13:50:46 +0000 | |||
355 | @@ -1,9 +1,10 @@ | |||
356 | 1 | # DistUpgradeViewKDE.py | 1 | # DistUpgradeViewKDE.py |
358 | 2 | # | 2 | # |
359 | 3 | # Copyright (c) 2007 Canonical Ltd | 3 | # Copyright (c) 2007 Canonical Ltd |
361 | 4 | # | 4 | # Copyright (c) 2014 Harald Sitter <apachelogger@kubuntu.org> |
362 | 5 | # | ||
363 | 5 | # Author: Jonathan Riddell <jriddell@ubuntu.com> | 6 | # Author: Jonathan Riddell <jriddell@ubuntu.com> |
365 | 6 | # | 7 | # |
366 | 7 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
367 | 8 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
368 | 9 | # published by the Free Software Foundation; either version 2 of the | 10 | # published by the Free Software Foundation; either version 2 of the |
369 | @@ -19,13 +20,26 @@ | |||
370 | 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
371 | 20 | # USA | 21 | # USA |
372 | 21 | 22 | ||
380 | 22 | from PyQt4.QtCore import QUrl, Qt, SIGNAL, QTimer | 23 | try: |
381 | 23 | from PyQt4.QtGui import ( | 24 | # 14.04 has a broken pyqt5, so don't even try to import it and require |
382 | 24 | QDesktopServices, QDialog, QPixmap, QTreeWidgetItem, QMessageBox, | 25 | # pyqt4. |
383 | 25 | QApplication, QTextEdit, QTextOption, QTextCursor, QPushButton, | 26 | # In 14.04 various signals in pyqt5 can not be connected because it thinks |
384 | 26 | QWidget, QIcon, QHBoxLayout, QLabel | 27 | # the signal does not exist or has an incompatible signature. Since this |
385 | 27 | ) | 28 | # potentially renders the GUI entirely broken and pyqt5 was not actively |
386 | 28 | from PyQt4 import uic | 29 | # used back then it is fair to simply require qt4 on trusty systems. |
387 | 30 | from .utils import get_dist | ||
388 | 31 | if get_dist() == 'trusty': | ||
389 | 32 | raise ImportError | ||
390 | 33 | |||
391 | 34 | from PyQt5 import uic | ||
392 | 35 | from PyQt5.QtCore import * | ||
393 | 36 | from PyQt5.QtGui import * | ||
394 | 37 | from PyQt5.QtWidgets import * | ||
395 | 38 | except ImportError: | ||
396 | 39 | from PyQt4 import uic | ||
397 | 40 | from PyQt4.QtCore import * | ||
398 | 41 | from PyQt4.QtGui import * | ||
399 | 42 | # If we still throw an exception, bounce back to Main to try another UI. | ||
400 | 29 | 43 | ||
401 | 30 | import sys | 44 | import sys |
402 | 31 | import locale | 45 | import locale |
403 | @@ -51,14 +65,16 @@ | |||
404 | 51 | from .DistUpgradeGettext import gettext as _ | 65 | from .DistUpgradeGettext import gettext as _ |
405 | 52 | from .DistUpgradeGettext import unicode_gettext | 66 | from .DistUpgradeGettext import unicode_gettext |
406 | 53 | 67 | ||
407 | 68 | from .QUrlOpener import QUrlOpener | ||
408 | 54 | 69 | ||
409 | 70 | # FIXME: what's the purpose? | ||
410 | 55 | def utf8(s, errors="strict"): | 71 | def utf8(s, errors="strict"): |
411 | 56 | if isinstance(s, bytes): | 72 | if isinstance(s, bytes): |
412 | 57 | return s.decode("UTF-8", errors) | 73 | return s.decode("UTF-8", errors) |
413 | 58 | else: | 74 | else: |
414 | 59 | return s | 75 | return s |
415 | 60 | 76 | ||
417 | 61 | 77 | # FIXME: what's the purpose? | |
418 | 62 | def loadUi(file, parent): | 78 | def loadUi(file, parent): |
419 | 63 | if os.path.exists(file): | 79 | if os.path.exists(file): |
420 | 64 | uic.loadUi(file, parent) | 80 | uic.loadUi(file, parent) |
421 | @@ -74,6 +90,7 @@ | |||
422 | 74 | QTextEdit.__init__(self, "", parent_frame) | 90 | QTextEdit.__init__(self, "", parent_frame) |
423 | 75 | self.installProgress = installProgress | 91 | self.installProgress = installProgress |
424 | 76 | self.setFontFamily("Monospace") | 92 | self.setFontFamily("Monospace") |
425 | 93 | # FIXME: fixed font size set!!! | ||
426 | 77 | self.setFontPointSize(8) | 94 | self.setFontPointSize(8) |
427 | 78 | self.setWordWrapMode(QTextOption.NoWrap) | 95 | self.setWordWrapMode(QTextOption.NoWrap) |
428 | 79 | self.setUndoRedoEnabled(False) | 96 | self.setUndoRedoEnabled(False) |
429 | @@ -298,7 +315,8 @@ | |||
430 | 298 | dialogue.textview_error.show() | 315 | dialogue.textview_error.show() |
431 | 299 | else: | 316 | else: |
432 | 300 | dialogue.textview_error.hide() | 317 | dialogue.textview_error.hide() |
434 | 301 | dialogue.connect(dialogue.button_bugreport, SIGNAL("clicked()"), self.parent.reportBug) | 318 | # Make sure we have a suitable size depending on whether or not the view is shown |
435 | 319 | dialogue.adjustSize() | ||
436 | 302 | dialogue.exec_() | 320 | dialogue.exec_() |
437 | 303 | 321 | ||
438 | 304 | def conffile(self, current, new): | 322 | def conffile(self, current, new): |
439 | @@ -316,7 +334,7 @@ | |||
440 | 316 | self.confDialogue.textview_conffile.hide() | 334 | self.confDialogue.textview_conffile.hide() |
441 | 317 | #FIXME, below to be tested | 335 | #FIXME, below to be tested |
442 | 318 | #self.confDialogue.resize(self.confDialogue.minimumSizeHint()) | 336 | #self.confDialogue.resize(self.confDialogue.minimumSizeHint()) |
444 | 319 | self.confDialogue.connect(self.confDialogue.show_difference_button, SIGNAL("clicked()"), self.showConffile) | 337 | self.confDialogue.show_difference_button.clicked.connect(self.showConffile)) |
445 | 320 | 338 | ||
446 | 321 | # workaround silly dpkg | 339 | # workaround silly dpkg |
447 | 322 | if not os.path.exists(current): | 340 | if not os.path.exists(current): |
448 | @@ -475,18 +493,23 @@ | |||
449 | 475 | except Exception as e: | 493 | except Exception as e: |
450 | 476 | logging.warning("Error setting locales (%s)" % e) | 494 | logging.warning("Error setting locales (%s)" % e) |
451 | 477 | 495 | ||
452 | 478 | #about = KAboutData("adept_manager","Upgrader","0.1","Dist Upgrade Tool for Kubuntu",KAboutData.License_GPL,"(c) 2007 Canonical Ltd", | ||
453 | 479 | #"http://wiki.kubuntu.org/KubuntuUpdateManager", "jriddell@ubuntu.com") | ||
454 | 480 | #about.addAuthor("Jonathan Riddell", None,"jriddell@ubuntu.com") | ||
455 | 481 | #about.addAuthor("Michael Vogt", None,"michael.vogt@ubuntu.com") | ||
456 | 482 | #KCmdLineArgs.init(["./dist-upgrade.py"],about) | ||
457 | 483 | |||
458 | 484 | # we test for DISPLAY here, QApplication does not throw a | 496 | # we test for DISPLAY here, QApplication does not throw a |
459 | 485 | # exception when run without DISPLAY but dies instead | 497 | # exception when run without DISPLAY but dies instead |
460 | 486 | if not "DISPLAY" in os.environ: | 498 | if not "DISPLAY" in os.environ: |
461 | 487 | raise Exception("No DISPLAY in os.environ found") | 499 | raise Exception("No DISPLAY in os.environ found") |
462 | 488 | self.app = QApplication(["ubuntu-release-upgrader"]) | 500 | self.app = QApplication(["ubuntu-release-upgrader"]) |
463 | 489 | 501 | ||
464 | 502 | # Try to load default Qt translations so we don't have to worry about | ||
465 | 503 | # QStandardButton translations. | ||
466 | 504 | translator = QTranslator(self.app) | ||
467 | 505 | if PYQT_VERSION >= 0x50000: | ||
468 | 506 | translator.load(QLocale.system(), 'qt', '_', '/usr/share/qt5/translations') | ||
469 | 507 | else: | ||
470 | 508 | translator.load(QLocale.system(), 'qt', '_', '/usr/share/qt4/translations') | ||
471 | 509 | self.app.installTranslator(translator) | ||
472 | 510 | |||
473 | 511 | QUrlOpener().setupUrlHandles() | ||
474 | 512 | |||
475 | 490 | if os.path.exists("/usr/share/icons/oxygen/48x48/apps/system-software-update.png"): | 513 | if os.path.exists("/usr/share/icons/oxygen/48x48/apps/system-software-update.png"): |
476 | 491 | messageIcon = QPixmap("/usr/share/icons/oxygen/48x48/apps/system-software-update.png") | 514 | messageIcon = QPixmap("/usr/share/icons/oxygen/48x48/apps/system-software-update.png") |
477 | 492 | else: | 515 | else: |
478 | @@ -509,30 +532,7 @@ | |||
479 | 509 | sys.excepthook = self._handleException | 532 | sys.excepthook = self._handleException |
480 | 510 | 533 | ||
481 | 511 | self.window_main.showTerminalButton.setEnabled(False) | 534 | self.window_main.showTerminalButton.setEnabled(False) |
506 | 512 | self.app.connect(self.window_main.showTerminalButton, SIGNAL("clicked()"), self.showTerminal) | 535 | self.window_main.showTerminalButton.clicked.connect(self.showTerminal) |
483 | 513 | |||
484 | 514 | #kdesu requires us to copy the xauthority file before it removes it when Adept is killed | ||
485 | 515 | fd, copyXauth = tempfile.mkstemp("", "adept") | ||
486 | 516 | if 'XAUTHORITY' in os.environ and os.environ['XAUTHORITY'] != copyXauth: | ||
487 | 517 | shutil.copy(os.environ['XAUTHORITY'], copyXauth) | ||
488 | 518 | os.environ["XAUTHORITY"] = copyXauth | ||
489 | 519 | |||
490 | 520 | # Note that with kdesudo this needs --nonewdcop | ||
491 | 521 | ## create a new DCOP-Client: | ||
492 | 522 | #client = DCOPClient() | ||
493 | 523 | ## connect the client to the local DCOP-server: | ||
494 | 524 | #client.attach() | ||
495 | 525 | |||
496 | 526 | #for qcstring_app in client.registeredApplications(): | ||
497 | 527 | # app = str(qcstring_app) | ||
498 | 528 | # if app.startswith("adept"): | ||
499 | 529 | # adept = DCOPApp(qcstring_app, client) | ||
500 | 530 | # adeptInterface = adept.object("MainApplication-Interface") | ||
501 | 531 | # adeptInterface.quit() | ||
502 | 532 | |||
503 | 533 | # This works just as well | ||
504 | 534 | subprocess.call(["killall", "adept_manager"]) | ||
505 | 535 | subprocess.call(["killall", "adept_updater"]) | ||
507 | 536 | 536 | ||
508 | 537 | # init gettext | 537 | # init gettext |
509 | 538 | gettext.bindtextdomain("ubuntu-release-upgrader",localedir) | 538 | gettext.bindtextdomain("ubuntu-release-upgrader",localedir) |
510 | @@ -605,24 +605,12 @@ | |||
511 | 605 | dialog = QDialog(self.window_main) | 605 | dialog = QDialog(self.window_main) |
512 | 606 | loadUi("dialog_error.ui", dialog) | 606 | loadUi("dialog_error.ui", dialog) |
513 | 607 | self.translate_widget_children(self.dialog) | 607 | self.translate_widget_children(self.dialog) |
514 | 608 | #FIXME make URL work | ||
515 | 609 | #dialog.connect(dialog.beastie_url, SIGNAL("leftClickedURL(const QString&)"), self.openURL) | ||
516 | 610 | dialog.crash_detail.setText(tbtext) | 608 | dialog.crash_detail.setText(tbtext) |
517 | 609 | # Make sure we have a suitable size depending on whether or not the view is shown | ||
518 | 610 | dialogue.adjustSize() | ||
519 | 611 | dialog.exec_() | 611 | dialog.exec_() |
520 | 612 | sys.exit(1) | 612 | sys.exit(1) |
521 | 613 | 613 | ||
522 | 614 | def openURL(self, url): | ||
523 | 615 | """start konqueror""" | ||
524 | 616 | #need to run this else kdesu can't run Konqueror | ||
525 | 617 | #subprocess.call(['su', 'ubuntu', 'xhost', '+localhost']) | ||
526 | 618 | QDesktopServices.openUrl(QUrl(url)) | ||
527 | 619 | |||
528 | 620 | def reportBug(self): | ||
529 | 621 | """start konqueror""" | ||
530 | 622 | #need to run this else kdesu can't run Konqueror | ||
531 | 623 | #subprocess.call(['su', 'ubuntu', 'xhost', '+localhost']) | ||
532 | 624 | QDesktopServices.openUrl(QUrl("https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+filebug")) | ||
533 | 625 | |||
534 | 626 | def showTerminal(self): | 614 | def showTerminal(self): |
535 | 627 | if self.window_main.konsole_frame.isVisible(): | 615 | if self.window_main.konsole_frame.isVisible(): |
536 | 628 | self.window_main.konsole_frame.hide() | 616 | self.window_main.konsole_frame.hide() |
537 | @@ -708,7 +696,6 @@ | |||
538 | 708 | dialogue.textview_error.show() | 696 | dialogue.textview_error.show() |
539 | 709 | else: | 697 | else: |
540 | 710 | dialogue.textview_error.hide() | 698 | dialogue.textview_error.hide() |
541 | 711 | dialogue.button_bugreport.hide() | ||
542 | 712 | dialogue.setWindowTitle(_("Information")) | 699 | dialogue.setWindowTitle(_("Information")) |
543 | 713 | 700 | ||
544 | 714 | if os.path.exists("/usr/share/icons/oxygen/48x48/status/dialog-information.png"): | 701 | if os.path.exists("/usr/share/icons/oxygen/48x48/status/dialog-information.png"): |
545 | @@ -718,6 +705,8 @@ | |||
546 | 718 | else: | 705 | else: |
547 | 719 | messageIcon = QPixmap("/usr/share/icons/crystalsvg/32x32/actions/messagebox_info.png") | 706 | messageIcon = QPixmap("/usr/share/icons/crystalsvg/32x32/actions/messagebox_info.png") |
548 | 720 | dialogue.image.setPixmap(messageIcon) | 707 | dialogue.image.setPixmap(messageIcon) |
549 | 708 | # Make sure we have a suitable size depending on whether or not the view is shown | ||
550 | 709 | dialogue.adjustSize() | ||
551 | 721 | dialogue.exec_() | 710 | dialogue.exec_() |
552 | 722 | 711 | ||
553 | 723 | def error(self, summary, msg, extended_msg=None): | 712 | def error(self, summary, msg, extended_msg=None): |
554 | @@ -732,8 +721,6 @@ | |||
555 | 732 | dialogue.textview_error.show() | 721 | dialogue.textview_error.show() |
556 | 733 | else: | 722 | else: |
557 | 734 | dialogue.textview_error.hide() | 723 | dialogue.textview_error.hide() |
558 | 735 | dialogue.button_close.show() | ||
559 | 736 | self.app.connect(dialogue.button_bugreport, SIGNAL("clicked()"), self.reportBug) | ||
560 | 737 | 724 | ||
561 | 738 | if os.path.exists("/usr/share/icons/oxygen/48x48/status/dialog-error.png"): | 725 | if os.path.exists("/usr/share/icons/oxygen/48x48/status/dialog-error.png"): |
562 | 739 | messageIcon = QPixmap("/usr/share/icons/oxygen/48x48/status/dialog-error.png") | 726 | messageIcon = QPixmap("/usr/share/icons/oxygen/48x48/status/dialog-error.png") |
563 | @@ -742,6 +729,8 @@ | |||
564 | 742 | else: | 729 | else: |
565 | 743 | messageIcon = QPixmap("/usr/share/icons/crystalsvg/32x32/actions/messagebox_critical.png") | 730 | messageIcon = QPixmap("/usr/share/icons/crystalsvg/32x32/actions/messagebox_critical.png") |
566 | 744 | dialogue.image.setPixmap(messageIcon) | 731 | dialogue.image.setPixmap(messageIcon) |
567 | 732 | # Make sure we have a suitable size depending on whether or not the view is shown | ||
568 | 733 | dialogue.adjustSize() | ||
569 | 745 | dialogue.exec_() | 734 | dialogue.exec_() |
570 | 746 | 735 | ||
571 | 747 | return False | 736 | return False |
572 | @@ -757,9 +746,11 @@ | |||
573 | 757 | loadUi("dialog_changes.ui", self.changesDialogue) | 746 | loadUi("dialog_changes.ui", self.changesDialogue) |
574 | 758 | 747 | ||
575 | 759 | self.changesDialogue.treeview_details.hide() | 748 | self.changesDialogue.treeview_details.hide() |
577 | 760 | self.changesDialogue.connect(self.changesDialogue.show_details_button, SIGNAL("clicked()"), self.showChangesDialogueDetails) | 749 | self.changesDialogue.buttonBox.helpRequested.connect(self.showChangesDialogueDetails) |
578 | 761 | self.translate_widget_children(self.changesDialogue) | 750 | self.translate_widget_children(self.changesDialogue) |
580 | 762 | self.changesDialogue.show_details_button.setText(_("Details") + " >>>") | 751 | self.changesDialogue.buttonBox.button(QDialogButtonBox.Ok).setText(_("&Start Upgrade")) |
581 | 752 | self.changesDialogue.buttonBox.button(QDialogButtonBox.Help).setIcon(QIcon()) | ||
582 | 753 | self.changesDialogue.buttonBox.button(QDialogButtonBox.Help).setText(_("Details") + " >>>") | ||
583 | 763 | self.changesDialogue.resize(self.changesDialogue.sizeHint()) | 754 | self.changesDialogue.resize(self.changesDialogue.sizeHint()) |
584 | 764 | 755 | ||
585 | 765 | if os.path.exists("/usr/share/icons/oxygen/48x48/status/dialog-warning.png"): | 756 | if os.path.exists("/usr/share/icons/oxygen/48x48/status/dialog-warning.png"): |
586 | @@ -773,9 +764,9 @@ | |||
587 | 773 | 764 | ||
588 | 774 | if actions != None: | 765 | if actions != None: |
589 | 775 | cancel = actions[0].replace("_", "") | 766 | cancel = actions[0].replace("_", "") |
591 | 776 | self.changesDialogue.button_cancel_changes.setText(cancel) | 767 | self.changesDialogue.buttonBox.button(QDialogButtonBox.Cancel).setText(cancel) |
592 | 777 | confirm = actions[1].replace("_", "") | 768 | confirm = actions[1].replace("_", "") |
594 | 778 | self.changesDialogue.button_confirm_changes.setText(confirm) | 769 | self.changesDialogue.buttonBox.button(QDialogButtonBox.Ok).setText(confirm) |
595 | 779 | 770 | ||
596 | 780 | summaryText = "<big><b>%s</b></big>" % summary | 771 | summaryText = "<big><b>%s</b></big>" % summary |
597 | 781 | self.changesDialogue.label_summary.setText(summaryText) | 772 | self.changesDialogue.label_summary.setText(summaryText) |
598 | @@ -804,10 +795,12 @@ | |||
599 | 804 | def showChangesDialogueDetails(self): | 795 | def showChangesDialogueDetails(self): |
600 | 805 | if self.changesDialogue.treeview_details.isVisible(): | 796 | if self.changesDialogue.treeview_details.isVisible(): |
601 | 806 | self.changesDialogue.treeview_details.hide() | 797 | self.changesDialogue.treeview_details.hide() |
603 | 807 | self.changesDialogue.show_details_button.setText(_("Details") + " >>>") | 798 | self.changesDialogue.buttonBox.button(QDialogButtonBox.Help).setText(_("Details") + " >>>") |
604 | 799 | # Make sure we shrink the dialog otherwise it looks silly | ||
605 | 800 | self.changesDialogue.adjustSize() | ||
606 | 808 | else: | 801 | else: |
607 | 809 | self.changesDialogue.treeview_details.show() | 802 | self.changesDialogue.treeview_details.show() |
609 | 810 | self.changesDialogue.show_details_button.setText("<<< " + _("Details")) | 803 | self.changesDialogue.buttonBox.button(QDialogButtonBox.Help).setText("<<< " + _("Details")) |
610 | 811 | self.changesDialogue.resize(self.changesDialogue.sizeHint()) | 804 | self.changesDialogue.resize(self.changesDialogue.sizeHint()) |
611 | 812 | 805 | ||
612 | 813 | def askYesNoQuestion(self, summary, msg, default='No'): | 806 | def askYesNoQuestion(self, summary, msg, default='No'): |
613 | 814 | 807 | ||
614 | === added file 'DistUpgrade/QUrlOpener.py' | |||
615 | --- DistUpgrade/QUrlOpener.py 1970-01-01 00:00:00 +0000 | |||
616 | +++ DistUpgrade/QUrlOpener.py 2014-08-05 13:50:46 +0000 | |||
617 | @@ -0,0 +1,80 @@ | |||
618 | 1 | # QUrlOpener.py | ||
619 | 2 | # -*- Mode: Python; indent-tabs-mode: nil; tab-width: 4; coding: utf-8 -*- | ||
620 | 3 | # | ||
621 | 4 | # Copyright (c) 2014 Harald Sitter <apachelogger@kubuntu.org> | ||
622 | 5 | # | ||
623 | 6 | # This program is free software; you can redistribute it and/or | ||
624 | 7 | # modify it under the terms of the GNU General Public License as | ||
625 | 8 | # published by the Free Software Foundation; either version 2 of the | ||
626 | 9 | # License, or (at your option) any later version. | ||
627 | 10 | # | ||
628 | 11 | # This program is distributed in the hope that it will be useful, | ||
629 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
630 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
631 | 14 | # GNU General Public License for more details. | ||
632 | 15 | # | ||
633 | 16 | # You should have received a copy of the GNU General Public License | ||
634 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
635 | 18 | |||
636 | 19 | try: | ||
637 | 20 | # 14.04 has a broken pyqt5, so don't even try to import it and require | ||
638 | 21 | # pyqt4. | ||
639 | 22 | # In 14.04 various signals in pyqt5 can not be connected because it thinks | ||
640 | 23 | # the signal does not exist or has an incompatible signature. Since this | ||
641 | 24 | # potentially renders the GUI entirely broken and pyqt5 was not actively | ||
642 | 25 | # used back then it is fair to simply require qt4 on trusty systems. | ||
643 | 26 | from .utils import get_dist | ||
644 | 27 | if get_dist() == 'trusty': | ||
645 | 28 | raise ImportError | ||
646 | 29 | |||
647 | 30 | from PyQt5.QtCore import * | ||
648 | 31 | from PyQt5.QtGui import * | ||
649 | 32 | except ImportError: | ||
650 | 33 | from PyQt4.QtCore import * | ||
651 | 34 | from PyQt4.QtGui import * | ||
652 | 35 | |||
653 | 36 | import os | ||
654 | 37 | import subprocess | ||
655 | 38 | |||
656 | 39 | def singleton(class_): | ||
657 | 40 | instances = {} | ||
658 | 41 | def instance(*args, **kwargs): | ||
659 | 42 | if class_ not in instances: | ||
660 | 43 | instances[class_] = class_(*args, **kwargs) | ||
661 | 44 | return instances[class_] | ||
662 | 45 | return instance | ||
663 | 46 | |||
664 | 47 | @singleton | ||
665 | 48 | class QUrlOpener(QObject): | ||
666 | 49 | def __init__(self): | ||
667 | 50 | QObject.__init__(self) | ||
668 | 51 | self.setParent(QCoreApplication.instance()) | ||
669 | 52 | |||
670 | 53 | def setupUrlHandles(self): | ||
671 | 54 | # Make sure we don't run a root browser. | ||
672 | 55 | # NOTE: Qt native API can set an openUrl handler from a QObject | ||
673 | 56 | # function, pyqt in theory also allows an arbitrary callable. Latter has | ||
674 | 57 | # been observed to be non-functional so rely on the native handling. | ||
675 | 58 | QDesktopServices.setUrlHandler('http', self, 'openUrl') | ||
676 | 59 | QDesktopServices.setUrlHandler('https', self, 'openUrl') | ||
677 | 60 | |||
678 | 61 | # NOTE: largely code copy from ReleaseNotesViewer which imports GTK. | ||
679 | 62 | @pyqtSlot(QUrl) | ||
680 | 63 | def openUrl(self, url): | ||
681 | 64 | url = url.toString() | ||
682 | 65 | """Open the specified URL in a browser""" | ||
683 | 66 | # Find an appropiate browser | ||
684 | 67 | if os.path.exists("/usr/bin/xdg-open"): | ||
685 | 68 | command = ["xdg-open", url] | ||
686 | 69 | elif os.path.exists("/usr/bin/kde-open"): | ||
687 | 70 | command = ["kde-open", url] | ||
688 | 71 | elif os.path.exists("/usr/bin/exo-open"): | ||
689 | 72 | command = ["exo-open", url] | ||
690 | 73 | elif os.path.exists('/usr/bin/gnome-open'): | ||
691 | 74 | command = ['gnome-open', url] | ||
692 | 75 | else: | ||
693 | 76 | command = ['x-www-browser', url] | ||
694 | 77 | # Avoid to run the browser as user root | ||
695 | 78 | if os.getuid() == 0 and 'SUDO_USER' in os.environ: | ||
696 | 79 | command = ['sudo', '-u', os.environ['SUDO_USER']] + command | ||
697 | 80 | subprocess.Popen(command) | ||
698 | 0 | 81 | ||
699 | === modified file 'DistUpgrade/dialog_changes.ui' | |||
700 | --- DistUpgrade/dialog_changes.ui 2008-09-12 12:19:10 +0000 | |||
701 | +++ DistUpgrade/dialog_changes.ui 2014-08-05 13:50:46 +0000 | |||
702 | @@ -1,7 +1,8 @@ | |||
704 | 1 | <ui version="4.0" > | 1 | <?xml version="1.0" encoding="UTF-8"?> |
705 | 2 | <ui version="4.0"> | ||
706 | 2 | <class>dialog_changes</class> | 3 | <class>dialog_changes</class> |
709 | 3 | <widget class="QDialog" name="dialog_changes" > | 4 | <widget class="QDialog" name="dialog_changes"> |
710 | 4 | <property name="geometry" > | 5 | <property name="geometry"> |
711 | 5 | <rect> | 6 | <rect> |
712 | 6 | <x>0</x> | 7 | <x>0</x> |
713 | 7 | <y>0</y> | 8 | <y>0</y> |
714 | @@ -9,58 +10,51 @@ | |||
715 | 9 | <height>417</height> | 10 | <height>417</height> |
716 | 10 | </rect> | 11 | </rect> |
717 | 11 | </property> | 12 | </property> |
720 | 12 | <property name="sizePolicy" > | 13 | <property name="sizePolicy"> |
721 | 13 | <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > | 14 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> |
722 | 14 | <horstretch>0</horstretch> | 15 | <horstretch>0</horstretch> |
723 | 15 | <verstretch>0</verstretch> | 16 | <verstretch>0</verstretch> |
724 | 16 | </sizepolicy> | 17 | </sizepolicy> |
725 | 17 | </property> | 18 | </property> |
727 | 18 | <property name="windowTitle" > | 19 | <property name="windowTitle"> |
728 | 19 | <string>Package Changes</string> | 20 | <string>Package Changes</string> |
729 | 20 | </property> | 21 | </property> |
731 | 21 | <property name="modal" > | 22 | <property name="modal"> |
732 | 22 | <bool>true</bool> | 23 | <bool>true</bool> |
733 | 23 | </property> | 24 | </property> |
744 | 24 | <layout class="QGridLayout" > | 25 | <layout class="QVBoxLayout" name="verticalLayout"> |
745 | 25 | <item row="3" column="3" > | 26 | <item> |
746 | 26 | <widget class="QPushButton" name="button_cancel_changes" > | 27 | <layout class="QHBoxLayout"> |
737 | 27 | <property name="text" > | ||
738 | 28 | <string>&Cancel</string> | ||
739 | 29 | </property> | ||
740 | 30 | </widget> | ||
741 | 31 | </item> | ||
742 | 32 | <item row="0" column="0" colspan="4" > | ||
743 | 33 | <layout class="QHBoxLayout" > | ||
747 | 34 | <item> | 28 | <item> |
749 | 35 | <layout class="QVBoxLayout" > | 29 | <layout class="QVBoxLayout"> |
750 | 36 | <item> | 30 | <item> |
754 | 37 | <widget class="QLabel" name="question_pixmap" > | 31 | <widget class="QLabel" name="question_pixmap"> |
755 | 38 | <property name="sizePolicy" > | 32 | <property name="sizePolicy"> |
756 | 39 | <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > | 33 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
757 | 40 | <horstretch>0</horstretch> | 34 | <horstretch>0</horstretch> |
758 | 41 | <verstretch>0</verstretch> | 35 | <verstretch>0</verstretch> |
759 | 42 | </sizepolicy> | 36 | </sizepolicy> |
760 | 43 | </property> | 37 | </property> |
762 | 44 | <property name="text" > | 38 | <property name="text"> |
763 | 45 | <string/> | 39 | <string/> |
764 | 46 | </property> | 40 | </property> |
766 | 47 | <property name="pixmap" > | 41 | <property name="pixmap"> |
767 | 48 | <pixmap>image0</pixmap> | 42 | <pixmap>image0</pixmap> |
768 | 49 | </property> | 43 | </property> |
770 | 50 | <property name="wordWrap" > | 44 | <property name="wordWrap"> |
771 | 51 | <bool>false</bool> | 45 | <bool>false</bool> |
772 | 52 | </property> | 46 | </property> |
773 | 53 | </widget> | 47 | </widget> |
774 | 54 | </item> | 48 | </item> |
775 | 55 | <item> | 49 | <item> |
778 | 56 | <spacer name="spacer6" > | 50 | <spacer name="spacer6"> |
779 | 57 | <property name="orientation" > | 51 | <property name="orientation"> |
780 | 58 | <enum>Qt::Vertical</enum> | 52 | <enum>Qt::Vertical</enum> |
781 | 59 | </property> | 53 | </property> |
783 | 60 | <property name="sizeType" > | 54 | <property name="sizeType"> |
784 | 61 | <enum>QSizePolicy::Expanding</enum> | 55 | <enum>QSizePolicy::Expanding</enum> |
785 | 62 | </property> | 56 | </property> |
787 | 63 | <property name="sizeHint" stdset="0" > | 57 | <property name="sizeHint" stdset="0"> |
788 | 64 | <size> | 58 | <size> |
789 | 65 | <width>20</width> | 59 | <width>20</width> |
790 | 66 | <height>80</height> | 60 | <height>80</height> |
791 | @@ -71,141 +65,121 @@ | |||
792 | 71 | </layout> | 65 | </layout> |
793 | 72 | </item> | 66 | </item> |
794 | 73 | <item> | 67 | <item> |
833 | 74 | <layout class="QVBoxLayout" > | 68 | <layout class="QVBoxLayout"> |
834 | 75 | <item> | 69 | <item> |
835 | 76 | <widget class="QLabel" name="label_summary" > | 70 | <widget class="QLabel" name="label_summary"> |
836 | 77 | <property name="text" > | 71 | <property name="sizePolicy"> |
837 | 78 | <string/> | 72 | <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> |
838 | 79 | </property> | 73 | <horstretch>0</horstretch> |
839 | 80 | <property name="textFormat" > | 74 | <verstretch>0</verstretch> |
840 | 81 | <enum>Qt::RichText</enum> | 75 | </sizepolicy> |
841 | 82 | </property> | 76 | </property> |
842 | 83 | <property name="alignment" > | 77 | <property name="text"> |
843 | 84 | <set>Qt::AlignVCenter</set> | 78 | <string/> |
844 | 85 | </property> | 79 | </property> |
845 | 86 | <property name="wordWrap" > | 80 | <property name="textFormat"> |
846 | 87 | <bool>true</bool> | 81 | <enum>Qt::RichText</enum> |
847 | 88 | </property> | 82 | </property> |
848 | 89 | </widget> | 83 | <property name="alignment"> |
849 | 90 | </item> | 84 | <set>Qt::AlignVCenter</set> |
850 | 91 | <item> | 85 | </property> |
851 | 92 | <widget class="QLabel" name="label_changes" > | 86 | <property name="wordWrap"> |
852 | 93 | <property name="sizePolicy" > | 87 | <bool>true</bool> |
853 | 94 | <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > | 88 | </property> |
854 | 95 | <horstretch>0</horstretch> | 89 | </widget> |
855 | 96 | <verstretch>0</verstretch> | 90 | </item> |
856 | 97 | </sizepolicy> | 91 | <item> |
857 | 98 | </property> | 92 | <widget class="QLabel" name="label_changes"> |
858 | 99 | <property name="text" > | 93 | <property name="sizePolicy"> |
859 | 100 | <string/> | 94 | <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> |
860 | 101 | </property> | 95 | <horstretch>0</horstretch> |
861 | 102 | <property name="textFormat" > | 96 | <verstretch>0</verstretch> |
862 | 103 | <enum>Qt::RichText</enum> | 97 | </sizepolicy> |
863 | 104 | </property> | 98 | </property> |
864 | 105 | <property name="alignment" > | 99 | <property name="text"> |
865 | 106 | <set>Qt::AlignVCenter</set> | 100 | <string/> |
866 | 107 | </property> | 101 | </property> |
867 | 108 | <property name="wordWrap" > | 102 | <property name="textFormat"> |
868 | 109 | <bool>true</bool> | 103 | <enum>Qt::RichText</enum> |
869 | 110 | </property> | 104 | </property> |
870 | 111 | </widget> | 105 | <property name="alignment"> |
871 | 106 | <set>Qt::AlignVCenter</set> | ||
872 | 107 | </property> | ||
873 | 108 | <property name="wordWrap"> | ||
874 | 109 | <bool>true</bool> | ||
875 | 110 | </property> | ||
876 | 111 | </widget> | ||
877 | 112 | </item> | ||
878 | 113 | <item> | ||
879 | 114 | <spacer name="spacer6_2"> | ||
880 | 115 | <property name="orientation"> | ||
881 | 116 | <enum>Qt::Vertical</enum> | ||
882 | 117 | </property> | ||
883 | 118 | <property name="sizeHint" stdset="0"> | ||
884 | 119 | <size> | ||
885 | 120 | <width>0</width> | ||
886 | 121 | <height>0</height> | ||
887 | 122 | </size> | ||
888 | 123 | </property> | ||
889 | 124 | </spacer> | ||
890 | 112 | </item> | 125 | </item> |
891 | 113 | </layout> | 126 | </layout> |
892 | 114 | </item> | 127 | </item> |
893 | 115 | </layout> | 128 | </layout> |
894 | 116 | </item> | 129 | </item> |
944 | 117 | <item row="1" column="0" > | 130 | <item> |
945 | 118 | <widget class="QPushButton" name="show_details_button" > | 131 | <widget class="QTreeWidget" name="treeview_details"> |
946 | 119 | <property name="text" > | 132 | <property name="rootIsDecorated"> |
898 | 120 | <string>Details >>></string> | ||
899 | 121 | </property> | ||
900 | 122 | </widget> | ||
901 | 123 | </item> | ||
902 | 124 | <item row="1" column="1" colspan="3" > | ||
903 | 125 | <spacer name="spacer2" > | ||
904 | 126 | <property name="orientation" > | ||
905 | 127 | <enum>Qt::Horizontal</enum> | ||
906 | 128 | </property> | ||
907 | 129 | <property name="sizeType" > | ||
908 | 130 | <enum>QSizePolicy::Expanding</enum> | ||
909 | 131 | </property> | ||
910 | 132 | <property name="sizeHint" stdset="0" > | ||
911 | 133 | <size> | ||
912 | 134 | <width>341</width> | ||
913 | 135 | <height>21</height> | ||
914 | 136 | </size> | ||
915 | 137 | </property> | ||
916 | 138 | </spacer> | ||
917 | 139 | </item> | ||
918 | 140 | <item row="3" column="2" > | ||
919 | 141 | <widget class="QPushButton" name="button_confirm_changes" > | ||
920 | 142 | <property name="text" > | ||
921 | 143 | <string>_Start Upgrade</string> | ||
922 | 144 | </property> | ||
923 | 145 | </widget> | ||
924 | 146 | </item> | ||
925 | 147 | <item row="3" column="0" colspan="2" > | ||
926 | 148 | <spacer name="spacer3" > | ||
927 | 149 | <property name="orientation" > | ||
928 | 150 | <enum>Qt::Horizontal</enum> | ||
929 | 151 | </property> | ||
930 | 152 | <property name="sizeType" > | ||
931 | 153 | <enum>QSizePolicy::Expanding</enum> | ||
932 | 154 | </property> | ||
933 | 155 | <property name="sizeHint" stdset="0" > | ||
934 | 156 | <size> | ||
935 | 157 | <width>161</width> | ||
936 | 158 | <height>20</height> | ||
937 | 159 | </size> | ||
938 | 160 | </property> | ||
939 | 161 | </spacer> | ||
940 | 162 | </item> | ||
941 | 163 | <item row="2" column="0" colspan="4" > | ||
942 | 164 | <widget class="QTreeWidget" name="treeview_details" > | ||
943 | 165 | <property name="rootIsDecorated" > | ||
947 | 166 | <bool>false</bool> | 133 | <bool>false</bool> |
948 | 167 | </property> | 134 | </property> |
949 | 168 | <column> | 135 | <column> |
951 | 169 | <property name="text" > | 136 | <property name="text"> |
952 | 170 | <string>1</string> | 137 | <string>1</string> |
953 | 171 | </property> | 138 | </property> |
954 | 172 | </column> | 139 | </column> |
955 | 173 | </widget> | 140 | </widget> |
956 | 174 | </item> | 141 | </item> |
957 | 142 | <item> | ||
958 | 143 | <widget class="QDialogButtonBox" name="buttonBox"> | ||
959 | 144 | <property name="standardButtons"> | ||
960 | 145 | <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set> | ||
961 | 146 | </property> | ||
962 | 147 | </widget> | ||
963 | 148 | </item> | ||
964 | 175 | </layout> | 149 | </layout> |
965 | 176 | </widget> | 150 | </widget> |
967 | 177 | <layoutdefault spacing="6" margin="11" /> | 151 | <layoutdefault spacing="6" margin="11"/> |
968 | 178 | <resources/> | 152 | <resources/> |
969 | 179 | <connections> | 153 | <connections> |
970 | 180 | <connection> | 154 | <connection> |
973 | 181 | <sender>button_confirm_changes</sender> | 155 | <sender>buttonBox</sender> |
974 | 182 | <signal>clicked()</signal> | 156 | <signal>accepted()</signal> |
975 | 183 | <receiver>dialog_changes</receiver> | 157 | <receiver>dialog_changes</receiver> |
976 | 184 | <slot>accept()</slot> | 158 | <slot>accept()</slot> |
977 | 185 | <hints> | 159 | <hints> |
981 | 186 | <hint type="sourcelabel" > | 160 | <hint type="sourcelabel"> |
982 | 187 | <x>20</x> | 161 | <x>293</x> |
983 | 188 | <y>20</y> | 162 | <y>163</y> |
984 | 189 | </hint> | 163 | </hint> |
988 | 190 | <hint type="destinationlabel" > | 164 | <hint type="destinationlabel"> |
989 | 191 | <x>20</x> | 165 | <x>293</x> |
990 | 192 | <y>20</y> | 166 | <y>208</y> |
991 | 193 | </hint> | 167 | </hint> |
992 | 194 | </hints> | 168 | </hints> |
993 | 195 | </connection> | 169 | </connection> |
994 | 196 | <connection> | 170 | <connection> |
997 | 197 | <sender>button_cancel_changes</sender> | 171 | <sender>buttonBox</sender> |
998 | 198 | <signal>clicked()</signal> | 172 | <signal>rejected()</signal> |
999 | 199 | <receiver>dialog_changes</receiver> | 173 | <receiver>dialog_changes</receiver> |
1000 | 200 | <slot>reject()</slot> | 174 | <slot>reject()</slot> |
1001 | 201 | <hints> | 175 | <hints> |
1005 | 202 | <hint type="sourcelabel" > | 176 | <hint type="sourcelabel"> |
1006 | 203 | <x>20</x> | 177 | <x>293</x> |
1007 | 204 | <y>20</y> | 178 | <y>163</y> |
1008 | 205 | </hint> | 179 | </hint> |
1012 | 206 | <hint type="destinationlabel" > | 180 | <hint type="destinationlabel"> |
1013 | 207 | <x>20</x> | 181 | <x>293</x> |
1014 | 208 | <y>20</y> | 182 | <y>208</y> |
1015 | 209 | </hint> | 183 | </hint> |
1016 | 210 | </hints> | 184 | </hints> |
1017 | 211 | </connection> | 185 | </connection> |
1018 | 212 | 186 | ||
1019 | === modified file 'DistUpgrade/dialog_error.ui' | |||
1020 | --- DistUpgrade/dialog_error.ui 2008-09-12 12:19:10 +0000 | |||
1021 | +++ DistUpgrade/dialog_error.ui 2014-08-05 13:50:46 +0000 | |||
1022 | @@ -1,117 +1,99 @@ | |||
1024 | 1 | <ui version="4.0" > | 1 | <?xml version="1.0" encoding="UTF-8"?> |
1025 | 2 | <ui version="4.0"> | ||
1026 | 2 | <class>dialog_error</class> | 3 | <class>dialog_error</class> |
1029 | 3 | <widget class="QDialog" name="dialog_error" > | 4 | <widget class="QDialog" name="dialog_error"> |
1030 | 4 | <property name="geometry" > | 5 | <property name="geometry"> |
1031 | 5 | <rect> | 6 | <rect> |
1032 | 6 | <x>0</x> | 7 | <x>0</x> |
1033 | 7 | <y>0</y> | 8 | <y>0</y> |
1036 | 8 | <width>427</width> | 9 | <width>268</width> |
1037 | 9 | <height>343</height> | 10 | <height>263</height> |
1038 | 10 | </rect> | 11 | </rect> |
1039 | 11 | </property> | 12 | </property> |
1041 | 12 | <property name="windowTitle" > | 13 | <property name="sizePolicy"> |
1042 | 14 | <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> | ||
1043 | 15 | <horstretch>0</horstretch> | ||
1044 | 16 | <verstretch>0</verstretch> | ||
1045 | 17 | </sizepolicy> | ||
1046 | 18 | </property> | ||
1047 | 19 | <property name="windowTitle"> | ||
1048 | 13 | <string>Error</string> | 20 | <string>Error</string> |
1049 | 14 | </property> | 21 | </property> |
1051 | 15 | <property name="modal" > | 22 | <property name="modal"> |
1052 | 16 | <bool>true</bool> | 23 | <bool>true</bool> |
1053 | 17 | </property> | 24 | </property> |
1103 | 18 | <layout class="QGridLayout" > | 25 | <layout class="QVBoxLayout" name="verticalLayout"> |
1104 | 19 | <item row="1" column="0" > | 26 | <item> |
1105 | 20 | <spacer name="spacer4" > | 27 | <layout class="QHBoxLayout" name="horizontalLayout"> |
1106 | 21 | <property name="orientation" > | 28 | <item> |
1107 | 22 | <enum>Qt::Vertical</enum> | 29 | <widget class="QLabel" name="image"> |
1108 | 23 | </property> | 30 | <property name="sizePolicy"> |
1109 | 24 | <property name="sizeType" > | 31 | <sizepolicy hsizetype="Fixed" vsizetype="Minimum"> |
1110 | 25 | <enum>QSizePolicy::Expanding</enum> | 32 | <horstretch>0</horstretch> |
1111 | 26 | </property> | 33 | <verstretch>0</verstretch> |
1112 | 27 | <property name="sizeHint" stdset="0" > | 34 | </sizepolicy> |
1113 | 28 | <size> | 35 | </property> |
1114 | 29 | <width>21</width> | 36 | <property name="text"> |
1115 | 30 | <height>161</height> | 37 | <string/> |
1116 | 31 | </size> | 38 | </property> |
1117 | 32 | </property> | 39 | <property name="pixmap"> |
1118 | 33 | </spacer> | 40 | <pixmap>image0</pixmap> |
1119 | 34 | </item> | 41 | </property> |
1120 | 35 | <item row="3" column="3" > | 42 | <property name="wordWrap"> |
1121 | 36 | <widget class="QPushButton" name="button_close" > | 43 | <bool>false</bool> |
1122 | 37 | <property name="text" > | 44 | </property> |
1123 | 38 | <string>&Close</string> | 45 | </widget> |
1124 | 39 | </property> | 46 | </item> |
1125 | 40 | </widget> | 47 | <item> |
1126 | 41 | </item> | 48 | <widget class="QLabel" name="label_error"> |
1127 | 42 | <item row="0" column="0" > | 49 | <property name="sizePolicy"> |
1128 | 43 | <widget class="QLabel" name="image" > | 50 | <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> |
1129 | 44 | <property name="sizePolicy" > | 51 | <horstretch>0</horstretch> |
1130 | 45 | <sizepolicy vsizetype="Preferred" hsizetype="Fixed" > | 52 | <verstretch>0</verstretch> |
1131 | 46 | <horstretch>0</horstretch> | 53 | </sizepolicy> |
1132 | 47 | <verstretch>0</verstretch> | 54 | </property> |
1133 | 48 | </sizepolicy> | 55 | <property name="text"> |
1134 | 49 | </property> | 56 | <string/> |
1135 | 50 | <property name="text" > | 57 | </property> |
1136 | 51 | <string/> | 58 | <property name="wordWrap"> |
1137 | 52 | </property> | 59 | <bool>true</bool> |
1138 | 53 | <property name="pixmap" > | 60 | </property> |
1139 | 54 | <pixmap>image0</pixmap> | 61 | </widget> |
1140 | 55 | </property> | 62 | </item> |
1141 | 56 | <property name="wordWrap" > | 63 | </layout> |
1142 | 57 | <bool>false</bool> | 64 | </item> |
1143 | 58 | </property> | 65 | <item> |
1144 | 59 | </widget> | 66 | <widget class="QTextBrowser" name="textview_error"> |
1145 | 60 | </item> | 67 | <property name="openExternalLinks"> |
1097 | 61 | <item row="0" column="1" colspan="3" > | ||
1098 | 62 | <widget class="QLabel" name="label_error" > | ||
1099 | 63 | <property name="text" > | ||
1100 | 64 | <string/> | ||
1101 | 65 | </property> | ||
1102 | 66 | <property name="wordWrap" > | ||
1146 | 67 | <bool>true</bool> | 68 | <bool>true</bool> |
1147 | 68 | </property> | 69 | </property> |
1148 | 69 | </widget> | 70 | </widget> |
1149 | 70 | </item> | 71 | </item> |
1170 | 71 | <item row="3" column="0" colspan="2" > | 72 | <item> |
1171 | 72 | <spacer name="spacer5" > | 73 | <widget class="QDialogButtonBox" name="buttonBox"> |
1172 | 73 | <property name="orientation" > | 74 | <property name="standardButtons"> |
1173 | 74 | <enum>Qt::Horizontal</enum> | 75 | <set>QDialogButtonBox::Close</set> |
1154 | 75 | </property> | ||
1155 | 76 | <property name="sizeType" > | ||
1156 | 77 | <enum>QSizePolicy::Expanding</enum> | ||
1157 | 78 | </property> | ||
1158 | 79 | <property name="sizeHint" stdset="0" > | ||
1159 | 80 | <size> | ||
1160 | 81 | <width>130</width> | ||
1161 | 82 | <height>21</height> | ||
1162 | 83 | </size> | ||
1163 | 84 | </property> | ||
1164 | 85 | </spacer> | ||
1165 | 86 | </item> | ||
1166 | 87 | <item row="3" column="2" > | ||
1167 | 88 | <widget class="QPushButton" name="button_bugreport" > | ||
1168 | 89 | <property name="text" > | ||
1169 | 90 | <string>_Report Bug</string> | ||
1174 | 91 | </property> | 76 | </property> |
1175 | 92 | </widget> | 77 | </widget> |
1176 | 93 | </item> | 78 | </item> |
1177 | 94 | <item rowspan="2" row="1" column="1" colspan="3" > | ||
1178 | 95 | <widget class="QTextEdit" name="textview_error" /> | ||
1179 | 96 | </item> | ||
1180 | 97 | </layout> | 79 | </layout> |
1181 | 98 | </widget> | 80 | </widget> |
1183 | 99 | <layoutdefault spacing="6" margin="11" /> | 81 | <layoutdefault spacing="6" margin="11"/> |
1184 | 100 | <resources/> | 82 | <resources/> |
1185 | 101 | <connections> | 83 | <connections> |
1186 | 102 | <connection> | 84 | <connection> |
1189 | 103 | <sender>button_close</sender> | 85 | <sender>buttonBox</sender> |
1190 | 104 | <signal>clicked()</signal> | 86 | <signal>rejected()</signal> |
1191 | 105 | <receiver>dialog_error</receiver> | 87 | <receiver>dialog_error</receiver> |
1192 | 106 | <slot>close()</slot> | 88 | <slot>close()</slot> |
1193 | 107 | <hints> | 89 | <hints> |
1197 | 108 | <hint type="sourcelabel" > | 90 | <hint type="sourcelabel"> |
1198 | 109 | <x>20</x> | 91 | <x>182</x> |
1199 | 110 | <y>20</y> | 92 | <y>274</y> |
1200 | 111 | </hint> | 93 | </hint> |
1204 | 112 | <hint type="destinationlabel" > | 94 | <hint type="destinationlabel"> |
1205 | 113 | <x>20</x> | 95 | <x>182</x> |
1206 | 114 | <y>20</y> | 96 | <y>147</y> |
1207 | 115 | </hint> | 97 | </hint> |
1208 | 116 | </hints> | 98 | </hints> |
1209 | 117 | </connection> | 99 | </connection> |
1210 | 118 | 100 | ||
1211 | === modified file 'DistUpgrade/dialog_release_notes.ui' | |||
1212 | --- DistUpgrade/dialog_release_notes.ui 2012-06-28 16:12:09 +0000 | |||
1213 | +++ DistUpgrade/dialog_release_notes.ui 2014-08-05 13:50:46 +0000 | |||
1214 | @@ -1,7 +1,8 @@ | |||
1216 | 1 | <ui version="4.0" > | 1 | <?xml version="1.0" encoding="UTF-8"?> |
1217 | 2 | <ui version="4.0"> | ||
1218 | 2 | <class>Dialog</class> | 3 | <class>Dialog</class> |
1221 | 3 | <widget class="QDialog" name="Dialog" > | 4 | <widget class="QDialog" name="Dialog"> |
1222 | 4 | <property name="geometry" > | 5 | <property name="geometry"> |
1223 | 5 | <rect> | 6 | <rect> |
1224 | 6 | <x>0</x> | 7 | <x>0</x> |
1225 | 7 | <y>0</y> | 8 | <y>0</y> |
1226 | @@ -9,27 +10,30 @@ | |||
1227 | 9 | <height>476</height> | 10 | <height>476</height> |
1228 | 10 | </rect> | 11 | </rect> |
1229 | 11 | </property> | 12 | </property> |
1231 | 12 | <property name="windowTitle" > | 13 | <property name="windowTitle"> |
1232 | 13 | <string>Dialog</string> | 14 | <string>Dialog</string> |
1233 | 14 | </property> | 15 | </property> |
1245 | 15 | <layout class="QGridLayout" name="gridLayout" > | 16 | <layout class="QGridLayout" name="gridLayout"> |
1246 | 16 | <item row="0" column="0" > | 17 | <item row="1" column="0"> |
1247 | 17 | <widget class="QTextEdit" name="scrolled_notes" > | 18 | <widget class="QDialogButtonBox" name="buttonBox"> |
1248 | 18 | <property name="readOnly" > | 19 | <property name="orientation"> |
1238 | 19 | <bool>true</bool> | ||
1239 | 20 | </property> | ||
1240 | 21 | </widget> | ||
1241 | 22 | </item> | ||
1242 | 23 | <item row="1" column="0" > | ||
1243 | 24 | <widget class="QDialogButtonBox" name="buttonBox" > | ||
1244 | 25 | <property name="orientation" > | ||
1249 | 26 | <enum>Qt::Horizontal</enum> | 20 | <enum>Qt::Horizontal</enum> |
1250 | 27 | </property> | 21 | </property> |
1252 | 28 | <property name="standardButtons" > | 22 | <property name="standardButtons"> |
1253 | 29 | <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | 23 | <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
1254 | 30 | </property> | 24 | </property> |
1255 | 31 | </widget> | 25 | </widget> |
1256 | 32 | </item> | 26 | </item> |
1257 | 27 | <item row="0" column="0"> | ||
1258 | 28 | <widget class="QTextBrowser" name="scrolled_notes"> | ||
1259 | 29 | <property name="readOnly"> | ||
1260 | 30 | <bool>true</bool> | ||
1261 | 31 | </property> | ||
1262 | 32 | <property name="openExternalLinks"> | ||
1263 | 33 | <bool>true</bool> | ||
1264 | 34 | </property> | ||
1265 | 35 | </widget> | ||
1266 | 36 | </item> | ||
1267 | 33 | </layout> | 37 | </layout> |
1268 | 34 | </widget> | 38 | </widget> |
1269 | 35 | <resources/> | 39 | <resources/> |
1270 | @@ -40,11 +44,11 @@ | |||
1271 | 40 | <receiver>Dialog</receiver> | 44 | <receiver>Dialog</receiver> |
1272 | 41 | <slot>accept()</slot> | 45 | <slot>accept()</slot> |
1273 | 42 | <hints> | 46 | <hints> |
1275 | 43 | <hint type="sourcelabel" > | 47 | <hint type="sourcelabel"> |
1276 | 44 | <x>248</x> | 48 | <x>248</x> |
1277 | 45 | <y>254</y> | 49 | <y>254</y> |
1278 | 46 | </hint> | 50 | </hint> |
1280 | 47 | <hint type="destinationlabel" > | 51 | <hint type="destinationlabel"> |
1281 | 48 | <x>157</x> | 52 | <x>157</x> |
1282 | 49 | <y>274</y> | 53 | <y>274</y> |
1283 | 50 | </hint> | 54 | </hint> |
1284 | @@ -56,11 +60,11 @@ | |||
1285 | 56 | <receiver>Dialog</receiver> | 60 | <receiver>Dialog</receiver> |
1286 | 57 | <slot>reject()</slot> | 61 | <slot>reject()</slot> |
1287 | 58 | <hints> | 62 | <hints> |
1289 | 59 | <hint type="sourcelabel" > | 63 | <hint type="sourcelabel"> |
1290 | 60 | <x>316</x> | 64 | <x>316</x> |
1291 | 61 | <y>260</y> | 65 | <y>260</y> |
1292 | 62 | </hint> | 66 | </hint> |
1294 | 63 | <hint type="destinationlabel" > | 67 | <hint type="destinationlabel"> |
1295 | 64 | <x>286</x> | 68 | <x>286</x> |
1296 | 65 | <y>274</y> | 69 | <y>274</y> |
1297 | 66 | </hint> | 70 | </hint> |
1298 | 67 | 71 | ||
1299 | === modified file 'DistUpgrade/fetch-progress.ui' | |||
1300 | --- DistUpgrade/fetch-progress.ui 2012-06-28 16:12:09 +0000 | |||
1301 | +++ DistUpgrade/fetch-progress.ui 2014-08-05 13:50:46 +0000 | |||
1302 | @@ -1,67 +1,36 @@ | |||
1304 | 1 | <ui version="4.0" > | 1 | <?xml version="1.0" encoding="UTF-8"?> |
1305 | 2 | <ui version="4.0"> | ||
1306 | 2 | <class>Dialog</class> | 3 | <class>Dialog</class> |
1309 | 3 | <widget class="QDialog" name="Dialog" > | 4 | <widget class="QDialog" name="Dialog"> |
1310 | 4 | <property name="geometry" > | 5 | <property name="geometry"> |
1311 | 5 | <rect> | 6 | <rect> |
1312 | 6 | <x>0</x> | 7 | <x>0</x> |
1313 | 7 | <y>0</y> | 8 | <y>0</y> |
1316 | 8 | <width>408</width> | 9 | <width>409</width> |
1317 | 9 | <height>129</height> | 10 | <height>93</height> |
1318 | 10 | </rect> | 11 | </rect> |
1319 | 11 | </property> | 12 | </property> |
1321 | 12 | <property name="windowTitle" > | 13 | <property name="windowTitle"> |
1322 | 13 | <string>Dialog</string> | 14 | <string>Dialog</string> |
1323 | 14 | </property> | 15 | </property> |
1367 | 15 | <layout class="QGridLayout" name="gridLayout_3" > | 16 | <layout class="QVBoxLayout" name="verticalLayout"> |
1368 | 16 | <item row="4" column="0" > | 17 | <item> |
1369 | 17 | <widget class="QWidget" native="1" name="installFrame" > | 18 | <widget class="QLabel" name="installingLabel"> |
1370 | 18 | <layout class="QGridLayout" name="gridLayout_2" > | 19 | <property name="text"> |
1328 | 19 | <property name="margin" > | ||
1329 | 20 | <number>0</number> | ||
1330 | 21 | </property> | ||
1331 | 22 | <item row="1" column="0" colspan="2" > | ||
1332 | 23 | <widget class="QProgressBar" name="installationProgress" > | ||
1333 | 24 | <property name="value" > | ||
1334 | 25 | <number>24</number> | ||
1335 | 26 | </property> | ||
1336 | 27 | </widget> | ||
1337 | 28 | </item> | ||
1338 | 29 | <item row="3" column="0" colspan="2" > | ||
1339 | 30 | <widget class="QWidget" native="1" name="konsoleFrame" /> | ||
1340 | 31 | </item> | ||
1341 | 32 | <item row="4" column="0" colspan="2" > | ||
1342 | 33 | <spacer name="verticalSpacer" > | ||
1343 | 34 | <property name="orientation" > | ||
1344 | 35 | <enum>Qt::Vertical</enum> | ||
1345 | 36 | </property> | ||
1346 | 37 | <property name="sizeHint" stdset="0" > | ||
1347 | 38 | <size> | ||
1348 | 39 | <width>397</width> | ||
1349 | 40 | <height>5</height> | ||
1350 | 41 | </size> | ||
1351 | 42 | </property> | ||
1352 | 43 | </spacer> | ||
1353 | 44 | </item> | ||
1354 | 45 | <item row="0" column="0" colspan="2" > | ||
1355 | 46 | <widget class="QLabel" name="installingLabel" > | ||
1356 | 47 | <property name="text" > | ||
1357 | 48 | <string/> | ||
1358 | 49 | </property> | ||
1359 | 50 | </widget> | ||
1360 | 51 | </item> | ||
1361 | 52 | </layout> | ||
1362 | 53 | </widget> | ||
1363 | 54 | </item> | ||
1364 | 55 | <item row="0" column="0" > | ||
1365 | 56 | <widget class="QLabel" name="titleLabel" > | ||
1366 | 57 | <property name="text" > | ||
1371 | 58 | <string/> | 20 | <string/> |
1372 | 59 | </property> | 21 | </property> |
1373 | 60 | </widget> | 22 | </widget> |
1374 | 61 | </item> | 23 | </item> |
1378 | 62 | <item row="5" column="0" > | 24 | <item> |
1379 | 63 | <widget class="QDialogButtonBox" name="buttonBox" > | 25 | <widget class="QProgressBar" name="installationProgress"> |
1380 | 64 | <property name="standardButtons" > | 26 | <property name="value"> |
1381 | 27 | <number>24</number> | ||
1382 | 28 | </property> | ||
1383 | 29 | </widget> | ||
1384 | 30 | </item> | ||
1385 | 31 | <item> | ||
1386 | 32 | <widget class="QDialogButtonBox" name="buttonBox"> | ||
1387 | 33 | <property name="standardButtons"> | ||
1388 | 65 | <set>QDialogButtonBox::Close</set> | 34 | <set>QDialogButtonBox::Close</set> |
1389 | 66 | </property> | 35 | </property> |
1390 | 67 | </widget> | 36 | </widget> |
1391 | @@ -76,11 +45,11 @@ | |||
1392 | 76 | <receiver>Dialog</receiver> | 45 | <receiver>Dialog</receiver> |
1393 | 77 | <slot>accept()</slot> | 46 | <slot>accept()</slot> |
1394 | 78 | <hints> | 47 | <hints> |
1396 | 79 | <hint type="sourcelabel" > | 48 | <hint type="sourcelabel"> |
1397 | 80 | <x>271</x> | 49 | <x>271</x> |
1398 | 81 | <y>169</y> | 50 | <y>169</y> |
1399 | 82 | </hint> | 51 | </hint> |
1401 | 83 | <hint type="destinationlabel" > | 52 | <hint type="destinationlabel"> |
1402 | 84 | <x>271</x> | 53 | <x>271</x> |
1403 | 85 | <y>94</y> | 54 | <y>94</y> |
1404 | 86 | </hint> | 55 | </hint> |
1405 | @@ -92,11 +61,11 @@ | |||
1406 | 92 | <receiver>Dialog</receiver> | 61 | <receiver>Dialog</receiver> |
1407 | 93 | <slot>reject()</slot> | 62 | <slot>reject()</slot> |
1408 | 94 | <hints> | 63 | <hints> |
1410 | 95 | <hint type="sourcelabel" > | 64 | <hint type="sourcelabel"> |
1411 | 96 | <x>271</x> | 65 | <x>271</x> |
1412 | 97 | <y>169</y> | 66 | <y>169</y> |
1413 | 98 | </hint> | 67 | </hint> |
1415 | 99 | <hint type="destinationlabel" > | 68 | <hint type="destinationlabel"> |
1416 | 100 | <x>271</x> | 69 | <x>271</x> |
1417 | 101 | <y>94</y> | 70 | <y>94</y> |
1418 | 102 | </hint> | 71 | </hint> |
1419 | 103 | 72 | ||
1420 | === modified file 'DistUpgrade/window_main.ui' | |||
1421 | --- DistUpgrade/window_main.ui 2014-05-02 11:46:02 +0000 | |||
1422 | +++ DistUpgrade/window_main.ui 2014-08-05 13:50:46 +0000 | |||
1423 | @@ -1,7 +1,8 @@ | |||
1425 | 1 | <ui version="4.0" > | 1 | <?xml version="1.0" encoding="UTF-8"?> |
1426 | 2 | <ui version="4.0"> | ||
1427 | 2 | <class>window_main</class> | 3 | <class>window_main</class> |
1430 | 3 | <widget class="QWidget" name="window_main" > | 4 | <widget class="QWidget" name="window_main"> |
1431 | 4 | <property name="geometry" > | 5 | <property name="geometry"> |
1432 | 5 | <rect> | 6 | <rect> |
1433 | 6 | <x>0</x> | 7 | <x>0</x> |
1434 | 7 | <y>0</y> | 8 | <y>0</y> |
1435 | @@ -9,26 +10,26 @@ | |||
1436 | 9 | <height>294</height> | 10 | <height>294</height> |
1437 | 10 | </rect> | 11 | </rect> |
1438 | 11 | </property> | 12 | </property> |
1440 | 12 | <property name="windowTitle" > | 13 | <property name="windowTitle"> |
1441 | 13 | <string>Distribution Upgrade</string> | 14 | <string>Distribution Upgrade</string> |
1442 | 14 | </property> | 15 | </property> |
1448 | 15 | <layout class="QGridLayout" > | 16 | <layout class="QGridLayout"> |
1449 | 16 | <item row="6" column="0" > | 17 | <item row="6" column="0"> |
1450 | 17 | <widget class="QPushButton" name="showTerminalButton" > | 18 | <widget class="QPushButton" name="showTerminalButton"> |
1451 | 18 | <property name="text" > | 19 | <property name="text"> |
1452 | 19 | <string>Show Terminal >>></string> | 20 | <string>Show Terminal >>></string> |
1453 | 20 | </property> | 21 | </property> |
1454 | 21 | </widget> | 22 | </widget> |
1455 | 22 | </item> | 23 | </item> |
1459 | 23 | <item row="6" column="1" > | 24 | <item row="6" column="1"> |
1460 | 24 | <spacer name="spacer1" > | 25 | <spacer name="spacer1"> |
1461 | 25 | <property name="orientation" > | 26 | <property name="orientation"> |
1462 | 26 | <enum>Qt::Horizontal</enum> | 27 | <enum>Qt::Horizontal</enum> |
1463 | 27 | </property> | 28 | </property> |
1465 | 28 | <property name="sizeType" > | 29 | <property name="sizeType"> |
1466 | 29 | <enum>QSizePolicy::Expanding</enum> | 30 | <enum>QSizePolicy::Expanding</enum> |
1467 | 30 | </property> | 31 | </property> |
1469 | 31 | <property name="sizeHint" stdset="0" > | 32 | <property name="sizeHint" stdset="0"> |
1470 | 32 | <size> | 33 | <size> |
1471 | 33 | <width>302</width> | 34 | <width>302</width> |
1472 | 34 | <height>21</height> | 35 | <height>21</height> |
1473 | @@ -36,25 +37,25 @@ | |||
1474 | 36 | </property> | 37 | </property> |
1475 | 37 | </spacer> | 38 | </spacer> |
1476 | 38 | </item> | 39 | </item> |
1480 | 39 | <item rowspan="2" row="4" column="0" colspan="4" > | 40 | <item row="4" column="0" rowspan="2" colspan="4"> |
1481 | 40 | <widget class="QLabel" name="label_status" > | 41 | <widget class="QLabel" name="label_status"> |
1482 | 41 | <property name="text" > | 42 | <property name="text"> |
1483 | 42 | <string/> | 43 | <string/> |
1484 | 43 | </property> | 44 | </property> |
1486 | 44 | <property name="wordWrap" > | 45 | <property name="wordWrap"> |
1487 | 45 | <bool>false</bool> | 46 | <bool>false</bool> |
1488 | 46 | </property> | 47 | </property> |
1489 | 47 | </widget> | 48 | </widget> |
1490 | 48 | </item> | 49 | </item> |
1494 | 49 | <item rowspan="2" row="5" column="2" > | 50 | <item row="5" column="2" rowspan="2"> |
1495 | 50 | <spacer name="spacer3" > | 51 | <spacer name="spacer3"> |
1496 | 51 | <property name="orientation" > | 52 | <property name="orientation"> |
1497 | 52 | <enum>Qt::Vertical</enum> | 53 | <enum>Qt::Vertical</enum> |
1498 | 53 | </property> | 54 | </property> |
1500 | 54 | <property name="sizeType" > | 55 | <property name="sizeType"> |
1501 | 55 | <enum>QSizePolicy::Expanding</enum> | 56 | <enum>QSizePolicy::Expanding</enum> |
1502 | 56 | </property> | 57 | </property> |
1504 | 57 | <property name="sizeHint" stdset="0" > | 58 | <property name="sizeHint" stdset="0"> |
1505 | 58 | <size> | 59 | <size> |
1506 | 59 | <width>20</width> | 60 | <width>20</width> |
1507 | 60 | <height>16</height> | 61 | <height>16</height> |
1508 | @@ -62,206 +63,212 @@ | |||
1509 | 62 | </property> | 63 | </property> |
1510 | 63 | </spacer> | 64 | </spacer> |
1511 | 64 | </item> | 65 | </item> |
1515 | 65 | <item row="2" column="0" colspan="4" > | 66 | <item row="2" column="0" colspan="4"> |
1516 | 66 | <widget class="QLabel" name="progress_text" > | 67 | <widget class="QLabel" name="progress_text"> |
1517 | 67 | <property name="text" > | 68 | <property name="text"> |
1518 | 68 | <string/> | 69 | <string/> |
1519 | 69 | </property> | 70 | </property> |
1521 | 70 | <property name="wordWrap" > | 71 | <property name="wordWrap"> |
1522 | 71 | <bool>false</bool> | 72 | <bool>false</bool> |
1523 | 72 | </property> | 73 | </property> |
1524 | 73 | </widget> | 74 | </widget> |
1525 | 74 | </item> | 75 | </item> |
1563 | 75 | <item row="1" column="0" colspan="4" > | 76 | <item row="1" column="0" colspan="4"> |
1564 | 76 | <layout class="QGridLayout" > | 77 | <layout class="QGridLayout"> |
1565 | 77 | <item row="3" column="0" > | 78 | <item row="3" column="0"> |
1566 | 78 | <widget class="QLabel" name="image_step4" > | 79 | <widget class="QLabel" name="image_step4"> |
1567 | 79 | <property name="sizePolicy" > | 80 | <property name="sizePolicy"> |
1568 | 80 | <sizepolicy vsizetype="Preferred" hsizetype="Maximum" > | 81 | <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> |
1569 | 81 | <horstretch>0</horstretch> | 82 | <horstretch>0</horstretch> |
1570 | 82 | <verstretch>0</verstretch> | 83 | <verstretch>0</verstretch> |
1571 | 83 | </sizepolicy> | 84 | </sizepolicy> |
1572 | 84 | </property> | 85 | </property> |
1573 | 85 | <property name="text" > | 86 | <property name="text"> |
1574 | 86 | <string/> | 87 | <string/> |
1575 | 87 | </property> | 88 | </property> |
1576 | 88 | <property name="wordWrap" > | 89 | <property name="wordWrap"> |
1577 | 89 | <bool>false</bool> | 90 | <bool>false</bool> |
1578 | 90 | </property> | 91 | </property> |
1579 | 91 | </widget> | 92 | </widget> |
1580 | 92 | </item> | 93 | </item> |
1581 | 93 | <item row="1" column="0" > | 94 | <item row="1" column="0"> |
1582 | 94 | <widget class="QLabel" name="image_step2" > | 95 | <widget class="QLabel" name="image_step2"> |
1583 | 95 | <property name="sizePolicy" > | 96 | <property name="sizePolicy"> |
1584 | 96 | <sizepolicy vsizetype="Preferred" hsizetype="Maximum" > | 97 | <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> |
1585 | 97 | <horstretch>0</horstretch> | 98 | <horstretch>0</horstretch> |
1586 | 98 | <verstretch>0</verstretch> | 99 | <verstretch>0</verstretch> |
1587 | 99 | </sizepolicy> | 100 | </sizepolicy> |
1588 | 100 | </property> | 101 | </property> |
1589 | 101 | <property name="text" > | 102 | <property name="text"> |
1590 | 102 | <string/> | 103 | <string/> |
1591 | 103 | </property> | 104 | </property> |
1592 | 104 | <property name="wordWrap" > | 105 | <property name="wordWrap"> |
1593 | 105 | <bool>false</bool> | 106 | <bool>false</bool> |
1594 | 106 | </property> | 107 | </property> |
1595 | 107 | </widget> | 108 | </widget> |
1596 | 108 | </item> | 109 | </item> |
1597 | 109 | <item row="0" column="1" > | 110 | <item row="0" column="1"> |
1598 | 110 | <widget class="QLabel" name="label_step1" > | 111 | <widget class="QLabel" name="label_step1"> |
1599 | 111 | <property name="text" > | 112 | <property name="text"> |
1600 | 112 | <string>Preparing to upgrade</string> | 113 | <string>Preparing to upgrade</string> |
1601 | 113 | </property> | 114 | </property> |
1642 | 114 | <property name="wordWrap" > | 115 | <property name="wordWrap"> |
1643 | 115 | <bool>false</bool> | 116 | <bool>false</bool> |
1644 | 116 | </property> | 117 | </property> |
1645 | 117 | </widget> | 118 | </widget> |
1646 | 118 | </item> | 119 | </item> |
1647 | 119 | <item row="0" column="0" > | 120 | <item row="0" column="0"> |
1648 | 120 | <widget class="QLabel" name="image_step1" > | 121 | <widget class="QLabel" name="image_step1"> |
1649 | 121 | <property name="sizePolicy" > | 122 | <property name="sizePolicy"> |
1650 | 122 | <sizepolicy vsizetype="Preferred" hsizetype="Maximum" > | 123 | <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> |
1651 | 123 | <horstretch>0</horstretch> | 124 | <horstretch>0</horstretch> |
1652 | 124 | <verstretch>0</verstretch> | 125 | <verstretch>0</verstretch> |
1653 | 125 | </sizepolicy> | 126 | </sizepolicy> |
1654 | 126 | </property> | 127 | </property> |
1655 | 127 | <property name="text" > | 128 | <property name="text"> |
1656 | 128 | <string/> | 129 | <string/> |
1657 | 129 | </property> | 130 | </property> |
1658 | 130 | <property name="wordWrap" > | 131 | <property name="wordWrap"> |
1659 | 131 | <bool>false</bool> | 132 | <bool>false</bool> |
1660 | 132 | </property> | 133 | </property> |
1661 | 133 | </widget> | 134 | </widget> |
1662 | 134 | </item> | 135 | </item> |
1663 | 135 | <item row="2" column="0" > | 136 | <item row="2" column="0"> |
1664 | 136 | <widget class="QLabel" name="image_step3" > | 137 | <widget class="QLabel" name="image_step3"> |
1665 | 137 | <property name="sizePolicy" > | 138 | <property name="sizePolicy"> |
1666 | 138 | <sizepolicy vsizetype="Preferred" hsizetype="Maximum" > | 139 | <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> |
1667 | 139 | <horstretch>0</horstretch> | 140 | <horstretch>0</horstretch> |
1668 | 140 | <verstretch>0</verstretch> | 141 | <verstretch>0</verstretch> |
1669 | 141 | </sizepolicy> | 142 | </sizepolicy> |
1670 | 142 | </property> | 143 | </property> |
1671 | 143 | <property name="text" > | 144 | <property name="text"> |
1672 | 144 | <string/> | 145 | <string/> |
1673 | 145 | </property> | 146 | </property> |
1674 | 146 | <property name="wordWrap" > | 147 | <property name="wordWrap"> |
1675 | 147 | <bool>false</bool> | 148 | <bool>false</bool> |
1676 | 148 | </property> | 149 | </property> |
1677 | 149 | </widget> | 150 | </widget> |
1678 | 150 | </item> | 151 | </item> |
1679 | 151 | <item row="2" column="1" > | 152 | <item row="2" column="1"> |
1680 | 152 | <widget class="QLabel" name="label_step3" > | 153 | <widget class="QLabel" name="label_step3"> |
1681 | 153 | <property name="text" > | 154 | <property name="text"> |
1682 | 154 | <string>Getting new packages</string> | 155 | <string>Getting new packages</string> |
1683 | 155 | </property> | 156 | </property> |
1685 | 156 | <property name="wordWrap" > | 157 | <property name="wordWrap"> |
1686 | 157 | <bool>false</bool> | 158 | <bool>false</bool> |
1687 | 158 | </property> | 159 | </property> |
1688 | 159 | </widget> | 160 | </widget> |
1689 | 160 | </item> | 161 | </item> |
1693 | 161 | <item row="4" column="1" > | 162 | <item row="4" column="1"> |
1694 | 162 | <widget class="QLabel" name="label_step5" > | 163 | <widget class="QLabel" name="label_step5"> |
1695 | 163 | <property name="text" > | 164 | <property name="text"> |
1696 | 164 | <string>Cleaning up</string> | 165 | <string>Cleaning up</string> |
1697 | 165 | </property> | 166 | </property> |
1699 | 166 | <property name="wordWrap" > | 167 | <property name="wordWrap"> |
1700 | 167 | <bool>false</bool> | 168 | <bool>false</bool> |
1701 | 168 | </property> | 169 | </property> |
1702 | 169 | </widget> | 170 | </widget> |
1703 | 170 | </item> | 171 | </item> |
1707 | 171 | <item row="3" column="1" > | 172 | <item row="3" column="1"> |
1708 | 172 | <widget class="QLabel" name="label_step4" > | 173 | <widget class="QLabel" name="label_step4"> |
1709 | 173 | <property name="text" > | 174 | <property name="text"> |
1710 | 174 | <string>Installing the upgrades</string> | 175 | <string>Installing the upgrades</string> |
1711 | 175 | </property> | 176 | </property> |
1713 | 176 | <property name="wordWrap" > | 177 | <property name="wordWrap"> |
1714 | 177 | <bool>false</bool> | 178 | <bool>false</bool> |
1715 | 178 | </property> | 179 | </property> |
1716 | 179 | </widget> | 180 | </widget> |
1717 | 180 | </item> | 181 | </item> |
1721 | 181 | <item row="1" column="1" > | 182 | <item row="1" column="1"> |
1722 | 182 | <widget class="QLabel" name="label_step2" > | 183 | <widget class="QLabel" name="label_step2"> |
1723 | 183 | <property name="text" > | 184 | <property name="text"> |
1724 | 184 | <string>Setting new software channels</string> | 185 | <string>Setting new software channels</string> |
1725 | 185 | </property> | 186 | </property> |
1727 | 186 | <property name="wordWrap" > | 187 | <property name="wordWrap"> |
1728 | 187 | <bool>false</bool> | 188 | <bool>false</bool> |
1729 | 188 | </property> | 189 | </property> |
1730 | 189 | </widget> | 190 | </widget> |
1731 | 190 | </item> | 191 | </item> |
1735 | 191 | <item row="5" column="1" > | 192 | <item row="5" column="1"> |
1736 | 192 | <widget class="QLabel" name="label_step6" > | 193 | <widget class="QLabel" name="label_step6"> |
1737 | 193 | <property name="text" > | 194 | <property name="text"> |
1738 | 194 | <string>Restarting the computer</string> | 195 | <string>Restarting the computer</string> |
1739 | 195 | </property> | 196 | </property> |
1773 | 196 | <property name="wordWrap" > | 197 | <property name="wordWrap"> |
1774 | 197 | <bool>false</bool> | 198 | <bool>false</bool> |
1775 | 198 | </property> | 199 | </property> |
1776 | 199 | </widget> | 200 | </widget> |
1777 | 200 | </item> | 201 | </item> |
1778 | 201 | <item row="4" column="0" > | 202 | <item row="4" column="0"> |
1779 | 202 | <widget class="QLabel" name="image_step5" > | 203 | <widget class="QLabel" name="image_step5"> |
1780 | 203 | <property name="sizePolicy" > | 204 | <property name="sizePolicy"> |
1781 | 204 | <sizepolicy vsizetype="Preferred" hsizetype="Maximum" > | 205 | <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> |
1782 | 205 | <horstretch>0</horstretch> | 206 | <horstretch>0</horstretch> |
1783 | 206 | <verstretch>0</verstretch> | 207 | <verstretch>0</verstretch> |
1784 | 207 | </sizepolicy> | 208 | </sizepolicy> |
1785 | 208 | </property> | 209 | </property> |
1786 | 209 | <property name="text" > | 210 | <property name="text"> |
1787 | 210 | <string/> | 211 | <string/> |
1788 | 211 | </property> | 212 | </property> |
1789 | 212 | <property name="wordWrap" > | 213 | <property name="wordWrap"> |
1790 | 213 | <bool>false</bool> | 214 | <bool>false</bool> |
1791 | 214 | </property> | 215 | </property> |
1792 | 215 | </widget> | 216 | </widget> |
1793 | 216 | </item> | 217 | </item> |
1794 | 217 | <item row="5" column="0" > | 218 | <item row="5" column="0"> |
1795 | 218 | <widget class="QLabel" name="image_step6" > | 219 | <widget class="QLabel" name="image_step6"> |
1796 | 219 | <property name="sizePolicy" > | 220 | <property name="sizePolicy"> |
1797 | 220 | <sizepolicy vsizetype="Preferred" hsizetype="Maximum" > | 221 | <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> |
1798 | 221 | <horstretch>0</horstretch> | 222 | <horstretch>0</horstretch> |
1799 | 222 | <verstretch>0</verstretch> | 223 | <verstretch>0</verstretch> |
1800 | 223 | </sizepolicy> | 224 | </sizepolicy> |
1801 | 224 | </property> | 225 | </property> |
1802 | 225 | <property name="text" > | 226 | <property name="text"> |
1803 | 226 | <string/> | 227 | <string/> |
1804 | 227 | </property> | 228 | </property> |
1805 | 228 | <property name="wordWrap" > | 229 | <property name="wordWrap"> |
1806 | 229 | <bool>false</bool> | 230 | <bool>false</bool> |
1807 | 230 | </property> | 231 | </property> |
1808 | 231 | </widget> | 232 | </widget> |
1809 | 232 | </item> | 233 | </item> |
1810 | 233 | </layout> | 234 | </layout> |
1811 | 234 | </item> | 235 | </item> |
1816 | 235 | <item row="0" column="0" colspan="4" > | 236 | <item row="0" column="0" colspan="4"> |
1817 | 236 | <widget class="QLabel" name="label_title" > | 237 | <widget class="QLabel" name="label_title"> |
1818 | 237 | <property name="text" > | 238 | <property name="text"> |
1819 | 238 | <string><b><big>Upgrading Ubuntu to version 14.10</big></b></string> | 239 | <string><b><big>Upgrading Ubuntu to version 14.10</big></b></string> |
1820 | 239 | </property> | 240 | </property> |
1822 | 240 | <property name="wordWrap" > | 241 | <property name="wordWrap"> |
1823 | 241 | <bool>false</bool> | 242 | <bool>false</bool> |
1824 | 242 | </property> | 243 | </property> |
1825 | 243 | </widget> | 244 | </widget> |
1826 | 244 | </item> | 245 | </item> |
1830 | 245 | <item row="7" column="0" colspan="3" > | 246 | <item row="7" column="0" colspan="3"> |
1831 | 246 | <widget class="QFrame" name="konsole_frame" > | 247 | <widget class="QFrame" name="konsole_frame"> |
1832 | 247 | <property name="frameShape" > | 248 | <property name="frameShape"> |
1833 | 248 | <enum>QFrame::StyledPanel</enum> | 249 | <enum>QFrame::StyledPanel</enum> |
1834 | 249 | </property> | 250 | </property> |
1836 | 250 | <property name="frameShadow" > | 251 | <property name="frameShadow"> |
1837 | 251 | <enum>QFrame::Raised</enum> | 252 | <enum>QFrame::Raised</enum> |
1838 | 252 | </property> | 253 | </property> |
1839 | 253 | </widget> | 254 | </widget> |
1840 | 254 | </item> | 255 | </item> |
1844 | 255 | <item row="3" column="0" colspan="3" > | 256 | <item row="3" column="0" colspan="3"> |
1845 | 256 | <widget class="QProgressBar" name="progressbar_cache" > | 257 | <widget class="QProgressBar" name="progressbar_cache"> |
1846 | 257 | <property name="value" > | 258 | <property name="sizePolicy"> |
1847 | 259 | <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||
1848 | 260 | <horstretch>0</horstretch> | ||
1849 | 261 | <verstretch>0</verstretch> | ||
1850 | 262 | </sizepolicy> | ||
1851 | 263 | </property> | ||
1852 | 264 | <property name="value"> | ||
1853 | 258 | <number>24</number> | 265 | <number>24</number> |
1854 | 259 | </property> | 266 | </property> |
1855 | 260 | </widget> | 267 | </widget> |
1856 | 261 | </item> | 268 | </item> |
1857 | 262 | </layout> | 269 | </layout> |
1858 | 263 | </widget> | 270 | </widget> |
1860 | 264 | <layoutdefault spacing="6" margin="11" /> | 271 | <layoutdefault spacing="6" margin="11"/> |
1861 | 265 | <resources/> | 272 | <resources/> |
1862 | 266 | <connections/> | 273 | <connections/> |
1863 | 267 | </ui> | 274 | </ui> |
1864 | 268 | 275 | ||
1865 | === modified file 'debian/changelog' | |||
1866 | --- debian/changelog 2014-08-05 06:33:47 +0000 | |||
1867 | +++ debian/changelog 2014-08-05 13:50:46 +0000 | |||
1868 | @@ -1,9 +1,96 @@ | |||
1869 | 1 | <<<<<<< TREE | ||
1870 | 1 | ubuntu-release-upgrader (1:14.10.6) UNRELEASED; urgency=medium | 2 | ubuntu-release-upgrader (1:14.10.6) UNRELEASED; urgency=medium |
1871 | 2 | 3 | ||
1872 | 3 | * check-new-release-gtk: Fix deprecated Gio.Settings constructor invocation. | 4 | * check-new-release-gtk: Fix deprecated Gio.Settings constructor invocation. |
1873 | 4 | 5 | ||
1874 | 5 | -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 05 Aug 2014 08:33:11 +0200 | 6 | -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 05 Aug 2014 08:33:11 +0200 |
1875 | 6 | 7 | ||
1876 | 8 | ======= | ||
1877 | 9 | ubuntu-release-upgrader (1:14.10.6ubuntu1) UNRELEASED; urgency=medium | ||
1878 | 10 | |||
1879 | 11 | * Port KDE GUIs to native Qt5 versions. | ||
1880 | 12 | + pyqt5 is only imported iff the current dist version is not trusty as | ||
1881 | 13 | that one had a nasty bug with signals and slots not connecting properly. | ||
1882 | 14 | + pyqt4/pykde4 compatibility is retained by fallback handling for the | ||
1883 | 15 | pyqt5 import, as well as some version checks switching out kde classes | ||
1884 | 16 | for qt classes when using Qt5. Ultimately systems <=utopic will retain | ||
1885 | 17 | the same behavior as before. | ||
1886 | 18 | + KDE bits replacemed as follows: | ||
1887 | 19 | * KIcon -> QIcon::fromTheme | ||
1888 | 20 | * KMessageBox -> QMessageBox (using most suitable version from the | ||
1889 | 21 | limited feature set of QMB) | ||
1890 | 22 | * KApplication -> QApplication | ||
1891 | 23 | * i18n -> _() | ||
1892 | 24 | * Fix KDE upgrade fetcher GUI | ||
1893 | 25 | + Wire up do-release-upgrade with the KDE GUI to actually provide a UI | ||
1894 | 26 | when run from a KDE Plasma envrionment | ||
1895 | 27 | + Remove all logic that replicated stuff done in do-release-upgrade | ||
1896 | 28 | (this primarily includes using MetaRelease to actually conduct the | ||
1897 | 29 | version check, the automatic version checks are done by a special | ||
1898 | 30 | script that is part of muon, so we do not ever call the fetcher | ||
1899 | 31 | manually, and have not done so in at least 5 years) | ||
1900 | 32 | + Detangle the Acquire class from the Fetcher class, latter is not | ||
1901 | 33 | automatically constructing former any longer but needs to get it | ||
1902 | 34 | supplied from the outside (i.e. do-release-upgrade) | ||
1903 | 35 | + init arguments of both classes are now alinged with their GTK | ||
1904 | 36 | counterparts | ||
1905 | 37 | + The designer ui file now uses a QTextBrowser rather than a QTextEdit as | ||
1906 | 38 | the user doesn't need to edit anything and the former supports html and | ||
1907 | 39 | url opening | ||
1908 | 40 | + The fetcher ui file has had all unused widgets removed which makes the | ||
1909 | 41 | fetcher dialog have correct spacing | ||
1910 | 42 | + The classes now hold a QApp as self.app to reflect the fact that they | ||
1911 | 43 | may be constructed in any order and thus may need a QApplication in any | ||
1912 | 44 | order. The actually instance is created from a new function that creates | ||
1913 | 45 | an instance if there isn't one already. Ultimately this should probably | ||
1914 | 46 | become a singleton. | ||
1915 | 47 | + The Acquire process can now be aborted properly. | ||
1916 | 48 | * Fix translation loading. As all Qt GUIs no prominently feature Qt builtin | ||
1917 | 49 | classes with strings (QMessageBox, QButtonBox) we make sure that the | ||
1918 | 50 | correct translations are loaded through QTranslator right after creating | ||
1919 | 51 | the QApplication instances. | ||
1920 | 52 | + ubuntu-release-upgrader-qt now recommends qttranslations5-l10n to | ||
1921 | 53 | reflect this on a packaging level | ||
1922 | 54 | * Add a new class QUrlOpener to redirect all openUrl calls through sudo -u | ||
1923 | 55 | if the GUI is run as root, so that we can start the browsers as the user | ||
1924 | 56 | rather than root. This class is used in both the Fetcher and the Upgrader. | ||
1925 | 57 | It is a singleton that autoparents to qapp, so a qapp instance needs to be | ||
1926 | 58 | available before using the opener. | ||
1927 | 59 | * Improve Upgrader GUI | ||
1928 | 60 | + Upgrader GUI does not meddle with xauthority anymore and doesn't kill | ||
1929 | 61 | adept anymore (mind you, adept hasn't been used in years...) | ||
1930 | 62 | Also the meddling seems to have been bugged in one form or the other | ||
1931 | 63 | which ultimately prevents us from doing a proper openUrl as the invoking | ||
1932 | 64 | user | ||
1933 | 65 | + dialog_error.ui has been converted to use QTextBrowser as there is no | ||
1934 | 66 | editing need. | ||
1935 | 67 | + error dialog size hinting as been adjusted to make sure the window can | ||
1936 | 68 | not be resized beyond what is suitable to still display stuff. | ||
1937 | 69 | + error dialog window size is adjusted before exec to make sure that | ||
1938 | 70 | the window has a suitable default size depending on whether the textview | ||
1939 | 71 | is displayed or not | ||
1940 | 72 | + dialog_error.ui has had its close button replaced with a standard | ||
1941 | 73 | QButtonBox | ||
1942 | 74 | + reportBug function has been removed as it is not used anymore (core | ||
1943 | 75 | brings up apport regardless and the bug report url is most inconvenient | ||
1944 | 76 | and pointless because people will not attach the relevant logs...) | ||
1945 | 77 | + openUrl function has been removed as it is not used anymore | ||
1946 | 78 | + dialog_changes.ui has had its size hinting adjusted to make sure that | ||
1947 | 79 | the window has a suitable default size | ||
1948 | 80 | + dialog_changes.ui uses QDialogButtonBox for all buttons now, details is | ||
1949 | 81 | derived from Help which is the closest fit as far as standard types are | ||
1950 | 82 | concerned | ||
1951 | 83 | + The changes dialog now adjusts its size when the details widget is | ||
1952 | 84 | hidden, this prevents overly large windows after details was shown once | ||
1953 | 85 | + The changes dialog now correctly spaces the labels as well as the icon | ||
1954 | 86 | label at the window, this resolves text jumping when showing/hiding the | ||
1955 | 87 | details widget which was caused by the labels being pushed towards the | ||
1956 | 88 | top to make space for the details, now a space makes that happen all the | ||
1957 | 89 | time | ||
1958 | 90 | |||
1959 | 91 | -- Harald Sitter <apachelogger@kubuntu.org> Tue, 05 Aug 2014 15:20:10 +0200 | ||
1960 | 92 | |||
1961 | 93 | >>>>>>> MERGE-SOURCE | ||
1962 | 7 | ubuntu-release-upgrader (1:14.10.5) utopic; urgency=medium | 94 | ubuntu-release-upgrader (1:14.10.5) utopic; urgency=medium |
1963 | 8 | 95 | ||
1964 | 9 | [ Brian Murray ] | 96 | [ Brian Murray ] |
1965 | 10 | 97 | ||
1966 | === modified file 'debian/control' | |||
1967 | --- debian/control 2014-03-13 17:06:03 +0000 | |||
1968 | +++ debian/control 2014-08-05 13:50:46 +0000 | |||
1969 | @@ -67,9 +67,10 @@ | |||
1970 | 67 | Pre-Depends: ${misc:Pre-Depends} | 67 | Pre-Depends: ${misc:Pre-Depends} |
1971 | 68 | Depends: ${misc:Depends}, | 68 | Depends: ${misc:Depends}, |
1972 | 69 | ubuntu-release-upgrader-core (= ${source:Version}), | 69 | ubuntu-release-upgrader-core (= ${source:Version}), |
1974 | 70 | python3-pykde4, | 70 | python3-pyqt5, |
1975 | 71 | kdesudo, | 71 | kdesudo, |
1976 | 72 | psmisc | 72 | psmisc |
1977 | 73 | Recommends: qttranslations5-l10n | ||
1978 | 73 | Replaces: update-manager-kde (<< 1:0.165) | 74 | Replaces: update-manager-kde (<< 1:0.165) |
1979 | 74 | Breaks: update-manager-kde (<< 1:0.165) | 75 | Breaks: update-manager-kde (<< 1:0.165) |
1980 | 75 | Description: manage release upgrades | 76 | Description: manage release upgrades |
1981 | 76 | 77 | ||
1982 | === modified file 'do-release-upgrade' | |||
1983 | --- do-release-upgrade 2014-03-07 17:00:00 +0000 | |||
1984 | +++ do-release-upgrade 2014-08-05 13:50:46 +0000 | |||
1985 | @@ -33,6 +33,18 @@ | |||
1986 | 33 | progress=progress, | 33 | progress=progress, |
1987 | 34 | parent=None, | 34 | parent=None, |
1988 | 35 | datadir=datadir) | 35 | datadir=datadir) |
1989 | 36 | elif frontend == "DistUpgradeViewKDE": | ||
1990 | 37 | print("kde") | ||
1991 | 38 | from DistUpgrade.DistUpgradeFetcherKDE import DistUpgradeFetcherKDE | ||
1992 | 39 | from DistUpgrade.DistUpgradeFetcherKDE import KDEAcquireProgressAdapter | ||
1993 | 40 | progress = KDEAcquireProgressAdapter( | ||
1994 | 41 | parent=None, | ||
1995 | 42 | datadir=datadir, | ||
1996 | 43 | label=_("Downloading the release upgrade tool")) | ||
1997 | 44 | return DistUpgradeFetcherKDE(new_dist=new_dist, | ||
1998 | 45 | progress=progress, | ||
1999 | 46 | parent=None, | ||
2000 | 47 | datadir=datadir) | ||
2001 | 36 | else: | 48 | else: |
2002 | 37 | from DistUpgrade.DistUpgradeFetcherCore import DistUpgradeFetcherCore | 49 | from DistUpgrade.DistUpgradeFetcherCore import DistUpgradeFetcherCore |
2003 | 38 | import apt | 50 | import apt |
Generally looks alright to me.