Merge lp:~dylanmccall/update-manager/dialogs-refactor into lp:update-manager
- dialogs-refactor
- Merge into main
Status: | Merged |
---|---|
Merged at revision: | 2631 |
Proposed branch: | lp:~dylanmccall/update-manager/dialogs-refactor |
Merge into: | lp:update-manager |
Diff against target: |
3504 lines (+976/-1517) 14 files modified
UpdateManager/Dialogs.py (+94/-52) UpdateManager/InstallProgress.py (+0/-100) UpdateManager/SimpleGtkbuilderApp.py (+0/-63) UpdateManager/UpdateManager.py (+78/-47) UpdateManager/UpdateProgress.py (+0/-81) UpdateManager/UpdatesAvailable.py (+94/-123) UpdateManager/backend/InstallBackendAptdaemon.py (+63/-66) UpdateManager/backend/InstallBackendSynaptic.py (+34/-28) UpdateManager/backend/__init__.py (+66/-28) data/gtkbuilder/Dialog.ui (+49/-50) data/gtkbuilder/UpdateManager.ui (+276/-444) debian/update-manager.install (+0/-3) po/POTFILES.in (+0/-2) po/update-manager.pot (+222/-430) |
To merge this branch: | bzr merge lp:~dylanmccall/update-manager/dialogs-refactor |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dimitri John Ledkov | Approve | ||
Review via email: mp+164673@code.launchpad.net |
Commit message
Description of the change
With this branch, I am proposing some refactoring of update-manager's various screens so they all use the same base class, "Dialog", which is typically a Gtk widget that can be added as a child of the application's main window.
Previously, the design of the application meant we used Dialog sometimes, but not always, with the UpdatesAvailable screen being a particularly noteworthy omission. To deal with all these different screens, whenever UpdateManager wanted to show a new screen it would call that screen's start method, and then the screen itself would effectively take control of the main window. This meant adding new widgets, hiding the main window, making it resizable, and the like; which also meant code duplication, several calls to Gtk.main, and a strong smell of feature envy :) With my design, I'm trying to adopt a more conventional layout, using the Dialog class throughout, as a GTK widget wherever possible. (The settings dialog and InstallBackendS
There is now a little less code (diffstat: 11 files changed, 747 insertions(+), 1074 deletions(-)), and it should be much easier to make a single change and have it apply logically across the application. In addition, because the main window has a better handle on its children, this paves the way for us to implement pretty transitions between screens, for example using the new-fangled GtkRevealer widget. Originally this would have meant changing every screen to deal with a new container in the main window. With this change, we can do it all in UpdateManager.py.
- 2634. By Dylan McCall
-
Put back the "backend" module. It wasn't necessary to move it in this branch.
- 2635. By Dylan McCall
-
Removed unnecessary layout changes in InstallBackendA
ptdaemon. Progress dialog should not wiggle when it first appears, now. - 2636. By Dylan McCall
-
Fix packaging and pot files.
Put back the 6px margin above header label in each dialog. - 2637. By Dylan McCall
-
Progress dialog is resizable while downloading packages, too.
Sebastien Bacher (seb128) wrote : | # |
Those changes seem to have a created https:/
Sebastien Bacher (seb128) wrote : | # |
That merge is also creating https:/
_action_done() is calling "self.window_
Dylan, do you think you could look at that?
Sebastien Bacher (seb128) wrote : | # |
I've opened https:/
Preview Diff
1 | === modified file 'UpdateManager/Dialogs.py' | |||
2 | --- UpdateManager/Dialogs.py 2013-01-09 21:04:35 +0000 | |||
3 | +++ UpdateManager/Dialogs.py 2013-05-21 05:43:25 +0000 | |||
4 | @@ -24,6 +24,7 @@ | |||
5 | 24 | 24 | ||
6 | 25 | from gi.repository import Gtk | 25 | from gi.repository import Gtk |
7 | 26 | from gi.repository import Gdk | 26 | from gi.repository import Gdk |
8 | 27 | from gi.repository import GLib | ||
9 | 27 | from gi.repository import GObject | 28 | from gi.repository import GObject |
10 | 28 | GObject.threads_init() | 29 | GObject.threads_init() |
11 | 29 | 30 | ||
12 | @@ -31,39 +32,79 @@ | |||
13 | 31 | warnings.filterwarnings( | 32 | warnings.filterwarnings( |
14 | 32 | "ignore", "Accessed deprecated property", DeprecationWarning) | 33 | "ignore", "Accessed deprecated property", DeprecationWarning) |
15 | 33 | 34 | ||
16 | 35 | import logging | ||
17 | 34 | import dbus | 36 | import dbus |
18 | 35 | import os | 37 | import os |
19 | 36 | import subprocess | 38 | import subprocess |
20 | 37 | import sys | 39 | import sys |
21 | 38 | from .SimpleGtkbuilderApp import SimpleGtkbuilderApp | ||
22 | 39 | 40 | ||
23 | 40 | from gettext import gettext as _ | 41 | from gettext import gettext as _ |
24 | 41 | 42 | ||
25 | 42 | 43 | ||
27 | 43 | class Dialog(SimpleGtkbuilderApp): | 44 | class Dialog(object): |
28 | 44 | def __init__(self, window_main): | 45 | def __init__(self, window_main): |
29 | 45 | self.window_main = window_main | 46 | self.window_main = window_main |
44 | 46 | self.focus_button = None | 47 | |
45 | 47 | SimpleGtkbuilderApp.__init__( | 48 | def start(self): |
46 | 48 | self, | 49 | pass |
47 | 49 | self.window_main.datadir + "/gtkbuilder/Dialog.ui", | 50 | |
48 | 50 | "update-manager") | 51 | def close(self): |
49 | 51 | 52 | return self.stop() | |
50 | 52 | def main(self): | 53 | |
51 | 53 | self.window_main.push(self.pane_dialog, self) | 54 | def stop(self): |
52 | 54 | if self.focus_button: | 55 | pass |
53 | 55 | self.focus_button.grab_focus() | 56 | |
54 | 56 | 57 | def run(self, parent=None): | |
55 | 57 | def run(self, parent=None): | 58 | pass |
56 | 58 | if self.focus_button: | 59 | |
57 | 59 | self.focus_button.grab_focus() | 60 | |
58 | 61 | class BuilderDialog(Dialog, Gtk.Alignment): | ||
59 | 62 | def __init__(self, window_main, ui_path, root_widget): | ||
60 | 63 | Dialog.__init__(self, window_main) | ||
61 | 64 | Gtk.Alignment.__init__(self) | ||
62 | 65 | |||
63 | 66 | builder = self._load_ui(ui_path, root_widget) | ||
64 | 67 | self.add(builder.get_object(root_widget)) | ||
65 | 68 | self.show() | ||
66 | 69 | |||
67 | 70 | def _load_ui(self, path, root_widget, domain="update-manager"): | ||
68 | 71 | builder = Gtk.Builder() | ||
69 | 72 | builder.set_translation_domain(domain) | ||
70 | 73 | builder.add_objects_from_file(path, [root_widget]) | ||
71 | 74 | builder.connect_signals(self) | ||
72 | 75 | |||
73 | 76 | for o in builder.get_objects(): | ||
74 | 77 | if issubclass(type(o), Gtk.Buildable): | ||
75 | 78 | name = Gtk.Buildable.get_name(o) | ||
76 | 79 | setattr(self, name, o) | ||
77 | 80 | else: | ||
78 | 81 | logging.debug("WARNING: can not get name for '%s'" % o) | ||
79 | 82 | |||
80 | 83 | return builder | ||
81 | 84 | |||
82 | 85 | def run(self, parent=None): | ||
83 | 86 | # FIXME: THIS WILL CRASH! | ||
84 | 60 | if parent: | 87 | if parent: |
85 | 61 | self.window_dialog.set_transient_for(parent) | 88 | self.window_dialog.set_transient_for(parent) |
86 | 62 | self.window_dialog.set_modal(True) | 89 | self.window_dialog.set_modal(True) |
87 | 63 | self.window_dialog.run() | 90 | self.window_dialog.run() |
88 | 64 | 91 | ||
91 | 65 | def close(self): | 92 | |
92 | 66 | sys.exit(0) # By default, exit the app | 93 | class InternalDialog(BuilderDialog): |
93 | 94 | def __init__(self, window_main, content_widget=None): | ||
94 | 95 | ui_path = os.path.join(window_main.datadir, "gtkbuilder/Dialog.ui") | ||
95 | 96 | BuilderDialog.__init__(self, window_main, ui_path, "pane_dialog") | ||
96 | 97 | |||
97 | 98 | self.focus_button = None | ||
98 | 99 | self.set_content_widget(content_widget) | ||
99 | 100 | self.connect("realize", self._on_realize) | ||
100 | 101 | |||
101 | 102 | def _on_realize(self, user_data): | ||
102 | 103 | if self.focus_button: | ||
103 | 104 | self.focus_button.set_can_default(True) | ||
104 | 105 | self.focus_button.set_can_focus(True) | ||
105 | 106 | self.focus_button.grab_default() | ||
106 | 107 | self.focus_button.grab_focus() | ||
107 | 67 | 108 | ||
108 | 68 | def add_button(self, label, callback, secondary=False): | 109 | def add_button(self, label, callback, secondary=False): |
109 | 69 | # from_stock tries stock first and falls back to mnemonic | 110 | # from_stock tries stock first and falls back to mnemonic |
110 | @@ -83,48 +124,50 @@ | |||
111 | 83 | return None | 124 | return None |
112 | 84 | 125 | ||
113 | 85 | def on_settings_button_clicked(self): | 126 | def on_settings_button_clicked(self): |
121 | 86 | cmd = ["/usr/bin/software-properties-gtk", | 127 | self.window_main.show_settings() |
115 | 87 | "--open-tab", "2", | ||
116 | 88 | # FIXME: once get_xid() is available via introspections, add | ||
117 | 89 | # this back | ||
118 | 90 | #"--toplevel", "%s" % self.window_main.get_window().get_xid() | ||
119 | 91 | ] | ||
120 | 92 | subprocess.Popen(cmd) | ||
122 | 93 | 128 | ||
123 | 94 | def set_header(self, label): | 129 | def set_header(self, label): |
125 | 95 | self.label_header.set_label(label) | 130 | if label: |
126 | 131 | self.label_header.set_markup( | ||
127 | 132 | "<span size='larger' weight='bold'>%s</span>" % label) | ||
128 | 133 | self.label_header.set_visible(bool(label)) | ||
129 | 96 | 134 | ||
130 | 97 | def set_desc(self, label): | 135 | def set_desc(self, label): |
132 | 98 | self.label_desc.set_label(label) | 136 | if label: |
133 | 137 | self.label_desc.set_markup(label) | ||
134 | 99 | self.label_desc.set_visible(bool(label)) | 138 | self.label_desc.set_visible(bool(label)) |
135 | 100 | 139 | ||
136 | 140 | def set_content_widget(self, content_widget): | ||
137 | 141 | if content_widget: | ||
138 | 142 | self.main_container.add(content_widget) | ||
139 | 143 | self.main_container.set_visible(bool(content_widget)) | ||
140 | 101 | 144 | ||
142 | 102 | class StoppedUpdatesDialog(Dialog): | 145 | class StoppedUpdatesDialog(InternalDialog): |
143 | 103 | def __init__(self, window_main): | 146 | def __init__(self, window_main): |
145 | 104 | Dialog.__init__(self, window_main) | 147 | InternalDialog.__init__(self, window_main) |
146 | 105 | self.set_header(_("You stopped the check for updates.")) | 148 | self.set_header(_("You stopped the check for updates.")) |
147 | 106 | self.add_settings_button() | 149 | self.add_settings_button() |
148 | 107 | self.add_button(_("_Check Again"), self.check) | 150 | self.add_button(_("_Check Again"), self.check) |
150 | 108 | self.focus_button = self.add_button(Gtk.STOCK_OK, self.close) | 151 | self.focus_button = self.add_button(Gtk.STOCK_OK, self.window_main.close) |
151 | 109 | 152 | ||
152 | 110 | def check(self): | 153 | def check(self): |
153 | 111 | self.window_main.start_update() | 154 | self.window_main.start_update() |
154 | 112 | 155 | ||
155 | 113 | 156 | ||
157 | 114 | class NoUpdatesDialog(Dialog): | 157 | class NoUpdatesDialog(InternalDialog): |
158 | 115 | def __init__(self, window_main, error_occurred=False): | 158 | def __init__(self, window_main, error_occurred=False): |
160 | 116 | Dialog.__init__(self, window_main) | 159 | InternalDialog.__init__(self, window_main) |
161 | 117 | if error_occurred: | 160 | if error_occurred: |
162 | 118 | self.set_header(_("No software updates are available.")) | 161 | self.set_header(_("No software updates are available.")) |
163 | 119 | else: | 162 | else: |
164 | 120 | self.set_header(_("The software on this computer is up to date.")) | 163 | self.set_header(_("The software on this computer is up to date.")) |
165 | 121 | self.add_settings_button() | 164 | self.add_settings_button() |
170 | 122 | self.focus_button = self.add_button(Gtk.STOCK_OK, self.close) | 165 | self.focus_button = self.add_button(Gtk.STOCK_OK, self.window_main.close) |
171 | 123 | 166 | ||
172 | 124 | 167 | ||
173 | 125 | class DistUpgradeDialog(Dialog): | 168 | class DistUpgradeDialog(InternalDialog): |
174 | 126 | def __init__(self, window_main, meta_release): | 169 | def __init__(self, window_main, meta_release): |
176 | 127 | Dialog.__init__(self, window_main) | 170 | InternalDialog.__init__(self, window_main) |
177 | 128 | self.meta_release = meta_release | 171 | self.meta_release = meta_release |
178 | 129 | self.set_header(_("The software on this computer is up to date.")) | 172 | self.set_header(_("The software on this computer is up to date.")) |
179 | 130 | # Translators: these are Ubuntu version names like "Ubuntu 12.04" | 173 | # Translators: these are Ubuntu version names like "Ubuntu 12.04" |
180 | @@ -134,7 +177,7 @@ | |||
181 | 134 | meta_release.current_dist_version)) | 177 | meta_release.current_dist_version)) |
182 | 135 | self.add_settings_button() | 178 | self.add_settings_button() |
183 | 136 | self.add_button(_("Upgrade…"), self.upgrade) | 179 | self.add_button(_("Upgrade…"), self.upgrade) |
185 | 137 | self.focus_button = self.add_button(Gtk.STOCK_OK, self.close) | 180 | self.focus_button = self.add_button(Gtk.STOCK_OK, self.window_main.close) |
186 | 138 | 181 | ||
187 | 139 | def upgrade(self): | 182 | def upgrade(self): |
188 | 140 | # Pass on several arguments | 183 | # Pass on several arguments |
189 | @@ -169,9 +212,9 @@ | |||
190 | 169 | DistUpgradeDialog.run(self, parent) | 212 | DistUpgradeDialog.run(self, parent) |
191 | 170 | 213 | ||
192 | 171 | 214 | ||
194 | 172 | class PartialUpgradeDialog(Dialog): | 215 | class PartialUpgradeDialog(InternalDialog): |
195 | 173 | def __init__(self, window_main): | 216 | def __init__(self, window_main): |
197 | 174 | Dialog.__init__(self, window_main) | 217 | InternalDialog.__init__(self, window_main) |
198 | 175 | self.set_header(_("Not all updates can be installed")) | 218 | self.set_header(_("Not all updates can be installed")) |
199 | 176 | self.set_desc(_( | 219 | self.set_desc(_( |
200 | 177 | """Run a partial upgrade, to install as many updates as possible. | 220 | """Run a partial upgrade, to install as many updates as possible. |
201 | @@ -191,24 +234,24 @@ | |||
202 | 191 | "/usr/lib/ubuntu-release-upgrader/do-partial-upgrade " | 234 | "/usr/lib/ubuntu-release-upgrader/do-partial-upgrade " |
203 | 192 | "--frontend=DistUpgradeViewGtk3") | 235 | "--frontend=DistUpgradeViewGtk3") |
204 | 193 | 236 | ||
207 | 194 | def main(self): | 237 | def start(self): |
208 | 195 | Dialog.main(self) | 238 | Dialog.start(self) |
209 | 196 | # Block progress until user has answered this question | 239 | # Block progress until user has answered this question |
210 | 197 | Gtk.main() | 240 | Gtk.main() |
211 | 198 | 241 | ||
212 | 199 | 242 | ||
214 | 200 | class ErrorDialog(Dialog): | 243 | class ErrorDialog(InternalDialog): |
215 | 201 | def __init__(self, window_main, header, desc=None): | 244 | def __init__(self, window_main, header, desc=None): |
217 | 202 | Dialog.__init__(self, window_main) | 245 | InternalDialog.__init__(self, window_main) |
218 | 203 | self.set_header(header) | 246 | self.set_header(header) |
219 | 204 | if desc: | 247 | if desc: |
220 | 205 | self.set_desc(desc) | 248 | self.set_desc(desc) |
221 | 206 | self.label_desc.set_selectable(True) | 249 | self.label_desc.set_selectable(True) |
222 | 207 | self.add_settings_button() | 250 | self.add_settings_button() |
224 | 208 | self.focus_button = self.add_button(Gtk.STOCK_OK, self.close) | 251 | self.focus_button = self.add_button(Gtk.STOCK_OK, self.window_main.close) |
225 | 209 | 252 | ||
228 | 210 | def main(self): | 253 | def start(self): |
229 | 211 | Dialog.main(self) | 254 | Dialog.start(self) |
230 | 212 | # The label likes to start selecting everything (b/c it got focus | 255 | # The label likes to start selecting everything (b/c it got focus |
231 | 213 | # before we switched to our default button). | 256 | # before we switched to our default button). |
232 | 214 | self.label_desc.select_region(0, 0) | 257 | self.label_desc.select_region(0, 0) |
233 | @@ -229,17 +272,16 @@ | |||
234 | 229 | self.window_main.start_available(error_occurred=True) | 272 | self.window_main.start_available(error_occurred=True) |
235 | 230 | 273 | ||
236 | 231 | 274 | ||
238 | 232 | class NeedRestartDialog(Dialog): | 275 | class NeedRestartDialog(InternalDialog): |
239 | 233 | def __init__(self, window_main): | 276 | def __init__(self, window_main): |
241 | 234 | Dialog.__init__(self, window_main) | 277 | InternalDialog.__init__(self, window_main) |
242 | 235 | self.set_header( | 278 | self.set_header( |
243 | 236 | _("The computer needs to restart to finish installing updates.")) | 279 | _("The computer needs to restart to finish installing updates.")) |
244 | 237 | self.focus_button = self.add_button(_("_Restart"), self.restart) | 280 | self.focus_button = self.add_button(_("_Restart"), self.restart) |
245 | 238 | 281 | ||
248 | 239 | def main(self): | 282 | def start(self): |
249 | 240 | Dialog.main(self) | 283 | Dialog.start(self) |
250 | 241 | # Turn off close button | 284 | # Turn off close button |
251 | 242 | self.window_main.realize() | ||
252 | 243 | self.window_main.get_window().set_functions(Gdk.WMFunction.MOVE | | 285 | self.window_main.get_window().set_functions(Gdk.WMFunction.MOVE | |
253 | 244 | Gdk.WMFunction.MINIMIZE) | 286 | Gdk.WMFunction.MINIMIZE) |
254 | 245 | 287 | ||
255 | 246 | 288 | ||
256 | === removed file 'UpdateManager/InstallProgress.py' | |||
257 | --- UpdateManager/InstallProgress.py 2012-12-13 20:39:37 +0000 | |||
258 | +++ UpdateManager/InstallProgress.py 1970-01-01 00:00:00 +0000 | |||
259 | @@ -1,100 +0,0 @@ | |||
260 | 1 | # InstallProgress.py | ||
261 | 2 | # -*- Mode: Python; indent-tabs-mode: nil; tab-width: 4; coding: utf-8 -*- | ||
262 | 3 | # | ||
263 | 4 | # Copyright (c) 2004-2012 Canonical | ||
264 | 5 | # 2004 Michiel Sikkes | ||
265 | 6 | # 2005 Martin Willemoes Hansen | ||
266 | 7 | # 2010 Mohamed Amine IL Idrissi | ||
267 | 8 | # | ||
268 | 9 | # Author: Michiel Sikkes <michiel@eyesopened.nl> | ||
269 | 10 | # Michael Vogt <mvo@debian.org> | ||
270 | 11 | # Martin Willemoes Hansen <mwh@sysrq.dk> | ||
271 | 12 | # Mohamed Amine IL Idrissi <ilidrissiamine@gmail.com> | ||
272 | 13 | # Alex Launi <alex.launi@canonical.com> | ||
273 | 14 | # Michael Terry <michael.terry@canonical.com> | ||
274 | 15 | # | ||
275 | 16 | # This program is free software; you can redistribute it and/or | ||
276 | 17 | # modify it under the terms of the GNU General Public License as | ||
277 | 18 | # published by the Free Software Foundation; either version 2 of the | ||
278 | 19 | # License, or (at your option) any later version. | ||
279 | 20 | # | ||
280 | 21 | # This program is distributed in the hope that it will be useful, | ||
281 | 22 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
282 | 23 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
283 | 24 | # GNU General Public License for more details. | ||
284 | 25 | # | ||
285 | 26 | # You should have received a copy of the GNU General Public License | ||
286 | 27 | # along with this program; if not, write to the Free Software | ||
287 | 28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
288 | 29 | # USA | ||
289 | 30 | |||
290 | 31 | from __future__ import absolute_import, print_function | ||
291 | 32 | |||
292 | 33 | import warnings | ||
293 | 34 | warnings.filterwarnings("ignore", "Accessed deprecated property", | ||
294 | 35 | DeprecationWarning) | ||
295 | 36 | |||
296 | 37 | import os | ||
297 | 38 | import sys | ||
298 | 39 | |||
299 | 40 | from .backend import get_backend | ||
300 | 41 | |||
301 | 42 | from .Core.utils import (inhibit_sleep, | ||
302 | 43 | allow_sleep) | ||
303 | 44 | |||
304 | 45 | |||
305 | 46 | class InstallProgress(object): | ||
306 | 47 | |||
307 | 48 | def __init__(self, app): | ||
308 | 49 | self.window_main = app | ||
309 | 50 | self.datadir = app.datadir | ||
310 | 51 | self.options = app.options | ||
311 | 52 | |||
312 | 53 | # Used for inhibiting power management | ||
313 | 54 | self.sleep_cookie = None | ||
314 | 55 | self.sleep_dev = None | ||
315 | 56 | |||
316 | 57 | # get the install backend | ||
317 | 58 | self.install_backend = get_backend(self.datadir, self.window_main) | ||
318 | 59 | self.install_backend.connect("action-done", self._on_backend_done) | ||
319 | 60 | |||
320 | 61 | def invoke_manager(self): | ||
321 | 62 | # don't display apt-listchanges, we already showed the changelog | ||
322 | 63 | os.environ["APT_LISTCHANGES_FRONTEND"] = "none" | ||
323 | 64 | |||
324 | 65 | # Do not suspend during the update process | ||
325 | 66 | (self.sleep_dev, self.sleep_cookie) = inhibit_sleep() | ||
326 | 67 | |||
327 | 68 | # If the progress dialog should be closed automatically afterwards | ||
328 | 69 | #settings = Gio.Settings("com.ubuntu.update-manager") | ||
329 | 70 | #close_on_done = settings.get_boolean("autoclose-install-window") | ||
330 | 71 | # FIXME: confirm with mpt whether this should still be a setting | ||
331 | 72 | close_on_done = False | ||
332 | 73 | |||
333 | 74 | # Get the packages which should be installed and update | ||
334 | 75 | pkgs_install = [] | ||
335 | 76 | pkgs_upgrade = [] | ||
336 | 77 | for pkg in self.window_main.cache: | ||
337 | 78 | if pkg.marked_install: | ||
338 | 79 | pkgs_install.append(pkg.name) | ||
339 | 80 | elif pkg.marked_upgrade: | ||
340 | 81 | pkgs_upgrade.append(pkg.name) | ||
341 | 82 | self.install_backend.commit(pkgs_install, pkgs_upgrade, close_on_done) | ||
342 | 83 | |||
343 | 84 | def _on_backend_done(self, backend, action, authorized, success, | ||
344 | 85 | error_string, error_desc): | ||
345 | 86 | # Allow suspend after synaptic is finished | ||
346 | 87 | if self.sleep_cookie: | ||
347 | 88 | allow_sleep(self.sleep_dev, self.sleep_cookie) | ||
348 | 89 | self.sleep_cookie = self.sleep_dev = None | ||
349 | 90 | |||
350 | 91 | # Either launch main dialog and continue or quit altogether | ||
351 | 92 | if success: | ||
352 | 93 | self.window_main.start_available() | ||
353 | 94 | elif error_string: | ||
354 | 95 | self.window_main.start_error(False, error_string, error_desc) | ||
355 | 96 | else: | ||
356 | 97 | sys.exit(0) | ||
357 | 98 | |||
358 | 99 | def main(self): | ||
359 | 100 | self.invoke_manager() | ||
360 | 101 | 0 | ||
361 | === removed file 'UpdateManager/SimpleGtkbuilderApp.py' | |||
362 | --- UpdateManager/SimpleGtkbuilderApp.py 2012-11-19 16:33:28 +0000 | |||
363 | +++ UpdateManager/SimpleGtkbuilderApp.py 1970-01-01 00:00:00 +0000 | |||
364 | @@ -1,63 +0,0 @@ | |||
365 | 1 | # -*- Mode: Python; indent-tabs-mode: nil; tab-width: 4; coding: utf-8 -*- | ||
366 | 2 | |||
367 | 3 | """ | ||
368 | 4 | SimpleGladeApp.py | ||
369 | 5 | Module that provides an object oriented abstraction to pygtk and libglade. | ||
370 | 6 | Copyright (C) 2004 Sandino Flores Moreno | ||
371 | 7 | """ | ||
372 | 8 | |||
373 | 9 | # This library is free software; you can redistribute it and/or | ||
374 | 10 | # modify it under the terms of the GNU Lesser General Public | ||
375 | 11 | # License as published by the Free Software Foundation; either | ||
376 | 12 | # version 2.1 of the License, or (at your option) any later version. | ||
377 | 13 | # | ||
378 | 14 | # This library is distributed in the hope that it will be useful, | ||
379 | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
380 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
381 | 17 | # Lesser General Public License for more details. | ||
382 | 18 | # | ||
383 | 19 | # You should have received a copy of the GNU Lesser General Public | ||
384 | 20 | # License along with this library; if not, write to the Free Software | ||
385 | 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
386 | 22 | # USA | ||
387 | 23 | |||
388 | 24 | import logging | ||
389 | 25 | |||
390 | 26 | from gi.repository import Gtk | ||
391 | 27 | |||
392 | 28 | |||
393 | 29 | # based on SimpleGladeApp | ||
394 | 30 | class SimpleGtkbuilderApp: | ||
395 | 31 | |||
396 | 32 | def __init__(self, path, domain): | ||
397 | 33 | self.builder = Gtk.Builder() | ||
398 | 34 | self.builder.set_translation_domain(domain) | ||
399 | 35 | self.builder.add_from_file(path) | ||
400 | 36 | self.builder.connect_signals(self) | ||
401 | 37 | for o in self.builder.get_objects(): | ||
402 | 38 | if issubclass(type(o), Gtk.Buildable): | ||
403 | 39 | name = Gtk.Buildable.get_name(o) | ||
404 | 40 | setattr(self, name, o) | ||
405 | 41 | else: | ||
406 | 42 | logging.debug("WARNING: can not get name for '%s'" % o) | ||
407 | 43 | |||
408 | 44 | def run(self): | ||
409 | 45 | """ | ||
410 | 46 | Starts the main loop of processing events checking for Control-C. | ||
411 | 47 | |||
412 | 48 | The default implementation checks wheter a Control-C is pressed, | ||
413 | 49 | then calls on_keyboard_interrupt(). | ||
414 | 50 | |||
415 | 51 | Use this method for starting programs. | ||
416 | 52 | """ | ||
417 | 53 | try: | ||
418 | 54 | Gtk.main() | ||
419 | 55 | except KeyboardInterrupt: | ||
420 | 56 | self.on_keyboard_interrupt() | ||
421 | 57 | |||
422 | 58 | def on_keyboard_interrupt(self): | ||
423 | 59 | """ | ||
424 | 60 | This method is called by the default implementation of run() | ||
425 | 61 | after a program is finished by pressing Control-C. | ||
426 | 62 | """ | ||
427 | 63 | pass | ||
428 | 64 | 0 | ||
429 | === modified file 'UpdateManager/UpdateManager.py' | |||
430 | --- UpdateManager/UpdateManager.py 2013-03-01 18:21:56 +0000 | |||
431 | +++ UpdateManager/UpdateManager.py 2013-05-21 05:43:25 +0000 | |||
432 | @@ -23,7 +23,7 @@ | |||
433 | 23 | from __future__ import absolute_import, print_function | 23 | from __future__ import absolute_import, print_function |
434 | 24 | 24 | ||
435 | 25 | from gi.repository import Gtk | 25 | from gi.repository import Gtk |
437 | 26 | from gi.repository import Gdk | 26 | from gi.repository import Gdk, GdkX11 |
438 | 27 | from gi.repository import Gio | 27 | from gi.repository import Gio |
439 | 28 | from gi.repository import GLib | 28 | from gi.repository import GLib |
440 | 29 | 29 | ||
441 | @@ -33,7 +33,9 @@ | |||
442 | 33 | 33 | ||
443 | 34 | import apt_pkg | 34 | import apt_pkg |
444 | 35 | import os | 35 | import os |
445 | 36 | import subprocess | ||
446 | 36 | import sys | 37 | import sys |
447 | 38 | import time | ||
448 | 37 | from gettext import gettext as _ | 39 | from gettext import gettext as _ |
449 | 38 | 40 | ||
450 | 39 | import dbus | 41 | import dbus |
451 | @@ -50,22 +52,22 @@ | |||
452 | 50 | PartialUpgradeDialog, | 52 | PartialUpgradeDialog, |
453 | 51 | UnsupportedDialog, | 53 | UnsupportedDialog, |
454 | 52 | UpdateErrorDialog) | 54 | UpdateErrorDialog) |
455 | 53 | from .InstallProgress import InstallProgress | ||
456 | 54 | from .MetaReleaseGObject import MetaRelease | 55 | from .MetaReleaseGObject import MetaRelease |
457 | 55 | from .UpdateProgress import UpdateProgress | ||
458 | 56 | from .UpdatesAvailable import UpdatesAvailable | 56 | from .UpdatesAvailable import UpdatesAvailable |
459 | 57 | from .Core.AlertWatcher import AlertWatcher | 57 | from .Core.AlertWatcher import AlertWatcher |
460 | 58 | from .Core.MyCache import MyCache | 58 | from .Core.MyCache import MyCache |
461 | 59 | from .Core.roam import NetworkManagerHelper | 59 | from .Core.roam import NetworkManagerHelper |
462 | 60 | from .Core.UpdateList import UpdateList | 60 | from .Core.UpdateList import UpdateList |
463 | 61 | from .backend import (InstallBackend, | ||
464 | 62 | get_backend) | ||
465 | 61 | 63 | ||
466 | 62 | # file that signals if we need to reboot | 64 | # file that signals if we need to reboot |
467 | 63 | REBOOT_REQUIRED_FILE = "/var/run/reboot-required" | 65 | REBOOT_REQUIRED_FILE = "/var/run/reboot-required" |
468 | 64 | 66 | ||
469 | 65 | 67 | ||
470 | 66 | class UpdateManager(Gtk.Window): | 68 | class UpdateManager(Gtk.Window): |
473 | 67 | """ This class is the main window and work flow controller. Panes will add | 69 | """ This class is the main window and work flow controller. The main |
474 | 68 | themselves to the main window and it will morph between them.""" | 70 | window will show panes, and it will morph between them. """ |
475 | 69 | 71 | ||
476 | 70 | def __init__(self, datadir, options): | 72 | def __init__(self, datadir, options): |
477 | 71 | Gtk.Window.__init__(self) | 73 | Gtk.Window.__init__(self) |
478 | @@ -82,16 +84,14 @@ | |||
479 | 82 | # Basic GTK+ parameters | 84 | # Basic GTK+ parameters |
480 | 83 | self.set_title(_("Software Updater")) | 85 | self.set_title(_("Software Updater")) |
481 | 84 | self.set_icon_name("system-software-update") | 86 | self.set_icon_name("system-software-update") |
482 | 85 | self.set_resizable(False) | ||
483 | 86 | self.set_position(Gtk.WindowPosition.CENTER) | 87 | self.set_position(Gtk.WindowPosition.CENTER) |
484 | 87 | 88 | ||
485 | 88 | # Keep window at a constant size | 89 | # Keep window at a constant size |
486 | 89 | ctx = self.get_style_context() | 90 | ctx = self.get_style_context() |
487 | 90 | ctx.connect("changed", lambda ctx: self.resize_to_standard_width()) | 91 | ctx.connect("changed", lambda ctx: self.resize_to_standard_width()) |
488 | 91 | self.resize_to_standard_width() | ||
489 | 92 | 92 | ||
490 | 93 | # Signals | 93 | # Signals |
492 | 94 | self.connect("delete-event", self.close) | 94 | self.connect("delete-event", self._on_close) |
493 | 95 | 95 | ||
494 | 96 | self._setup_dbus() | 96 | self._setup_dbus() |
495 | 97 | 97 | ||
496 | @@ -110,6 +110,17 @@ | |||
497 | 110 | self.options and self.options.devel_release, | 110 | self.options and self.options.devel_release, |
498 | 111 | self.options and self.options.use_proposed) | 111 | self.options and self.options.use_proposed) |
499 | 112 | 112 | ||
500 | 113 | def begin_user_resizable(self, stored_width=0, stored_height=0): | ||
501 | 114 | self.set_resizable(True) | ||
502 | 115 | if stored_width > 0 and stored_height > 0: | ||
503 | 116 | # There is a race here. If we immediately resize, it often doesn't | ||
504 | 117 | # take. Using idle_add helps, but we *still* occasionally don't | ||
505 | 118 | # restore the size correctly. Help needed to track this down! | ||
506 | 119 | GLib.idle_add(lambda: self.resize(stored_width, stored_height)) | ||
507 | 120 | |||
508 | 121 | def end_user_resizable(self): | ||
509 | 122 | self.set_resizable(False) | ||
510 | 123 | |||
511 | 113 | def resize_to_standard_width(self): | 124 | def resize_to_standard_width(self): |
512 | 114 | if self.get_resizable(): | 125 | if self.get_resizable(): |
513 | 115 | return # only size to a specific em if we are a static size | 126 | return # only size to a specific em if we are a static size |
514 | @@ -130,56 +141,77 @@ | |||
515 | 130 | self.disconnect(self.initial_focus_id) | 141 | self.disconnect(self.initial_focus_id) |
516 | 131 | return False | 142 | return False |
517 | 132 | 143 | ||
524 | 133 | def push(self, pane, controller): | 144 | def _start_pane(self, pane): |
525 | 134 | child = self.get_child() | 145 | if self.controller is not None: |
526 | 135 | if child is not None: | 146 | self.controller.stop() |
527 | 136 | if self.controller and hasattr(self.controller, "save_state"): | 147 | if isinstance(self.controller, Gtk.Widget): |
528 | 137 | self.controller.save_state() | 148 | self.controller.destroy() |
529 | 138 | child.destroy() | 149 | |
530 | 150 | self.controller = pane | ||
531 | 151 | self._look_ready() | ||
532 | 152 | self.end_user_resizable() | ||
533 | 139 | 153 | ||
534 | 140 | if pane is None: | 154 | if pane is None: |
535 | 141 | self.controller = None | ||
536 | 142 | return | 155 | return |
537 | 143 | 156 | ||
556 | 144 | pane.reparent(self) | 157 | if isinstance(pane, Gtk.Widget): |
557 | 145 | self.controller = controller | 158 | self.add(pane) |
558 | 146 | 159 | pane.start() | |
559 | 147 | # Reset state | 160 | self.show_all() |
560 | 148 | self.set_resizable(False) | 161 | else: |
561 | 149 | self.resize_to_standard_width() | 162 | pane.start() |
562 | 150 | self.set_sensitive(True) | 163 | self.hide() |
563 | 151 | if self.get_window() is not None: | 164 | |
564 | 152 | self.get_window().set_cursor(None) | 165 | def _on_close(self, widget, data=None): |
565 | 153 | self.get_window().set_functions(Gdk.WMFunction.ALL) | 166 | self.close() |
566 | 154 | 167 | ||
567 | 155 | if self.controller and hasattr(self.controller, "restore_state"): | 168 | def close(self): |
550 | 156 | self.controller.restore_state() | ||
551 | 157 | |||
552 | 158 | pane.show() | ||
553 | 159 | self.show() | ||
554 | 160 | |||
555 | 161 | def close(self, widget, data=None): | ||
568 | 162 | if not self.get_sensitive(): | 169 | if not self.get_sensitive(): |
569 | 163 | return True | 170 | return True |
570 | 164 | 171 | ||
576 | 165 | if self.controller and hasattr(self.controller, "close"): | 172 | controller_close = self.controller.close() |
577 | 166 | # let controller handle it as they will | 173 | if controller_close: |
578 | 167 | if self.controller.close(): | 174 | return controller_close |
574 | 168 | return | ||
575 | 169 | |||
579 | 170 | self.exit() | 175 | self.exit() |
580 | 171 | 176 | ||
581 | 172 | def exit(self): | 177 | def exit(self): |
582 | 173 | """ exit the application, save the state """ | 178 | """ exit the application, save the state """ |
584 | 174 | self.push(None, None) | 179 | self._start_pane(None) |
585 | 175 | sys.exit(0) | 180 | sys.exit(0) |
586 | 176 | 181 | ||
587 | 182 | def show_settings(self): | ||
588 | 183 | try: | ||
589 | 184 | apt_pkg.pkgsystem_unlock() | ||
590 | 185 | except SystemError: | ||
591 | 186 | pass | ||
592 | 187 | cmd = ["/usr/bin/software-properties-gtk", | ||
593 | 188 | "--open-tab", "2", | ||
594 | 189 | "--toplevel", "%s" % self.get_window().get_xid() | ||
595 | 190 | ] | ||
596 | 191 | self._look_busy() | ||
597 | 192 | try: | ||
598 | 193 | p = subprocess.Popen(cmd) | ||
599 | 194 | except OSError: | ||
600 | 195 | pass | ||
601 | 196 | else: | ||
602 | 197 | while p.poll() is None: | ||
603 | 198 | while Gtk.events_pending(): | ||
604 | 199 | Gtk.main_iteration() | ||
605 | 200 | time.sleep(0.05) | ||
606 | 201 | finally: | ||
607 | 202 | self.start_available() | ||
608 | 203 | |||
609 | 177 | def start_update(self): | 204 | def start_update(self): |
610 | 178 | if self.options.no_update: | 205 | if self.options.no_update: |
611 | 179 | self.start_available() | 206 | self.start_available() |
612 | 180 | return | 207 | return |
613 | 181 | 208 | ||
615 | 182 | self._start_pane(UpdateProgress(self)) | 209 | update_backend = get_backend(self, InstallBackend.ACTION_UPDATE) |
616 | 210 | self._start_pane(update_backend) | ||
617 | 211 | |||
618 | 212 | def start_install(self): | ||
619 | 213 | install_backend = get_backend(self, InstallBackend.ACTION_INSTALL) | ||
620 | 214 | self._start_pane(install_backend) | ||
621 | 183 | 215 | ||
622 | 184 | def start_available(self, cancelled_update=False, error_occurred=False): | 216 | def start_available(self, cancelled_update=False, error_occurred=False): |
623 | 185 | self._look_busy() | 217 | self._look_busy() |
624 | @@ -214,24 +246,23 @@ | |||
625 | 214 | "a previous check.") | 246 | "a previous check.") |
626 | 215 | return UpdatesAvailable(self, header, desc) | 247 | return UpdatesAvailable(self, header, desc) |
627 | 216 | 248 | ||
628 | 217 | def start_install(self): | ||
629 | 218 | self._start_pane(InstallProgress(self)) | ||
630 | 219 | |||
631 | 220 | def start_error(self, is_update_error, header, desc): | 249 | def start_error(self, is_update_error, header, desc): |
632 | 221 | if is_update_error: | 250 | if is_update_error: |
633 | 222 | self._start_pane(UpdateErrorDialog(self, header, desc)) | 251 | self._start_pane(UpdateErrorDialog(self, header, desc)) |
634 | 223 | else: | 252 | else: |
635 | 224 | self._start_pane(ErrorDialog(self, header, desc)) | 253 | self._start_pane(ErrorDialog(self, header, desc)) |
636 | 225 | 254 | ||
637 | 226 | def _start_pane(self, pane): | ||
638 | 227 | self._look_busy() | ||
639 | 228 | pane.main() | ||
640 | 229 | |||
641 | 230 | def _look_busy(self): | 255 | def _look_busy(self): |
642 | 231 | self.set_sensitive(False) | 256 | self.set_sensitive(False) |
643 | 232 | if self.get_window() is not None: | 257 | if self.get_window() is not None: |
644 | 233 | self.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH)) | 258 | self.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH)) |
645 | 234 | 259 | ||
646 | 260 | def _look_ready(self): | ||
647 | 261 | self.set_sensitive(True) | ||
648 | 262 | if self.get_window() is not None: | ||
649 | 263 | self.get_window().set_cursor(None) | ||
650 | 264 | self.get_window().set_functions(Gdk.WMFunction.ALL) | ||
651 | 265 | |||
652 | 235 | def _check_meta_release(self): | 266 | def _check_meta_release(self): |
653 | 236 | if self.meta_release is None: | 267 | if self.meta_release is None: |
654 | 237 | return None | 268 | return None |
655 | 238 | 269 | ||
656 | === removed file 'UpdateManager/UpdateProgress.py' | |||
657 | --- UpdateManager/UpdateProgress.py 2012-12-13 20:39:37 +0000 | |||
658 | +++ UpdateManager/UpdateProgress.py 1970-01-01 00:00:00 +0000 | |||
659 | @@ -1,81 +0,0 @@ | |||
660 | 1 | # UpdateProgress.py | ||
661 | 2 | # -*- Mode: Python; indent-tabs-mode: nil; tab-width: 4; coding: utf-8 -*- | ||
662 | 3 | # | ||
663 | 4 | # Copyright (c) 2004-2012 Canonical | ||
664 | 5 | # 2004 Michiel Sikkes | ||
665 | 6 | # 2005 Martin Willemoes Hansen | ||
666 | 7 | # 2010 Mohamed Amine IL Idrissi | ||
667 | 8 | # | ||
668 | 9 | # Author: Michiel Sikkes <michiel@eyesopened.nl> | ||
669 | 10 | # Michael Vogt <mvo@debian.org> | ||
670 | 11 | # Martin Willemoes Hansen <mwh@sysrq.dk> | ||
671 | 12 | # Mohamed Amine IL Idrissi <ilidrissiamine@gmail.com> | ||
672 | 13 | # Alex Launi <alex.launi@canonical.com> | ||
673 | 14 | # Michael Terry <michael.terry@canonical.com> | ||
674 | 15 | # | ||
675 | 16 | # This program is free software; you can redistribute it and/or | ||
676 | 17 | # modify it under the terms of the GNU General Public License as | ||
677 | 18 | # published by the Free Software Foundation; either version 2 of the | ||
678 | 19 | # License, or (at your option) any later version. | ||
679 | 20 | # | ||
680 | 21 | # This program is distributed in the hope that it will be useful, | ||
681 | 22 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
682 | 23 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
683 | 24 | # GNU General Public License for more details. | ||
684 | 25 | # | ||
685 | 26 | # You should have received a copy of the GNU General Public License | ||
686 | 27 | # along with this program; if not, write to the Free Software | ||
687 | 28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
688 | 29 | # USA | ||
689 | 30 | |||
690 | 31 | from __future__ import absolute_import, print_function | ||
691 | 32 | |||
692 | 33 | import warnings | ||
693 | 34 | warnings.filterwarnings("ignore", "Accessed deprecated property", | ||
694 | 35 | DeprecationWarning) | ||
695 | 36 | |||
696 | 37 | import os | ||
697 | 38 | |||
698 | 39 | from .backend import get_backend | ||
699 | 40 | |||
700 | 41 | from .Core.utils import inhibit_sleep, allow_sleep | ||
701 | 42 | |||
702 | 43 | |||
703 | 44 | class UpdateProgress(object): | ||
704 | 45 | |||
705 | 46 | def __init__(self, app): | ||
706 | 47 | self.window_main = app | ||
707 | 48 | self.datadir = app.datadir | ||
708 | 49 | self.options = app.options | ||
709 | 50 | |||
710 | 51 | # Used for inhibiting power management | ||
711 | 52 | self.sleep_cookie = None | ||
712 | 53 | self.sleep_dev = None | ||
713 | 54 | |||
714 | 55 | # get the install backend | ||
715 | 56 | self.install_backend = get_backend(self.datadir, self.window_main) | ||
716 | 57 | self.install_backend.connect("action-done", self._on_backend_done) | ||
717 | 58 | |||
718 | 59 | def invoke_manager(self): | ||
719 | 60 | # don't display apt-listchanges | ||
720 | 61 | os.environ["APT_LISTCHANGES_FRONTEND"] = "none" | ||
721 | 62 | |||
722 | 63 | # Do not suspend during the update process | ||
723 | 64 | (self.sleep_dev, self.sleep_cookie) = inhibit_sleep() | ||
724 | 65 | |||
725 | 66 | self.install_backend.update() | ||
726 | 67 | |||
727 | 68 | def _on_backend_done(self, backend, action, authorized, success, | ||
728 | 69 | error_string, error_desc): | ||
729 | 70 | # Allow suspend after synaptic is finished | ||
730 | 71 | if self.sleep_cookie: | ||
731 | 72 | allow_sleep(self.sleep_dev, self.sleep_cookie) | ||
732 | 73 | self.sleep_cookie = self.sleep_dev = None | ||
733 | 74 | |||
734 | 75 | if error_string: | ||
735 | 76 | self.window_main.start_error(True, error_string, error_desc) | ||
736 | 77 | else: | ||
737 | 78 | self.window_main.start_available(not success) | ||
738 | 79 | |||
739 | 80 | def main(self): | ||
740 | 81 | self.invoke_manager() | ||
741 | 82 | 0 | ||
742 | === modified file 'UpdateManager/UpdatesAvailable.py' | |||
743 | --- UpdateManager/UpdatesAvailable.py 2013-03-05 18:02:34 +0000 | |||
744 | +++ UpdateManager/UpdatesAvailable.py 2013-05-21 05:43:25 +0000 | |||
745 | @@ -48,22 +48,20 @@ | |||
746 | 48 | import os | 48 | import os |
747 | 49 | import re | 49 | import re |
748 | 50 | import logging | 50 | import logging |
749 | 51 | import subprocess | ||
750 | 52 | import time | 51 | import time |
751 | 53 | import threading | 52 | import threading |
752 | 54 | 53 | ||
753 | 55 | from gettext import gettext as _ | 54 | from gettext import gettext as _ |
754 | 56 | from gettext import ngettext | 55 | from gettext import ngettext |
755 | 57 | 56 | ||
756 | 58 | |||
757 | 59 | from .Core.utils import humanize_size | 57 | from .Core.utils import humanize_size |
758 | 60 | from .Core.AlertWatcher import AlertWatcher | 58 | from .Core.AlertWatcher import AlertWatcher |
759 | 61 | from .Core.UpdateList import UpdateSystemGroup | 59 | from .Core.UpdateList import UpdateSystemGroup |
760 | 60 | from .Dialogs import InternalDialog | ||
761 | 62 | 61 | ||
762 | 63 | from DistUpgrade.DistUpgradeCache import NotEnoughFreeSpaceError | 62 | from DistUpgrade.DistUpgradeCache import NotEnoughFreeSpaceError |
763 | 64 | 63 | ||
764 | 65 | from .ChangelogViewer import ChangelogViewer | 64 | from .ChangelogViewer import ChangelogViewer |
765 | 66 | from .SimpleGtkbuilderApp import SimpleGtkbuilderApp | ||
766 | 67 | from .UnitySupport import UnitySupport | 65 | from .UnitySupport import UnitySupport |
767 | 68 | 66 | ||
768 | 69 | 67 | ||
769 | @@ -205,40 +203,52 @@ | |||
770 | 205 | return cell_start | 203 | return cell_start |
771 | 206 | 204 | ||
772 | 207 | 205 | ||
774 | 208 | class UpdatesAvailable(SimpleGtkbuilderApp): | 206 | class UpdatesAvailable(InternalDialog): |
775 | 209 | APP_INSTALL_ICONS_PATH = "/usr/share/app-install/icons" | 207 | APP_INSTALL_ICONS_PATH = "/usr/share/app-install/icons" |
776 | 210 | 208 | ||
787 | 211 | def __init__(self, app, header=None, desc=None): | 209 | def __init__(self, window_main, header=None, desc=None): |
788 | 212 | self.window_main = app | 210 | InternalDialog.__init__(self, window_main) |
789 | 213 | self.datadir = app.datadir | 211 | |
790 | 214 | self.options = app.options | 212 | self.window_main = window_main |
791 | 215 | self.cache = app.cache | 213 | self.datadir = window_main.datadir |
792 | 216 | self.list = app.update_list | 214 | self.cache = window_main.cache |
793 | 217 | SimpleGtkbuilderApp.__init__( | 215 | |
794 | 218 | self, | 216 | self.custom_header = header |
795 | 219 | self.datadir + "/gtkbuilder/UpdateManager.ui", | 217 | self.custom_desc = desc |
796 | 220 | "update-manager") | 218 | |
797 | 219 | content_ui_path = os.path.join(self.datadir, "gtkbuilder/UpdateManager.ui") | ||
798 | 220 | self._load_ui(content_ui_path, "pane_updates_available") | ||
799 | 221 | self.set_content_widget(self.pane_updates_available) | ||
800 | 222 | |||
801 | 223 | self.dl_size = 0 | ||
802 | 224 | self.connected = True | ||
803 | 221 | 225 | ||
804 | 222 | # Used for inhibiting power management | 226 | # Used for inhibiting power management |
805 | 223 | self.sleep_cookie = None | 227 | self.sleep_cookie = None |
806 | 224 | self.sleep_dev = None | 228 | self.sleep_dev = None |
807 | 225 | 229 | ||
808 | 226 | # workaround for LP: #945536 | ||
809 | 227 | self.clearing_store = False | ||
810 | 228 | |||
811 | 229 | self.custom_header = header | ||
812 | 230 | self.custom_desc = desc | ||
813 | 231 | |||
814 | 232 | self.button_close.grab_focus() | ||
815 | 233 | self.dl_size = 0 | ||
816 | 234 | self.connected = True | ||
817 | 235 | |||
818 | 236 | self.settings = Gio.Settings("com.ubuntu.update-manager") | 230 | self.settings = Gio.Settings("com.ubuntu.update-manager") |
819 | 237 | 231 | ||
820 | 238 | # Special icon theme for looking up app-install-data icons | 232 | # Special icon theme for looking up app-install-data icons |
821 | 239 | self.app_icons = Gtk.IconTheme() | 233 | self.app_icons = Gtk.IconTheme() |
822 | 240 | self.app_icons.append_search_path(self.APP_INSTALL_ICONS_PATH) | 234 | self.app_icons.append_search_path(self.APP_INSTALL_ICONS_PATH) |
823 | 241 | 235 | ||
824 | 236 | # Create Unity launcher quicklist | ||
825 | 237 | # FIXME: instead of passing parent we really should just send signals | ||
826 | 238 | self.unity = UnitySupport(parent=self) | ||
827 | 239 | |||
828 | 240 | # setup the help viewer and disable the help button if there | ||
829 | 241 | # is no viewer available | ||
830 | 242 | #self.help_viewer = HelpViewer("update-manager") | ||
831 | 243 | #if self.help_viewer.check() == False: | ||
832 | 244 | # self.button_help.set_sensitive(False) | ||
833 | 245 | |||
834 | 246 | self.add_settings_button() | ||
835 | 247 | self.button_close = self.add_button(Gtk.STOCK_CANCEL, self.window_main.close) | ||
836 | 248 | self.button_install = self.add_button(_("Install Now"), | ||
837 | 249 | self.on_button_install_clicked) | ||
838 | 250 | self.focus_button = self.button_install | ||
839 | 251 | |||
840 | 242 | # create text view | 252 | # create text view |
841 | 243 | self.textview_changes = ChangelogViewer() | 253 | self.textview_changes = ChangelogViewer() |
842 | 244 | self.textview_changes.show() | 254 | self.textview_changes.show() |
843 | @@ -246,27 +256,9 @@ | |||
844 | 246 | changes_buffer = self.textview_changes.get_buffer() | 256 | changes_buffer = self.textview_changes.get_buffer() |
845 | 247 | changes_buffer.create_tag("versiontag", weight=Pango.Weight.BOLD) | 257 | changes_buffer.create_tag("versiontag", weight=Pango.Weight.BOLD) |
846 | 248 | 258 | ||
847 | 249 | # expander | ||
848 | 250 | self.expander_details.set_expanded( | ||
849 | 251 | self.settings.get_boolean("show-details")) | ||
850 | 252 | self.expander_details.connect("activate", self.pre_activate_details) | ||
851 | 253 | self.expander_details.connect("notify::expanded", | ||
852 | 254 | self.activate_details) | ||
853 | 255 | self.expander_desc.connect("notify::expanded", self.activate_desc) | ||
854 | 256 | |||
855 | 257 | # useful exit stuff | ||
856 | 258 | self.button_close.connect("clicked", lambda w: self.window_main.exit()) | ||
857 | 259 | |||
858 | 260 | # If auto-updates are on, change cancel label | ||
859 | 261 | self.notifier_settings = Gio.Settings("com.ubuntu.update-notifier") | ||
860 | 262 | self.notifier_settings.connect( | ||
861 | 263 | "changed::auto-launch", | ||
862 | 264 | lambda s, p: self.update_close_button()) | ||
863 | 265 | self.update_close_button() | ||
864 | 266 | |||
865 | 267 | # the treeview (move into it's own code!) | 259 | # the treeview (move into it's own code!) |
866 | 268 | self.store = Gtk.TreeStore(str, GObject.TYPE_PYOBJECT, str, bool) | 260 | self.store = Gtk.TreeStore(str, GObject.TYPE_PYOBJECT, str, bool) |
868 | 269 | self.treeview_update.set_model(self.store) | 261 | self.treeview_update.set_model(None) |
869 | 270 | 262 | ||
870 | 271 | restart_icon_renderer = Gtk.CellRendererPixbuf() | 263 | restart_icon_renderer = Gtk.CellRendererPixbuf() |
871 | 272 | restart_icon_renderer.set_property("xpad", 4) | 264 | restart_icon_renderer.set_property("xpad", 4) |
872 | @@ -280,9 +272,9 @@ | |||
873 | 280 | restart_column.set_cell_data_func(restart_icon_renderer, | 272 | restart_column.set_cell_data_func(restart_icon_renderer, |
874 | 281 | self.restart_icon_renderer_data_func) | 273 | self.restart_icon_renderer_data_func) |
875 | 282 | 274 | ||
879 | 283 | pkg_area = CellAreaPackage(bool(self.list.security_groups)) | 275 | self.pkg_cell_area = CellAreaPackage(False) |
880 | 284 | pkg_column = Gtk.TreeViewColumn.new_with_area(pkg_area) | 276 | pkg_column = Gtk.TreeViewColumn.new_with_area(self.pkg_cell_area) |
881 | 285 | pkg_area.column = pkg_column | 277 | self.pkg_cell_area.column = pkg_column |
882 | 286 | pkg_column.set_title(_("Install")) | 278 | pkg_column.set_title(_("Install")) |
883 | 287 | pkg_column.set_property("spacing", 4) | 279 | pkg_column.set_property("spacing", 4) |
884 | 288 | pkg_column.set_expand(True) | 280 | pkg_column.set_expand(True) |
885 | @@ -331,24 +323,26 @@ | |||
886 | 331 | self.treeview_update.connect("button-press-event", | 323 | self.treeview_update.connect("button-press-event", |
887 | 332 | self.on_treeview_button_press) | 324 | self.on_treeview_button_press) |
888 | 333 | 325 | ||
889 | 334 | # setup the help viewer and disable the help button if there | ||
890 | 335 | # is no viewer available | ||
891 | 336 | #self.help_viewer = HelpViewer("update-manager") | ||
892 | 337 | #if self.help_viewer.check() == False: | ||
893 | 338 | # self.button_help.set_sensitive(False) | ||
894 | 339 | |||
895 | 340 | if not os.path.exists("/usr/bin/software-properties-gtk"): | ||
896 | 341 | self.button_settings.set_sensitive(False) | ||
897 | 342 | |||
898 | 343 | # init show version | 326 | # init show version |
899 | 344 | self.show_versions = self.settings.get_boolean("show-versions") | 327 | self.show_versions = self.settings.get_boolean("show-versions") |
900 | 345 | # init summary_before_name | 328 | # init summary_before_name |
901 | 346 | self.summary_before_name = self.settings.get_boolean( | 329 | self.summary_before_name = self.settings.get_boolean( |
902 | 347 | "summary-before-name") | 330 | "summary-before-name") |
903 | 348 | 331 | ||
907 | 349 | # Create Unity launcher quicklist | 332 | # expander |
908 | 350 | # FIXME: instead of passing parent we really should just send signals | 333 | self.expander_details.set_expanded( |
909 | 351 | self.unity = UnitySupport(parent=self) | 334 | self.settings.get_boolean("show-details")) |
910 | 335 | self.expander_details.connect("activate", self.pre_activate_details) | ||
911 | 336 | self.expander_details.connect("notify::expanded", | ||
912 | 337 | self.activate_details) | ||
913 | 338 | self.expander_desc.connect("notify::expanded", self.activate_desc) | ||
914 | 339 | |||
915 | 340 | # If auto-updates are on, change cancel label | ||
916 | 341 | self.notifier_settings = Gio.Settings("com.ubuntu.update-notifier") | ||
917 | 342 | self.notifier_settings.connect( | ||
918 | 343 | "changed::auto-launch", | ||
919 | 344 | lambda s, p: self.update_close_button()) | ||
920 | 345 | self.update_close_button() | ||
921 | 352 | 346 | ||
922 | 353 | # Alert watcher | 347 | # Alert watcher |
923 | 354 | self.alert_watcher = AlertWatcher() | 348 | self.alert_watcher = AlertWatcher() |
924 | @@ -357,6 +351,16 @@ | |||
925 | 357 | self.alert_watcher.connect("network-3g-alert", | 351 | self.alert_watcher.connect("network-3g-alert", |
926 | 358 | self._on_network_3g_alert) | 352 | self._on_network_3g_alert) |
927 | 359 | 353 | ||
928 | 354 | def stop(self): | ||
929 | 355 | InternalDialog.stop(self) | ||
930 | 356 | self._save_state() | ||
931 | 357 | |||
932 | 358 | def start(self): | ||
933 | 359 | InternalDialog.start(self) | ||
934 | 360 | self.set_update_list(self.window_main.update_list) | ||
935 | 361 | self.alert_watcher.check_alert_state() | ||
936 | 362 | self._restore_state() | ||
937 | 363 | |||
938 | 360 | def is_auto_update(self): | 364 | def is_auto_update(self): |
939 | 361 | update_days = apt_pkg.config.find_i( | 365 | update_days = apt_pkg.config.find_i( |
940 | 362 | "APT::Periodic::Update-Package-Lists") | 366 | "APT::Periodic::Update-Package-Lists") |
941 | @@ -378,22 +382,25 @@ | |||
942 | 378 | self.on_button_install_clicked(None) | 382 | self.on_button_install_clicked(None) |
943 | 379 | 383 | ||
944 | 380 | def restart_icon_renderer_data_func(self, cell_layout, renderer, model, | 384 | def restart_icon_renderer_data_func(self, cell_layout, renderer, model, |
946 | 381 | iter, data): | 385 | iter, user_data): |
947 | 382 | def pkg_requires_restart(pkg): | 386 | def pkg_requires_restart(pkg): |
949 | 383 | restart_condition = pkg.candidate.record.get('XB-Restart-Required') | 387 | if pkg is None or pkg.candidate is None: |
950 | 388 | return False | ||
951 | 389 | restart_condition = pkg.candidate.record.get( | ||
952 | 390 | 'XB-Restart-Required') | ||
953 | 384 | return restart_condition == 'system' | 391 | return restart_condition == 'system' |
954 | 385 | 392 | ||
955 | 386 | data = model.get_value(iter, LIST_UPDATE_DATA) | 393 | data = model.get_value(iter, LIST_UPDATE_DATA) |
956 | 387 | path = model.get_path(iter) | 394 | path = model.get_path(iter) |
957 | 388 | 395 | ||
958 | 389 | requires_restart = False | 396 | requires_restart = False |
960 | 390 | if data.item: | 397 | if data.item and data.item.pkg: |
961 | 391 | requires_restart = pkg_requires_restart(data.item.pkg) | 398 | requires_restart = pkg_requires_restart(data.item.pkg) |
962 | 392 | elif data.group: | 399 | elif data.group: |
963 | 393 | if not self.treeview_update.row_expanded(path): | 400 | if not self.treeview_update.row_expanded(path): |
964 | 394 | # A package in the group requires restart | 401 | # A package in the group requires restart |
965 | 395 | for group_item in data.group.items: | 402 | for group_item in data.group.items: |
967 | 396 | if pkg_requires_restart(group_item.pkg): | 403 | if group_item.pkg and pkg_requires_restart(group_item.pkg): |
968 | 397 | requires_restart = True | 404 | requires_restart = True |
969 | 398 | break | 405 | break |
970 | 399 | 406 | ||
971 | @@ -408,8 +415,8 @@ | |||
972 | 408 | gicon = None | 415 | gicon = None |
973 | 409 | renderer.set_property("gicon", gicon) | 416 | renderer.set_property("gicon", gicon) |
974 | 410 | 417 | ||
977 | 411 | def pkg_toggle_renderer_data_func(self, cell_layout, renderer, model, iter, | 418 | def pkg_toggle_renderer_data_func(self, cell_layout, renderer, model, |
978 | 412 | data): | 419 | iter, user_data): |
979 | 413 | data = model.get_value(iter, LIST_UPDATE_DATA) | 420 | data = model.get_value(iter, LIST_UPDATE_DATA) |
980 | 414 | 421 | ||
981 | 415 | activatable = False | 422 | activatable = False |
982 | @@ -439,8 +446,8 @@ | |||
983 | 439 | renderer.set_property("activatable", activatable) | 446 | renderer.set_property("activatable", activatable) |
984 | 440 | renderer.set_property("inconsistent", inconsistent) | 447 | renderer.set_property("inconsistent", inconsistent) |
985 | 441 | 448 | ||
988 | 442 | def pkg_icon_renderer_data_func(self, cell_layout, renderer, model, iter, | 449 | def pkg_icon_renderer_data_func(self, cell_layout, renderer, model, |
989 | 443 | data): | 450 | iter, user_data): |
990 | 444 | data = model.get_value(iter, LIST_UPDATE_DATA) | 451 | data = model.get_value(iter, LIST_UPDATE_DATA) |
991 | 445 | 452 | ||
992 | 446 | gicon = None | 453 | gicon = None |
993 | @@ -466,8 +473,8 @@ | |||
994 | 466 | else: | 473 | else: |
995 | 467 | return icon # Assume it's in one of the user's themes | 474 | return icon # Assume it's in one of the user's themes |
996 | 468 | 475 | ||
999 | 469 | def pkg_label_renderer_data_func(self, cell_layout, renderer, model, iter, | 476 | def pkg_label_renderer_data_func(self, cell_layout, renderer, model, |
1000 | 470 | data): | 477 | iter, user_data): |
1001 | 471 | data = model.get_value(iter, LIST_UPDATE_DATA) | 478 | data = model.get_value(iter, LIST_UPDATE_DATA) |
1002 | 472 | name = GLib.markup_escape_text(model.get_value(iter, LIST_NAME)) | 479 | name = GLib.markup_escape_text(model.get_value(iter, LIST_NAME)) |
1003 | 473 | 480 | ||
1004 | @@ -742,6 +749,9 @@ | |||
1005 | 742 | 749 | ||
1006 | 743 | if self.custom_header is not None: | 750 | if self.custom_header is not None: |
1007 | 744 | text_header = self.custom_header | 751 | text_header = self.custom_header |
1008 | 752 | if self.custom_desc is not None: | ||
1009 | 753 | text_desc = self.custom_desc | ||
1010 | 754 | |||
1011 | 745 | # show different text on first run (UX team suggestion) | 755 | # show different text on first run (UX team suggestion) |
1012 | 746 | elif self.settings.get_boolean("first-run"): | 756 | elif self.settings.get_boolean("first-run"): |
1013 | 747 | flavor = self.window_main.meta_release.flavor_name | 757 | flavor = self.window_main.meta_release.flavor_name |
1014 | @@ -754,19 +764,10 @@ | |||
1015 | 754 | text_header = _("Updated software is available for this " | 764 | text_header = _("Updated software is available for this " |
1016 | 755 | "computer. Do you want to install it now?") | 765 | "computer. Do you want to install it now?") |
1017 | 756 | 766 | ||
1018 | 757 | if self.custom_desc is not None: | ||
1019 | 758 | text_desc = self.custom_desc | ||
1020 | 759 | |||
1021 | 760 | self.notebook_details.set_sensitive(True) | 767 | self.notebook_details.set_sensitive(True) |
1022 | 761 | self.treeview_update.set_sensitive(True) | 768 | self.treeview_update.set_sensitive(True) |
1031 | 762 | self.button_install.grab_default() | 769 | self.set_header(text_header) |
1032 | 763 | self.label_header.set_label(text_header) | 770 | self.set_desc(text_desc) |
1025 | 764 | |||
1026 | 765 | if text_desc is not None: | ||
1027 | 766 | self.label_desc.set_label(text_desc) | ||
1028 | 767 | self.label_desc.show() | ||
1029 | 768 | else: | ||
1030 | 769 | self.label_desc.hide() | ||
1033 | 770 | 771 | ||
1034 | 771 | return True | 772 | return True |
1035 | 772 | 773 | ||
1036 | @@ -774,47 +775,20 @@ | |||
1037 | 774 | def pre_activate_details(self, expander): | 775 | def pre_activate_details(self, expander): |
1038 | 775 | expanded = self.expander_details.get_expanded() | 776 | expanded = self.expander_details.get_expanded() |
1039 | 776 | if expanded: | 777 | if expanded: |
1041 | 777 | self.save_state() | 778 | self._save_state() |
1042 | 778 | 779 | ||
1043 | 779 | def activate_details(self, expander, data): | 780 | def activate_details(self, expander, data): |
1044 | 780 | expanded = self.expander_details.get_expanded() | 781 | expanded = self.expander_details.get_expanded() |
1045 | 781 | self.settings.set_boolean("show-details", expanded) | 782 | self.settings.set_boolean("show-details", expanded) |
1046 | 782 | if expanded: | 783 | if expanded: |
1047 | 783 | self.on_treeview_update_cursor_changed(self.treeview_update) | 784 | self.on_treeview_update_cursor_changed(self.treeview_update) |
1049 | 784 | self.restore_state() | 785 | self._restore_state() |
1050 | 785 | 786 | ||
1051 | 786 | def activate_desc(self, expander, data): | 787 | def activate_desc(self, expander, data): |
1052 | 787 | expanded = self.expander_desc.get_expanded() | 788 | expanded = self.expander_desc.get_expanded() |
1053 | 788 | self.expander_desc.set_vexpand(expanded) | 789 | self.expander_desc.set_vexpand(expanded) |
1054 | 789 | 790 | ||
1083 | 790 | #def on_button_help_clicked(self, widget): | 791 | def on_button_install_clicked(self): |
1056 | 791 | # self.help_viewer.run() | ||
1057 | 792 | |||
1058 | 793 | def on_button_settings_clicked(self, widget): | ||
1059 | 794 | #print("on_button_settings_clicked") | ||
1060 | 795 | try: | ||
1061 | 796 | apt_pkg.pkgsystem_unlock() | ||
1062 | 797 | except SystemError: | ||
1063 | 798 | pass | ||
1064 | 799 | cmd = ["/usr/bin/software-properties-gtk", | ||
1065 | 800 | "--open-tab", "2", | ||
1066 | 801 | # FIXME: once get_xid() is available via introspections, add | ||
1067 | 802 | # this back | ||
1068 | 803 | #"--toplevel", "%s" % self.window_main.get_window().get_xid() | ||
1069 | 804 | ] | ||
1070 | 805 | self.window_main.set_sensitive(False) | ||
1071 | 806 | p = subprocess.Popen(cmd) | ||
1072 | 807 | while p.poll() is None: | ||
1073 | 808 | while Gtk.events_pending(): | ||
1074 | 809 | Gtk.main_iteration() | ||
1075 | 810 | time.sleep(0.05) | ||
1076 | 811 | apt_pkg.init_config() | ||
1077 | 812 | self.window_main.refresh_cache() | ||
1078 | 813 | self.fillstore() | ||
1079 | 814 | self.update_close_button() | ||
1080 | 815 | self.window_main.set_sensitive(True) | ||
1081 | 816 | |||
1082 | 817 | def on_button_install_clicked(self, widget): | ||
1084 | 818 | self.unity.set_install_menuitem_visible(False) | 792 | self.unity.set_install_menuitem_visible(False) |
1085 | 819 | #print("on_button_install_clicked") | 793 | #print("on_button_install_clicked") |
1086 | 820 | err_sum = _("Not enough free disk space") | 794 | err_sum = _("Not enough free disk space") |
1087 | @@ -930,24 +904,22 @@ | |||
1088 | 930 | del actiongroup | 904 | del actiongroup |
1089 | 931 | self.setBusy(False) | 905 | self.setBusy(False) |
1090 | 932 | 906 | ||
1092 | 933 | def save_state(self): | 907 | def _save_state(self): |
1093 | 934 | """ save the state (window-size for now) """ | 908 | """ save the state (window-size for now) """ |
1094 | 935 | if self.expander_details.get_expanded(): | 909 | if self.expander_details.get_expanded(): |
1095 | 936 | (w, h) = self.window_main.get_size() | 910 | (w, h) = self.window_main.get_size() |
1096 | 937 | self.settings.set_int("window-width", w) | 911 | self.settings.set_int("window-width", w) |
1097 | 938 | self.settings.set_int("window-height", h) | 912 | self.settings.set_int("window-height", h) |
1098 | 939 | 913 | ||
1100 | 940 | def restore_state(self): | 914 | def _restore_state(self): |
1101 | 941 | """ restore the state (window-size for now) """ | 915 | """ restore the state (window-size for now) """ |
1102 | 942 | w = self.settings.get_int("window-width") | 916 | w = self.settings.get_int("window-width") |
1103 | 943 | h = self.settings.get_int("window-height") | 917 | h = self.settings.get_int("window-height") |
1104 | 944 | expanded = self.expander_details.get_expanded() | 918 | expanded = self.expander_details.get_expanded() |
1111 | 945 | self.window_main.set_resizable(expanded) | 919 | if expanded: |
1112 | 946 | if w > 0 and h > 0 and expanded: | 920 | self.window_main.begin_user_resizable(w, h) |
1113 | 947 | # There is a race here. If we immediately resize, it often doesn't | 921 | else: |
1114 | 948 | # take. Using idle_add helps, but we *still* occasionally don't | 922 | self.window_main.end_user_resizable() |
1109 | 949 | # restore the size correctly. Help needed to track this down! | ||
1110 | 950 | GLib.idle_add(lambda: self.window_main.resize(w, h)) | ||
1115 | 951 | return False | 923 | return False |
1116 | 952 | 924 | ||
1117 | 953 | def _add_header(self, name, groups): | 925 | def _add_header(self, name, groups): |
1118 | @@ -996,7 +968,9 @@ | |||
1119 | 996 | ] | 968 | ] |
1120 | 997 | self.store.append(group_iter, item_row) | 969 | self.store.append(group_iter, item_row) |
1121 | 998 | 970 | ||
1123 | 999 | def fillstore(self): | 971 | def set_update_list(self, update_list): |
1124 | 972 | self.list = update_list | ||
1125 | 973 | |||
1126 | 1000 | # use the watch cursor | 974 | # use the watch cursor |
1127 | 1001 | self.setBusy(True) | 975 | self.setBusy(True) |
1128 | 1002 | # disconnect the view first | 976 | # disconnect the view first |
1129 | @@ -1017,14 +991,11 @@ | |||
1130 | 1017 | self._add_groups(self.list.update_groups) | 991 | self._add_groups(self.list.update_groups) |
1131 | 1018 | 992 | ||
1132 | 1019 | self.treeview_update.set_model(self.store) | 993 | self.treeview_update.set_model(self.store) |
1133 | 994 | self.pkg_cell_area.indent_toplevel = bool(self.list.security_groups) | ||
1134 | 995 | self.update_close_button() | ||
1135 | 1020 | self.update_count() | 996 | self.update_count() |
1136 | 1021 | self.setBusy(False) | 997 | self.setBusy(False) |
1137 | 1022 | while Gtk.events_pending(): | 998 | while Gtk.events_pending(): |
1138 | 1023 | Gtk.main_iteration() | 999 | Gtk.main_iteration() |
1139 | 1024 | self.updates_changed() | 1000 | self.updates_changed() |
1140 | 1025 | return False | 1001 | return False |
1141 | 1026 | |||
1142 | 1027 | def main(self): | ||
1143 | 1028 | self.window_main.push(self.pane_updates_available, self) | ||
1144 | 1029 | self.fillstore() | ||
1145 | 1030 | self.alert_watcher.check_alert_state() | ||
1146 | 1031 | 1002 | ||
1147 | === modified file 'UpdateManager/backend/InstallBackendAptdaemon.py' | |||
1148 | --- UpdateManager/backend/InstallBackendAptdaemon.py 2013-02-06 21:12:16 +0000 | |||
1149 | +++ UpdateManager/backend/InstallBackendAptdaemon.py 2013-05-21 05:43:25 +0000 | |||
1150 | @@ -24,20 +24,25 @@ | |||
1151 | 24 | 24 | ||
1152 | 25 | from UpdateManager.backend import InstallBackend | 25 | from UpdateManager.backend import InstallBackend |
1153 | 26 | from UpdateManager.UnitySupport import UnitySupport | 26 | from UpdateManager.UnitySupport import UnitySupport |
1154 | 27 | from UpdateManager.Dialogs import BuilderDialog | ||
1155 | 27 | 28 | ||
1156 | 28 | from gettext import gettext as _ | 29 | from gettext import gettext as _ |
1157 | 29 | 30 | ||
1158 | 30 | import apt | 31 | import apt |
1159 | 31 | import dbus | 32 | import dbus |
1165 | 32 | import sys | 33 | import os |
1166 | 33 | 34 | ||
1167 | 34 | 35 | ||
1168 | 35 | class InstallBackendAptdaemon(InstallBackend): | 36 | class InstallBackendAptdaemon(InstallBackend, BuilderDialog): |
1164 | 36 | |||
1169 | 37 | """Makes use of aptdaemon to refresh the cache and to install updates.""" | 37 | """Makes use of aptdaemon to refresh the cache and to install updates.""" |
1170 | 38 | 38 | ||
1173 | 39 | def __init__(self, datadir, window_main): | 39 | def __init__(self, window_main, action): |
1174 | 40 | InstallBackend.__init__(self, datadir, window_main) | 40 | InstallBackend.__init__(self, window_main, action) |
1175 | 41 | ui_path = os.path.join(window_main.datadir, | ||
1176 | 42 | "gtkbuilder/UpdateProgress.ui") | ||
1177 | 43 | BuilderDialog.__init__(self, window_main, ui_path, | ||
1178 | 44 | "pane_update_progress") | ||
1179 | 45 | |||
1180 | 41 | self.client = client.AptClient() | 46 | self.client = client.AptClient() |
1181 | 42 | self.unity = UnitySupport() | 47 | self.unity = UnitySupport() |
1182 | 43 | self._expanded_size = None | 48 | self._expanded_size = None |
1183 | @@ -59,17 +64,20 @@ | |||
1184 | 59 | pass | 64 | pass |
1185 | 60 | try: | 65 | try: |
1186 | 61 | trans = yield self.client.update_cache(defer=True) | 66 | trans = yield self.client.update_cache(defer=True) |
1190 | 62 | yield self._run_in_dialog(trans, self.UPDATE, | 67 | yield self._show_transaction(trans, self.ACTION_UPDATE, |
1191 | 63 | _("Checking for updates…"), | 68 | _("Checking for updates…"), False) |
1189 | 64 | False, False) | ||
1192 | 65 | except errors.NotAuthorizedError: | 69 | except errors.NotAuthorizedError: |
1194 | 66 | self.emit("action-done", self.UPDATE, False, False, None, None) | 70 | self._action_done(self.ACTION_UPDATE, |
1195 | 71 | authorized=False, success=False, | ||
1196 | 72 | error_string=None, error_desc=None) | ||
1197 | 67 | except: | 73 | except: |
1199 | 68 | self.emit("action-done", self.UPDATE, True, False, None, None) | 74 | self._action_done(self.ACTION_UPDATE, |
1200 | 75 | authorized=True, success=False, | ||
1201 | 76 | error_string=None, error_desc=None) | ||
1202 | 69 | raise | 77 | raise |
1203 | 70 | 78 | ||
1204 | 71 | @inline_callbacks | 79 | @inline_callbacks |
1206 | 72 | def commit(self, pkgs_install, pkgs_upgrade, close_on_done): | 80 | def commit(self, pkgs_install, pkgs_upgrade): |
1207 | 73 | """Commit a list of package adds and removes""" | 81 | """Commit a list of package adds and removes""" |
1208 | 74 | try: | 82 | try: |
1209 | 75 | apt.apt_pkg.pkgsystem_unlock() | 83 | apt.apt_pkg.pkgsystem_unlock() |
1210 | @@ -81,18 +89,23 @@ | |||
1211 | 81 | pkgs_install, reinstall, remove, purge, pkgs_upgrade, | 89 | pkgs_install, reinstall, remove, purge, pkgs_upgrade, |
1212 | 82 | downgrade, defer=True) | 90 | downgrade, defer=True) |
1213 | 83 | trans.connect("progress-changed", self._on_progress_changed) | 91 | trans.connect("progress-changed", self._on_progress_changed) |
1217 | 84 | yield self._run_in_dialog(trans, self.INSTALL, | 92 | yield self._show_transaction(trans, self.ACTION_INSTALL, |
1218 | 85 | _("Installing updates…"), | 93 | _("Installing updates…"), True) |
1216 | 86 | True, close_on_done) | ||
1219 | 87 | except errors.NotAuthorizedError as e: | 94 | except errors.NotAuthorizedError as e: |
1221 | 88 | self.emit("action-done", self.INSTALL, False, False, None, None) | 95 | self._action_done(self.ACTION_INSTALL, |
1222 | 96 | authorized=False, success=False, | ||
1223 | 97 | error_string=None, error_desc=None) | ||
1224 | 89 | except dbus.DBusException as e: | 98 | except dbus.DBusException as e: |
1225 | 90 | #print(e, e.get_dbus_name()) | 99 | #print(e, e.get_dbus_name()) |
1226 | 91 | if e.get_dbus_name() != "org.freedesktop.DBus.Error.NoReply": | 100 | if e.get_dbus_name() != "org.freedesktop.DBus.Error.NoReply": |
1227 | 92 | raise | 101 | raise |
1229 | 93 | self.emit("action-done", self.INSTALL, False, False, None, None) | 102 | self._action_done(self.ACTION_INSTALL, |
1230 | 103 | authorized=False, success=False, | ||
1231 | 104 | error_string=None, error_desc=None) | ||
1232 | 94 | except Exception as e: | 105 | except Exception as e: |
1234 | 95 | self.emit("action-done", self.INSTALL, True, False, None, None) | 106 | self._action_done(self.ACTION_INSTALL, |
1235 | 107 | authorized=True, success=False, | ||
1236 | 108 | error_string=None, error_desc=None) | ||
1237 | 96 | raise | 109 | raise |
1238 | 97 | 110 | ||
1239 | 98 | def _on_progress_changed(self, trans, progress): | 111 | def _on_progress_changed(self, trans, progress): |
1240 | @@ -111,28 +124,18 @@ | |||
1241 | 111 | self._resize_to_show_details(expander) | 124 | self._resize_to_show_details(expander) |
1242 | 112 | 125 | ||
1243 | 113 | @inline_callbacks | 126 | @inline_callbacks |
1252 | 114 | def _run_in_dialog(self, trans, action, header, show_details, | 127 | def _show_transaction(self, trans, action, header, show_details): |
1253 | 115 | close_on_done): | 128 | self.label_header.set_label(header) |
1246 | 116 | builder = Gtk.Builder() | ||
1247 | 117 | builder.set_translation_domain("update-manager") | ||
1248 | 118 | builder.add_from_file(self.datadir + "/gtkbuilder/UpdateProgress.ui") | ||
1249 | 119 | |||
1250 | 120 | label_header = builder.get_object("label_header") | ||
1251 | 121 | label_header.set_label(header) | ||
1254 | 122 | 129 | ||
1255 | 123 | progressbar = AptProgressBar(trans) | 130 | progressbar = AptProgressBar(trans) |
1256 | 124 | progressbar.show() | 131 | progressbar.show() |
1259 | 125 | progressbar_slot = builder.get_object("progressbar_slot") | 132 | self.progressbar_slot.add(progressbar) |
1258 | 126 | progressbar_slot.add(progressbar) | ||
1260 | 127 | 133 | ||
1261 | 128 | self.button_cancel = AptCancelButton(trans) | 134 | self.button_cancel = AptCancelButton(trans) |
1263 | 129 | if action == self.UPDATE: | 135 | if action == self.ACTION_UPDATE: |
1264 | 130 | self.button_cancel.set_label(Gtk.STOCK_STOP) | 136 | self.button_cancel.set_label(Gtk.STOCK_STOP) |
1265 | 131 | self.button_cancel.show() | 137 | self.button_cancel.show() |
1270 | 132 | button_cancel_slot = builder.get_object("button_cancel_slot") | 138 | self.button_cancel_slot.add(self.button_cancel) |
1267 | 133 | button_cancel_slot.add(self.button_cancel) | ||
1268 | 134 | |||
1269 | 135 | label_details = builder.get_object("label_details") | ||
1271 | 136 | 139 | ||
1272 | 137 | if show_details: | 140 | if show_details: |
1273 | 138 | expander = AptDetailsExpander(trans) | 141 | expander = AptDetailsExpander(trans) |
1274 | @@ -140,39 +143,30 @@ | |||
1275 | 140 | expander.set_hexpand(True) | 143 | expander.set_hexpand(True) |
1276 | 141 | expander.show_all() | 144 | expander.show_all() |
1277 | 142 | expander.connect("notify::expanded", self._on_expanded) | 145 | expander.connect("notify::expanded", self._on_expanded) |
1281 | 143 | expander_slot = builder.get_object("expander_slot") | 146 | self.expander_slot.add(expander) |
1282 | 144 | expander_slot.add(expander) | 147 | self.expander_slot.show() |
1280 | 145 | expander_slot.show() | ||
1283 | 146 | else: | 148 | else: |
1284 | 147 | expander = None | 149 | expander = None |
1285 | 148 | 150 | ||
1286 | 149 | trans.connect("status-details-changed", self._on_details_changed, | 151 | trans.connect("status-details-changed", self._on_details_changed, |
1289 | 150 | label_details) | 152 | self.label_details) |
1290 | 151 | trans.connect("status-changed", self._on_status_changed, label_details, | 153 | trans.connect("status-changed", self._on_status_changed, self.label_details, |
1291 | 152 | expander) | 154 | expander) |
1293 | 153 | trans.connect("finished", self._on_finished, action, close_on_done) | 155 | trans.connect("finished", self._on_finished, action) |
1294 | 154 | trans.connect("medium-required", self._on_medium_required) | 156 | trans.connect("medium-required", self._on_medium_required) |
1295 | 155 | trans.connect("config-file-conflict", self._on_config_file_conflict) | 157 | trans.connect("config-file-conflict", self._on_config_file_conflict) |
1296 | 156 | 158 | ||
1297 | 157 | yield trans.set_debconf_frontend("gnome") | 159 | yield trans.set_debconf_frontend("gnome") |
1298 | 158 | yield trans.run() | 160 | yield trans.run() |
1299 | 159 | 161 | ||
1300 | 160 | self.window_main.push(builder.get_object("pane_update_progress"), | ||
1301 | 161 | self) | ||
1302 | 162 | |||
1303 | 163 | self.window_main.get_window().set_functions(Gdk.WMFunction.MOVE | | ||
1304 | 164 | Gdk.WMFunction.RESIZE | | ||
1305 | 165 | Gdk.WMFunction.MINIMIZE) | ||
1306 | 166 | |||
1307 | 167 | def _on_expanded(self, expander, param): | 162 | def _on_expanded(self, expander, param): |
1308 | 168 | # Make the dialog resizable if the expander is expanded | 163 | # Make the dialog resizable if the expander is expanded |
1309 | 169 | # try to restore a previous size | 164 | # try to restore a previous size |
1310 | 170 | if not expander.get_expanded(): | 165 | if not expander.get_expanded(): |
1311 | 171 | self._expanded_size = (expander.terminal.get_visible(), | 166 | self._expanded_size = (expander.terminal.get_visible(), |
1312 | 172 | self.window_main.get_size()) | 167 | self.window_main.get_size()) |
1314 | 173 | self.window_main.set_resizable(False) | 168 | self.window_main.end_user_resizable() |
1315 | 174 | elif self._expanded_size: | 169 | elif self._expanded_size: |
1316 | 175 | self.window_main.set_resizable(True) | ||
1317 | 176 | term_visible, (stored_width, stored_height) = self._expanded_size | 170 | term_visible, (stored_width, stored_height) = self._expanded_size |
1318 | 177 | # Check if the stored size was for the download details or | 171 | # Check if the stored size was for the download details or |
1319 | 178 | # the terminal widget | 172 | # the terminal widget |
1320 | @@ -181,9 +175,8 @@ | |||
1321 | 181 | # get a new size for the terminal widget | 175 | # get a new size for the terminal widget |
1322 | 182 | self._resize_to_show_details(expander) | 176 | self._resize_to_show_details(expander) |
1323 | 183 | else: | 177 | else: |
1325 | 184 | self.window_main.resize(stored_width, stored_height) | 178 | self.window_main.begin_user_resizable(stored_width, stored_height) |
1326 | 185 | else: | 179 | else: |
1327 | 186 | self.window_main.set_resizable(True) | ||
1328 | 187 | self._resize_to_show_details(expander) | 180 | self._resize_to_show_details(expander) |
1329 | 188 | 181 | ||
1330 | 189 | def _resize_to_show_details(self, expander): | 182 | def _resize_to_show_details(self, expander): |
1331 | @@ -195,16 +188,19 @@ | |||
1332 | 195 | If the expander is expanded afterwards the window won't change its | 188 | If the expander is expanded afterwards the window won't change its |
1333 | 196 | size anymore. So we have to do this manually. See LP#840942 | 189 | size anymore. So we have to do this manually. See LP#840942 |
1334 | 197 | """ | 190 | """ |
1345 | 198 | win_width, win_height = self.window_main.get_size() | 191 | if expander.get_expanded(): |
1346 | 199 | exp_width = expander.get_allocation().width | 192 | win_width, win_height = self.window_main.get_size() |
1347 | 200 | exp_height = expander.get_allocation().height | 193 | exp_width = expander.get_allocation().width |
1348 | 201 | if expander.terminal.get_visible(): | 194 | exp_height = expander.get_allocation().height |
1349 | 202 | terminal_width = expander.terminal.get_char_width() * 80 | 195 | if expander.terminal.get_visible(): |
1350 | 203 | terminal_height = expander.terminal.get_char_height() * 24 | 196 | terminal_width = expander.terminal.get_char_width() * 80 |
1351 | 204 | self.window_main.resize(terminal_width - exp_width + win_width, | 197 | terminal_height = expander.terminal.get_char_height() * 24 |
1352 | 205 | terminal_height - exp_height + win_height) | 198 | new_width = terminal_width - exp_width + win_width |
1353 | 206 | else: | 199 | new_height = terminal_height - exp_height + win_height |
1354 | 207 | self.window_main.resize(win_width + 100, win_height + 200) | 200 | else: |
1355 | 201 | new_width = win_width + 100 | ||
1356 | 202 | new_height = win_height + 200 | ||
1357 | 203 | self.window_main.begin_user_resizable(new_width, new_height) | ||
1358 | 208 | 204 | ||
1359 | 209 | def _on_medium_required(self, transaction, medium, drive): | 205 | def _on_medium_required(self, transaction, medium, drive): |
1360 | 210 | dialog = AptMediumRequiredDialog(medium, drive, self.window_main) | 206 | dialog = AptMediumRequiredDialog(medium, drive, self.window_main) |
1361 | @@ -224,18 +220,19 @@ | |||
1362 | 224 | else: | 220 | else: |
1363 | 225 | transaction.resolve_config_file_conflict(old, "keep") | 221 | transaction.resolve_config_file_conflict(old, "keep") |
1364 | 226 | 222 | ||
1366 | 227 | def _on_finished(self, trans, status, action, close_on_done): | 223 | def _on_finished(self, trans, status, action): |
1367 | 228 | error_string = None | 224 | error_string = None |
1368 | 229 | error_desc = None | 225 | error_desc = None |
1369 | 230 | if status == EXIT_FAILED: | 226 | if status == EXIT_FAILED: |
1370 | 231 | error_string = get_error_string_from_enum(trans.error.code) | 227 | error_string = get_error_string_from_enum(trans.error.code) |
1371 | 232 | error_desc = get_error_description_from_enum(trans.error.code) | 228 | error_desc = get_error_description_from_enum(trans.error.code) |
1372 | 233 | elif status == EXIT_SUCCESS and close_on_done: | ||
1373 | 234 | sys.exit(0) | ||
1374 | 235 | # tell unity to hide the progress again | 229 | # tell unity to hide the progress again |
1375 | 236 | self.unity.set_progress(-1) | 230 | self.unity.set_progress(-1) |
1378 | 237 | self.emit("action-done", action, True, status == EXIT_SUCCESS, | 231 | is_success = (status == EXIT_SUCCESS) |
1379 | 238 | error_string, error_desc) | 232 | self._action_done(action, |
1380 | 233 | authorized=True, success=is_success, | ||
1381 | 234 | error_string=error_string, error_desc=error_desc) | ||
1382 | 235 | |||
1383 | 239 | 236 | ||
1384 | 240 | if __name__ == "__main__": | 237 | if __name__ == "__main__": |
1385 | 241 | b = InstallBackendAptdaemon(None) | 238 | b = InstallBackendAptdaemon(None) |
1386 | 242 | 239 | ||
1387 | === modified file 'UpdateManager/backend/InstallBackendSynaptic.py' | |||
1388 | --- UpdateManager/backend/InstallBackendSynaptic.py 2012-12-13 20:39:37 +0000 | |||
1389 | +++ UpdateManager/backend/InstallBackendSynaptic.py 2013-05-21 05:43:25 +0000 | |||
1390 | @@ -8,13 +8,43 @@ | |||
1391 | 8 | from gettext import gettext as _ | 8 | from gettext import gettext as _ |
1392 | 9 | 9 | ||
1393 | 10 | from gi.repository import GObject | 10 | from gi.repository import GObject |
1394 | 11 | # Extra GdkX11 import for pygobject bug #673396 | ||
1395 | 12 | # https://bugzilla.gnome.org/show_bug.cgi?id=673396 | ||
1396 | 13 | from gi.repository import GdkX11 | ||
1397 | 11 | 14 | ||
1398 | 12 | from UpdateManager.backend import InstallBackend | 15 | from UpdateManager.backend import InstallBackend |
1399 | 16 | from UpdateManager.Dialogs import Dialog | ||
1400 | 13 | 17 | ||
1401 | 14 | 18 | ||
1402 | 15 | class InstallBackendSynaptic(InstallBackend): | 19 | class InstallBackendSynaptic(InstallBackend): |
1403 | 16 | """ Install backend based on synaptic """ | 20 | """ Install backend based on synaptic """ |
1404 | 17 | 21 | ||
1405 | 22 | def update(self): | ||
1406 | 23 | opt = ["--update-at-startup"] | ||
1407 | 24 | tempf = None | ||
1408 | 25 | self._run_synaptic(self.ACTION_UPDATE, opt, tempf) | ||
1409 | 26 | |||
1410 | 27 | def commit(self, pkgs_install, pkgs_upgrade, close_on_done=False): | ||
1411 | 28 | # close when update was successful (its ok to use a Synaptic:: | ||
1412 | 29 | # option here, it will not get auto-saved, because synaptic does | ||
1413 | 30 | # not save options in non-interactive mode) | ||
1414 | 31 | opt = [] | ||
1415 | 32 | if close_on_done: | ||
1416 | 33 | opt.append("-o") | ||
1417 | 34 | opt.append("Synaptic::closeZvt=true") | ||
1418 | 35 | # custom progress strings | ||
1419 | 36 | opt.append("--progress-str") | ||
1420 | 37 | opt.append("%s" % _("Please wait, this can take some time.")) | ||
1421 | 38 | opt.append("--finish-str") | ||
1422 | 39 | opt.append("%s" % _("Update is complete")) | ||
1423 | 40 | tempf = tempfile.NamedTemporaryFile(mode="w+") | ||
1424 | 41 | for pkg_name in pkgs_install + pkgs_upgrade: | ||
1425 | 42 | tempf.write("%s\tinstall\n" % pkg_name) | ||
1426 | 43 | opt.append("--set-selections-file") | ||
1427 | 44 | opt.append("%s" % tempf.name) | ||
1428 | 45 | tempf.flush() | ||
1429 | 46 | self._run_synaptic(self.ACTION_INSTALL, opt, tempf) | ||
1430 | 47 | |||
1431 | 18 | def _run_synaptic(self, action, opt, tempf): | 48 | def _run_synaptic(self, action, opt, tempf): |
1432 | 19 | """Execute synaptic.""" | 49 | """Execute synaptic.""" |
1433 | 20 | try: | 50 | try: |
1434 | @@ -42,31 +72,7 @@ | |||
1435 | 42 | action, tempf = data | 72 | action, tempf = data |
1436 | 43 | if tempf: | 73 | if tempf: |
1437 | 44 | tempf.close() | 74 | tempf.close() |
1466 | 45 | self.emit("action-done", action, True, os.WEXITSTATUS(condition) == 0, | 75 | self._action_done(action, |
1467 | 46 | None, None) | 76 | authorized=True, |
1468 | 47 | 77 | success=os.WEXITSTATUS(condition) == 0, | |
1469 | 48 | def update(self): | 78 | error_string=None, error_desc=None) |
1442 | 49 | opt = ["--update-at-startup"] | ||
1443 | 50 | tempf = None | ||
1444 | 51 | self._run_synaptic(self.UPDATE, opt, tempf) | ||
1445 | 52 | |||
1446 | 53 | def commit(self, pkgs_install, pkgs_upgrade, close_on_done): | ||
1447 | 54 | # close when update was successful (its ok to use a Synaptic:: | ||
1448 | 55 | # option here, it will not get auto-saved, because synaptic does | ||
1449 | 56 | # not save options in non-interactive mode) | ||
1450 | 57 | opt = [] | ||
1451 | 58 | if close_on_done: | ||
1452 | 59 | opt.append("-o") | ||
1453 | 60 | opt.append("Synaptic::closeZvt=true") | ||
1454 | 61 | # custom progress strings | ||
1455 | 62 | opt.append("--progress-str") | ||
1456 | 63 | opt.append("%s" % _("Please wait, this can take some time.")) | ||
1457 | 64 | opt.append("--finish-str") | ||
1458 | 65 | opt.append("%s" % _("Update is complete")) | ||
1459 | 66 | tempf = tempfile.NamedTemporaryFile(mode="w+") | ||
1460 | 67 | for pkg_name in pkgs_install + pkgs_upgrade: | ||
1461 | 68 | tempf.write("%s\tinstall\n" % pkg_name) | ||
1462 | 69 | opt.append("--set-selections-file") | ||
1463 | 70 | opt.append("%s" % tempf.name) | ||
1464 | 71 | tempf.flush() | ||
1465 | 72 | self._run_synaptic(self.INSTALL, opt, tempf) | ||
1470 | 73 | 79 | ||
1471 | === modified file 'UpdateManager/backend/__init__.py' | |||
1472 | --- UpdateManager/backend/__init__.py 2012-12-13 20:39:37 +0000 | |||
1473 | +++ UpdateManager/backend/__init__.py 2013-05-21 05:43:25 +0000 | |||
1474 | @@ -7,41 +7,79 @@ | |||
1475 | 7 | from __future__ import absolute_import | 7 | from __future__ import absolute_import |
1476 | 8 | 8 | ||
1477 | 9 | import os | 9 | import os |
1478 | 10 | import sys | ||
1479 | 10 | 11 | ||
1480 | 11 | from gi.repository import GObject | 12 | from gi.repository import GObject |
1509 | 12 | 13 | from UpdateManager.Core.utils import (inhibit_sleep, | |
1510 | 13 | 14 | allow_sleep) | |
1511 | 14 | class InstallBackend(GObject.GObject): | 15 | from UpdateManager.Dialogs import Dialog |
1512 | 15 | """The abstract backend that can install/remove packages""" | 16 | |
1513 | 16 | 17 | ||
1514 | 17 | __gsignals__ = {"action-done": (GObject.SignalFlags.RUN_FIRST, | 18 | class InstallBackend(Dialog): |
1515 | 18 | None, | 19 | ACTION_UPDATE = 0 |
1516 | 19 | (GObject.TYPE_INT, # action id | 20 | ACTION_INSTALL = 1 |
1517 | 20 | GObject.TYPE_BOOLEAN, # authorized | 21 | |
1518 | 21 | GObject.TYPE_BOOLEAN, # success | 22 | def __init__(self, window_main, action): |
1519 | 22 | GObject.TYPE_STRING, # error string | 23 | Dialog.__init__(self, window_main) |
1520 | 23 | GObject.TYPE_STRING) # error desc | 24 | self.action = action |
1521 | 24 | ), | 25 | self.sleep_cookie = None |
1522 | 25 | } | 26 | self.sleep_dev = None |
1523 | 26 | 27 | ||
1524 | 27 | (INSTALL, UPDATE) = range(2) | 28 | def start(self): |
1525 | 28 | 29 | os.environ["APT_LISTCHANGES_FRONTEND"] = "none" | |
1526 | 29 | def __init__(self, datadir, window_main): | 30 | |
1527 | 30 | """init backend | 31 | # Do not suspend during the update process |
1528 | 31 | takes a gtk main window as parameter | 32 | (self.sleep_dev, self.sleep_cookie) = inhibit_sleep() |
1529 | 32 | """ | 33 | |
1530 | 33 | GObject.GObject.__init__(self) | 34 | if self.action == self.ACTION_INSTALL: |
1531 | 34 | self.datadir = datadir | 35 | # Get the packages which should be installed and update |
1532 | 35 | self.window_main = window_main | 36 | pkgs_install = [] |
1533 | 36 | 37 | pkgs_upgrade = [] | |
1534 | 37 | def commit(self, pkgs_install, pkgs_upgrade, close_on_done): | 38 | for pkg in self.window_main.cache: |
1535 | 38 | """Commit the cache changes """ | 39 | if pkg.marked_install: |
1536 | 39 | raise NotImplemented | 40 | pkgs_install.append(pkg.name) |
1537 | 41 | elif pkg.marked_upgrade: | ||
1538 | 42 | pkgs_upgrade.append(pkg.name) | ||
1539 | 43 | self.commit(pkgs_install, pkgs_upgrade) | ||
1540 | 44 | else: | ||
1541 | 45 | self.update() | ||
1542 | 40 | 46 | ||
1543 | 41 | def update(self): | 47 | def update(self): |
1544 | 42 | """Run a update to refresh the package list""" | 48 | """Run a update to refresh the package list""" |
1545 | 43 | raise NotImplemented | 49 | raise NotImplemented |
1546 | 44 | 50 | ||
1547 | 51 | def commit(self, pkgs_install, pkgs_upgrade): | ||
1548 | 52 | """Commit the cache changes """ | ||
1549 | 53 | raise NotImplemented | ||
1550 | 54 | |||
1551 | 55 | def _action_done(self, action, authorized, success, error_string, | ||
1552 | 56 | error_desc): | ||
1553 | 57 | # Allow suspend after update is finished | ||
1554 | 58 | if self.sleep_cookie: | ||
1555 | 59 | allow_sleep(self.sleep_dev, self.sleep_cookie) | ||
1556 | 60 | self.sleep_cookie = self.sleep_dev = None | ||
1557 | 61 | |||
1558 | 62 | # If the progress dialog should be closed automatically afterwards | ||
1559 | 63 | #settings = Gio.Settings("com.ubuntu.update-manager") | ||
1560 | 64 | #close_after_install = settings.get_boolean( | ||
1561 | 65 | # "autoclose-install-window") | ||
1562 | 66 | # FIXME: confirm with mpt whether this should still be a setting | ||
1563 | 67 | close_after_install = False | ||
1564 | 68 | |||
1565 | 69 | if action == self.ACTION_INSTALL: | ||
1566 | 70 | if success: | ||
1567 | 71 | self.window_main.start_available() | ||
1568 | 72 | elif error_string: | ||
1569 | 73 | self.window_main.start_error(False, error_string, error_desc) | ||
1570 | 74 | else: | ||
1571 | 75 | self.window_main.exit() | ||
1572 | 76 | else: | ||
1573 | 77 | if error_string: | ||
1574 | 78 | self.window_main.start_error(True, error_string, error_desc) | ||
1575 | 79 | else: | ||
1576 | 80 | is_cancelled_update = not success | ||
1577 | 81 | self.window_main.start_available(is_cancelled_update) | ||
1578 | 82 | |||
1579 | 45 | 83 | ||
1580 | 46 | def get_backend(*args, **kwargs): | 84 | def get_backend(*args, **kwargs): |
1581 | 47 | """Select and return a package manager backend.""" | 85 | """Select and return a package manager backend.""" |
1582 | 48 | 86 | ||
1583 | === modified file 'data/gtkbuilder/Dialog.ui' | |||
1584 | --- data/gtkbuilder/Dialog.ui 2013-01-25 16:41:01 +0000 | |||
1585 | +++ data/gtkbuilder/Dialog.ui 2013-05-21 05:43:25 +0000 | |||
1586 | @@ -1,36 +1,23 @@ | |||
1587 | 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
1588 | 2 | <interface> | 2 | <interface> |
1589 | 3 | <!-- interface-requires gtk+ 3.0 --> | 3 | <!-- interface-requires gtk+ 3.0 --> |
1591 | 4 | <object class="GtkDialog" id="window_dialog"> | 4 | <object class="GtkWindow" id="window_dialog"> |
1592 | 5 | <property name="can_focus">False</property> | 5 | <property name="can_focus">False</property> |
1596 | 6 | <property name="type_hint">dialog</property> | 6 | <child> |
1597 | 7 | <child internal-child="vbox"> | 7 | <object class="GtkBox" id="pane_dialog"> |
1598 | 8 | <object class="GtkBox" id="dialog-vbox1"> | 8 | <property name="visible">True</property> |
1599 | 9 | <property name="can_focus">False</property> | 9 | <property name="can_focus">False</property> |
1600 | 10 | <property name="hexpand">True</property> | ||
1601 | 11 | <property name="vexpand">True</property> | ||
1602 | 12 | <property name="border_width">12</property> | ||
1603 | 10 | <property name="orientation">vertical</property> | 13 | <property name="orientation">vertical</property> |
1604 | 11 | <child internal-child="action_area"> | ||
1605 | 12 | <object class="GtkButtonBox" id="dialog-action_area1"> | ||
1606 | 13 | <property name="can_focus">False</property> | ||
1607 | 14 | <property name="layout_style">end</property> | ||
1608 | 15 | <child> | ||
1609 | 16 | <placeholder/> | ||
1610 | 17 | </child> | ||
1611 | 18 | </object> | ||
1612 | 19 | <packing> | ||
1613 | 20 | <property name="expand">False</property> | ||
1614 | 21 | <property name="fill">True</property> | ||
1615 | 22 | <property name="pack_type">end</property> | ||
1616 | 23 | <property name="position">0</property> | ||
1617 | 24 | </packing> | ||
1618 | 25 | </child> | ||
1619 | 26 | <child> | 14 | <child> |
1621 | 27 | <object class="GtkGrid" id="pane_dialog"> | 15 | <object class="GtkGrid" id="header_grid"> |
1622 | 28 | <property name="visible">True</property> | 16 | <property name="visible">True</property> |
1623 | 29 | <property name="can_focus">False</property> | 17 | <property name="can_focus">False</property> |
1624 | 18 | <property name="margin_bottom">12</property> | ||
1625 | 30 | <property name="hexpand">True</property> | 19 | <property name="hexpand">True</property> |
1629 | 31 | <property name="vexpand">True</property> | 20 | <property name="row_spacing">2</property> |
1627 | 32 | <property name="border_width">12</property> | ||
1628 | 33 | <property name="row_spacing">12</property> | ||
1630 | 34 | <property name="column_spacing">12</property> | 21 | <property name="column_spacing">12</property> |
1631 | 35 | <child> | 22 | <child> |
1632 | 36 | <object class="GtkImage" id="image_logo"> | 23 | <object class="GtkImage" id="image_logo"> |
1633 | @@ -44,23 +31,21 @@ | |||
1634 | 44 | <property name="left_attach">0</property> | 31 | <property name="left_attach">0</property> |
1635 | 45 | <property name="top_attach">0</property> | 32 | <property name="top_attach">0</property> |
1636 | 46 | <property name="width">1</property> | 33 | <property name="width">1</property> |
1638 | 47 | <property name="height">1</property> | 34 | <property name="height">2</property> |
1639 | 48 | </packing> | 35 | </packing> |
1640 | 49 | </child> | 36 | </child> |
1641 | 50 | <child> | 37 | <child> |
1642 | 51 | <object class="GtkLabel" id="label_header"> | 38 | <object class="GtkLabel" id="label_header"> |
1643 | 52 | <property name="visible">True</property> | ||
1644 | 53 | <property name="can_focus">False</property> | 39 | <property name="can_focus">False</property> |
1645 | 40 | <property name="no_show_all">True</property> | ||
1646 | 54 | <property name="margin_top">6</property> | 41 | <property name="margin_top">6</property> |
1647 | 55 | <property name="hexpand">True</property> | 42 | <property name="hexpand">True</property> |
1648 | 56 | <property name="xalign">0</property> | 43 | <property name="xalign">0</property> |
1649 | 57 | <property name="yalign">0</property> | 44 | <property name="yalign">0</property> |
1650 | 58 | <property name="wrap">True</property> | 45 | <property name="wrap">True</property> |
1651 | 59 | <property name="width_chars">20</property> | ||
1652 | 60 | <property name="max_width_chars">20</property> | 46 | <property name="max_width_chars">20</property> |
1653 | 61 | <attributes> | 47 | <attributes> |
1654 | 62 | <attribute name="weight" value="bold"/> | 48 | <attribute name="weight" value="bold"/> |
1655 | 63 | <attribute name="scale" value="1.25"/> | ||
1656 | 64 | </attributes> | 49 | </attributes> |
1657 | 65 | </object> | 50 | </object> |
1658 | 66 | <packing> | 51 | <packing> |
1659 | @@ -75,7 +60,6 @@ | |||
1660 | 75 | <property name="can_focus">False</property> | 60 | <property name="can_focus">False</property> |
1661 | 76 | <property name="no_show_all">True</property> | 61 | <property name="no_show_all">True</property> |
1662 | 77 | <property name="hexpand">True</property> | 62 | <property name="hexpand">True</property> |
1663 | 78 | <property name="vexpand">True</property> | ||
1664 | 79 | <property name="xalign">0</property> | 63 | <property name="xalign">0</property> |
1665 | 80 | <property name="yalign">0</property> | 64 | <property name="yalign">0</property> |
1666 | 81 | <property name="wrap">True</property> | 65 | <property name="wrap">True</property> |
1667 | @@ -88,37 +72,52 @@ | |||
1668 | 88 | <property name="height">1</property> | 72 | <property name="height">1</property> |
1669 | 89 | </packing> | 73 | </packing> |
1670 | 90 | </child> | 74 | </child> |
1692 | 91 | <child> | 75 | </object> |
1693 | 92 | <object class="GtkButtonBox" id="buttonbox"> | 76 | <packing> |
1694 | 93 | <property name="visible">True</property> | 77 | <property name="expand">False</property> |
1695 | 94 | <property name="can_focus">False</property> | 78 | <property name="fill">True</property> |
1696 | 95 | <property name="valign">end</property> | 79 | <property name="position">0</property> |
1697 | 96 | <property name="hexpand">True</property> | 80 | </packing> |
1698 | 97 | <property name="vexpand">True</property> | 81 | </child> |
1699 | 98 | <property name="spacing">6</property> | 82 | <child> |
1700 | 99 | <property name="homogeneous">True</property> | 83 | <object class="GtkBox" id="main_container"> |
1701 | 100 | <property name="layout_style">end</property> | 84 | <property name="can_focus">False</property> |
1702 | 101 | <child> | 85 | <property name="no_show_all">True</property> |
1703 | 102 | <placeholder/> | 86 | <property name="margin_bottom">12</property> |
1704 | 103 | </child> | 87 | <property name="hexpand">True</property> |
1705 | 104 | </object> | 88 | <property name="vexpand">True</property> |
1706 | 105 | <packing> | 89 | <property name="orientation">vertical</property> |
1686 | 106 | <property name="left_attach">0</property> | ||
1687 | 107 | <property name="top_attach">2</property> | ||
1688 | 108 | <property name="width">2</property> | ||
1689 | 109 | <property name="height">1</property> | ||
1690 | 110 | </packing> | ||
1691 | 111 | </child> | ||
1707 | 112 | <child> | 90 | <child> |
1708 | 113 | <placeholder/> | 91 | <placeholder/> |
1709 | 114 | </child> | 92 | </child> |
1710 | 115 | </object> | 93 | </object> |
1711 | 116 | <packing> | 94 | <packing> |
1713 | 117 | <property name="expand">False</property> | 95 | <property name="expand">True</property> |
1714 | 118 | <property name="fill">True</property> | 96 | <property name="fill">True</property> |
1715 | 97 | <property name="padding">4</property> | ||
1716 | 119 | <property name="position">1</property> | 98 | <property name="position">1</property> |
1717 | 120 | </packing> | 99 | </packing> |
1718 | 121 | </child> | 100 | </child> |
1719 | 101 | <child> | ||
1720 | 102 | <object class="GtkButtonBox" id="buttonbox"> | ||
1721 | 103 | <property name="visible">True</property> | ||
1722 | 104 | <property name="can_focus">False</property> | ||
1723 | 105 | <property name="valign">end</property> | ||
1724 | 106 | <property name="hexpand">True</property> | ||
1725 | 107 | <property name="spacing">6</property> | ||
1726 | 108 | <property name="homogeneous">True</property> | ||
1727 | 109 | <property name="layout_style">end</property> | ||
1728 | 110 | <child> | ||
1729 | 111 | <placeholder/> | ||
1730 | 112 | </child> | ||
1731 | 113 | </object> | ||
1732 | 114 | <packing> | ||
1733 | 115 | <property name="expand">False</property> | ||
1734 | 116 | <property name="fill">True</property> | ||
1735 | 117 | <property name="pack_type">end</property> | ||
1736 | 118 | <property name="position">2</property> | ||
1737 | 119 | </packing> | ||
1738 | 120 | </child> | ||
1739 | 122 | </object> | 121 | </object> |
1740 | 123 | </child> | 122 | </child> |
1741 | 124 | </object> | 123 | </object> |
1742 | 125 | 124 | ||
1743 | === modified file 'data/gtkbuilder/UpdateManager.ui' | |||
1744 | --- data/gtkbuilder/UpdateManager.ui 2012-12-18 02:30:27 +0000 | |||
1745 | +++ data/gtkbuilder/UpdateManager.ui 2013-05-21 05:43:25 +0000 | |||
1746 | @@ -1,533 +1,365 @@ | |||
1747 | 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
1748 | 2 | <interface> | 2 | <interface> |
1749 | 3 | <!-- interface-requires gtk+ 3.0 --> | 3 | <!-- interface-requires gtk+ 3.0 --> |
1751 | 4 | <object class="GtkImage" id="image-apply"> | 4 | <object class="GtkVBox" id="pane_updates_available"> |
1752 | 5 | <property name="visible">True</property> | 5 | <property name="visible">True</property> |
1753 | 6 | <property name="can_focus">False</property> | 6 | <property name="can_focus">False</property> |
1758 | 7 | <property name="stock">gtk-apply</property> | 7 | <property name="spacing">12</property> |
1755 | 8 | </object> | ||
1756 | 9 | <object class="GtkWindow" id="window_updates_available"> | ||
1757 | 10 | <property name="can_focus">False</property> | ||
1759 | 11 | <child> | 8 | <child> |
1761 | 12 | <object class="GtkVBox" id="pane_updates_available"> | 9 | <object class="GtkExpander" id="expander_details"> |
1762 | 13 | <property name="visible">True</property> | 10 | <property name="visible">True</property> |
1765 | 14 | <property name="can_focus">False</property> | 11 | <property name="can_focus">True</property> |
1764 | 15 | <property name="border_width">6</property> | ||
1766 | 16 | <property name="spacing">6</property> | 12 | <property name="spacing">6</property> |
1767 | 13 | <property name="resize_toplevel">True</property> | ||
1768 | 17 | <child> | 14 | <child> |
1770 | 18 | <object class="GtkVBox" id="vbox_updates"> | 15 | <object class="GtkVBox" id="vbox4"> |
1771 | 19 | <property name="visible">True</property> | 16 | <property name="visible">True</property> |
1772 | 20 | <property name="can_focus">False</property> | 17 | <property name="can_focus">False</property> |
1775 | 21 | <property name="border_width">6</property> | 18 | <property name="spacing">6</property> |
1774 | 22 | <property name="spacing">12</property> | ||
1776 | 23 | <child> | 19 | <child> |
1778 | 24 | <object class="GtkHBox" id="hbox3"> | 20 | <object class="GtkScrolledWindow" id="scrolledwindow_update"> |
1779 | 25 | <property name="visible">True</property> | 21 | <property name="visible">True</property> |
1845 | 26 | <property name="can_focus">False</property> | 22 | <property name="can_focus">True</property> |
1846 | 27 | <property name="spacing">12</property> | 23 | <property name="shadow_type">in</property> |
1847 | 28 | <child> | 24 | <property name="min_content_height">100</property> |
1848 | 29 | <object class="GtkImage" id="image_logo"> | 25 | <child> |
1849 | 30 | <property name="visible">True</property> | 26 | <object class="GtkTreeView" id="treeview_update"> |
1850 | 31 | <property name="can_focus">False</property> | 27 | <property name="visible">True</property> |
1851 | 32 | <property name="yalign">0</property> | 28 | <property name="can_focus">True</property> |
1852 | 33 | <property name="pixel_size">48</property> | 29 | <property name="headers_visible">False</property> |
1853 | 34 | <property name="icon_name">system-software-update</property> | 30 | <property name="headers_clickable">False</property> |
1854 | 35 | </object> | 31 | <property name="rules_hint">True</property> |
1855 | 36 | <packing> | 32 | <child internal-child="accessible"> |
1856 | 37 | <property name="expand">False</property> | 33 | <object class="AtkObject" id="treeview_update-atkobject"> |
1857 | 38 | <property name="fill">False</property> | 34 | <property name="AtkObject::accessible-name" translatable="yes">updates</property> |
1858 | 39 | <property name="position">0</property> | 35 | </object> |
1859 | 40 | </packing> | 36 | </child> |
1860 | 41 | </child> | 37 | <signal name="cursor-changed" handler="on_treeview_update_cursor_changed" swapped="no"/> |
1861 | 42 | <child> | 38 | <signal name="row-activated" handler="on_treeview_update_row_activated" swapped="no"/> |
1862 | 43 | <object class="GtkGrid" id="grid1"> | 39 | </object> |
1798 | 44 | <property name="visible">True</property> | ||
1799 | 45 | <property name="can_focus">False</property> | ||
1800 | 46 | <property name="margin_bottom">6</property> | ||
1801 | 47 | <property name="row_spacing">6</property> | ||
1802 | 48 | <property name="column_spacing">12</property> | ||
1803 | 49 | <child> | ||
1804 | 50 | <object class="GtkLabel" id="label_header"> | ||
1805 | 51 | <property name="visible">True</property> | ||
1806 | 52 | <property name="can_focus">False</property> | ||
1807 | 53 | <property name="hexpand">True</property> | ||
1808 | 54 | <property name="xalign">0</property> | ||
1809 | 55 | <property name="wrap">True</property> | ||
1810 | 56 | <property name="max_width_chars">20</property> | ||
1811 | 57 | <attributes> | ||
1812 | 58 | <attribute name="weight" value="bold"/> | ||
1813 | 59 | <attribute name="scale" value="1.25"/> | ||
1814 | 60 | </attributes> | ||
1815 | 61 | </object> | ||
1816 | 62 | <packing> | ||
1817 | 63 | <property name="left_attach">0</property> | ||
1818 | 64 | <property name="top_attach">0</property> | ||
1819 | 65 | <property name="width">1</property> | ||
1820 | 66 | <property name="height">1</property> | ||
1821 | 67 | </packing> | ||
1822 | 68 | </child> | ||
1823 | 69 | <child> | ||
1824 | 70 | <object class="GtkLabel" id="label_desc"> | ||
1825 | 71 | <property name="can_focus">False</property> | ||
1826 | 72 | <property name="no_show_all">True</property> | ||
1827 | 73 | <property name="hexpand">True</property> | ||
1828 | 74 | <property name="xalign">0</property> | ||
1829 | 75 | <property name="wrap">True</property> | ||
1830 | 76 | <property name="max_width_chars">20</property> | ||
1831 | 77 | </object> | ||
1832 | 78 | <packing> | ||
1833 | 79 | <property name="left_attach">0</property> | ||
1834 | 80 | <property name="top_attach">1</property> | ||
1835 | 81 | <property name="width">1</property> | ||
1836 | 82 | <property name="height">1</property> | ||
1837 | 83 | </packing> | ||
1838 | 84 | </child> | ||
1839 | 85 | </object> | ||
1840 | 86 | <packing> | ||
1841 | 87 | <property name="expand">False</property> | ||
1842 | 88 | <property name="fill">True</property> | ||
1843 | 89 | <property name="position">1</property> | ||
1844 | 90 | </packing> | ||
1863 | 91 | </child> | 40 | </child> |
1864 | 92 | </object> | 41 | </object> |
1865 | 93 | <packing> | 42 | <packing> |
1867 | 94 | <property name="expand">False</property> | 43 | <property name="expand">True</property> |
1868 | 95 | <property name="fill">True</property> | 44 | <property name="fill">True</property> |
1869 | 96 | <property name="position">0</property> | 45 | <property name="position">0</property> |
1870 | 97 | </packing> | 46 | </packing> |
1871 | 98 | </child> | 47 | </child> |
1872 | 99 | <child> | 48 | <child> |
1874 | 100 | <object class="GtkExpander" id="expander_details"> | 49 | <object class="GtkExpander" id="expander_desc"> |
1875 | 101 | <property name="visible">True</property> | 50 | <property name="visible">True</property> |
1876 | 102 | <property name="can_focus">True</property> | 51 | <property name="can_focus">True</property> |
1877 | 103 | <property name="spacing">6</property> | ||
1878 | 104 | <property name="resize_toplevel">True</property> | ||
1879 | 105 | <child> | 52 | <child> |
1881 | 106 | <object class="GtkVBox" id="vbox4"> | 53 | <object class="GtkNotebook" id="notebook_details"> |
1882 | 107 | <property name="visible">True</property> | 54 | <property name="visible">True</property> |
1887 | 108 | <property name="can_focus">False</property> | 55 | <property name="can_focus">True</property> |
1888 | 109 | <property name="spacing">6</property> | 56 | <property name="show_border">False</property> |
1889 | 110 | <child> | 57 | <child> |
1890 | 111 | <object class="GtkScrolledWindow" id="scrolledwindow_update"> | 58 | <object class="GtkVBox" id="vbox5"> |
1891 | 59 | <property name="visible">True</property> | ||
1892 | 60 | <property name="can_focus">False</property> | ||
1893 | 61 | <property name="border_width">6</property> | ||
1894 | 62 | <property name="spacing">6</property> | ||
1895 | 63 | <child> | ||
1896 | 64 | <object class="GtkScrolledWindow" id="scrolledwindow_changes"> | ||
1897 | 65 | <property name="visible">True</property> | ||
1898 | 66 | <property name="can_focus">True</property> | ||
1899 | 67 | <property name="shadow_type">in</property> | ||
1900 | 68 | <child> | ||
1901 | 69 | <placeholder/> | ||
1902 | 70 | </child> | ||
1903 | 71 | </object> | ||
1904 | 72 | <packing> | ||
1905 | 73 | <property name="expand">True</property> | ||
1906 | 74 | <property name="fill">True</property> | ||
1907 | 75 | <property name="position">0</property> | ||
1908 | 76 | </packing> | ||
1909 | 77 | </child> | ||
1910 | 78 | </object> | ||
1911 | 79 | </child> | ||
1912 | 80 | <child type="tab"> | ||
1913 | 81 | <object class="GtkLabel" id="label8"> | ||
1914 | 82 | <property name="visible">True</property> | ||
1915 | 83 | <property name="can_focus">False</property> | ||
1916 | 84 | <property name="label" translatable="yes">Changes</property> | ||
1917 | 85 | </object> | ||
1918 | 86 | <packing> | ||
1919 | 87 | <property name="tab_fill">False</property> | ||
1920 | 88 | </packing> | ||
1921 | 89 | </child> | ||
1922 | 90 | <child> | ||
1923 | 91 | <object class="GtkScrolledWindow" id="scrolledwindow3"> | ||
1924 | 112 | <property name="visible">True</property> | 92 | <property name="visible">True</property> |
1925 | 113 | <property name="can_focus">True</property> | 93 | <property name="can_focus">True</property> |
1926 | 94 | <property name="border_width">6</property> | ||
1927 | 114 | <property name="shadow_type">in</property> | 95 | <property name="shadow_type">in</property> |
1928 | 115 | <property name="min_content_height">100</property> | ||
1929 | 116 | <child> | 96 | <child> |
1931 | 117 | <object class="GtkTreeView" id="treeview_update"> | 97 | <object class="GtkTextView" id="textview_descr"> |
1932 | 118 | <property name="visible">True</property> | 98 | <property name="visible">True</property> |
1933 | 119 | <property name="can_focus">True</property> | 99 | <property name="can_focus">True</property> |
1937 | 120 | <property name="headers_visible">False</property> | 100 | <property name="pixels_above_lines">6</property> |
1938 | 121 | <property name="headers_clickable">False</property> | 101 | <property name="editable">False</property> |
1939 | 122 | <property name="rules_hint">True</property> | 102 | <property name="wrap_mode">word</property> |
1940 | 103 | <property name="left_margin">6</property> | ||
1941 | 104 | <property name="right_margin">6</property> | ||
1942 | 105 | <property name="cursor_visible">False</property> | ||
1943 | 106 | <property name="accepts_tab">False</property> | ||
1944 | 123 | <child internal-child="accessible"> | 107 | <child internal-child="accessible"> |
1947 | 124 | <object class="AtkObject" id="treeview_update-atkobject"> | 108 | <object class="AtkObject" id="textview_descr-atkobject"> |
1948 | 125 | <property name="AtkObject::accessible-name" translatable="yes">updates</property> | 109 | <property name="AtkObject::accessible-name" translatable="yes">Description</property> |
1949 | 126 | </object> | 110 | </object> |
1950 | 127 | </child> | 111 | </child> |
1951 | 128 | <signal name="cursor-changed" handler="on_treeview_update_cursor_changed" swapped="no"/> | ||
1952 | 129 | <signal name="row-activated" handler="on_treeview_update_row_activated" swapped="no"/> | ||
1953 | 130 | <child internal-child="selection"> | ||
1954 | 131 | <object class="GtkTreeSelection" id="treeview-selection"/> | ||
1955 | 132 | </child> | ||
1956 | 133 | </object> | 112 | </object> |
1957 | 134 | </child> | 113 | </child> |
1958 | 135 | </object> | 114 | </object> |
1959 | 136 | <packing> | 115 | <packing> |
1963 | 137 | <property name="expand">True</property> | 116 | <property name="position">1</property> |
1961 | 138 | <property name="fill">True</property> | ||
1962 | 139 | <property name="position">0</property> | ||
1964 | 140 | </packing> | 117 | </packing> |
1965 | 141 | </child> | 118 | </child> |
1968 | 142 | <child> | 119 | <child type="tab"> |
1969 | 143 | <object class="GtkExpander" id="expander_desc"> | 120 | <object class="GtkLabel" id="label9"> |
1970 | 144 | <property name="visible">True</property> | 121 | <property name="visible">True</property> |
2062 | 145 | <property name="can_focus">True</property> | 122 | <property name="can_focus">False</property> |
2063 | 146 | <child> | 123 | <property name="label" translatable="yes">Description</property> |
2064 | 147 | <object class="GtkNotebook" id="notebook_details"> | 124 | <child internal-child="accessible"> |
2065 | 148 | <property name="visible">True</property> | 125 | <object class="AtkObject" id="label9-atkobject"> |
2066 | 149 | <property name="can_focus">True</property> | 126 | <property name="AtkObject::accessible-name" translatable="yes">Description</property> |
1976 | 150 | <property name="show_border">False</property> | ||
1977 | 151 | <child> | ||
1978 | 152 | <object class="GtkVBox" id="vbox5"> | ||
1979 | 153 | <property name="visible">True</property> | ||
1980 | 154 | <property name="can_focus">False</property> | ||
1981 | 155 | <property name="border_width">6</property> | ||
1982 | 156 | <property name="spacing">6</property> | ||
1983 | 157 | <child> | ||
1984 | 158 | <object class="GtkScrolledWindow" id="scrolledwindow_changes"> | ||
1985 | 159 | <property name="visible">True</property> | ||
1986 | 160 | <property name="can_focus">True</property> | ||
1987 | 161 | <property name="shadow_type">in</property> | ||
1988 | 162 | <child> | ||
1989 | 163 | <placeholder/> | ||
1990 | 164 | </child> | ||
1991 | 165 | </object> | ||
1992 | 166 | <packing> | ||
1993 | 167 | <property name="expand">True</property> | ||
1994 | 168 | <property name="fill">True</property> | ||
1995 | 169 | <property name="position">0</property> | ||
1996 | 170 | </packing> | ||
1997 | 171 | </child> | ||
1998 | 172 | </object> | ||
1999 | 173 | </child> | ||
2000 | 174 | <child type="tab"> | ||
2001 | 175 | <object class="GtkLabel" id="label8"> | ||
2002 | 176 | <property name="visible">True</property> | ||
2003 | 177 | <property name="can_focus">False</property> | ||
2004 | 178 | <property name="label" translatable="yes">Changes</property> | ||
2005 | 179 | </object> | ||
2006 | 180 | <packing> | ||
2007 | 181 | <property name="tab_fill">False</property> | ||
2008 | 182 | </packing> | ||
2009 | 183 | </child> | ||
2010 | 184 | <child> | ||
2011 | 185 | <object class="GtkScrolledWindow" id="scrolledwindow3"> | ||
2012 | 186 | <property name="visible">True</property> | ||
2013 | 187 | <property name="can_focus">True</property> | ||
2014 | 188 | <property name="border_width">6</property> | ||
2015 | 189 | <property name="shadow_type">in</property> | ||
2016 | 190 | <child> | ||
2017 | 191 | <object class="GtkTextView" id="textview_descr"> | ||
2018 | 192 | <property name="visible">True</property> | ||
2019 | 193 | <property name="can_focus">True</property> | ||
2020 | 194 | <property name="pixels_above_lines">6</property> | ||
2021 | 195 | <property name="editable">False</property> | ||
2022 | 196 | <property name="wrap_mode">word</property> | ||
2023 | 197 | <property name="left_margin">6</property> | ||
2024 | 198 | <property name="right_margin">6</property> | ||
2025 | 199 | <property name="cursor_visible">False</property> | ||
2026 | 200 | <property name="accepts_tab">False</property> | ||
2027 | 201 | <child internal-child="accessible"> | ||
2028 | 202 | <object class="AtkObject" id="textview_descr-atkobject"> | ||
2029 | 203 | <property name="AtkObject::accessible-name" translatable="yes">Description</property> | ||
2030 | 204 | </object> | ||
2031 | 205 | </child> | ||
2032 | 206 | </object> | ||
2033 | 207 | </child> | ||
2034 | 208 | </object> | ||
2035 | 209 | <packing> | ||
2036 | 210 | <property name="position">1</property> | ||
2037 | 211 | </packing> | ||
2038 | 212 | </child> | ||
2039 | 213 | <child type="tab"> | ||
2040 | 214 | <object class="GtkLabel" id="label9"> | ||
2041 | 215 | <property name="visible">True</property> | ||
2042 | 216 | <property name="can_focus">False</property> | ||
2043 | 217 | <property name="label" translatable="yes">Description</property> | ||
2044 | 218 | <child internal-child="accessible"> | ||
2045 | 219 | <object class="AtkObject" id="label9-atkobject"> | ||
2046 | 220 | <property name="AtkObject::accessible-name" translatable="yes">Description</property> | ||
2047 | 221 | </object> | ||
2048 | 222 | </child> | ||
2049 | 223 | </object> | ||
2050 | 224 | <packing> | ||
2051 | 225 | <property name="position">1</property> | ||
2052 | 226 | <property name="tab_fill">False</property> | ||
2053 | 227 | </packing> | ||
2054 | 228 | </child> | ||
2055 | 229 | </object> | ||
2056 | 230 | </child> | ||
2057 | 231 | <child type="label"> | ||
2058 | 232 | <object class="GtkLabel" id="label13"> | ||
2059 | 233 | <property name="visible">True</property> | ||
2060 | 234 | <property name="can_focus">False</property> | ||
2061 | 235 | <property name="label" translatable="yes">Technical description</property> | ||
2067 | 236 | </object> | 127 | </object> |
2068 | 237 | </child> | 128 | </child> |
2069 | 238 | </object> | 129 | </object> |
2070 | 239 | <packing> | 130 | <packing> |
2071 | 240 | <property name="expand">False</property> | ||
2072 | 241 | <property name="fill">True</property> | ||
2073 | 242 | <property name="position">1</property> | 131 | <property name="position">1</property> |
2074 | 132 | <property name="tab_fill">False</property> | ||
2075 | 243 | </packing> | 133 | </packing> |
2076 | 244 | </child> | 134 | </child> |
2077 | 245 | </object> | 135 | </object> |
2078 | 246 | </child> | 136 | </child> |
2079 | 247 | <child type="label"> | 137 | <child type="label"> |
2081 | 248 | <object class="GtkLabel" id="label12"> | 138 | <object class="GtkLabel" id="label13"> |
2082 | 249 | <property name="visible">True</property> | 139 | <property name="visible">True</property> |
2083 | 250 | <property name="can_focus">False</property> | 140 | <property name="can_focus">False</property> |
2086 | 251 | <property name="label" translatable="yes">Details of updates</property> | 141 | <property name="label" translatable="yes">Technical description</property> |
2085 | 252 | <property name="use_markup">True</property> | ||
2087 | 253 | </object> | 142 | </object> |
2088 | 254 | </child> | 143 | </child> |
2089 | 255 | </object> | 144 | </object> |
2090 | 256 | <packing> | 145 | <packing> |
2122 | 257 | <property name="expand">True</property> | 146 | <property name="expand">False</property> |
2123 | 258 | <property name="fill">True</property> | 147 | <property name="fill">True</property> |
2124 | 259 | <property name="position">2</property> | 148 | <property name="position">1</property> |
2125 | 260 | </packing> | 149 | </packing> |
2126 | 261 | </child> | 150 | </child> |
2127 | 262 | <child> | 151 | </object> |
2128 | 263 | <object class="GtkVBox" id="vbox_alerts"> | 152 | </child> |
2129 | 264 | <property name="can_focus">False</property> | 153 | <child type="label"> |
2130 | 265 | <property name="spacing">3</property> | 154 | <object class="GtkLabel" id="label12"> |
2131 | 266 | <child> | 155 | <property name="visible">True</property> |
2132 | 267 | <object class="GtkHBox" id="hbox_downsize"> | 156 | <property name="can_focus">False</property> |
2133 | 268 | <property name="can_focus">False</property> | 157 | <property name="label" translatable="yes">Details of updates</property> |
2134 | 269 | <property name="spacing">12</property> | 158 | <property name="use_markup">True</property> |
2135 | 270 | <child> | 159 | </object> |
2136 | 271 | <object class="GtkImage" id="image_downsize"> | 160 | </child> |
2137 | 272 | <property name="visible">True</property> | 161 | </object> |
2138 | 273 | <property name="can_focus">False</property> | 162 | <packing> |
2139 | 274 | <property name="icon_name">aptdaemon-download</property> | 163 | <property name="expand">True</property> |
2140 | 275 | </object> | 164 | <property name="fill">True</property> |
2141 | 276 | <packing> | 165 | <property name="position">2</property> |
2142 | 277 | <property name="expand">False</property> | 166 | </packing> |
2143 | 278 | <property name="fill">True</property> | 167 | </child> |
2144 | 279 | <property name="position">0</property> | 168 | <child> |
2145 | 280 | </packing> | 169 | <object class="GtkVBox" id="vbox_alerts"> |
2146 | 281 | </child> | 170 | <property name="can_focus">False</property> |
2147 | 282 | <child> | 171 | <property name="spacing">3</property> |
2148 | 283 | <object class="GtkLabel" id="label_downsize"> | 172 | <child> |
2149 | 284 | <property name="visible">True</property> | 173 | <object class="GtkHBox" id="hbox_downsize"> |
2150 | 285 | <property name="can_focus">False</property> | 174 | <property name="can_focus">False</property> |
2151 | 286 | <property name="xalign">0</property> | 175 | <property name="spacing">12</property> |
2152 | 287 | <property name="label"> | 176 | <child> |
2153 | 177 | <object class="GtkImage" id="image_downsize"> | ||
2154 | 178 | <property name="visible">True</property> | ||
2155 | 179 | <property name="can_focus">False</property> | ||
2156 | 180 | <property name="icon_name">aptdaemon-download</property> | ||
2157 | 181 | </object> | ||
2158 | 182 | <packing> | ||
2159 | 183 | <property name="expand">False</property> | ||
2160 | 184 | <property name="fill">True</property> | ||
2161 | 185 | <property name="position">0</property> | ||
2162 | 186 | </packing> | ||
2163 | 187 | </child> | ||
2164 | 188 | <child> | ||
2165 | 189 | <object class="GtkLabel" id="label_downsize"> | ||
2166 | 190 | <property name="visible">True</property> | ||
2167 | 191 | <property name="can_focus">False</property> | ||
2168 | 192 | <property name="xalign">0</property> | ||
2169 | 193 | <property name="label"> | ||
2170 | 288 | </property> | 194 | </property> |
2333 | 289 | <property name="wrap">True</property> | 195 | <property name="wrap">True</property> |
2172 | 290 | </object> | ||
2173 | 291 | <packing> | ||
2174 | 292 | <property name="expand">True</property> | ||
2175 | 293 | <property name="fill">True</property> | ||
2176 | 294 | <property name="position">1</property> | ||
2177 | 295 | </packing> | ||
2178 | 296 | </child> | ||
2179 | 297 | </object> | ||
2180 | 298 | <packing> | ||
2181 | 299 | <property name="expand">False</property> | ||
2182 | 300 | <property name="fill">False</property> | ||
2183 | 301 | <property name="position">0</property> | ||
2184 | 302 | </packing> | ||
2185 | 303 | </child> | ||
2186 | 304 | <child> | ||
2187 | 305 | <object class="GtkHBox" id="hbox_roaming"> | ||
2188 | 306 | <property name="can_focus">False</property> | ||
2189 | 307 | <property name="spacing">12</property> | ||
2190 | 308 | <child> | ||
2191 | 309 | <object class="GtkImage" id="image_roaming"> | ||
2192 | 310 | <property name="visible">True</property> | ||
2193 | 311 | <property name="can_focus">False</property> | ||
2194 | 312 | <property name="icon_name">dialog-warning</property> | ||
2195 | 313 | </object> | ||
2196 | 314 | <packing> | ||
2197 | 315 | <property name="expand">False</property> | ||
2198 | 316 | <property name="fill">True</property> | ||
2199 | 317 | <property name="position">0</property> | ||
2200 | 318 | </packing> | ||
2201 | 319 | </child> | ||
2202 | 320 | <child> | ||
2203 | 321 | <object class="GtkLabel" id="label_roaming"> | ||
2204 | 322 | <property name="visible">True</property> | ||
2205 | 323 | <property name="can_focus">False</property> | ||
2206 | 324 | <property name="xalign">0</property> | ||
2207 | 325 | <property name="label" translatable="yes">You are connected via roaming and may be charged for the data consumed by this update.</property> | ||
2208 | 326 | <property name="wrap">True</property> | ||
2209 | 327 | </object> | ||
2210 | 328 | <packing> | ||
2211 | 329 | <property name="expand">True</property> | ||
2212 | 330 | <property name="fill">True</property> | ||
2213 | 331 | <property name="position">1</property> | ||
2214 | 332 | </packing> | ||
2215 | 333 | </child> | ||
2216 | 334 | </object> | ||
2217 | 335 | <packing> | ||
2218 | 336 | <property name="expand">False</property> | ||
2219 | 337 | <property name="fill">False</property> | ||
2220 | 338 | <property name="position">1</property> | ||
2221 | 339 | </packing> | ||
2222 | 340 | </child> | ||
2223 | 341 | <child> | ||
2224 | 342 | <object class="GtkHBox" id="hbox_on_3g"> | ||
2225 | 343 | <property name="can_focus">False</property> | ||
2226 | 344 | <property name="spacing">12</property> | ||
2227 | 345 | <child> | ||
2228 | 346 | <object class="GtkImage" id="image_on_3g"> | ||
2229 | 347 | <property name="visible">True</property> | ||
2230 | 348 | <property name="can_focus">False</property> | ||
2231 | 349 | <property name="icon_name">modem</property> | ||
2232 | 350 | </object> | ||
2233 | 351 | <packing> | ||
2234 | 352 | <property name="expand">False</property> | ||
2235 | 353 | <property name="fill">True</property> | ||
2236 | 354 | <property name="position">0</property> | ||
2237 | 355 | </packing> | ||
2238 | 356 | </child> | ||
2239 | 357 | <child> | ||
2240 | 358 | <object class="GtkLabel" id="label_on_3g"> | ||
2241 | 359 | <property name="visible">True</property> | ||
2242 | 360 | <property name="can_focus">False</property> | ||
2243 | 361 | <property name="xalign">0</property> | ||
2244 | 362 | <property name="label" translatable="yes">You may want to wait until you’re not using a mobile broadband connection.</property> | ||
2245 | 363 | <property name="wrap">True</property> | ||
2246 | 364 | </object> | ||
2247 | 365 | <packing> | ||
2248 | 366 | <property name="expand">True</property> | ||
2249 | 367 | <property name="fill">True</property> | ||
2250 | 368 | <property name="position">1</property> | ||
2251 | 369 | </packing> | ||
2252 | 370 | </child> | ||
2253 | 371 | </object> | ||
2254 | 372 | <packing> | ||
2255 | 373 | <property name="expand">False</property> | ||
2256 | 374 | <property name="fill">False</property> | ||
2257 | 375 | <property name="position">2</property> | ||
2258 | 376 | </packing> | ||
2259 | 377 | </child> | ||
2260 | 378 | <child> | ||
2261 | 379 | <object class="GtkHBox" id="hbox_battery"> | ||
2262 | 380 | <property name="can_focus">False</property> | ||
2263 | 381 | <property name="spacing">12</property> | ||
2264 | 382 | <child> | ||
2265 | 383 | <object class="GtkImage" id="image_battery"> | ||
2266 | 384 | <property name="visible">True</property> | ||
2267 | 385 | <property name="can_focus">False</property> | ||
2268 | 386 | <property name="icon_name">battery</property> | ||
2269 | 387 | </object> | ||
2270 | 388 | <packing> | ||
2271 | 389 | <property name="expand">False</property> | ||
2272 | 390 | <property name="fill">True</property> | ||
2273 | 391 | <property name="position">0</property> | ||
2274 | 392 | </packing> | ||
2275 | 393 | </child> | ||
2276 | 394 | <child> | ||
2277 | 395 | <object class="GtkLabel" id="label_battery"> | ||
2278 | 396 | <property name="visible">True</property> | ||
2279 | 397 | <property name="can_focus">False</property> | ||
2280 | 398 | <property name="xalign">0</property> | ||
2281 | 399 | <property name="label" translatable="yes">It’s safer to connect the computer to AC power before updating.</property> | ||
2282 | 400 | <property name="wrap">True</property> | ||
2283 | 401 | </object> | ||
2284 | 402 | <packing> | ||
2285 | 403 | <property name="expand">True</property> | ||
2286 | 404 | <property name="fill">True</property> | ||
2287 | 405 | <property name="position">1</property> | ||
2288 | 406 | </packing> | ||
2289 | 407 | </child> | ||
2290 | 408 | </object> | ||
2291 | 409 | <packing> | ||
2292 | 410 | <property name="expand">False</property> | ||
2293 | 411 | <property name="fill">False</property> | ||
2294 | 412 | <property name="position">3</property> | ||
2295 | 413 | </packing> | ||
2296 | 414 | </child> | ||
2297 | 415 | <child> | ||
2298 | 416 | <object class="GtkHBox" id="hbox_offline"> | ||
2299 | 417 | <property name="can_focus">False</property> | ||
2300 | 418 | <property name="spacing">12</property> | ||
2301 | 419 | <child> | ||
2302 | 420 | <object class="GtkImage" id="image_offline"> | ||
2303 | 421 | <property name="visible">True</property> | ||
2304 | 422 | <property name="can_focus">False</property> | ||
2305 | 423 | <property name="icon_name">network-offline</property> | ||
2306 | 424 | </object> | ||
2307 | 425 | <packing> | ||
2308 | 426 | <property name="expand">False</property> | ||
2309 | 427 | <property name="fill">True</property> | ||
2310 | 428 | <property name="position">0</property> | ||
2311 | 429 | </packing> | ||
2312 | 430 | </child> | ||
2313 | 431 | <child> | ||
2314 | 432 | <object class="GtkLabel" id="label_offline"> | ||
2315 | 433 | <property name="visible">True</property> | ||
2316 | 434 | <property name="can_focus">False</property> | ||
2317 | 435 | <property name="xalign">0</property> | ||
2318 | 436 | <property name="wrap">True</property> | ||
2319 | 437 | </object> | ||
2320 | 438 | <packing> | ||
2321 | 439 | <property name="expand">True</property> | ||
2322 | 440 | <property name="fill">True</property> | ||
2323 | 441 | <property name="position">1</property> | ||
2324 | 442 | </packing> | ||
2325 | 443 | </child> | ||
2326 | 444 | </object> | ||
2327 | 445 | <packing> | ||
2328 | 446 | <property name="expand">False</property> | ||
2329 | 447 | <property name="fill">False</property> | ||
2330 | 448 | <property name="position">4</property> | ||
2331 | 449 | </packing> | ||
2332 | 450 | </child> | ||
2334 | 451 | </object> | 196 | </object> |
2335 | 452 | <packing> | 197 | <packing> |
2337 | 453 | <property name="expand">False</property> | 198 | <property name="expand">True</property> |
2338 | 454 | <property name="fill">True</property> | 199 | <property name="fill">True</property> |
2340 | 455 | <property name="position">3</property> | 200 | <property name="position">1</property> |
2341 | 456 | </packing> | 201 | </packing> |
2342 | 457 | </child> | 202 | </child> |
2343 | 458 | </object> | 203 | </object> |
2344 | 459 | <packing> | 204 | <packing> |
2347 | 460 | <property name="expand">True</property> | 205 | <property name="expand">False</property> |
2348 | 461 | <property name="fill">True</property> | 206 | <property name="fill">False</property> |
2349 | 462 | <property name="position">0</property> | 207 | <property name="position">0</property> |
2350 | 463 | </packing> | 208 | </packing> |
2351 | 464 | </child> | 209 | </child> |
2352 | 465 | <child> | 210 | <child> |
2355 | 466 | <object class="GtkHButtonBox" id="hbuttonbox6"> | 211 | <object class="GtkHBox" id="hbox_roaming"> |
2354 | 467 | <property name="visible">True</property> | ||
2356 | 468 | <property name="can_focus">False</property> | 212 | <property name="can_focus">False</property> |
2360 | 469 | <property name="border_width">5</property> | 213 | <property name="spacing">12</property> |
2358 | 470 | <property name="spacing">6</property> | ||
2359 | 471 | <property name="layout_style">end</property> | ||
2361 | 472 | <child> | 214 | <child> |
2364 | 473 | <object class="GtkButton" id="button_settings"> | 215 | <object class="GtkImage" id="image_roaming"> |
2363 | 474 | <property name="label" translatable="yes">_Settings...</property> | ||
2365 | 475 | <property name="visible">True</property> | 216 | <property name="visible">True</property> |
2370 | 476 | <property name="can_focus">True</property> | 217 | <property name="can_focus">False</property> |
2371 | 477 | <property name="receives_default">True</property> | 218 | <property name="icon_name">dialog-warning</property> |
2368 | 478 | <property name="use_underline">True</property> | ||
2369 | 479 | <signal name="clicked" handler="on_button_settings_clicked" swapped="no"/> | ||
2372 | 480 | </object> | 219 | </object> |
2373 | 481 | <packing> | 220 | <packing> |
2374 | 482 | <property name="expand">False</property> | 221 | <property name="expand">False</property> |
2376 | 483 | <property name="fill">False</property> | 222 | <property name="fill">True</property> |
2377 | 484 | <property name="position">0</property> | 223 | <property name="position">0</property> |
2412 | 485 | <property name="secondary">True</property> | 224 | </packing> |
2413 | 486 | </packing> | 225 | </child> |
2414 | 487 | </child> | 226 | <child> |
2415 | 488 | <child> | 227 | <object class="GtkLabel" id="label_roaming"> |
2416 | 489 | <object class="GtkButton" id="button_close"> | 228 | <property name="visible">True</property> |
2417 | 490 | <property name="label">gtk-cancel</property> | 229 | <property name="can_focus">False</property> |
2418 | 491 | <property name="visible">True</property> | 230 | <property name="xalign">0</property> |
2419 | 492 | <property name="can_focus">True</property> | 231 | <property name="label" translatable="yes">You are connected via roaming and may be charged for the data consumed by this update.</property> |
2420 | 493 | <property name="can_default">True</property> | 232 | <property name="wrap">True</property> |
2421 | 494 | <property name="receives_default">True</property> | 233 | </object> |
2422 | 495 | <property name="use_stock">True</property> | 234 | <packing> |
2423 | 496 | <accelerator key="W" signal="clicked" modifiers="GDK_CONTROL_MASK"/> | 235 | <property name="expand">True</property> |
2390 | 497 | <accelerator key="Q" signal="clicked" modifiers="GDK_CONTROL_MASK"/> | ||
2391 | 498 | </object> | ||
2392 | 499 | <packing> | ||
2393 | 500 | <property name="expand">False</property> | ||
2394 | 501 | <property name="fill">False</property> | ||
2395 | 502 | <property name="position">2</property> | ||
2396 | 503 | </packing> | ||
2397 | 504 | </child> | ||
2398 | 505 | <child> | ||
2399 | 506 | <object class="GtkButton" id="button_install"> | ||
2400 | 507 | <property name="label" translatable="yes">_Install Now</property> | ||
2401 | 508 | <property name="visible">True</property> | ||
2402 | 509 | <property name="can_focus">True</property> | ||
2403 | 510 | <property name="can_default">True</property> | ||
2404 | 511 | <property name="has_default">True</property> | ||
2405 | 512 | <property name="receives_default">True</property> | ||
2406 | 513 | <property name="image">image-apply</property> | ||
2407 | 514 | <property name="use_underline">True</property> | ||
2408 | 515 | <signal name="clicked" handler="on_button_install_clicked" swapped="no"/> | ||
2409 | 516 | </object> | ||
2410 | 517 | <packing> | ||
2411 | 518 | <property name="expand">False</property> | ||
2424 | 519 | <property name="fill">True</property> | 236 | <property name="fill">True</property> |
2426 | 520 | <property name="position">3</property> | 237 | <property name="position">1</property> |
2427 | 521 | </packing> | 238 | </packing> |
2428 | 522 | </child> | 239 | </child> |
2429 | 523 | </object> | 240 | </object> |
2430 | 524 | <packing> | 241 | <packing> |
2431 | 525 | <property name="expand">False</property> | 242 | <property name="expand">False</property> |
2433 | 526 | <property name="fill">True</property> | 243 | <property name="fill">False</property> |
2434 | 527 | <property name="position">1</property> | 244 | <property name="position">1</property> |
2435 | 528 | </packing> | 245 | </packing> |
2436 | 529 | </child> | 246 | </child> |
2437 | 247 | <child> | ||
2438 | 248 | <object class="GtkHBox" id="hbox_on_3g"> | ||
2439 | 249 | <property name="can_focus">False</property> | ||
2440 | 250 | <property name="spacing">12</property> | ||
2441 | 251 | <child> | ||
2442 | 252 | <object class="GtkImage" id="image_on_3g"> | ||
2443 | 253 | <property name="visible">True</property> | ||
2444 | 254 | <property name="can_focus">False</property> | ||
2445 | 255 | <property name="icon_name">modem</property> | ||
2446 | 256 | </object> | ||
2447 | 257 | <packing> | ||
2448 | 258 | <property name="expand">False</property> | ||
2449 | 259 | <property name="fill">True</property> | ||
2450 | 260 | <property name="position">0</property> | ||
2451 | 261 | </packing> | ||
2452 | 262 | </child> | ||
2453 | 263 | <child> | ||
2454 | 264 | <object class="GtkLabel" id="label_on_3g"> | ||
2455 | 265 | <property name="visible">True</property> | ||
2456 | 266 | <property name="can_focus">False</property> | ||
2457 | 267 | <property name="xalign">0</property> | ||
2458 | 268 | <property name="label" translatable="yes">You may want to wait until you’re not using a mobile broadband connection.</property> | ||
2459 | 269 | <property name="wrap">True</property> | ||
2460 | 270 | </object> | ||
2461 | 271 | <packing> | ||
2462 | 272 | <property name="expand">True</property> | ||
2463 | 273 | <property name="fill">True</property> | ||
2464 | 274 | <property name="position">1</property> | ||
2465 | 275 | </packing> | ||
2466 | 276 | </child> | ||
2467 | 277 | </object> | ||
2468 | 278 | <packing> | ||
2469 | 279 | <property name="expand">False</property> | ||
2470 | 280 | <property name="fill">False</property> | ||
2471 | 281 | <property name="position">2</property> | ||
2472 | 282 | </packing> | ||
2473 | 283 | </child> | ||
2474 | 284 | <child> | ||
2475 | 285 | <object class="GtkHBox" id="hbox_battery"> | ||
2476 | 286 | <property name="can_focus">False</property> | ||
2477 | 287 | <property name="spacing">12</property> | ||
2478 | 288 | <child> | ||
2479 | 289 | <object class="GtkImage" id="image_battery"> | ||
2480 | 290 | <property name="visible">True</property> | ||
2481 | 291 | <property name="can_focus">False</property> | ||
2482 | 292 | <property name="icon_name">battery</property> | ||
2483 | 293 | </object> | ||
2484 | 294 | <packing> | ||
2485 | 295 | <property name="expand">False</property> | ||
2486 | 296 | <property name="fill">True</property> | ||
2487 | 297 | <property name="position">0</property> | ||
2488 | 298 | </packing> | ||
2489 | 299 | </child> | ||
2490 | 300 | <child> | ||
2491 | 301 | <object class="GtkLabel" id="label_battery"> | ||
2492 | 302 | <property name="visible">True</property> | ||
2493 | 303 | <property name="can_focus">False</property> | ||
2494 | 304 | <property name="xalign">0</property> | ||
2495 | 305 | <property name="label" translatable="yes">It’s safer to connect the computer to AC power before updating.</property> | ||
2496 | 306 | <property name="wrap">True</property> | ||
2497 | 307 | </object> | ||
2498 | 308 | <packing> | ||
2499 | 309 | <property name="expand">True</property> | ||
2500 | 310 | <property name="fill">True</property> | ||
2501 | 311 | <property name="position">1</property> | ||
2502 | 312 | </packing> | ||
2503 | 313 | </child> | ||
2504 | 314 | </object> | ||
2505 | 315 | <packing> | ||
2506 | 316 | <property name="expand">False</property> | ||
2507 | 317 | <property name="fill">False</property> | ||
2508 | 318 | <property name="position">3</property> | ||
2509 | 319 | </packing> | ||
2510 | 320 | </child> | ||
2511 | 321 | <child> | ||
2512 | 322 | <object class="GtkHBox" id="hbox_offline"> | ||
2513 | 323 | <property name="can_focus">False</property> | ||
2514 | 324 | <property name="spacing">12</property> | ||
2515 | 325 | <child> | ||
2516 | 326 | <object class="GtkImage" id="image_offline"> | ||
2517 | 327 | <property name="visible">True</property> | ||
2518 | 328 | <property name="can_focus">False</property> | ||
2519 | 329 | <property name="icon_name">network-offline</property> | ||
2520 | 330 | </object> | ||
2521 | 331 | <packing> | ||
2522 | 332 | <property name="expand">False</property> | ||
2523 | 333 | <property name="fill">True</property> | ||
2524 | 334 | <property name="position">0</property> | ||
2525 | 335 | </packing> | ||
2526 | 336 | </child> | ||
2527 | 337 | <child> | ||
2528 | 338 | <object class="GtkLabel" id="label_offline"> | ||
2529 | 339 | <property name="visible">True</property> | ||
2530 | 340 | <property name="can_focus">False</property> | ||
2531 | 341 | <property name="xalign">0</property> | ||
2532 | 342 | <property name="wrap">True</property> | ||
2533 | 343 | </object> | ||
2534 | 344 | <packing> | ||
2535 | 345 | <property name="expand">True</property> | ||
2536 | 346 | <property name="fill">True</property> | ||
2537 | 347 | <property name="position">1</property> | ||
2538 | 348 | </packing> | ||
2539 | 349 | </child> | ||
2540 | 350 | </object> | ||
2541 | 351 | <packing> | ||
2542 | 352 | <property name="expand">False</property> | ||
2543 | 353 | <property name="fill">False</property> | ||
2544 | 354 | <property name="position">4</property> | ||
2545 | 355 | </packing> | ||
2546 | 356 | </child> | ||
2547 | 530 | </object> | 357 | </object> |
2548 | 358 | <packing> | ||
2549 | 359 | <property name="expand">False</property> | ||
2550 | 360 | <property name="fill">True</property> | ||
2551 | 361 | <property name="position">3</property> | ||
2552 | 362 | </packing> | ||
2553 | 531 | </child> | 363 | </child> |
2554 | 532 | </object> | 364 | </object> |
2555 | 533 | </interface> | 365 | </interface> |
2556 | 534 | 366 | ||
2557 | === modified file 'debian/update-manager.install' | |||
2558 | --- debian/update-manager.install 2012-11-19 16:33:28 +0000 | |||
2559 | +++ debian/update-manager.install 2013-05-21 05:43:25 +0000 | |||
2560 | @@ -8,10 +8,7 @@ | |||
2561 | 8 | debian/tmp/usr/share/applications/update-manager.desktop | 8 | debian/tmp/usr/share/applications/update-manager.desktop |
2562 | 9 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/ChangelogViewer.py | 9 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/ChangelogViewer.py |
2563 | 10 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/Dialogs.py | 10 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/Dialogs.py |
2564 | 11 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/InstallProgress.py | ||
2565 | 12 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/MetaReleaseGObject.py | 11 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/MetaReleaseGObject.py |
2566 | 13 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/UpdateManager.py | 12 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/UpdateManager.py |
2567 | 14 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/UpdateProgress.py | ||
2568 | 15 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/UpdatesAvailable.py | 13 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/UpdatesAvailable.py |
2569 | 16 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/SimpleGtkbuilderApp.py | ||
2570 | 17 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/HelpViewer.py | 14 | debian/tmp/usr/lib/python3*/dist-packages/UpdateManager/HelpViewer.py |
2571 | 18 | 15 | ||
2572 | === modified file 'po/POTFILES.in' | |||
2573 | --- po/POTFILES.in 2012-09-25 07:36:24 +0000 | |||
2574 | +++ po/POTFILES.in 2013-05-21 05:43:25 +0000 | |||
2575 | @@ -4,9 +4,7 @@ | |||
2576 | 4 | UpdateManager/ChangelogViewer.py | 4 | UpdateManager/ChangelogViewer.py |
2577 | 5 | UpdateManager/MetaReleaseGObject.py | 5 | UpdateManager/MetaReleaseGObject.py |
2578 | 6 | UpdateManager/Dialogs.py | 6 | UpdateManager/Dialogs.py |
2579 | 7 | UpdateManager/InstallProgress.py | ||
2580 | 8 | UpdateManager/UpdateManager.py | 7 | UpdateManager/UpdateManager.py |
2581 | 9 | UpdateManager/UpdateProgress.py | ||
2582 | 10 | UpdateManager/UpdatesAvailable.py | 8 | UpdateManager/UpdatesAvailable.py |
2583 | 11 | UpdateManager/UnitySupport.py | 9 | UpdateManager/UnitySupport.py |
2584 | 12 | UpdateManagerText/UpdateManagerText.py | 10 | UpdateManagerText/UpdateManagerText.py |
2585 | 13 | 11 | ||
2586 | === modified file 'po/update-manager.pot' | |||
2587 | --- po/update-manager.pot 2012-06-25 16:25:51 +0000 | |||
2588 | +++ po/update-manager.pot 2013-05-21 05:43:25 +0000 | |||
2589 | @@ -8,7 +8,7 @@ | |||
2590 | 8 | msgstr "" | 8 | msgstr "" |
2591 | 9 | "Project-Id-Version: PACKAGE VERSION\n" | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
2592 | 10 | "Report-Msgid-Bugs-To: \n" | 10 | "Report-Msgid-Bugs-To: \n" |
2594 | 11 | "POT-Creation-Date: 2012-06-25 12:22-0400\n" | 11 | "POT-Creation-Date: 2013-05-20 10:14-0700\n" |
2595 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
2596 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
2597 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
2598 | @@ -18,176 +18,235 @@ | |||
2599 | 18 | "Content-Transfer-Encoding: 8bit\n" | 18 | "Content-Transfer-Encoding: 8bit\n" |
2600 | 19 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" | 19 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" |
2601 | 20 | 20 | ||
2603 | 21 | #: ../UpdateManager/backend/InstallBackendSynaptic.py:64 | 21 | #: ../UpdateManager/backend/InstallBackendAptdaemon.py:68 |
2604 | 22 | msgid "Checking for updates…" | ||
2605 | 23 | msgstr "" | ||
2606 | 24 | |||
2607 | 25 | #: ../UpdateManager/backend/InstallBackendAptdaemon.py:93 | ||
2608 | 26 | msgid "Installing updates…" | ||
2609 | 27 | msgstr "" | ||
2610 | 28 | |||
2611 | 29 | #: ../UpdateManager/backend/InstallBackendSynaptic.py:37 | ||
2612 | 22 | msgid "Please wait, this can take some time." | 30 | msgid "Please wait, this can take some time." |
2613 | 23 | msgstr "" | 31 | msgstr "" |
2614 | 24 | 32 | ||
2616 | 25 | #: ../UpdateManager/backend/InstallBackendSynaptic.py:66 | 33 | #: ../UpdateManager/backend/InstallBackendSynaptic.py:39 |
2617 | 26 | msgid "Update is complete" | 34 | msgid "Update is complete" |
2618 | 27 | msgstr "" | 35 | msgstr "" |
2619 | 28 | 36 | ||
2677 | 29 | #: ../UpdateManager/DistUpgradeFetcher.py:114 | 37 | #: ../UpdateManager/ChangelogViewer.py:79 |
2621 | 30 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:109 | ||
2622 | 31 | msgid "Could not find the release notes" | ||
2623 | 32 | msgstr "" | ||
2624 | 33 | |||
2625 | 34 | #: ../UpdateManager/DistUpgradeFetcher.py:115 | ||
2626 | 35 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:110 | ||
2627 | 36 | msgid "The server may be overloaded. " | ||
2628 | 37 | msgstr "" | ||
2629 | 38 | |||
2630 | 39 | #: ../UpdateManager/DistUpgradeFetcher.py:125 | ||
2631 | 40 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:114 | ||
2632 | 41 | msgid "Could not download the release notes" | ||
2633 | 42 | msgstr "" | ||
2634 | 43 | |||
2635 | 44 | #: ../UpdateManager/DistUpgradeFetcher.py:126 | ||
2636 | 45 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:115 | ||
2637 | 46 | msgid "Please check your internet connection." | ||
2638 | 47 | msgstr "" | ||
2639 | 48 | |||
2640 | 49 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:68 | ||
2641 | 50 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:91 | ||
2642 | 51 | msgid "Upgrade" | ||
2643 | 52 | msgstr "" | ||
2644 | 53 | |||
2645 | 54 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:95 | ||
2646 | 55 | #: ../data/gtkbuilder/UpdateManager.ui.h:15 | ||
2647 | 56 | msgid "Release Notes" | ||
2648 | 57 | msgstr "" | ||
2649 | 58 | |||
2650 | 59 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:134 | ||
2651 | 60 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:148 | ||
2652 | 61 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:150 | ||
2653 | 62 | msgid "Downloading additional package files..." | ||
2654 | 63 | msgstr "" | ||
2655 | 64 | |||
2656 | 65 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:148 | ||
2657 | 66 | #, python-format | ||
2658 | 67 | msgid "File %s of %s at %sB/s" | ||
2659 | 68 | msgstr "" | ||
2660 | 69 | |||
2661 | 70 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:150 | ||
2662 | 71 | #, python-format | ||
2663 | 72 | msgid "File %s of %s" | ||
2664 | 73 | msgstr "" | ||
2665 | 74 | |||
2666 | 75 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:155 | ||
2667 | 76 | #, python-format | ||
2668 | 77 | msgid "Please insert '%s' into the drive '%s'" | ||
2669 | 78 | msgstr "" | ||
2670 | 79 | |||
2671 | 80 | #. change = QMessageBox.question(None, _("Media Change"), msg, QMessageBox.Ok, QMessageBox.Cancel) | ||
2672 | 81 | #: ../UpdateManager/DistUpgradeFetcherKDE.py:157 | ||
2673 | 82 | msgid "Media Change" | ||
2674 | 83 | msgstr "" | ||
2675 | 84 | |||
2676 | 85 | #: ../UpdateManager/ChangelogViewer.py:75 | ||
2678 | 86 | msgid "Open Link in Browser" | 38 | msgid "Open Link in Browser" |
2679 | 87 | msgstr "" | 39 | msgstr "" |
2680 | 88 | 40 | ||
2682 | 89 | #: ../UpdateManager/ChangelogViewer.py:78 | 41 | #: ../UpdateManager/ChangelogViewer.py:83 |
2683 | 90 | msgid "Copy Link to Clipboard" | 42 | msgid "Copy Link to Clipboard" |
2684 | 91 | msgstr "" | 43 | msgstr "" |
2685 | 92 | 44 | ||
2712 | 93 | #: ../UpdateManager/GtkProgress.py:162 | 45 | #: ../UpdateManager/Dialogs.py:120 |
2713 | 94 | #, python-format | 46 | msgid "Settings…" |
2714 | 95 | msgid "Downloading file %(current)li of %(total)li with %(speed)s/s" | 47 | msgstr "" |
2715 | 96 | msgstr "" | 48 | |
2716 | 97 | 49 | #: ../UpdateManager/Dialogs.py:148 ../UpdateManager/UpdateManager.py:244 | |
2717 | 98 | #: ../UpdateManager/GtkProgress.py:167 | 50 | msgid "You stopped the check for updates." |
2718 | 99 | #, python-format | 51 | msgstr "" |
2719 | 100 | msgid "Downloading file %(current)li of %(total)li" | 52 | |
2720 | 101 | msgstr "" | 53 | #: ../UpdateManager/Dialogs.py:150 |
2721 | 102 | 54 | msgid "_Check Again" | |
2722 | 103 | #: ../UpdateManager/UpdateManager.py:100 | 55 | msgstr "" |
2723 | 104 | msgid "Your Ubuntu release is not supported anymore." | 56 | |
2724 | 105 | msgstr "" | 57 | #: ../UpdateManager/Dialogs.py:161 |
2725 | 106 | 58 | msgid "No software updates are available." | |
2726 | 107 | #: ../UpdateManager/UpdateManager.py:101 | 59 | msgstr "" |
2727 | 108 | msgid "" | 60 | |
2728 | 109 | "You will not get any further security fixes or critical updates. Please " | 61 | #: ../UpdateManager/Dialogs.py:163 ../UpdateManager/Dialogs.py:172 |
2729 | 110 | "upgrade to a later version of Ubuntu." | 62 | msgid "The software on this computer is up to date." |
2730 | 111 | msgstr "" | 63 | msgstr "" |
2731 | 112 | 64 | ||
2732 | 113 | #: ../UpdateManager/UpdateManager.py:109 | 65 | #. Translators: these are Ubuntu version names like "Ubuntu 12.04" |
2733 | 114 | msgid "Upgrade information" | 66 | #: ../UpdateManager/Dialogs.py:174 |
2734 | 115 | msgstr "" | 67 | #, python-format |
2735 | 116 | 68 | msgid "However, %s %s is now available (you have %s)." | |
2736 | 117 | #: ../UpdateManager/UpdateManager.py:204 | 69 | msgstr "" |
2737 | 118 | #: ../UpdateManagerText/UpdateManagerText.py:35 | 70 | |
2738 | 71 | #: ../UpdateManager/Dialogs.py:179 | ||
2739 | 72 | msgid "Upgrade…" | ||
2740 | 73 | msgstr "" | ||
2741 | 74 | |||
2742 | 75 | #. Translators: this is an Ubuntu version name like "Ubuntu 12.04" | ||
2743 | 76 | #: ../UpdateManager/Dialogs.py:201 | ||
2744 | 77 | #, python-format | ||
2745 | 78 | msgid "Software updates are no longer provided for %s %s." | ||
2746 | 79 | msgstr "" | ||
2747 | 80 | |||
2748 | 81 | #. Translators: this is an Ubuntu version name like "Ubuntu 12.04" | ||
2749 | 82 | #: ../UpdateManager/Dialogs.py:205 | ||
2750 | 83 | #, python-format | ||
2751 | 84 | msgid "To stay secure, you should upgrade to %s %s." | ||
2752 | 85 | msgstr "" | ||
2753 | 86 | |||
2754 | 87 | #: ../UpdateManager/Dialogs.py:218 | ||
2755 | 88 | msgid "Not all updates can be installed" | ||
2756 | 89 | msgstr "" | ||
2757 | 90 | |||
2758 | 91 | #: ../UpdateManager/Dialogs.py:220 | ||
2759 | 92 | msgid "" | ||
2760 | 93 | "Run a partial upgrade, to install as many updates as possible.\n" | ||
2761 | 94 | "\n" | ||
2762 | 95 | " This can be caused by:\n" | ||
2763 | 96 | " * A previous upgrade which didn't complete\n" | ||
2764 | 97 | " * Problems with some of the installed software\n" | ||
2765 | 98 | " * Unofficial software packages not provided by Ubuntu\n" | ||
2766 | 99 | " * Normal changes of a pre-release version of Ubuntu" | ||
2767 | 100 | msgstr "" | ||
2768 | 101 | |||
2769 | 102 | #: ../UpdateManager/Dialogs.py:228 | ||
2770 | 103 | msgid "_Partial Upgrade" | ||
2771 | 104 | msgstr "" | ||
2772 | 105 | |||
2773 | 106 | #: ../UpdateManager/Dialogs.py:229 | ||
2774 | 107 | msgid "_Continue" | ||
2775 | 108 | msgstr "" | ||
2776 | 109 | |||
2777 | 110 | #: ../UpdateManager/Dialogs.py:265 | ||
2778 | 111 | msgid "_Try Again" | ||
2779 | 112 | msgstr "" | ||
2780 | 113 | |||
2781 | 114 | #: ../UpdateManager/Dialogs.py:279 | ||
2782 | 115 | msgid "The computer needs to restart to finish installing updates." | ||
2783 | 116 | msgstr "" | ||
2784 | 117 | |||
2785 | 118 | #: ../UpdateManager/Dialogs.py:280 | ||
2786 | 119 | msgid "_Restart" | ||
2787 | 120 | msgstr "" | ||
2788 | 121 | |||
2789 | 122 | #. Basic GTK+ parameters | ||
2790 | 123 | #: ../UpdateManager/UpdateManager.py:85 ../data/update-manager.desktop.in.h:1 | ||
2791 | 124 | msgid "Software Updater" | ||
2792 | 125 | msgstr "" | ||
2793 | 126 | |||
2794 | 127 | #: ../UpdateManager/UpdateManager.py:242 | ||
2795 | 128 | msgid "Some software couldn’t be checked for updates." | ||
2796 | 129 | msgstr "" | ||
2797 | 130 | |||
2798 | 131 | #: ../UpdateManager/UpdateManager.py:245 | ||
2799 | 132 | msgid "Updated software is available from a previous check." | ||
2800 | 133 | msgstr "" | ||
2801 | 134 | |||
2802 | 135 | #. we assert a clean cache | ||
2803 | 136 | #: ../UpdateManager/UpdateManager.py:323 | ||
2804 | 137 | msgid "Software index is broken" | ||
2805 | 138 | msgstr "" | ||
2806 | 139 | |||
2807 | 140 | #: ../UpdateManager/UpdateManager.py:324 | ||
2808 | 141 | msgid "" | ||
2809 | 142 | "It is impossible to install or remove any software. Please use the package " | ||
2810 | 143 | "manager \"Synaptic\" or run \"sudo apt-get install -f\" in a terminal to fix " | ||
2811 | 144 | "this issue at first." | ||
2812 | 145 | msgstr "" | ||
2813 | 146 | |||
2814 | 147 | #: ../UpdateManager/UpdateManager.py:330 | ||
2815 | 148 | msgid "Could not initialize the package information" | ||
2816 | 149 | msgstr "" | ||
2817 | 150 | |||
2818 | 151 | #: ../UpdateManager/UpdateManager.py:331 | ||
2819 | 152 | msgid "" | ||
2820 | 153 | "An unresolvable problem occurred while initializing the package " | ||
2821 | 154 | "information.\n" | ||
2822 | 155 | "\n" | ||
2823 | 156 | "Please report this bug against the 'update-manager' package and include the " | ||
2824 | 157 | "following error message:\n" | ||
2825 | 158 | msgstr "" | ||
2826 | 159 | |||
2827 | 160 | #: ../UpdateManager/UpdateManager.py:348 | ||
2828 | 161 | msgid "Could not calculate the upgrade" | ||
2829 | 162 | msgstr "" | ||
2830 | 163 | |||
2831 | 164 | #: ../UpdateManager/UpdateManager.py:349 | ||
2832 | 165 | msgid "" | ||
2833 | 166 | "An unresolvable problem occurred while calculating the upgrade.\n" | ||
2834 | 167 | "\n" | ||
2835 | 168 | "Please report this bug against the 'update-manager' package and include the " | ||
2836 | 169 | "following error message:\n" | ||
2837 | 170 | msgstr "" | ||
2838 | 171 | |||
2839 | 172 | #: ../UpdateManager/UpdatesAvailable.py:248 | ||
2840 | 173 | msgid "Install Now" | ||
2841 | 174 | msgstr "" | ||
2842 | 175 | |||
2843 | 176 | #: ../UpdateManager/UpdatesAvailable.py:278 | ||
2844 | 177 | #: ../UpdateManagerText/UpdateManagerText.py:36 | ||
2845 | 119 | msgid "Install" | 178 | msgid "Install" |
2846 | 120 | msgstr "" | 179 | msgstr "" |
2847 | 121 | 180 | ||
2850 | 122 | #: ../UpdateManager/UpdateManager.py:206 | 181 | #: ../UpdateManager/UpdatesAvailable.py:312 |
2851 | 123 | msgid "Name" | 182 | msgid "Download" |
2852 | 183 | msgstr "" | ||
2853 | 184 | |||
2854 | 185 | #: ../UpdateManager/UpdatesAvailable.py:372 | ||
2855 | 186 | msgid "_Remind Me Later" | ||
2856 | 124 | msgstr "" | 187 | msgstr "" |
2857 | 125 | 188 | ||
2858 | 126 | #. upload_archive = version_match.group(2).strip() | 189 | #. upload_archive = version_match.group(2).strip() |
2860 | 127 | #: ../UpdateManager/UpdateManager.py:359 | 190 | #: ../UpdateManager/UpdatesAvailable.py:506 |
2861 | 128 | #, python-format | 191 | #, python-format |
2862 | 129 | msgid "Version %s: \n" | 192 | msgid "Version %s: \n" |
2863 | 130 | msgstr "" | 193 | msgstr "" |
2864 | 131 | 194 | ||
2866 | 132 | #: ../UpdateManager/UpdateManager.py:417 | 195 | #: ../UpdateManager/UpdatesAvailable.py:569 |
2867 | 133 | msgid "" | 196 | msgid "" |
2868 | 134 | "No network connection detected, you can not download changelog information." | 197 | "No network connection detected, you can not download changelog information." |
2869 | 135 | msgstr "" | 198 | msgstr "" |
2870 | 136 | 199 | ||
2872 | 137 | #: ../UpdateManager/UpdateManager.py:427 | 200 | #: ../UpdateManager/UpdatesAvailable.py:579 |
2873 | 138 | msgid "Downloading list of changes..." | 201 | msgid "Downloading list of changes..." |
2874 | 139 | msgstr "" | 202 | msgstr "" |
2875 | 140 | 203 | ||
2877 | 141 | #: ../UpdateManager/UpdateManager.py:471 | 204 | #: ../UpdateManager/UpdatesAvailable.py:623 |
2878 | 142 | msgid "_Deselect All" | 205 | msgid "_Deselect All" |
2879 | 143 | msgstr "" | 206 | msgstr "" |
2880 | 144 | 207 | ||
2882 | 145 | #: ../UpdateManager/UpdateManager.py:477 | 208 | #: ../UpdateManager/UpdatesAvailable.py:629 |
2883 | 146 | msgid "Select _All" | 209 | msgid "Select _All" |
2884 | 147 | msgstr "" | 210 | msgstr "" |
2885 | 148 | 211 | ||
2887 | 149 | #: ../UpdateManager/UpdateManager.py:536 | 212 | #: ../UpdateManager/UpdatesAvailable.py:704 |
2888 | 150 | #, python-format | 213 | #, python-format |
2889 | 151 | msgid "%s will be downloaded." | 214 | msgid "%s will be downloaded." |
2890 | 152 | msgstr "" | 215 | msgstr "" |
2891 | 153 | 216 | ||
2893 | 154 | #: ../UpdateManager/UpdateManager.py:548 | 217 | #: ../UpdateManager/UpdatesAvailable.py:718 |
2894 | 155 | msgid "The update has already been downloaded." | 218 | msgid "The update has already been downloaded." |
2895 | 156 | msgid_plural "The updates have already been downloaded." | 219 | msgid_plural "The updates have already been downloaded." |
2896 | 157 | msgstr[0] "" | 220 | msgstr[0] "" |
2897 | 158 | msgstr[1] "" | 221 | msgstr[1] "" |
2898 | 159 | 222 | ||
2900 | 160 | #: ../UpdateManager/UpdateManager.py:553 | 223 | #: ../UpdateManager/UpdatesAvailable.py:724 |
2901 | 161 | msgid "There are no updates to install." | 224 | msgid "There are no updates to install." |
2902 | 162 | msgstr "" | 225 | msgstr "" |
2903 | 163 | 226 | ||
2905 | 164 | #: ../UpdateManager/UpdateManager.py:562 | 227 | #: ../UpdateManager/UpdatesAvailable.py:733 |
2906 | 165 | msgid "Unknown download size." | 228 | msgid "Unknown download size." |
2907 | 166 | msgstr "" | 229 | msgstr "" |
2908 | 167 | 230 | ||
2914 | 168 | #: ../UpdateManager/UpdateManager.py:577 | 231 | #: ../UpdateManager/UpdatesAvailable.py:759 |
2910 | 169 | msgid "The software on this computer is up to date." | ||
2911 | 170 | msgstr "" | ||
2912 | 171 | |||
2913 | 172 | #: ../UpdateManager/UpdateManager.py:591 | ||
2915 | 173 | #, python-format | 232 | #, python-format |
2916 | 174 | msgid "" | 233 | msgid "" |
2918 | 175 | "Updated software has been issued since %s was released. Do you want to " | 234 | "Updated software has been issued since %s %s was released. Do you want to " |
2919 | 176 | "install it now?" | 235 | "install it now?" |
2920 | 177 | msgstr "" | 236 | msgstr "" |
2921 | 178 | 237 | ||
2923 | 179 | #: ../UpdateManager/UpdateManager.py:594 | 238 | #: ../UpdateManager/UpdatesAvailable.py:764 |
2924 | 180 | msgid "" | 239 | msgid "" |
2925 | 181 | "Updated software is available for this computer. Do you want to install it " | 240 | "Updated software is available for this computer. Do you want to install it " |
2926 | 182 | "now?" | 241 | "now?" |
2927 | 183 | msgstr "" | 242 | msgstr "" |
2928 | 184 | 243 | ||
2929 | 185 | #. print("on_button_install_clicked") | 244 | #. print("on_button_install_clicked") |
2931 | 186 | #: ../UpdateManager/UpdateManager.py:645 | 245 | #: ../UpdateManager/UpdatesAvailable.py:794 |
2932 | 187 | msgid "Not enough free disk space" | 246 | msgid "Not enough free disk space" |
2933 | 188 | msgstr "" | 247 | msgstr "" |
2934 | 189 | 248 | ||
2936 | 190 | #: ../UpdateManager/UpdateManager.py:646 | 249 | #: ../UpdateManager/UpdatesAvailable.py:795 |
2937 | 191 | #, python-format | 250 | #, python-format |
2938 | 192 | msgid "" | 251 | msgid "" |
2939 | 193 | "The upgrade needs a total of %s free space on disk '%s'. Please free at " | 252 | "The upgrade needs a total of %s free space on disk '%s'. Please free at " |
2940 | @@ -195,125 +254,46 @@ | |||
2941 | 195 | "temporary packages of former installations using 'sudo apt-get clean'." | 254 | "temporary packages of former installations using 'sudo apt-get clean'." |
2942 | 196 | msgstr "" | 255 | msgstr "" |
2943 | 197 | 256 | ||
2955 | 198 | #: ../UpdateManager/UpdateManager.py:671 | 257 | #: ../UpdateManager/UpdatesAvailable.py:821 |
2945 | 199 | msgid "" | ||
2946 | 200 | "The computer needs to restart to finish installing updates. Please save your " | ||
2947 | 201 | "work before continuing." | ||
2948 | 202 | msgstr "" | ||
2949 | 203 | |||
2950 | 204 | #: ../UpdateManager/UpdateManager.py:728 | ||
2951 | 205 | msgid "Reading package information" | ||
2952 | 206 | msgstr "" | ||
2953 | 207 | |||
2954 | 208 | #: ../UpdateManager/UpdateManager.py:743 | ||
2956 | 209 | msgid "Connecting..." | 258 | msgid "Connecting..." |
2957 | 210 | msgstr "" | 259 | msgstr "" |
2958 | 211 | 260 | ||
2960 | 212 | #: ../UpdateManager/UpdateManager.py:758 | 261 | #: ../UpdateManager/UpdatesAvailable.py:837 |
2961 | 213 | msgid "You may not be able to check for updates or download new updates." | 262 | msgid "You may not be able to check for updates or download new updates." |
2962 | 214 | msgstr "" | 263 | msgstr "" |
2963 | 215 | 264 | ||
3042 | 216 | #: ../UpdateManager/UpdateManager.py:880 | 265 | #: ../UpdateManager/UpdatesAvailable.py:986 |
3043 | 217 | msgid "Could not initialize the package information" | 266 | msgid "Security updates" |
3044 | 218 | msgstr "" | 267 | msgstr "" |
3045 | 219 | 268 | ||
3046 | 220 | #: ../UpdateManager/UpdateManager.py:881 | 269 | #: ../UpdateManager/UpdatesAvailable.py:989 |
3047 | 221 | msgid "" | 270 | msgid "Other updates" |
3048 | 222 | "An unresolvable problem occurred while initializing the package " | 271 | msgstr "" |
3049 | 223 | "information.\n" | 272 | |
3050 | 224 | "\n" | 273 | #: ../UpdateManager/UnitySupport.py:67 |
2973 | 225 | "Please report this bug against the 'update-manager' package and include the " | ||
2974 | 226 | "following error message:\n" | ||
2975 | 227 | msgstr "" | ||
2976 | 228 | |||
2977 | 229 | #: ../UpdateManager/UpdateManager.py:905 | ||
2978 | 230 | msgid "Could not calculate the upgrade" | ||
2979 | 231 | msgstr "" | ||
2980 | 232 | |||
2981 | 233 | #: ../UpdateManager/UpdateManager.py:906 | ||
2982 | 234 | msgid "" | ||
2983 | 235 | "An unresolvable problem occurred while calculating the upgrade.\n" | ||
2984 | 236 | "\n" | ||
2985 | 237 | "Please report this bug against the 'update-manager' package and include the " | ||
2986 | 238 | "following error message:" | ||
2987 | 239 | msgstr "" | ||
2988 | 240 | |||
2989 | 241 | #: ../UpdateManager/UpdateManager.py:930 | ||
2990 | 242 | msgid " (New install)" | ||
2991 | 243 | msgstr "" | ||
2992 | 244 | |||
2993 | 245 | #. TRANSLATORS: the b stands for Bytes | ||
2994 | 246 | #: ../UpdateManager/UpdateManager.py:937 | ||
2995 | 247 | #, python-format | ||
2996 | 248 | msgid "(Size: %s)" | ||
2997 | 249 | msgstr "" | ||
2998 | 250 | |||
2999 | 251 | #: ../UpdateManager/UpdateManager.py:941 | ||
3000 | 252 | #, python-format | ||
3001 | 253 | msgid "From version %(old_version)s to %(new_version)s" | ||
3002 | 254 | msgstr "" | ||
3003 | 255 | |||
3004 | 256 | #: ../UpdateManager/UpdateManager.py:945 | ||
3005 | 257 | #, python-format | ||
3006 | 258 | msgid "Version %s" | ||
3007 | 259 | msgstr "" | ||
3008 | 260 | |||
3009 | 261 | #: ../UpdateManager/UpdateManager.py:978 | ||
3010 | 262 | msgid "Release upgrade not possible right now" | ||
3011 | 263 | msgstr "" | ||
3012 | 264 | |||
3013 | 265 | #: ../UpdateManager/UpdateManager.py:979 | ||
3014 | 266 | #, python-format | ||
3015 | 267 | msgid "" | ||
3016 | 268 | "The release upgrade can not be performed currently, please try again later. " | ||
3017 | 269 | "The server reported: '%s'" | ||
3018 | 270 | msgstr "" | ||
3019 | 271 | |||
3020 | 272 | #: ../UpdateManager/UpdateManager.py:981 | ||
3021 | 273 | msgid "Downloading the release upgrade tool" | ||
3022 | 274 | msgstr "" | ||
3023 | 275 | |||
3024 | 276 | #: ../UpdateManager/UpdateManager.py:988 | ||
3025 | 277 | #, python-format | ||
3026 | 278 | msgid "<b>New Ubuntu release '%s' is available</b>" | ||
3027 | 279 | msgstr "" | ||
3028 | 280 | |||
3029 | 281 | #. we assert a clean cache | ||
3030 | 282 | #: ../UpdateManager/UpdateManager.py:1027 | ||
3031 | 283 | msgid "Software index is broken" | ||
3032 | 284 | msgstr "" | ||
3033 | 285 | |||
3034 | 286 | #: ../UpdateManager/UpdateManager.py:1028 | ||
3035 | 287 | msgid "" | ||
3036 | 288 | "It is impossible to install or remove any software. Please use the package " | ||
3037 | 289 | "manager \"Synaptic\" or run \"sudo apt-get install -f\" in a terminal to fix " | ||
3038 | 290 | "this issue at first." | ||
3039 | 291 | msgstr "" | ||
3040 | 292 | |||
3041 | 293 | #: ../UpdateManager/UnitySupport.py:57 | ||
3051 | 294 | msgid "Install All Available Updates" | 274 | msgid "Install All Available Updates" |
3052 | 295 | msgstr "" | 275 | msgstr "" |
3053 | 296 | 276 | ||
3055 | 297 | #: ../UpdateManagerText/UpdateManagerText.py:34 | 277 | #: ../UpdateManagerText/UpdateManagerText.py:35 |
3056 | 298 | msgid "Cancel" | 278 | msgid "Cancel" |
3057 | 299 | msgstr "" | 279 | msgstr "" |
3058 | 300 | 280 | ||
3060 | 301 | #: ../UpdateManagerText/UpdateManagerText.py:37 | 281 | #: ../UpdateManagerText/UpdateManagerText.py:38 |
3061 | 302 | msgid "Changelog" | 282 | msgid "Changelog" |
3062 | 303 | msgstr "" | 283 | msgstr "" |
3063 | 304 | 284 | ||
3065 | 305 | #: ../UpdateManagerText/UpdateManagerText.py:40 | 285 | #: ../UpdateManagerText/UpdateManagerText.py:41 |
3066 | 306 | msgid "Updates" | 286 | msgid "Updates" |
3067 | 307 | msgstr "" | 287 | msgstr "" |
3068 | 308 | 288 | ||
3070 | 309 | #: ../UpdateManagerText/UpdateManagerText.py:53 | 289 | #: ../UpdateManagerText/UpdateManagerText.py:54 |
3071 | 310 | msgid "Building Updates List" | 290 | msgid "Building Updates List" |
3072 | 311 | msgstr "" | 291 | msgstr "" |
3073 | 312 | 292 | ||
3075 | 313 | #: ../UpdateManagerText/UpdateManagerText.py:56 | 293 | #: ../UpdateManagerText/UpdateManagerText.py:57 |
3076 | 314 | msgid "" | 294 | msgid "" |
3077 | 315 | "\n" | 295 | "\n" |
3079 | 316 | "A normal upgrade can not be calculated, please run: \n" | 296 | "A normal upgrade can not be calculated, please run:\n" |
3080 | 317 | " sudo apt-get dist-upgrade\n" | 297 | " sudo apt-get dist-upgrade\n" |
3081 | 318 | "\n" | 298 | "\n" |
3082 | 319 | "\n" | 299 | "\n" |
3083 | @@ -324,35 +304,30 @@ | |||
3084 | 324 | " * Normal changes of a pre-release version of Ubuntu" | 304 | " * Normal changes of a pre-release version of Ubuntu" |
3085 | 325 | msgstr "" | 305 | msgstr "" |
3086 | 326 | 306 | ||
3088 | 327 | #: ../UpdateManagerText/UpdateManagerText.py:125 | 307 | #: ../UpdateManagerText/UpdateManagerText.py:127 |
3089 | 328 | msgid "Downloading changelog" | 308 | msgid "Downloading changelog" |
3090 | 329 | msgstr "" | 309 | msgstr "" |
3091 | 330 | 310 | ||
3098 | 331 | #: ../UpdateManager/Core/MyCache.py:147 | 311 | #: ../UpdateManager/Core/MyCache.py:333 |
3093 | 332 | #, python-format | ||
3094 | 333 | msgid "Other updates (%s)" | ||
3095 | 334 | msgstr "" | ||
3096 | 335 | |||
3097 | 336 | #: ../UpdateManager/Core/MyCache.py:325 | ||
3099 | 337 | msgid "This update does not come from a source that supports changelogs." | 312 | msgid "This update does not come from a source that supports changelogs." |
3100 | 338 | msgstr "" | 313 | msgstr "" |
3101 | 339 | 314 | ||
3103 | 340 | #: ../UpdateManager/Core/MyCache.py:331 ../UpdateManager/Core/MyCache.py:359 | 315 | #: ../UpdateManager/Core/MyCache.py:339 ../UpdateManager/Core/MyCache.py:376 |
3104 | 341 | msgid "" | 316 | msgid "" |
3105 | 342 | "Failed to download the list of changes. \n" | 317 | "Failed to download the list of changes. \n" |
3106 | 343 | "Please check your Internet connection." | 318 | "Please check your Internet connection." |
3107 | 344 | msgstr "" | 319 | msgstr "" |
3108 | 345 | 320 | ||
3110 | 346 | #: ../UpdateManager/Core/MyCache.py:338 | 321 | #: ../UpdateManager/Core/MyCache.py:346 |
3111 | 347 | #, python-format | 322 | #, python-format |
3112 | 348 | msgid "" | 323 | msgid "" |
3114 | 349 | "Changes for the versions:\n" | 324 | "Changes for %s versions:\n" |
3115 | 350 | "Installed version: %s\n" | 325 | "Installed version: %s\n" |
3116 | 351 | "Available version: %s\n" | 326 | "Available version: %s\n" |
3117 | 352 | "\n" | 327 | "\n" |
3118 | 353 | msgstr "" | 328 | msgstr "" |
3119 | 354 | 329 | ||
3121 | 355 | #: ../UpdateManager/Core/MyCache.py:348 | 330 | #: ../UpdateManager/Core/MyCache.py:362 |
3122 | 356 | #, python-format | 331 | #, python-format |
3123 | 357 | msgid "" | 332 | msgid "" |
3124 | 358 | "The changelog does not contain any relevant changes.\n" | 333 | "The changelog does not contain any relevant changes.\n" |
3125 | @@ -361,7 +336,7 @@ | |||
3126 | 361 | "until the changes become available or try again later." | 336 | "until the changes become available or try again later." |
3127 | 362 | msgstr "" | 337 | msgstr "" |
3128 | 363 | 338 | ||
3130 | 364 | #: ../UpdateManager/Core/MyCache.py:353 | 339 | #: ../UpdateManager/Core/MyCache.py:369 |
3131 | 365 | #, python-format | 340 | #, python-format |
3132 | 366 | msgid "" | 341 | msgid "" |
3133 | 367 | "The list of changes is not available yet.\n" | 342 | "The list of changes is not available yet.\n" |
3134 | @@ -370,124 +345,15 @@ | |||
3135 | 370 | "until the changes become available or try again later." | 345 | "until the changes become available or try again later." |
3136 | 371 | msgstr "" | 346 | msgstr "" |
3137 | 372 | 347 | ||
3252 | 373 | #: ../UpdateManager/Core/UpdateList.py:51 | 348 | #. Translators: the %s is a distro name, like 'Ubuntu' and 'base' as in |
3253 | 374 | msgid "Failed to detect distribution" | 349 | #. the core components and packages. |
3254 | 375 | msgstr "" | 350 | #: ../UpdateManager/Core/UpdateList.py:167 |
3255 | 376 | 351 | #, python-format | |
3256 | 377 | #: ../UpdateManager/Core/UpdateList.py:52 | 352 | msgid "%s base" |
3143 | 378 | #, python-format | ||
3144 | 379 | msgid "A error '%s' occurred while checking what system you are using." | ||
3145 | 380 | msgstr "" | ||
3146 | 381 | |||
3147 | 382 | #: ../UpdateManager/Core/UpdateList.py:63 | ||
3148 | 383 | msgid "Important security updates" | ||
3149 | 384 | msgstr "" | ||
3150 | 385 | |||
3151 | 386 | #: ../UpdateManager/Core/UpdateList.py:64 | ||
3152 | 387 | msgid "Recommended updates" | ||
3153 | 388 | msgstr "" | ||
3154 | 389 | |||
3155 | 390 | #: ../UpdateManager/Core/UpdateList.py:65 | ||
3156 | 391 | msgid "Proposed updates" | ||
3157 | 392 | msgstr "" | ||
3158 | 393 | |||
3159 | 394 | #: ../UpdateManager/Core/UpdateList.py:66 | ||
3160 | 395 | msgid "Backports" | ||
3161 | 396 | msgstr "" | ||
3162 | 397 | |||
3163 | 398 | #: ../UpdateManager/Core/UpdateList.py:67 | ||
3164 | 399 | msgid "Distribution updates" | ||
3165 | 400 | msgstr "" | ||
3166 | 401 | |||
3167 | 402 | #: ../UpdateManager/Core/UpdateList.py:72 | ||
3168 | 403 | msgid "Other updates" | ||
3169 | 404 | msgstr "" | ||
3170 | 405 | |||
3171 | 406 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:72 | ||
3172 | 407 | #, python-format | ||
3173 | 408 | msgid "authenticate '%(file)s' against '%(signature)s' " | ||
3174 | 409 | msgstr "" | ||
3175 | 410 | |||
3176 | 411 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:131 | ||
3177 | 412 | #, python-format | ||
3178 | 413 | msgid "extracting '%s'" | ||
3179 | 414 | msgstr "" | ||
3180 | 415 | |||
3181 | 416 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:151 | ||
3182 | 417 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:152 | ||
3183 | 418 | msgid "Could not run the upgrade tool" | ||
3184 | 419 | msgstr "" | ||
3185 | 420 | |||
3186 | 421 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:152 | ||
3187 | 422 | msgid "" | ||
3188 | 423 | "This is most likely a bug in the upgrade tool. Please report it as a bug " | ||
3189 | 424 | "using the command 'ubuntu-bug update-manager'." | ||
3190 | 425 | msgstr "" | ||
3191 | 426 | |||
3192 | 427 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:227 | ||
3193 | 428 | msgid "Upgrade tool signature" | ||
3194 | 429 | msgstr "" | ||
3195 | 430 | |||
3196 | 431 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:234 | ||
3197 | 432 | msgid "Upgrade tool" | ||
3198 | 433 | msgstr "" | ||
3199 | 434 | |||
3200 | 435 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:268 | ||
3201 | 436 | msgid "Failed to fetch" | ||
3202 | 437 | msgstr "" | ||
3203 | 438 | |||
3204 | 439 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:269 | ||
3205 | 440 | msgid "Fetching the upgrade failed. There may be a network problem. " | ||
3206 | 441 | msgstr "" | ||
3207 | 442 | |||
3208 | 443 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:273 | ||
3209 | 444 | msgid "Authentication failed" | ||
3210 | 445 | msgstr "" | ||
3211 | 446 | |||
3212 | 447 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:274 | ||
3213 | 448 | msgid "" | ||
3214 | 449 | "Authenticating the upgrade failed. There may be a problem with the network " | ||
3215 | 450 | "or with the server. " | ||
3216 | 451 | msgstr "" | ||
3217 | 452 | |||
3218 | 453 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:279 | ||
3219 | 454 | msgid "Failed to extract" | ||
3220 | 455 | msgstr "" | ||
3221 | 456 | |||
3222 | 457 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:280 | ||
3223 | 458 | msgid "" | ||
3224 | 459 | "Extracting the upgrade failed. There may be a problem with the network or " | ||
3225 | 460 | "with the server. " | ||
3226 | 461 | msgstr "" | ||
3227 | 462 | |||
3228 | 463 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:285 | ||
3229 | 464 | msgid "Verification failed" | ||
3230 | 465 | msgstr "" | ||
3231 | 466 | |||
3232 | 467 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:286 | ||
3233 | 468 | msgid "" | ||
3234 | 469 | "Verifying the upgrade failed. There may be a problem with the network or " | ||
3235 | 470 | "with the server. " | ||
3236 | 471 | msgstr "" | ||
3237 | 472 | |||
3238 | 473 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:300 | ||
3239 | 474 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:306 | ||
3240 | 475 | msgid "Can not run the upgrade" | ||
3241 | 476 | msgstr "" | ||
3242 | 477 | |||
3243 | 478 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:301 | ||
3244 | 479 | msgid "" | ||
3245 | 480 | "This usually is caused by a system where /tmp is mounted noexec. Please " | ||
3246 | 481 | "remount without noexec and run the upgrade again." | ||
3247 | 482 | msgstr "" | ||
3248 | 483 | |||
3249 | 484 | #: ../UpdateManager/Core/DistUpgradeFetcherCore.py:307 | ||
3250 | 485 | #, python-format | ||
3251 | 486 | msgid "The error message is '%s'." | ||
3257 | 487 | msgstr "" | 353 | msgstr "" |
3258 | 488 | 354 | ||
3259 | 489 | #. TRANSLATORS: download size of small updates, e.g. "250 kB" | 355 | #. TRANSLATORS: download size of small updates, e.g. "250 kB" |
3261 | 490 | #: ../UpdateManager/Core/utils.py:433 | 356 | #: ../UpdateManager/Core/utils.py:485 |
3262 | 491 | #, python-format | 357 | #, python-format |
3263 | 492 | msgid "%(size).0f kB" | 358 | msgid "%(size).0f kB" |
3264 | 493 | msgid_plural "%(size).0f kB" | 359 | msgid_plural "%(size).0f kB" |
3265 | @@ -495,112 +361,46 @@ | |||
3266 | 495 | msgstr[1] "" | 361 | msgstr[1] "" |
3267 | 496 | 362 | ||
3268 | 497 | #. TRANSLATORS: download size of updates, e.g. "2.3 MB" | 363 | #. TRANSLATORS: download size of updates, e.g. "2.3 MB" |
3270 | 498 | #: ../UpdateManager/Core/utils.py:436 | 364 | #: ../UpdateManager/Core/utils.py:489 |
3271 | 499 | #, python-format | 365 | #, python-format |
3272 | 500 | msgid "%.1f MB" | 366 | msgid "%.1f MB" |
3273 | 501 | msgstr "" | 367 | msgstr "" |
3274 | 502 | 368 | ||
3275 | 503 | #: ../data/gtkbuilder/UpdateManager.ui.h:1 | 369 | #: ../data/gtkbuilder/UpdateManager.ui.h:1 |
3277 | 504 | msgid "<big><b>Starting Software Updater</b></big>" | 370 | msgid "updates" |
3278 | 505 | msgstr "" | 371 | msgstr "" |
3279 | 506 | 372 | ||
3280 | 507 | #: ../data/gtkbuilder/UpdateManager.ui.h:2 | 373 | #: ../data/gtkbuilder/UpdateManager.ui.h:2 |
3284 | 508 | msgid "" | 374 | msgid "Changes" |
3282 | 509 | "Software updates correct errors, eliminate security vulnerabilities and " | ||
3283 | 510 | "provide new features." | ||
3285 | 511 | msgstr "" | 375 | msgstr "" |
3286 | 512 | 376 | ||
3287 | 513 | #: ../data/gtkbuilder/UpdateManager.ui.h:3 | 377 | #: ../data/gtkbuilder/UpdateManager.ui.h:3 |
3289 | 514 | msgid "_Partial Upgrade" | 378 | msgid "Description" |
3290 | 515 | msgstr "" | 379 | msgstr "" |
3291 | 516 | 380 | ||
3292 | 517 | #: ../data/gtkbuilder/UpdateManager.ui.h:4 | 381 | #: ../data/gtkbuilder/UpdateManager.ui.h:4 |
3294 | 518 | msgid "<big><b>Not all updates can be installed</b></big>" | 382 | msgid "Technical description" |
3295 | 519 | msgstr "" | 383 | msgstr "" |
3296 | 520 | 384 | ||
3297 | 521 | #: ../data/gtkbuilder/UpdateManager.ui.h:5 | 385 | #: ../data/gtkbuilder/UpdateManager.ui.h:5 |
3298 | 522 | msgid "" | ||
3299 | 523 | "Run a partial upgrade, to install as many updates as possible. \n" | ||
3300 | 524 | "\n" | ||
3301 | 525 | "This can be caused by:\n" | ||
3302 | 526 | " * A previous upgrade which didn't complete\n" | ||
3303 | 527 | " * Problems with some of the installed software\n" | ||
3304 | 528 | " * Unofficial software packages not provided by Ubuntu\n" | ||
3305 | 529 | " * Normal changes of a pre-release version of Ubuntu" | ||
3306 | 530 | msgstr "" | ||
3307 | 531 | |||
3308 | 532 | #: ../data/gtkbuilder/UpdateManager.ui.h:12 | ||
3309 | 533 | msgid "Co_ntinue" | ||
3310 | 534 | msgstr "" | ||
3311 | 535 | |||
3312 | 536 | #: ../data/gtkbuilder/UpdateManager.ui.h:13 | ||
3313 | 537 | msgid "<big><b>Running on battery</b></big>" | ||
3314 | 538 | msgstr "" | ||
3315 | 539 | |||
3316 | 540 | #: ../data/gtkbuilder/UpdateManager.ui.h:14 | ||
3317 | 541 | msgid "Your system is running on battery. Are you sure you want to continue?" | ||
3318 | 542 | msgstr "" | ||
3319 | 543 | |||
3320 | 544 | #: ../data/gtkbuilder/UpdateManager.ui.h:16 | ||
3321 | 545 | msgid "_Upgrade" | ||
3322 | 546 | msgstr "" | ||
3323 | 547 | |||
3324 | 548 | #: ../data/gtkbuilder/UpdateManager.ui.h:17 | ||
3325 | 549 | msgid "Show progress of individual files" | ||
3326 | 550 | msgstr "" | ||
3327 | 551 | |||
3328 | 552 | #: ../data/gtkbuilder/UpdateManager.ui.h:18 | ||
3329 | 553 | #: ../data/update-manager.desktop.in.h:1 | ||
3330 | 554 | msgid "Software Updater" | ||
3331 | 555 | msgstr "" | ||
3332 | 556 | |||
3333 | 557 | #: ../data/gtkbuilder/UpdateManager.ui.h:19 | ||
3334 | 558 | msgid "U_pgrade" | ||
3335 | 559 | msgstr "" | ||
3336 | 560 | |||
3337 | 561 | #: ../data/gtkbuilder/UpdateManager.ui.h:20 | ||
3338 | 562 | msgid "_Restart Now" | ||
3339 | 563 | msgstr "" | ||
3340 | 564 | |||
3341 | 565 | #: ../data/gtkbuilder/UpdateManager.ui.h:21 | ||
3342 | 566 | msgid "updates" | ||
3343 | 567 | msgstr "" | ||
3344 | 568 | |||
3345 | 569 | #: ../data/gtkbuilder/UpdateManager.ui.h:22 | ||
3346 | 570 | msgid "Changes" | ||
3347 | 571 | msgstr "" | ||
3348 | 572 | |||
3349 | 573 | #: ../data/gtkbuilder/UpdateManager.ui.h:23 | ||
3350 | 574 | msgid "Description" | ||
3351 | 575 | msgstr "" | ||
3352 | 576 | |||
3353 | 577 | #: ../data/gtkbuilder/UpdateManager.ui.h:24 | ||
3354 | 578 | msgid "Details of updates" | 386 | msgid "Details of updates" |
3355 | 579 | msgstr "" | 387 | msgstr "" |
3356 | 580 | 388 | ||
3358 | 581 | #: ../data/gtkbuilder/UpdateManager.ui.h:25 | 389 | #: ../data/gtkbuilder/UpdateManager.ui.h:6 |
3359 | 582 | msgid "" | 390 | msgid "" |
3360 | 583 | "You are connected via roaming and may be charged for the data consumed by " | 391 | "You are connected via roaming and may be charged for the data consumed by " |
3361 | 584 | "this update." | 392 | "this update." |
3362 | 585 | msgstr "" | 393 | msgstr "" |
3363 | 586 | 394 | ||
3365 | 587 | #: ../data/gtkbuilder/UpdateManager.ui.h:26 | 395 | #: ../data/gtkbuilder/UpdateManager.ui.h:7 |
3366 | 588 | msgid "" | 396 | msgid "" |
3367 | 589 | "You may want to wait until you’re not using a mobile broadband connection." | 397 | "You may want to wait until you’re not using a mobile broadband connection." |
3368 | 590 | msgstr "" | 398 | msgstr "" |
3369 | 591 | 399 | ||
3371 | 592 | #: ../data/gtkbuilder/UpdateManager.ui.h:27 | 400 | #: ../data/gtkbuilder/UpdateManager.ui.h:8 |
3372 | 593 | msgid "It’s safer to connect the computer to AC power before updating." | 401 | msgid "It’s safer to connect the computer to AC power before updating." |
3373 | 594 | msgstr "" | 402 | msgstr "" |
3374 | 595 | 403 | ||
3375 | 596 | #: ../data/gtkbuilder/UpdateManager.ui.h:28 | ||
3376 | 597 | msgid "_Settings..." | ||
3377 | 598 | msgstr "" | ||
3378 | 599 | |||
3379 | 600 | #: ../data/gtkbuilder/UpdateManager.ui.h:29 | ||
3380 | 601 | msgid "_Install Now" | ||
3381 | 602 | msgstr "" | ||
3382 | 603 | |||
3383 | 604 | #: ../data/update-manager.desktop.in.h:2 | 404 | #: ../data/update-manager.desktop.in.h:2 |
3384 | 605 | msgid "Software Updates" | 405 | msgid "Software Updates" |
3385 | 606 | msgstr "" | 406 | msgstr "" |
3386 | @@ -609,46 +409,38 @@ | |||
3387 | 609 | msgid "Show and install available updates" | 409 | msgid "Show and install available updates" |
3388 | 610 | msgstr "" | 410 | msgstr "" |
3389 | 611 | 411 | ||
3391 | 612 | #: ../update-manager:71 ../update-manager-text:55 | 412 | #: ../update-manager:70 ../update-manager-text:55 |
3392 | 613 | msgid "Show version and exit" | 413 | msgid "Show version and exit" |
3393 | 614 | msgstr "" | 414 | msgstr "" |
3394 | 615 | 415 | ||
3396 | 616 | #: ../update-manager:74 | 416 | #: ../update-manager:73 |
3397 | 617 | msgid "Directory that contains the data files" | 417 | msgid "Directory that contains the data files" |
3398 | 618 | msgstr "" | 418 | msgstr "" |
3399 | 619 | 419 | ||
3401 | 620 | #: ../update-manager:77 | 420 | #: ../update-manager:76 |
3402 | 621 | msgid "Check if a new Ubuntu release is available" | 421 | msgid "Check if a new Ubuntu release is available" |
3403 | 622 | msgstr "" | 422 | msgstr "" |
3404 | 623 | 423 | ||
3406 | 624 | #: ../update-manager:80 | 424 | #: ../update-manager:79 |
3407 | 625 | msgid "Check if upgrading to the latest devel release is possible" | 425 | msgid "Check if upgrading to the latest devel release is possible" |
3408 | 626 | msgstr "" | 426 | msgstr "" |
3409 | 627 | 427 | ||
3411 | 628 | #: ../update-manager:84 | 428 | #: ../update-manager:83 |
3412 | 629 | msgid "Upgrade using the latest proposed version of the release upgrader" | 429 | msgid "Upgrade using the latest proposed version of the release upgrader" |
3413 | 630 | msgstr "" | 430 | msgstr "" |
3414 | 631 | 431 | ||
3416 | 632 | #: ../update-manager:91 | 432 | #: ../update-manager:90 |
3417 | 633 | msgid "Do not focus on map when starting" | 433 | msgid "Do not focus on map when starting" |
3418 | 634 | msgstr "" | 434 | msgstr "" |
3419 | 635 | 435 | ||
3422 | 636 | #: ../update-manager:94 | 436 | #: ../update-manager:93 |
3423 | 637 | msgid "Try to run a dist-upgrade" | 437 | msgid "Do not check for updates when starting" |
3424 | 638 | msgstr "" | 438 | msgstr "" |
3425 | 639 | 439 | ||
3426 | 640 | #: ../update-manager:97 | 440 | #: ../update-manager:97 |
3427 | 641 | msgid "Do not check for updates when starting" | ||
3428 | 642 | msgstr "" | ||
3429 | 643 | |||
3430 | 644 | #: ../update-manager:101 | ||
3431 | 645 | msgid "Test upgrade with a sandbox aufs overlay" | 441 | msgid "Test upgrade with a sandbox aufs overlay" |
3432 | 646 | msgstr "" | 442 | msgstr "" |
3433 | 647 | 443 | ||
3434 | 648 | #: ../update-manager:121 | ||
3435 | 649 | msgid "Running partial upgrade" | ||
3436 | 650 | msgstr "" | ||
3437 | 651 | |||
3438 | 652 | #: ../update-manager-text:59 | 444 | #: ../update-manager-text:59 |
3439 | 653 | msgid "Show description of the package instead of the changelog" | 445 | msgid "Show description of the package instead of the changelog" |
3440 | 654 | msgstr "" | 446 | msgstr "" |
3441 | @@ -713,7 +505,7 @@ | |||
3442 | 713 | 505 | ||
3443 | 714 | #. Why do we use %s here instead of $strings or {} format placeholders? | 506 | #. Why do we use %s here instead of $strings or {} format placeholders? |
3444 | 715 | #. It's because we don't want to break existing translations. | 507 | #. It's because we don't want to break existing translations. |
3446 | 716 | #: ../janitor/plugincore/exceptions.py:42 | 508 | #: ../janitor/plugincore/exceptions.py:43 |
3447 | 717 | #, python-format | 509 | #, python-format |
3448 | 718 | msgid "Unimplemented method: %s" | 510 | msgid "Unimplemented method: %s" |
3449 | 719 | msgstr "" | 511 | msgstr "" |
3450 | @@ -722,45 +514,45 @@ | |||
3451 | 722 | msgid "A file on disk" | 514 | msgid "A file on disk" |
3452 | 723 | msgstr "" | 515 | msgstr "" |
3453 | 724 | 516 | ||
3455 | 725 | #: ../janitor/plugincore/core/missing_package_cruft.py:39 | 517 | #: ../janitor/plugincore/core/missing_package_cruft.py:40 |
3456 | 726 | msgid "Install missing package." | 518 | msgid "Install missing package." |
3457 | 727 | msgstr "" | 519 | msgstr "" |
3458 | 728 | 520 | ||
3459 | 729 | #. 2012-06-08 BAW: i18n string; don't use {} or PEP 292. | 521 | #. 2012-06-08 BAW: i18n string; don't use {} or PEP 292. |
3461 | 730 | #: ../janitor/plugincore/core/missing_package_cruft.py:49 | 522 | #: ../janitor/plugincore/core/missing_package_cruft.py:50 |
3462 | 731 | #, python-format | 523 | #, python-format |
3463 | 732 | msgid "Package %s should be installed." | 524 | msgid "Package %s should be installed." |
3464 | 733 | msgstr "" | 525 | msgstr "" |
3465 | 734 | 526 | ||
3467 | 735 | #: ../janitor/plugincore/core/package_cruft.py:49 | 527 | #: ../janitor/plugincore/core/package_cruft.py:50 |
3468 | 736 | msgid ".deb package" | 528 | msgid ".deb package" |
3469 | 737 | msgstr "" | 529 | msgstr "" |
3470 | 738 | 530 | ||
3472 | 739 | #: ../janitor/plugincore/plugins/langpack_manual_plugin.py:46 | 531 | #: ../janitor/plugincore/plugins/langpack_manual_plugin.py:47 |
3473 | 740 | #, python-format | 532 | #, python-format |
3474 | 741 | msgid "%s needs to be marked as manually installed." | 533 | msgid "%s needs to be marked as manually installed." |
3475 | 742 | msgstr "" | 534 | msgstr "" |
3476 | 743 | 535 | ||
3478 | 744 | #: ../janitor/plugincore/plugins/kdelibs4to5_plugin.py:49 | 536 | #: ../janitor/plugincore/plugins/kdelibs4to5_plugin.py:50 |
3479 | 745 | msgid "" | 537 | msgid "" |
3480 | 746 | "When upgrading, if kdelibs4-dev is installed, kdelibs5-dev needs to be " | 538 | "When upgrading, if kdelibs4-dev is installed, kdelibs5-dev needs to be " |
3481 | 747 | "installed. See bugs.launchpad.net, bug #279621 for details." | 539 | "installed. See bugs.launchpad.net, bug #279621 for details." |
3482 | 748 | msgstr "" | 540 | msgstr "" |
3483 | 749 | 541 | ||
3485 | 750 | #: ../janitor/plugincore/plugins/dpkg_status_plugin.py:44 | 542 | #: ../janitor/plugincore/plugins/dpkg_status_plugin.py:45 |
3486 | 751 | #, python-format | 543 | #, python-format |
3487 | 752 | msgid "%i obsolete entries in the status file" | 544 | msgid "%i obsolete entries in the status file" |
3488 | 753 | msgstr "" | 545 | msgstr "" |
3489 | 754 | 546 | ||
3491 | 755 | #: ../janitor/plugincore/plugins/dpkg_status_plugin.py:47 | 547 | #: ../janitor/plugincore/plugins/dpkg_status_plugin.py:48 |
3492 | 756 | msgid "Obsolete entries in dpkg status" | 548 | msgid "Obsolete entries in dpkg status" |
3493 | 757 | msgstr "" | 549 | msgstr "" |
3494 | 758 | 550 | ||
3495 | 759 | #. pragma: no cover | 551 | #. pragma: no cover |
3497 | 760 | #: ../janitor/plugincore/plugins/dpkg_status_plugin.py:50 | 552 | #: ../janitor/plugincore/plugins/dpkg_status_plugin.py:51 |
3498 | 761 | msgid "Obsolete dpkg status entries" | 553 | msgid "Obsolete dpkg status entries" |
3499 | 762 | msgstr "" | 554 | msgstr "" |
3500 | 763 | 555 | ||
3502 | 764 | #: ../janitor/plugincore/plugins/remove_lilo_plugin.py:42 | 556 | #: ../janitor/plugincore/plugins/remove_lilo_plugin.py:43 |
3503 | 765 | msgid "Remove lilo since grub is also installed.(See bug #314004 for details.)" | 557 | msgid "Remove lilo since grub is also installed.(See bug #314004 for details.)" |
3504 | 766 | msgstr "" | 558 | msgstr "" |
Looks good to me. Installed and running this version of update-manager. Will report any bugs / regression. So far everything looks good.