Merge lp:~mterry/update-manager/dialogs into lp:update-manager

Proposed by Michael Terry
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 2452
Merged at revision: 2507
Proposed branch: lp:~mterry/update-manager/dialogs
Merge into: lp:update-manager
Prerequisite: lp:~mterry/update-manager/single-window
Diff against target: 2631 lines (+879/-1244)
18 files modified
UpdateManager/Core/MetaRelease.py (+6/-2)
UpdateManager/Core/utils.py (+18/-5)
UpdateManager/Dialogs.py (+237/-0)
UpdateManager/DistUpgradeFetcher.py (+12/-15)
UpdateManager/GtkProgress.py (+10/-131)
UpdateManager/InstallProgress.py (+1/-9)
UpdateManager/MetaReleaseGObject.py (+10/-8)
UpdateManager/UpdateManager.py (+146/-10)
UpdateManager/UpdateProgress.py (+0/-7)
UpdateManager/UpdatesAvailable.py (+44/-306)
UpdateManager/backend/InstallBackendAptdaemon.py (+4/-5)
check-new-release-gtk (+9/-5)
data/gtkbuilder/AcquireProgress.ui (+161/-0)
data/gtkbuilder/Dialog.ui (+123/-0)
data/gtkbuilder/ReleaseNotes.ui (+88/-0)
data/gtkbuilder/UpdateManager.ui (+3/-738)
tests/interactive_fetch_release_upgrader.py (+5/-2)
tests/test_end_of_life.py (+2/-1)
To merge this branch: bzr merge lp:~mterry/update-manager/dialogs
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Michael Vogt Pending
Review via email: mp+110900@code.launchpad.net

This proposal supersedes a proposal from 2012-06-18.

Description of the change

This branch implements a lot of the special purpose dialogs in the Software Updates spec.
https://wiki.ubuntu.com/SoftwareUpdates

Specifically, the new release, unsupported release, errors, and no updates dialogs.

(whoops, resubmitted to include the prereq branch)

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

The branch looks good, nice work :)

+ print("Hello!")

+ print("Hello2!", self.window_main)

Aren't they debug info that you left over?

319 + except:
320 + pass
-> you don't want to add some logging info here?

Couldn't really get all the insight of the changes TBH, we should have a class diagram :)

review: Approve
Revision history for this message
Michael Terry (mterry) wrote :

I dropped the debugging prints that squeezed into my branch. About the except/pass, that was just copy/pasted from elsewhere in the code. So I didn't feel the need to change it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'UpdateManager/Core/MetaRelease.py'
2--- UpdateManager/Core/MetaRelease.py 2012-06-12 01:40:26 +0000
3+++ UpdateManager/Core/MetaRelease.py 2012-06-18 20:03:30 +0000
4@@ -42,7 +42,7 @@
5 except ImportError:
6 from urllib2 import HTTPError, Request, URLError, urlopen
7
8-from .utils import get_lang, get_dist, get_dist_description, get_ubuntu_flavor
9+from .utils import get_lang, get_dist, get_dist_version, get_ubuntu_flavor, get_ubuntu_flavor_name
10
11 class Dist(object):
12 def __init__(self, name, version, date, supported):
13@@ -79,9 +79,11 @@
14 self.forceDownload = forceDownload
15 # information about the available dists
16 self.downloading = True
17+ self.upgradable_to = None
18 self.new_dist = None
19+ self.flavor_name = get_ubuntu_flavor_name()
20 self.current_dist_name = get_dist()
21- self.current_dist_description = get_dist_description()
22+ self.current_dist_version = get_dist_version()
23 self.no_longer_supported = None
24
25 # default (if the conf file is missing)
26@@ -248,8 +250,10 @@
27 # only warn if unsupported and a new dist is available (because
28 # the development version is also unsupported)
29 if upgradable_to != "" and not current_dist.supported:
30+ self.upgradable_to = upgradable_to
31 self.dist_no_longer_supported(current_dist)
32 if upgradable_to != "":
33+ self.upgradable_to = upgradable_to
34 self.new_dist_available(upgradable_to)
35
36 # parsing done and sucessfully
37
38=== modified file 'UpdateManager/Core/utils.py'
39--- UpdateManager/Core/utils.py 2012-06-13 11:40:17 +0000
40+++ UpdateManager/Core/utils.py 2012-06-18 20:03:30 +0000
41@@ -210,16 +210,16 @@
42 p.stdout.close()
43 return dist
44
45-def get_dist_description():
46- " return the description of the current runing distro "
47+def get_dist_version():
48+ " return the version of the current running distro "
49 # support debug overwrite
50- desc = os.environ.get("META_RELEASE_FAKE_DESCRIPTION")
51+ desc = os.environ.get("META_RELEASE_FAKE_VERSION")
52 if desc:
53- logging.warn("using fake release description '%s' (because of META_RELEASE_FAKE_DESCRIPTION environment) " % desc)
54+ logging.warn("using fake release version '%s' (because of META_RELEASE_FAKE_VERSION environment) " % desc)
55 return desc
56 # then check the real one
57 from subprocess import Popen, PIPE
58- p = Popen(["lsb_release","-d","-s"], stdout=PIPE, universal_newlines=True)
59+ p = Popen(["lsb_release","-r","-s"], stdout=PIPE, universal_newlines=True)
60 res = p.wait()
61 if res != 0:
62 sys.stderr.write("lsb_release returned exitcode: %i\n" % res)
63@@ -395,6 +395,8 @@
64 # this will (of course) not work in a server environment,
65 # but the main use case for this is to show the right
66 # release notes
67+ # TODO: actually examine which meta packages are installed, like
68+ # DistUpgrade/DistUpgradeCache.py does and use that to choose a flavor.
69 denv = os.environ.get("DESKTOP_SESSION", "")
70 if "gnome" in denv:
71 return "ubuntu"
72@@ -407,6 +409,17 @@
73 # default to ubuntu if nothing more specific is found
74 return "ubuntu"
75
76+def get_ubuntu_flavor_name():
77+ flavor = get_ubuntu_flavor()
78+ if flavor == "kubuntu":
79+ return "Kubuntu"
80+ elif flavor == "xubuntu":
81+ return "Xubuntu"
82+ elif flavor == "lubuntu":
83+ return "Lubuntu"
84+ else:
85+ return "Ubuntu"
86+
87 def error(parent, summary, message):
88 from gi.repository import Gtk, Gdk
89 d = Gtk.MessageDialog(parent=parent,
90
91=== added file 'UpdateManager/Dialogs.py'
92--- UpdateManager/Dialogs.py 1970-01-01 00:00:00 +0000
93+++ UpdateManager/Dialogs.py 2012-06-18 20:03:30 +0000
94@@ -0,0 +1,237 @@
95+# Dialogs.py
96+# -*- coding: utf-8 -*-
97+#
98+# Copyright (c) 2012 Canonical
99+#
100+# Author: Michael Terry <michael.terry@canonical.com>
101+#
102+# This program is free software; you can redistribute it and/or
103+# modify it under the terms of the GNU General Public License as
104+# published by the Free Software Foundation; either version 2 of the
105+# License, or (at your option) any later version.
106+#
107+# This program is distributed in the hope that it will be useful,
108+# but WITHOUT ANY WARRANTY; without even the implied warranty of
109+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
110+# GNU General Public License for more details.
111+#
112+# You should have received a copy of the GNU General Public License
113+# along with this program; if not, write to the Free Software
114+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
115+# USA
116+
117+from __future__ import absolute_import, print_function
118+
119+from gi.repository import Gtk
120+from gi.repository import GObject
121+GObject.threads_init()
122+
123+import warnings
124+warnings.filterwarnings("ignore", "Accessed deprecated property", DeprecationWarning)
125+
126+import dbus
127+import os
128+import subprocess
129+import sys
130+import time
131+from .SimpleGtk3builderApp import SimpleGtkbuilderApp
132+from .DistUpgradeFetcher import DistUpgradeFetcherGtk
133+from .GtkProgress import GtkAcquireProgress
134+
135+from gettext import gettext as _
136+
137+class Dialog(SimpleGtkbuilderApp):
138+ def __init__(self, window_main):
139+ self.window_main = window_main
140+ self.focus_button = None
141+ SimpleGtkbuilderApp.__init__(self, self.window_main.datadir+"/gtkbuilder/Dialog.ui",
142+ "update-manager")
143+
144+ def main(self):
145+ self.window_main.push(self.pane_dialog, self)
146+ if self.focus_button:
147+ self.focus_button.grab_focus()
148+
149+ def run(self, parent=None):
150+ if self.focus_button:
151+ self.focus_button.grab_focus()
152+ if parent:
153+ self.window_dialog.set_transient_for(parent)
154+ self.window_dialog.set_modal(True)
155+ self.window_dialog.run()
156+
157+ def close(self):
158+ sys.exit(0) # By default, exit the app
159+
160+ def add_button(self, label, callback, secondary=False):
161+ # from_stock tries stock first and falls back to mnemonic
162+ button = Gtk.Button.new_from_stock(label)
163+ button.connect("clicked", lambda x: callback())
164+ button.show()
165+ self.buttonbox.add(button)
166+ self.buttonbox.set_child_secondary(button, secondary)
167+ return button
168+
169+ def add_settings_button(self):
170+ if os.path.exists("/usr/bin/software-properties-gtk"):
171+ return self.add_button(_("Settingsā€¦"), self.on_settings_button_clicked, secondary=True)
172+ else:
173+ return None
174+
175+ def on_settings_button_clicked(self):
176+ cmd = ["/usr/bin/software-properties-gtk",
177+ "--open-tab","2",
178+ # FIXME: once get_xid() is available via introspections, add
179+ # this back
180+ #"--toplevel", "%s" % self.window_main.get_window().get_xid()
181+ ]
182+ self.window_main.set_sensitive(False)
183+ p = subprocess.Popen(cmd)
184+ while p.poll() is None:
185+ while Gtk.events_pending():
186+ Gtk.main_iteration()
187+ time.sleep(0.05)
188+ self.window_main.set_sensitive(True)
189+
190+ def set_header(self, label):
191+ self.label_header.set_label(label)
192+
193+ def set_desc(self, label):
194+ self.label_desc.set_label(label)
195+ self.label_desc.set_visible(bool(label))
196+
197+
198+class NoUpdatesDialog(Dialog):
199+ def __init__(self, window_main):
200+ Dialog.__init__(self, window_main)
201+ self.set_header(_("The software on this computer is up to date."))
202+ self.add_settings_button()
203+ self.focus_button = self.add_button(Gtk.STOCK_OK, self.close)
204+
205+
206+class DistUpgradeDialog(Dialog):
207+ def __init__(self, window_main, meta_release):
208+ Dialog.__init__(self, window_main)
209+ self.meta_release = meta_release
210+ self.set_header(_("The software on this computer is up to date."))
211+ # Translators: these are Ubuntu version names like "Ubuntu 12.04"
212+ self.set_desc(_("However, %s %s is now available (you have %s).") % (
213+ meta_release.flavor_name,
214+ meta_release.upgradable_to.version,
215+ meta_release.current_dist_version))
216+ self.add_settings_button()
217+ self.add_button(_("Upgradeā€¦"), self.upgrade)
218+ self.focus_button = self.add_button(Gtk.STOCK_OK, self.close)
219+
220+ def upgrade(self):
221+ progress = GtkAcquireProgress(self.window_main, self.window_main.datadir,
222+ _("Downloading the release upgrade tool"))
223+ fetcher = DistUpgradeFetcherGtk(new_dist=self.meta_release.upgradable_to,
224+ parent=self.window_main,
225+ progress=progress,
226+ datadir=self.window_main.datadir)
227+ if self.window_main.options.sandbox:
228+ fetcher.run_options.append("--sandbox")
229+ fetcher.run()
230+
231+
232+class UnsupportedDialog(DistUpgradeDialog):
233+ def __init__(self, window_main, meta_release):
234+ DistUpgradeDialog.__init__(self, window_main, meta_release)
235+ # Translators: this is an Ubuntu version name like "Ubuntu 12.04"
236+ self.set_header(_("Software updates are no longer provided for %s %s.") % (
237+ meta_release.flavor_name,
238+ meta_release.current_dist_version))
239+ # Translators: this is an Ubuntu version name like "Ubuntu 12.04"
240+ self.set_desc(_("To stay secure, you should upgrade to %s %s.") % (
241+ meta_release.flavor_name,
242+ meta_release.upgradable_to.version))
243+ print("Hello!")
244+
245+ def run(self, parent):
246+ # This field is used in tests/test_end_of_life.py
247+ print("Hello2!", self.window_main)
248+ self.window_main.no_longer_supported_nag = self.window_dialog
249+ DistUpgradeDialog.run(self, parent)
250+
251+
252+class PartialUpgradeDialog(Dialog):
253+ def __init__(self, window_main):
254+ Dialog.__init__(self, window_main)
255+ self.set_header(_("Not all updates can be installed"))
256+ self.set_desc(_("""Run a partial upgrade, to install as many updates as possible.
257+
258+This can be caused by:
259+ * A previous upgrade which didn't complete
260+ * Problems with some of the installed software
261+ * Unofficial software packages not provided by Ubuntu
262+ * Normal changes of a pre-release version of Ubuntu"""))
263+ self.add_settings_button()
264+ self.add_button(_("_Partial Upgrade"), self.upgrade)
265+ self.focus_button = self.add_button(_("_Continue"), Gtk.main_quit)
266+
267+ def upgrade(self):
268+ os.execl("/usr/bin/gksu",
269+ "/usr/bin/gksu", "--desktop",
270+ "/usr/share/applications/update-manager.desktop",
271+ "--", "/usr/bin/update-manager", "--dist-upgrade")
272+
273+ def main(self):
274+ Dialog.main(self)
275+ # Block progress until user has answered this question
276+ Gtk.main()
277+
278+
279+class ErrorDialog(Dialog):
280+ def __init__(self, window_main, header, desc=None):
281+ Dialog.__init__(self, window_main)
282+ self.set_header(header)
283+ if desc:
284+ self.set_desc(desc)
285+ self.label_desc.set_selectable(True)
286+ self.add_settings_button()
287+ self.focus_button = self.add_button(Gtk.STOCK_OK, self.close)
288+
289+ def main(self):
290+ Dialog.main(self)
291+ # The label likes to start selecting everything (b/c it got focus before
292+ # we switched to our default button).
293+ self.label_desc.select_region(0, 0)
294+ # Since errors usually are outside the normal flow, we'll guarantee that
295+ # we don't continue with normal code flow by running our own loop here.
296+ # We won't screw anything up because the only thing this dialog will do
297+ # is exit.
298+ Gtk.main()
299+
300+
301+class NeedRestartDialog(Dialog):
302+ def __init__(self, window_main):
303+ Dialog.__init__(self, window_main)
304+ self.set_header(_("The computer needs to restart to finish installing updates."))
305+ self.focus_button = self.add_button(_("_Restart"), self.restart)
306+
307+ def restart(self, *args, **kwargs):
308+ self._request_reboot_via_session_manager()
309+
310+ def _request_reboot_via_session_manager(self):
311+ try:
312+ bus = dbus.SessionBus()
313+ proxy_obj = bus.get_object("org.gnome.SessionManager",
314+ "/org/gnome/SessionManager")
315+ iface = dbus.Interface(proxy_obj, "org.gnome.SessionManager")
316+ iface.RequestReboot()
317+ except dbus.DBusException:
318+ self._request_reboot_via_consolekit()
319+ except:
320+ pass
321+
322+ def _request_reboot_via_consolekit(self):
323+ try:
324+ bus = dbus.SystemBus()
325+ proxy_obj = bus.get_object("org.freedesktop.ConsoleKit",
326+ "/org/freedesktop/ConsoleKit/Manager")
327+ iface = dbus.Interface(proxy_obj, "org.freedesktop.ConsoleKit.Manager")
328+ iface.Restart()
329+ except dbus.DBusException:
330+ pass
331+
332
333=== modified file 'UpdateManager/DistUpgradeFetcher.py'
334--- UpdateManager/DistUpgradeFetcher.py 2012-06-12 01:40:26 +0000
335+++ UpdateManager/DistUpgradeFetcher.py 2012-06-18 20:03:30 +0000
336@@ -26,6 +26,7 @@
337 from .ReleaseNotesViewer import ReleaseNotesViewer
338 from .Core.utils import error, inhibit_sleep, allow_sleep
339 from .Core.DistUpgradeFetcherCore import DistUpgradeFetcherCore
340+from .SimpleGtk3builderApp import SimpleGtkbuilderApp
341 from gettext import gettext as _
342 try:
343 from urllib.request import urlopen
344@@ -38,10 +39,11 @@
345
346 class DistUpgradeFetcherGtk(DistUpgradeFetcherCore):
347
348- def __init__(self, new_dist, progress, parent):
349+ def __init__(self, new_dist, progress, parent, datadir):
350 DistUpgradeFetcherCore.__init__(self,new_dist,progress)
351- self.parent = parent
352- self.window_main = parent.window_main
353+ uifile = datadir + "gtkbuilder/ReleaseNotes.ui"
354+ self.widgets = SimpleGtkbuilderApp(uifile, "update-manager")
355+ self.window_main = parent
356
357 def error(self, summary, message):
358 return error(self.window_main, summary, message)
359@@ -76,9 +78,9 @@
360 from .ReleaseNotesViewerWebkit import ReleaseNotesViewerWebkit
361 webkit_release_notes = ReleaseNotesViewerWebkit(self.new_dist.releaseNotesHtmlUri)
362 webkit_release_notes.show()
363- self.parent.scrolled_notes.add(webkit_release_notes)
364- res = self.parent.dialog_release_notes.run()
365- self.parent.dialog_release_notes.hide()
366+ self.widgets.scrolled_notes.add(webkit_release_notes)
367+ res = self.widgets.dialog_release_notes.run()
368+ self.widgets.dialog_release_notes.hide()
369 if res == Gtk.ResponseType.OK:
370 return True
371 return False
372@@ -105,10 +107,10 @@
373 notes = release_notes.read().decode("UTF-8", "replace")
374 textview_release_notes = ReleaseNotesViewer(notes)
375 textview_release_notes.show()
376- self.parent.scrolled_notes.add(textview_release_notes)
377- self.parent.dialog_release_notes.set_transient_for(self.window_main)
378- res = self.parent.dialog_release_notes.run()
379- self.parent.dialog_release_notes.hide()
380+ self.widgets.scrolled_notes.add(textview_release_notes)
381+ self.widgets.dialog_release_notes.set_transient_for(self.window_main)
382+ res = self.widgets.dialog_release_notes.run()
383+ self.widgets.dialog_release_notes.hide()
384 except HTTPError:
385 primary = "<span weight=\"bold\" size=\"larger\">%s</span>" % \
386 _("Could not find the release notes")
387@@ -139,8 +141,3 @@
388 return True
389 return False
390
391-if __name__ == "__main__":
392- error(None, "summary","message")
393- d = DistUpgradeFetcherGtk(None,None)
394- print(d.authenticate('/tmp/Release','/tmp/Release.gpg'))
395-
396
397=== modified file 'UpdateManager/GtkProgress.py'
398--- UpdateManager/GtkProgress.py 2012-06-12 11:50:29 +0000
399+++ UpdateManager/GtkProgress.py 2012-06-18 20:03:30 +0000
400@@ -23,123 +23,27 @@
401
402 from gi.repository import Gtk, Gdk
403 import apt
404-import apt_pkg
405 from gettext import gettext as _
406 from .Core.utils import humanize_size
407-
408-# intervals of the start up progress
409-# 3x caching and menu creation
410-STEPS_UPDATE_CACHE = [33, 66, 100]
411-#STEPS_UPDATE_CACHE = [25, 50, 75, 100]
412-
413-class GtkOpProgressInline(apt.progress.base.OpProgress):
414- def __init__(self, progressbar, parent,
415- steps=STEPS_UPDATE_CACHE):
416- # steps
417- self.all_steps = steps
418- self._init_steps()
419- # the progressbar to use
420- self._progressbar = progressbar
421- self._parent = parent
422- self._window = None
423- def _init_steps(self):
424- self.steps = self.all_steps[:]
425- self.base = 0
426- self.old = 0
427- self.next = int(self.steps.pop(0))
428- def update(self, percent=None):
429- super(GtkOpProgressInline, self).update(percent)
430- self._progressbar.show()
431- self._parent.set_sensitive(False)
432- # if the old percent was higher, a new progress was started
433- if self.old > self.percent:
434- # set the borders to the next interval
435- self.base = self.next
436- try:
437- self.next = int(self.steps.pop(0))
438- except:
439- pass
440- progress = self.base + self.percent/100 * (self.next - self.base)
441- self.old = self.percent
442- if abs(self.percent-self._progressbar.get_fraction()*100.0) > 0.5:
443- self._progressbar.set_text("%s" % self.op)
444- self._progressbar.set_fraction(progress/100.0)
445- while Gtk.events_pending():
446- Gtk.main_iteration()
447- def done(self):
448- """ one sub-step is done """
449- pass
450- def all_done(self):
451- """ all steps are completed (called by the parent) """
452- self._parent.set_sensitive(True)
453- self._progressbar.hide()
454- self._init_steps()
455-
456-class GtkOpProgressWindow(apt.progress.base.OpProgress):
457- def __init__(self, host_window, progressbar, status, parent,
458- steps=STEPS_UPDATE_CACHE):
459- # used for the "one run progressbar"
460- self.steps = steps[:]
461- self.base = 0
462- self.old = 0
463- self.next = int(self.steps.pop(0))
464-
465- self._parent = parent
466- self._window = host_window
467- self._status = status
468- self._progressbar = progressbar
469- # Do not show the close button
470- self._window.realize()
471- self._window.set_title("")
472- host_window.get_window().set_functions(Gdk.WMFunction.MOVE)
473- self._window.set_transient_for(parent)
474-
475- def update(self, percent=None):
476- super(GtkOpProgressWindow, self).update(percent)
477- #print(self.percent)
478- #print(self.Op)
479- #print(self.SubOp)
480- # only show progress bar if the parent is not iconified (#353195)
481- state = self._parent.window.get_state()
482- if not (state & Gdk.WINDOW_STATE_ICONIFIED):
483- self._window.show()
484- self._parent.set_sensitive(False)
485- # if the old percent was higher, a new progress was started
486- if self.old > self.percent:
487- # set the borders to the next interval
488- self.base = self.next
489- try:
490- self.next = int(self.steps.pop(0))
491- except:
492- pass
493- progress = self.base + self.percent/100 * (self.next - self.base)
494- self.old = self.percent
495- if abs(self.percent-self._progressbar.get_fraction()*100.0) > 0.1:
496- self._status.set_markup("<i>%s</i>" % self.op)
497- self._progressbar.set_fraction(progress/100.0)
498- while Gtk.events_pending():
499- Gtk.main_iteration()
500-
501- def done(self):
502- self._parent.set_sensitive(True)
503- def hide(self):
504- self._window.hide()
505+from .SimpleGtk3builderApp import SimpleGtkbuilderApp
506
507 class GtkAcquireProgress(apt.progress.base.AcquireProgress):
508- def __init__(self, parent, summary="", descr=""):
509+ def __init__(self, parent, datadir, summary="", descr=""):
510+ uifile = datadir + "gtkbuilder/AcquireProgress.ui"
511+ self.widgets = SimpleGtkbuilderApp(uifile, "update-manager")
512 # if this is set to false the download will cancel
513 self._continue = True
514 # init vars here
515 # FIXME: find a more elegant way, this sucks
516- self.summary = parent.label_fetch_summary
517- self.status = parent.label_fetch_status
518+ self.summary = self.widgets.label_fetch_summary
519+ self.status = self.widgets.label_fetch_status
520 # we need to connect the signal manual here, it won't work
521 # from the main window auto-connect
522- parent.button_fetch_cancel.connect(
523+ self.widgets.button_fetch_cancel.connect(
524 "clicked", self.on_button_fetch_cancel_clicked)
525- self.progress = parent.progressbar_fetch
526- self.window_fetch = parent.window_fetch
527- self.window_fetch.set_transient_for(parent.window_main)
528+ self.progress = self.widgets.progressbar_fetch
529+ self.window_fetch = self.widgets.window_fetch
530+ self.window_fetch.set_transient_for(parent)
531 self.window_fetch.realize()
532 self.window_fetch.get_window().set_functions(Gdk.WMFunction.MOVE)
533 # set summary
534@@ -183,28 +87,3 @@
535 Gtk.main_iteration()
536 return self._continue
537
538-if __name__ == "__main__":
539- import apt
540- from .SimpleGtkbuilderApp import SimpleGtkbuilderApp
541-
542- class MockParent(SimpleGtkbuilderApp):
543- """Mock parent for the fetcher that just loads the UI file"""
544- def __init__(self):
545- SimpleGtkbuilderApp.__init__(self, "../data/gtkbuilder/UpdateManager.ui", "update-manager")
546-
547- # create mock parent and fetcher
548- parent = MockParent()
549- acquire_progress = GtkAcquireProgress(parent, "summary", "long detailed description")
550- #acquire_progress = GtkAcquireProgress(parent)
551-
552- # download lists
553- cache = apt.Cache()
554- res = cache.update(acquire_progress)
555- # generate a dist-upgrade (to feed data to the fetcher) and get it
556- cache.upgrade()
557- pm = apt_pkg.PackageManager(cache._depcache)
558- fetcher = apt_pkg.Acquire(acquire_progress)
559- res = cache._fetch_archives(fetcher, pm)
560- print(res)
561-
562-
563
564=== modified file 'UpdateManager/InstallProgress.py'
565--- UpdateManager/InstallProgress.py 2012-06-18 20:03:30 +0000
566+++ UpdateManager/InstallProgress.py 2012-06-18 20:03:30 +0000
567@@ -29,10 +29,6 @@
568
569 from __future__ import absolute_import, print_function
570
571-from gi.repository import Gtk
572-#from gi.repository import Gio
573-from gi.repository import GLib
574-
575 import warnings
576 warnings.filterwarnings("ignore", "Accessed deprecated property", DeprecationWarning)
577
578@@ -41,10 +37,6 @@
579
580 from .backend import get_backend
581
582-from gettext import gettext as _
583-from gettext import ngettext
584-
585-from UpdateManager.UpdatesAvailable import UpdatesAvailable
586 from .Core.utils import (inhibit_sleep,
587 allow_sleep)
588
589@@ -93,7 +85,7 @@
590
591 # Either launch main dialog and continue or quit altogether
592 if success:
593- self.window_main.start_available()
594+ self.window_main.start_available(allow_restart=True)
595 else:
596 sys.exit(0)
597
598
599=== modified file 'UpdateManager/MetaReleaseGObject.py'
600--- UpdateManager/MetaReleaseGObject.py 2012-05-01 14:01:29 +0000
601+++ UpdateManager/MetaReleaseGObject.py 2012-06-18 20:03:30 +0000
602@@ -30,8 +30,10 @@
603 (GObject.TYPE_PYOBJECT,)),
604 'dist_no_longer_supported' : (GObject.SignalFlags.RUN_LAST,
605 None,
606- ())
607-
608+ ()),
609+ 'done_downloading' : (GObject.SignalFlags.RUN_LAST,
610+ None,
611+ ())
612 }
613
614 def __init__(self, useDevelopmentRelease=False, useProposed=False):
615@@ -43,13 +45,13 @@
616
617 def check(self):
618 # check if we have a metarelease_information file
619- keepRuning = True
620 if self.no_longer_supported is not None:
621- keepRuning = False
622 self.emit("dist_no_longer_supported")
623 if self.new_dist is not None:
624- keepRuning = False
625- self.emit("new_dist_available", self.new_dist)
626- return keepRuning
627-
628+ self.emit("new_dist_available", self.new_dist)
629+ if self.downloading:
630+ return True
631+ else:
632+ self.emit("done_downloading")
633+ return False
634
635
636=== modified file 'UpdateManager/UpdateManager.py'
637--- UpdateManager/UpdateManager.py 2012-06-18 20:03:30 +0000
638+++ UpdateManager/UpdateManager.py 2012-06-18 20:03:30 +0000
639@@ -24,10 +24,14 @@
640
641 from gi.repository import Gtk
642 from gi.repository import Gdk
643+from gi.repository import Gio
644+from gi.repository import GLib
645
646 import warnings
647 warnings.filterwarnings("ignore", "Accessed deprecated property", DeprecationWarning)
648
649+import apt_pkg
650+import os
651 import sys
652 from gettext import gettext as _
653
654@@ -37,11 +41,23 @@
655 DBusGMainLoop(set_as_default=True)
656
657 from .UnitySupport import UnitySupport
658+from .Dialogs import (DistUpgradeDialog,
659+ ErrorDialog,
660+ NeedRestartDialog,
661+ NoUpdatesDialog,
662+ PartialUpgradeDialog,
663+ UnsupportedDialog)
664 from .InstallProgress import InstallProgress
665+from .MetaReleaseGObject import MetaRelease
666 from .UpdateProgress import UpdateProgress
667 from .UpdatesAvailable import UpdatesAvailable
668 from .Core.AlertWatcher import AlertWatcher
669+from .Core.MyCache import MyCache
670 from .Core.roam import NetworkManagerHelper
671+from .Core.UpdateList import UpdateList
672+
673+# file that signals if we need to reboot
674+REBOOT_REQUIRED_FILE = "/var/run/reboot-required"
675
676 class UpdateManager(Gtk.Window):
677 """ This class is the main window and work flow controller. Panes will add
678@@ -55,6 +71,9 @@
679 self.options = options
680 self.unity = UnitySupport()
681 self.controller = None
682+ self.cache = None
683+ self.update_list = None
684+ self.meta_release = None
685
686 # Basic GTK+ parameters
687 self.set_title(_("Software Updater"))
688@@ -69,7 +88,7 @@
689 self._setup_dbus()
690
691 # deal with no-focus-on-map
692- if self.options.no_focus_on_map:
693+ if self.options and self.options.no_focus_on_map:
694 self.set_focus_on_map(False)
695 self.iconify()
696 self.stick()
697@@ -78,6 +97,11 @@
698 self.initial_focus_id = self.connect(
699 "focus-in-event", self.on_initial_focus_in)
700
701+ # Look for a new release in a thread
702+ self.meta_release = MetaRelease(self.options and self.options.devel_release,
703+ self.options and self.options.use_proposed)
704+
705+
706 def on_initial_focus_in(self, widget, event):
707 """callback run on initial focus-in (if started unmapped)"""
708 self.unstick()
709@@ -132,20 +156,132 @@
710 if self.options.no_update:
711 self.start_available()
712 return
713- self._start_pane(UpdateProgress)
714-
715- def start_available(self):
716- self._start_pane(UpdatesAvailable)
717+
718+ self._start_pane(UpdateProgress(self))
719+
720+ def start_available(self, allow_restart=False):
721+ # If restart is needed, show that. Else show no-update-needed. Else
722+ # actually show the available updates.
723+ if allow_restart and os.path.exists(REBOOT_REQUIRED_FILE):
724+ self._start_pane(NeedRestartDialog(self))
725+ return
726+
727+ self._look_busy()
728+ self.refresh_cache()
729+
730+ if self.cache.install_count == 0:
731+ if not self._check_meta_release():
732+ self._start_pane(NoUpdatesDialog(self))
733+ else:
734+ self._start_pane(UpdatesAvailable(self))
735
736 def start_install(self):
737- self._start_pane(InstallProgress)
738-
739- def _start_pane(self, pane_class):
740+ self._start_pane(InstallProgress(self))
741+
742+ def start_error(self, header, desc):
743+ self._start_pane(ErrorDialog(self, header, desc))
744+
745+ def _start_pane(self, pane):
746+ self._look_busy()
747+ pane.main()
748+
749+ def _look_busy(self):
750 self.set_sensitive(False)
751 if self.get_window() is not None:
752 self.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
753- pane = pane_class(self)
754- pane.main()
755+
756+ def _check_meta_release(self):
757+ if self.meta_release is None:
758+ return False
759+
760+ if self.meta_release.downloading:
761+ # Block until we get an answer
762+ GLib.idle_add(self._meta_release_wait_idle)
763+ Gtk.main()
764+
765+ # Check if there is anything to upgrade to or a known-broken upgrade
766+ next = self.meta_release.upgradable_to
767+ if not next or next.upgrade_broken:
768+ return False
769+
770+ # Check for end-of-life
771+ if self.meta_release.no_longer_supported:
772+ self._start_pane(UnsupportedDialog(self, self.meta_release))
773+ return True
774+
775+ # Check for new fresh release
776+ settings = Gio.Settings("com.ubuntu.update-manager")
777+ if (self.meta_release.new_dist and
778+ (self.options.check_dist_upgrades or
779+ settings.get_boolean("check-dist-upgrades"))):
780+ self._start_pane(DistUpgradeDialog(self, self.meta_release))
781+ return True
782+
783+ return False
784+
785+ def _meta_release_wait_idle(self):
786+ # 'downloading' is changed in a thread, but the signal 'done_downloading'
787+ # is done in our thread's event loop. So we know that it won't fire while
788+ # we're in this function.
789+ if not self.meta_release.downloading:
790+ Gtk.main_quit()
791+ else:
792+ self.meta_release.connect("done_downloading", Gtk.main_quit)
793+ return False
794+
795+ # fixme: we should probably abstract away all the stuff from libapt
796+ def refresh_cache(self):
797+ # get the lock
798+ try:
799+ apt_pkg.pkgsystem_lock()
800+ except SystemError:
801+ pass
802+
803+ try:
804+ if self.cache is None:
805+ self.cache = MyCache(None)
806+ else:
807+ self.cache.open(None)
808+ self.cache._initDepCache()
809+ except AssertionError:
810+ # if the cache could not be opened for some reason,
811+ # let the release upgrader handle it, it deals
812+ # a lot better with this
813+ self._start_pane(PartialUpgradeDialog(self))
814+ # we assert a clean cache
815+ header = _("Software index is broken")
816+ desc = _("It is impossible to install or remove any software. "
817+ "Please use the package manager \"Synaptic\" or run "
818+ "\"sudo apt-get install -f\" in a terminal to fix "
819+ "this issue at first.")
820+ self.start_error(header, desc)
821+ except SystemError as e:
822+ header = _("Could not initialize the package information")
823+ desc = _("An unresolvable problem occurred while "
824+ "initializing the package information.\n\n"
825+ "Please report this bug against the 'update-manager' "
826+ "package and include the following error message:\n") + e
827+ self.start_error(header, desc)
828+
829+ # Let the Gtk event loop breath if it hasn't had a chance.
830+ while Gtk.events_pending():
831+ Gtk.main_iteration()
832+
833+ self.update_list = UpdateList(self)
834+ try:
835+ self.update_list.update(self.cache)
836+ except SystemError as e:
837+ header = _("Could not calculate the upgrade")
838+ desc = _("An unresolvable problem occurred while "
839+ "calculating the upgrade.\n\n"
840+ "Please report this bug against the 'update-manager' "
841+ "package and include the following error message:\n") + e
842+ self.start_error(header, desc)
843+
844+ self.unity.set_updates_count(self.cache.install_count)
845+
846+ if self.update_list.distUpgradeWouldDelete > 0:
847+ self._start_pane(PartialUpgradeDialog(self))
848
849 def _setup_dbus(self):
850 """ this sets up a dbus listener if none is installed alread """
851
852=== modified file 'UpdateManager/UpdateProgress.py'
853--- UpdateManager/UpdateProgress.py 2012-06-18 20:03:30 +0000
854+++ UpdateManager/UpdateProgress.py 2012-06-18 20:03:30 +0000
855@@ -29,9 +29,6 @@
856
857 from __future__ import absolute_import, print_function
858
859-from gi.repository import Gtk
860-from gi.repository import GLib
861-
862 import warnings
863 warnings.filterwarnings("ignore", "Accessed deprecated property", DeprecationWarning)
864
865@@ -40,10 +37,6 @@
866
867 from .backend import get_backend
868
869-from gettext import gettext as _
870-from gettext import ngettext
871-
872-from UpdateManager.UpdatesAvailable import UpdatesAvailable
873 from .Core.utils import (inhibit_sleep,
874 allow_sleep)
875
876
877=== modified file 'UpdateManager/UpdatesAvailable.py'
878--- UpdateManager/UpdatesAvailable.py 2012-06-18 20:03:30 +0000
879+++ UpdateManager/UpdatesAvailable.py 2012-06-18 20:03:30 +0000
880@@ -41,9 +41,7 @@
881
882 import apt_pkg
883
884-import sys
885 import os
886-import stat
887 import re
888 import logging
889 import operator
890@@ -52,29 +50,17 @@
891 import threading
892 import xml.sax.saxutils
893
894-import dbus
895-
896-from .GtkProgress import GtkAcquireProgress, GtkOpProgressInline
897-from .backend import get_backend
898-
899 from gettext import gettext as _
900 from gettext import ngettext
901
902
903-from .Core.utils import (humanize_size,
904- on_battery,
905- inhibit_sleep,
906- allow_sleep)
907-from .Core.UpdateList import UpdateList
908-from .Core.MyCache import MyCache
909+from .Core.utils import humanize_size
910 from .Core.AlertWatcher import AlertWatcher
911
912 from DistUpgrade.DistUpgradeCache import NotEnoughFreeSpaceError
913-from .DistUpgradeFetcher import DistUpgradeFetcherGtk
914
915 from .ChangelogViewer import ChangelogViewer
916 from .SimpleGtk3builderApp import SimpleGtkbuilderApp
917-from .MetaReleaseGObject import MetaRelease
918 from .UnitySupport import UnitySupport
919
920
921@@ -86,43 +72,18 @@
922 # list constants
923 (LIST_CONTENTS, LIST_NAME, LIST_PKG, LIST_ORIGIN, LIST_TOGGLE_CHECKED) = range(5)
924
925-# file that signals if we need to reboot
926-REBOOT_REQUIRED_FILE = "/var/run/reboot-required"
927-
928 # NetworkManager enums
929 from .Core.roam import NetworkManagerHelper
930
931-def show_dist_no_longer_supported_dialog(parent=None):
932- """ show a no-longer-supported dialog """
933- msg = "<big><b>%s</b></big>\n\n%s" % (
934- _("Your Ubuntu release is not supported anymore."),
935- _("You will not get any further security fixes or critical "
936- "updates. "
937- "Please upgrade to a later version of Ubuntu."))
938- dialog = Gtk.MessageDialog(parent, 0, Gtk.MessageType.WARNING,
939- Gtk.ButtonsType.CLOSE,"")
940- dialog.set_title("")
941- dialog.set_markup(msg)
942- button = Gtk.LinkButton(uri="http://www.ubuntu.com/releaseendoflife",
943- label=_("Upgrade information"))
944- button.show()
945- dialog.get_content_area().pack_end(button, True, True, 0)
946- # this data used in the test to get the dialog
947- if parent:
948- parent.no_longer_supported_nag = dialog
949- dialog.run()
950- dialog.destroy()
951- if parent:
952- del parent.no_longer_supported_nag
953-
954-
955 class UpdatesAvailable(SimpleGtkbuilderApp):
956
957 def __init__(self, app):
958 self.window_main = app
959 self.datadir = app.datadir
960 self.options = app.options
961- SimpleGtkbuilderApp.__init__(self, self.datadir+"gtkbuilder/UpdateManager.ui",
962+ self.cache = app.cache
963+ self.list = app.update_list
964+ SimpleGtkbuilderApp.__init__(self, self.datadir+"/gtkbuilder/UpdateManager.ui",
965 "update-manager")
966
967 # Used for inhibiting power management
968@@ -195,25 +156,11 @@
969 if not os.path.exists("/usr/bin/software-properties-gtk"):
970 self.button_settings.set_sensitive(False)
971
972- # check if there is a new reboot required notification
973- if os.path.exists(REBOOT_REQUIRED_FILE):
974- self.show_reboot_required_info()
975-
976- self.window_main.push(self.pane_updates_available, self)
977-
978 # init show version
979 self.show_versions = self.settings.get_boolean("show-versions")
980 # init summary_before_name
981 self.summary_before_name = self.settings.get_boolean("summary-before-name")
982
983- # get progress object
984- self.progress = GtkOpProgressInline(
985- self.progressbar_cache_inline, self.window_main)
986-
987- # deal with no-focus-on-map
988- if self.options.no_focus_on_map and self.progress._window:
989- self.progress._window.set_focus_on_map(False)
990-
991 # Create Unity launcher quicklist
992 # FIXME: instead of passing parent we really should just send signals
993 self.unity = UnitySupport(parent=self)
994@@ -228,16 +175,6 @@
995 self.select_all_updgrades (None)
996 self.on_button_install_clicked (None)
997
998- def warn_on_battery(self):
999- """check and warn if on battery"""
1000- if on_battery():
1001- self.dialog_on_battery.set_transient_for(self.window_main)
1002- self.dialog_on_battery.set_title("")
1003- res = self.dialog_on_battery.run()
1004- self.dialog_on_battery.hide()
1005- if res != Gtk.ResponseType.YES:
1006- sys.exit()
1007-
1008 def install_column_view_func(self, cell_layout, renderer, model, iter, data):
1009 pkg = model.get_value(iter, LIST_PKG)
1010 if pkg is None:
1011@@ -484,9 +421,6 @@
1012 self.refresh_updates_count()
1013 num_updates = self.cache.install_count
1014
1015- # setup unity stuff
1016- self.unity.set_updates_count(num_updates)
1017-
1018 if num_updates == 0:
1019 text_header= _("The software on this computer is up to date.")
1020 self.label_downsize.set_text("\n")
1021@@ -502,7 +436,9 @@
1022 # show different text on first run (UX team suggestion)
1023 firstrun = self.settings.get_boolean("first-run")
1024 if firstrun:
1025- text_header = _("Updated software has been issued since %s was released. Do you want to install it now?") % self.meta.current_dist_description
1026+ flavor = self.window_main.meta_release.flavor_name
1027+ version = self.window_main.meta_release.current_dist_version
1028+ text_header = _("Updated software has been issued since %s %s was released. Do you want to install it now?") % (flavor, version)
1029 self.settings.set_boolean("first-run", False)
1030 else:
1031 text_header = _("Updated software is available for this computer. Do you want to install it now?")
1032@@ -551,6 +487,7 @@
1033 while Gtk.events_pending():
1034 Gtk.main_iteration()
1035 time.sleep(0.05)
1036+ self.window_main.refresh_cache()
1037 self.fillstore()
1038
1039 def on_button_install_clicked(self, widget):
1040@@ -567,45 +504,14 @@
1041 self.cache.checkFreeSpace()
1042 except NotEnoughFreeSpaceError as e:
1043 for req in e.free_space_required_list:
1044- self.error(err_sum, err_long % (req.size_total,
1045- req.dir,
1046- req.size_needed,
1047- req.dir))
1048+ self.window_main.start_error(err_sum, err_long % (req.size_total,
1049+ req.dir,
1050+ req.size_needed,
1051+ req.dir))
1052 return
1053 except SystemError as e:
1054 logging.exception("free space check failed")
1055 self.window_main.start_install()
1056-
1057- def on_button_restart_required_clicked(self, button=None):
1058- self._request_reboot_via_session_manager()
1059-
1060- def show_reboot_required_info(self):
1061- self.frame_restart_required.show()
1062- self.label_restart_required.set_text(_("The computer needs to restart to "
1063- "finish installing updates. Please "
1064- "save your work before continuing."))
1065-
1066- def _request_reboot_via_session_manager(self):
1067- try:
1068- bus = dbus.SessionBus()
1069- proxy_obj = bus.get_object("org.gnome.SessionManager",
1070- "/org/gnome/SessionManager")
1071- iface = dbus.Interface(proxy_obj, "org.gnome.SessionManager")
1072- iface.RequestReboot()
1073- except dbus.DBusException:
1074- self._request_reboot_via_consolekit()
1075- except:
1076- pass
1077-
1078- def _request_reboot_via_consolekit(self):
1079- try:
1080- bus = dbus.SystemBus()
1081- proxy_obj = bus.get_object("org.freedesktop.ConsoleKit",
1082- "/org/freedesktop/ConsoleKit/Manager")
1083- iface = dbus.Interface(proxy_obj, "org.freedesktop.ConsoleKit.Manager")
1084- iface.Restart()
1085- except dbus.DBusException:
1086- pass
1087
1088 def _on_network_alert(self, watcher, state):
1089 # do not set the buttons to sensitive/insensitive until NM
1090@@ -737,216 +643,48 @@
1091 # disconnect the view first
1092 self.treeview_update.set_model(None)
1093 self.store.clear()
1094-
1095 # clean most objects
1096 self.dl_size = 0
1097- try:
1098- self.initCache()
1099- except SystemError as e:
1100- msg = ("<big><b>%s</b></big>\n\n%s\n'%s'" %
1101- (_("Could not initialize the package information"),
1102- _("An unresolvable problem occurred while "
1103- "initializing the package information.\n\n"
1104- "Please report this bug against the 'update-manager' "
1105- "package and include the following error message:\n"),
1106- e)
1107- )
1108- dialog = Gtk.MessageDialog(self.window_main,
1109- 0, Gtk.MessageType.ERROR,
1110- Gtk.ButtonsType.CLOSE,"")
1111- dialog.set_markup(msg)
1112- dialog.get_content_area().set_spacing(6)
1113- dialog.run()
1114- dialog.destroy()
1115- sys.exit(1)
1116- self.list = UpdateList(self)
1117-
1118- while Gtk.events_pending():
1119- Gtk.main_iteration()
1120
1121- # fill them again
1122- try:
1123- self.list.update(self.cache)
1124- except SystemError as e:
1125- msg = ("<big><b>%s</b></big>\n\n%s\n'%s'" %
1126- (_("Could not calculate the upgrade"),
1127- _("An unresolvable problem occurred while "
1128- "calculating the upgrade.\n\n"
1129- "Please report this bug against the 'update-manager' "
1130- "package and include the following error message:"),
1131- e)
1132- )
1133- dialog = Gtk.MessageDialog(self.window_main,
1134- 0, Gtk.MessageType.ERROR,
1135- Gtk.ButtonsType.CLOSE,"")
1136- dialog.set_markup(msg)
1137- dialog.get_content_area().set_spacing(6)
1138- dialog.run()
1139- dialog.destroy()
1140- if self.list.num_updates > 0:
1141- #self.treeview_update.set_model(None)
1142- self.scrolledwindow_update.show()
1143- origin_list = sorted(
1144- self.list.pkgs, key=operator.attrgetter("importance"), reverse=True)
1145- for origin in origin_list:
1146- self.store.append(['<b><big>%s</big></b>' % origin.description,
1147- origin.description, None, origin,True])
1148- for pkg in self.list.pkgs[origin]:
1149- name = xml.sax.saxutils.escape(pkg.name)
1150- if not pkg.is_installed:
1151- name += _(" (New install)")
1152- summary = xml.sax.saxutils.escape(getattr(pkg.candidate, "summary", None))
1153- if self.summary_before_name:
1154- contents = "%s\n<small>%s</small>" % (summary, name)
1155- else:
1156- contents = "<b>%s</b>\n<small>%s</small>" % (name, summary)
1157- #TRANSLATORS: the b stands for Bytes
1158- size = _("(Size: %s)") % humanize_size(getattr(pkg.candidate, "size", 0))
1159- installed_version = getattr(pkg.installed, "version", None)
1160- candidate_version = getattr(pkg.candidate, "version", None)
1161- if installed_version is not None:
1162- version = _("From version %(old_version)s to %(new_version)s") %\
1163- {"old_version" : installed_version,
1164- "new_version" : candidate_version}
1165- else:
1166- version = _("Version %s") % candidate_version
1167- if self.show_versions:
1168- contents = "%s\n<small>%s %s</small>" % (contents, version, size)
1169- else:
1170- contents = "%s <small>%s</small>" % (contents, size)
1171- self.store.append([contents, pkg.name, pkg, None, True])
1172- self.treeview_update.set_model(self.store)
1173+ self.scrolledwindow_update.show()
1174+ origin_list = sorted(
1175+ self.list.pkgs, key=operator.attrgetter("importance"), reverse=True)
1176+ for origin in origin_list:
1177+ self.store.append(['<b><big>%s</big></b>' % origin.description,
1178+ origin.description, None, origin,True])
1179+ for pkg in self.list.pkgs[origin]:
1180+ name = xml.sax.saxutils.escape(pkg.name)
1181+ if not pkg.is_installed:
1182+ name += _(" (New install)")
1183+ summary = xml.sax.saxutils.escape(getattr(pkg.candidate, "summary", None))
1184+ if self.summary_before_name:
1185+ contents = "%s\n<small>%s</small>" % (summary, name)
1186+ else:
1187+ contents = "<b>%s</b>\n<small>%s</small>" % (name, summary)
1188+ #TRANSLATORS: the b stands for Bytes
1189+ size = _("(Size: %s)") % humanize_size(getattr(pkg.candidate, "size", 0))
1190+ installed_version = getattr(pkg.installed, "version", None)
1191+ candidate_version = getattr(pkg.candidate, "version", None)
1192+ if installed_version is not None:
1193+ version = _("From version %(old_version)s to %(new_version)s") %\
1194+ {"old_version" : installed_version,
1195+ "new_version" : candidate_version}
1196+ else:
1197+ version = _("Version %s") % candidate_version
1198+ if self.show_versions:
1199+ contents = "%s\n<small>%s %s</small>" % (contents, version, size)
1200+ else:
1201+ contents = "%s <small>%s</small>" % (contents, size)
1202+ self.store.append([contents, pkg.name, pkg, None, True])
1203+ self.treeview_update.set_model(self.store)
1204 self.update_count()
1205 self.setBusy(False)
1206 while Gtk.events_pending():
1207 Gtk.main_iteration()
1208- self.check_all_updates_installable()
1209 self.refresh_updates_count()
1210 return False
1211
1212- def dist_no_longer_supported(self, meta_release):
1213- show_dist_no_longer_supported_dialog(self.window_main)
1214-
1215- def error(self, summary, details):
1216- " helper function to display a error message "
1217- msg = ("<big><b>%s</b></big>\n\n%s\n" % (summary, details) )
1218- dialog = Gtk.MessageDialog(self.window_main,
1219- 0, Gtk.MessageType.ERROR,
1220- Gtk.ButtonsType.CLOSE,"")
1221- dialog.set_markup(msg)
1222- dialog.get_content_area().set_spacing(6)
1223- dialog.run()
1224- dialog.destroy()
1225-
1226- def on_button_dist_upgrade_clicked(self, button):
1227- #print("on_button_dist_upgrade_clicked")
1228- if self.new_dist.upgrade_broken:
1229- return self.error(
1230- _("Release upgrade not possible right now"),
1231- _("The release upgrade can not be performed currently, "
1232- "please try again later. The server reported: '%s'") % self.new_dist.upgrade_broken)
1233- fetcher = DistUpgradeFetcherGtk(new_dist=self.new_dist, parent=self, progress=GtkAcquireProgress(self, _("Downloading the release upgrade tool")))
1234- if self.options.sandbox:
1235- fetcher.run_options.append("--sandbox")
1236- fetcher.run()
1237-
1238- def new_dist_available(self, meta_release, upgradable_to):
1239- self.frame_new_release.show()
1240- self.label_new_release.set_markup(_("<b>New Ubuntu release '%s' is available</b>") % upgradable_to.version)
1241- self.new_dist = upgradable_to
1242-
1243-
1244- # fixme: we should probably abstract away all the stuff from libapt
1245- def initCache(self):
1246- # get the lock
1247- try:
1248- apt_pkg.pkgsystem_lock()
1249- except SystemError:
1250- pass
1251- #d = Gtk.MessageDialog(parent=self.window_main,
1252- # flags=Gtk.DialogFlags.MODAL,
1253- # type=Gtk.MessageType.ERROR,
1254- # buttons=Gtk.ButtonsType.CLOSE)
1255- #d.set_markup("<big><b>%s</b></big>\n\n%s" % (
1256- # _("Only one software management tool is allowed to "
1257- # "run at the same time"),
1258- # _("Please close the other application e.g. 'aptitude' "
1259- # "or 'Synaptic' first.")))
1260- #print("error from apt: '%s'" % e)
1261- #d.set_title("")
1262- #res = d.run()
1263- #d.destroy()
1264- #sys.exit()
1265-
1266- try:
1267- if hasattr(self, "cache"):
1268- self.cache.open(self.progress)
1269- self.cache._initDepCache()
1270- else:
1271- self.cache = MyCache(self.progress)
1272- # FIXME: make this next line more elegant in a future branch by
1273- # moving the cache to a central location, probably UpdateManager.py
1274- self.window_main.cache = self.cache
1275- except AssertionError:
1276- # if the cache could not be opened for some reason,
1277- # let the release upgrader handle it, it deals
1278- # a lot better with this
1279- self.ask_run_partial_upgrade()
1280- # we assert a clean cache
1281- msg=("<big><b>%s</b></big>\n\n%s"% \
1282- (_("Software index is broken"),
1283- _("It is impossible to install or remove any software. "
1284- "Please use the package manager \"Synaptic\" or run "
1285- "\"sudo apt-get install -f\" in a terminal to fix "
1286- "this issue at first.")))
1287- dialog = Gtk.MessageDialog(self.window_main,
1288- 0, Gtk.MessageType.ERROR,
1289- Gtk.ButtonsType.CLOSE,"")
1290- dialog.set_markup(msg)
1291- dialog.get_content_area().set_spacing(6)
1292- dialog.run()
1293- dialog.destroy()
1294- sys.exit(1)
1295- else:
1296- self.progress.all_done()
1297-
1298- def check_all_updates_installable(self):
1299- """ Check if all available updates can be installed and suggest
1300- to run a distribution upgrade if not """
1301- if self.list.distUpgradeWouldDelete > 0:
1302- self.ask_run_partial_upgrade()
1303-
1304- def ask_run_partial_upgrade(self):
1305- self.dialog_dist_upgrade.set_transient_for(self.window_main)
1306- self.dialog_dist_upgrade.set_title("")
1307- res = self.dialog_dist_upgrade.run()
1308- self.dialog_dist_upgrade.hide()
1309- if res == Gtk.ResponseType.YES:
1310- os.execl("/usr/bin/gksu",
1311- "/usr/bin/gksu", "--desktop",
1312- "/usr/share/applications/update-manager.desktop",
1313- "--", "/usr/bin/update-manager", "--dist-upgrade")
1314- return False
1315-
1316- def check_metarelease(self):
1317- " check for new meta-release information "
1318- settings = Gio.Settings("com.ubuntu.update-manager")
1319- self.meta = MetaRelease(self.options.devel_release,
1320- self.options.use_proposed)
1321- self.meta.connect("dist_no_longer_supported",self.dist_no_longer_supported)
1322- # check if we are interessted in dist-upgrade information
1323- # (we are not by default on dapper)
1324- if (self.options.check_dist_upgrades or
1325- settings.get_boolean("check-dist-upgrades")):
1326- self.meta.connect("new_dist_available",self.new_dist_available)
1327-
1328-
1329 def main(self):
1330- # check for new distributin information
1331- self.check_metarelease()
1332-
1333- while Gtk.events_pending():
1334- Gtk.main_iteration()
1335-
1336+ self.window_main.push(self.pane_updates_available, self)
1337 self.fillstore()
1338 self.alert_watcher.check_alert_state()
1339
1340=== modified file 'UpdateManager/backend/InstallBackendAptdaemon.py'
1341--- UpdateManager/backend/InstallBackendAptdaemon.py 2012-06-18 20:03:30 +0000
1342+++ UpdateManager/backend/InstallBackendAptdaemon.py 2012-06-18 20:03:30 +0000
1343@@ -11,9 +11,10 @@
1344 from aptdaemon import client, errors
1345 from defer import inline_callbacks
1346 from aptdaemon.gtk3widgets import (AptCancelButton,
1347+ AptConfigFileConflictDialog,
1348 AptDetailsExpander,
1349 AptErrorDialog,
1350- AptProgressDialog,
1351+ AptMediumRequiredDialog,
1352 AptProgressBar)
1353 from aptdaemon.enums import (EXIT_SUCCESS,
1354 EXIT_FAILED,
1355@@ -41,7 +42,7 @@
1356 self.button_cancel = None
1357
1358 def close(self):
1359- if button_cancel:
1360+ if self.button_cancel:
1361 self.button_cancel.clicked()
1362 return True
1363 else:
1364@@ -110,7 +111,7 @@
1365 def _run_in_dialog(self, trans, action, header, show_details, close_on_done):
1366 builder = Gtk.Builder()
1367 builder.set_translation_domain("update-manager")
1368- builder.add_from_file(self.datadir+"gtkbuilder/UpdateProgress.ui")
1369+ builder.add_from_file(self.datadir+"/gtkbuilder/UpdateProgress.ui")
1370
1371 label_header = builder.get_object("label_header")
1372 label_header.set_label(header)
1373@@ -226,6 +227,4 @@
1374 if __name__ == "__main__":
1375 b = InstallBackendAptdaemon(None)
1376 b.commit(["2vcard"], [], False)
1377-
1378- from gi.repository import Gtk
1379 Gtk.main()
1380
1381=== modified file 'check-new-release-gtk'
1382--- check-new-release-gtk 2012-06-13 22:45:57 +0000
1383+++ check-new-release-gtk 2012-06-18 20:03:30 +0000
1384@@ -72,7 +72,9 @@
1385 FETCH_TIMEOUT = 20
1386
1387 def __init__(self, options):
1388- SimpleGtkbuilderApp.__init__(self, options.datadir+"/gtkbuilder/UpgradePromptDialog.ui", "update-manager")
1389+ self.options = options
1390+ self.datadir = options.datadir
1391+ SimpleGtkbuilderApp.__init__(self, self.datadir+"/gtkbuilder/UpgradePromptDialog.ui", "update-manager")
1392 self.new_dist = None
1393 logging.debug("running with devel=%s proposed=%s" % (
1394 options.devel_release, options.proposed_release))
1395@@ -107,9 +109,9 @@
1396 self.show_uri(html_uri)
1397 # show alert on unsupported distros
1398 if meta_release.no_longer_supported is not None:
1399- from UpdateManager.UpdateManager import show_dist_no_longer_supported_dialog
1400- self.window_main.realize()
1401- show_dist_no_longer_supported_dialog(self.window_main)
1402+ from UpdateManager.Dialogs import UnsupportedDialog
1403+ dialog = UnsupportedDialog(self, meta_release)
1404+ dialog.run(self.window_main)
1405
1406 def build_ui(self):
1407 from gi.repository import WebKit
1408@@ -123,9 +125,11 @@
1409
1410 def on_button_upgrade_now_clicked(self, button):
1411 logging.debug("upgrade now")
1412- progress=UpdateManager.GtkProgress.GtkAcquireProgress(self, _("Downloading the release upgrade tool"))
1413+ progress=UpdateManager.GtkProgress.GtkAcquireProgress(self, self.datadir,
1414+ _("Downloading the release upgrade tool"))
1415 fetcher = DistUpgradeFetcher(new_dist=self.new_dist,
1416 parent=self,
1417+ datadir=self.datadir,
1418 progress=progress)
1419 res = fetcher.run()
1420 res # pyflakes
1421
1422=== added file 'data/gtkbuilder/AcquireProgress.ui'
1423--- data/gtkbuilder/AcquireProgress.ui 1970-01-01 00:00:00 +0000
1424+++ data/gtkbuilder/AcquireProgress.ui 2012-06-18 20:03:30 +0000
1425@@ -0,0 +1,161 @@
1426+<?xml version="1.0" encoding="UTF-8"?>
1427+<interface>
1428+ <!-- interface-requires gtk+ 3.0 -->
1429+ <object class="GtkWindow" id="window_fetch">
1430+ <property name="can_focus">False</property>
1431+ <property name="border_width">6</property>
1432+ <property name="modal">True</property>
1433+ <property name="window_position">center-on-parent</property>
1434+ <property name="default_width">400</property>
1435+ <property name="type_hint">dialog</property>
1436+ <property name="skip_taskbar_hint">True</property>
1437+ <property name="skip_pager_hint">True</property>
1438+ <child>
1439+ <object class="GtkVBox" id="pane_fetch">
1440+ <property name="visible">True</property>
1441+ <property name="can_focus">False</property>
1442+ <property name="spacing">6</property>
1443+ <child>
1444+ <object class="GtkVBox" id="vbox7">
1445+ <property name="visible">True</property>
1446+ <property name="can_focus">False</property>
1447+ <property name="border_width">6</property>
1448+ <property name="spacing">12</property>
1449+ <child>
1450+ <object class="GtkLabel" id="label_fetch_summary">
1451+ <property name="visible">True</property>
1452+ <property name="can_focus">False</property>
1453+ <property name="xalign">0</property>
1454+ <property name="use_markup">True</property>
1455+ <property name="wrap">True</property>
1456+ </object>
1457+ <packing>
1458+ <property name="expand">False</property>
1459+ <property name="fill">False</property>
1460+ <property name="position">0</property>
1461+ </packing>
1462+ </child>
1463+ <child>
1464+ <object class="GtkVBox" id="vbox8">
1465+ <property name="visible">True</property>
1466+ <property name="can_focus">False</property>
1467+ <property name="spacing">6</property>
1468+ <child>
1469+ <object class="GtkProgressBar" id="progressbar_fetch">
1470+ <property name="visible">True</property>
1471+ <property name="can_focus">False</property>
1472+ <property name="pulse_step">0.10000000149</property>
1473+ </object>
1474+ <packing>
1475+ <property name="expand">True</property>
1476+ <property name="fill">False</property>
1477+ <property name="position">0</property>
1478+ </packing>
1479+ </child>
1480+ <child>
1481+ <object class="GtkLabel" id="label_fetch_status">
1482+ <property name="visible">True</property>
1483+ <property name="can_focus">False</property>
1484+ <property name="xalign">0</property>
1485+ </object>
1486+ <packing>
1487+ <property name="expand">False</property>
1488+ <property name="fill">False</property>
1489+ <property name="position">1</property>
1490+ </packing>
1491+ </child>
1492+ </object>
1493+ <packing>
1494+ <property name="expand">False</property>
1495+ <property name="fill">False</property>
1496+ <property name="position">1</property>
1497+ </packing>
1498+ </child>
1499+ <child>
1500+ <object class="GtkExpander" id="expander1">
1501+ <property name="can_focus">True</property>
1502+ <property name="spacing">6</property>
1503+ <child>
1504+ <object class="GtkVBox" id="vbox9">
1505+ <property name="visible">True</property>
1506+ <property name="can_focus">False</property>
1507+ <property name="spacing">6</property>
1508+ <child>
1509+ <object class="GtkScrolledWindow" id="scrolledwindow6">
1510+ <property name="height_request">200</property>
1511+ <property name="visible">True</property>
1512+ <property name="can_focus">True</property>
1513+ <property name="shadow_type">in</property>
1514+ <child>
1515+ <object class="GtkTreeView" id="treeview1">
1516+ <property name="visible">True</property>
1517+ <property name="can_focus">True</property>
1518+ <property name="enable_search">False</property>
1519+ <child internal-child="selection">
1520+ <object class="GtkTreeSelection" id="treeview-selection"/>
1521+ </child>
1522+ </object>
1523+ </child>
1524+ </object>
1525+ <packing>
1526+ <property name="expand">True</property>
1527+ <property name="fill">True</property>
1528+ <property name="position">0</property>
1529+ </packing>
1530+ </child>
1531+ </object>
1532+ </child>
1533+ <child type="label">
1534+ <object class="GtkLabel" id="label19">
1535+ <property name="visible">True</property>
1536+ <property name="can_focus">False</property>
1537+ <property name="label" translatable="yes">Show progress of individual files</property>
1538+ </object>
1539+ </child>
1540+ </object>
1541+ <packing>
1542+ <property name="expand">True</property>
1543+ <property name="fill">True</property>
1544+ <property name="position">2</property>
1545+ </packing>
1546+ </child>
1547+ </object>
1548+ <packing>
1549+ <property name="expand">True</property>
1550+ <property name="fill">True</property>
1551+ <property name="position">0</property>
1552+ </packing>
1553+ </child>
1554+ <child>
1555+ <object class="GtkHButtonBox" id="hbuttonbox7">
1556+ <property name="visible">True</property>
1557+ <property name="can_focus">False</property>
1558+ <property name="layout_style">end</property>
1559+ <child>
1560+ <object class="GtkButton" id="button_fetch_cancel">
1561+ <property name="label">gtk-cancel</property>
1562+ <property name="use_action_appearance">False</property>
1563+ <property name="visible">True</property>
1564+ <property name="can_focus">True</property>
1565+ <property name="receives_default">True</property>
1566+ <property name="border_width">5</property>
1567+ <property name="use_action_appearance">False</property>
1568+ <property name="use_stock">True</property>
1569+ </object>
1570+ <packing>
1571+ <property name="expand">False</property>
1572+ <property name="fill">False</property>
1573+ <property name="position">0</property>
1574+ </packing>
1575+ </child>
1576+ </object>
1577+ <packing>
1578+ <property name="expand">False</property>
1579+ <property name="fill">True</property>
1580+ <property name="position">1</property>
1581+ </packing>
1582+ </child>
1583+ </object>
1584+ </child>
1585+ </object>
1586+</interface>
1587
1588=== added file 'data/gtkbuilder/Dialog.ui'
1589--- data/gtkbuilder/Dialog.ui 1970-01-01 00:00:00 +0000
1590+++ data/gtkbuilder/Dialog.ui 2012-06-18 20:03:30 +0000
1591@@ -0,0 +1,123 @@
1592+<?xml version="1.0" encoding="UTF-8"?>
1593+<interface>
1594+ <!-- interface-requires gtk+ 3.0 -->
1595+ <object class="GtkDialog" id="window_dialog">
1596+ <property name="can_focus">False</property>
1597+ <property name="type_hint">dialog</property>
1598+ <child internal-child="vbox">
1599+ <object class="GtkBox" id="dialog-vbox1">
1600+ <property name="can_focus">False</property>
1601+ <property name="orientation">vertical</property>
1602+ <child internal-child="action_area">
1603+ <object class="GtkButtonBox" id="dialog-action_area1">
1604+ <property name="can_focus">False</property>
1605+ <property name="layout_style">end</property>
1606+ <child>
1607+ <placeholder/>
1608+ </child>
1609+ </object>
1610+ <packing>
1611+ <property name="expand">False</property>
1612+ <property name="fill">True</property>
1613+ <property name="pack_type">end</property>
1614+ <property name="position">0</property>
1615+ </packing>
1616+ </child>
1617+ <child>
1618+ <object class="GtkGrid" id="pane_dialog">
1619+ <property name="visible">True</property>
1620+ <property name="can_focus">False</property>
1621+ <property name="hexpand">True</property>
1622+ <property name="vexpand">True</property>
1623+ <property name="border_width">12</property>
1624+ <property name="row_spacing">12</property>
1625+ <property name="column_spacing">12</property>
1626+ <child>
1627+ <object class="GtkImage" id="image_logo">
1628+ <property name="visible">True</property>
1629+ <property name="can_focus">False</property>
1630+ <property name="yalign">0</property>
1631+ <property name="pixel_size">48</property>
1632+ <property name="icon_name">system-software-update</property>
1633+ </object>
1634+ <packing>
1635+ <property name="left_attach">0</property>
1636+ <property name="top_attach">0</property>
1637+ <property name="width">1</property>
1638+ <property name="height">1</property>
1639+ </packing>
1640+ </child>
1641+ <child>
1642+ <object class="GtkLabel" id="label_header">
1643+ <property name="visible">True</property>
1644+ <property name="can_focus">False</property>
1645+ <property name="margin_top">6</property>
1646+ <property name="hexpand">True</property>
1647+ <property name="xalign">0</property>
1648+ <property name="yalign">0</property>
1649+ <property name="wrap">True</property>
1650+ <property name="width_chars">40</property>
1651+ <property name="max_width_chars">40</property>
1652+ <attributes>
1653+ <attribute name="weight" value="bold"/>
1654+ <attribute name="scale" value="1.25"/>
1655+ </attributes>
1656+ </object>
1657+ <packing>
1658+ <property name="left_attach">1</property>
1659+ <property name="top_attach">0</property>
1660+ <property name="width">1</property>
1661+ <property name="height">1</property>
1662+ </packing>
1663+ </child>
1664+ <child>
1665+ <object class="GtkLabel" id="label_desc">
1666+ <property name="can_focus">False</property>
1667+ <property name="no_show_all">True</property>
1668+ <property name="hexpand">True</property>
1669+ <property name="vexpand">True</property>
1670+ <property name="xalign">0</property>
1671+ <property name="yalign">0</property>
1672+ <property name="wrap">True</property>
1673+ <property name="max_width_chars">40</property>
1674+ </object>
1675+ <packing>
1676+ <property name="left_attach">1</property>
1677+ <property name="top_attach">1</property>
1678+ <property name="width">1</property>
1679+ <property name="height">1</property>
1680+ </packing>
1681+ </child>
1682+ <child>
1683+ <object class="GtkButtonBox" id="buttonbox">
1684+ <property name="visible">True</property>
1685+ <property name="can_focus">False</property>
1686+ <property name="hexpand">True</property>
1687+ <property name="spacing">6</property>
1688+ <property name="homogeneous">True</property>
1689+ <property name="layout_style">end</property>
1690+ <child>
1691+ <placeholder/>
1692+ </child>
1693+ </object>
1694+ <packing>
1695+ <property name="left_attach">0</property>
1696+ <property name="top_attach">2</property>
1697+ <property name="width">2</property>
1698+ <property name="height">1</property>
1699+ </packing>
1700+ </child>
1701+ <child>
1702+ <placeholder/>
1703+ </child>
1704+ </object>
1705+ <packing>
1706+ <property name="expand">False</property>
1707+ <property name="fill">True</property>
1708+ <property name="position">1</property>
1709+ </packing>
1710+ </child>
1711+ </object>
1712+ </child>
1713+ </object>
1714+</interface>
1715
1716=== added file 'data/gtkbuilder/ReleaseNotes.ui'
1717--- data/gtkbuilder/ReleaseNotes.ui 1970-01-01 00:00:00 +0000
1718+++ data/gtkbuilder/ReleaseNotes.ui 2012-06-18 20:03:30 +0000
1719@@ -0,0 +1,88 @@
1720+<?xml version="1.0" encoding="UTF-8"?>
1721+<interface>
1722+ <!-- interface-requires gtk+ 3.0 -->
1723+ <object class="GtkDialog" id="dialog_release_notes">
1724+ <property name="can_focus">False</property>
1725+ <property name="border_width">6</property>
1726+ <property name="title" translatable="yes">Release Notes</property>
1727+ <property name="modal">True</property>
1728+ <property name="window_position">center-on-parent</property>
1729+ <property name="default_width">600</property>
1730+ <property name="default_height">500</property>
1731+ <property name="type_hint">dialog</property>
1732+ <child internal-child="vbox">
1733+ <object class="GtkBox" id="dialog-vbox">
1734+ <property name="visible">True</property>
1735+ <property name="can_focus">False</property>
1736+ <property name="orientation">vertical</property>
1737+ <property name="spacing">6</property>
1738+ <child internal-child="action_area">
1739+ <object class="GtkButtonBox" id="dialog-action_area">
1740+ <property name="can_focus">False</property>
1741+ <child>
1742+ <object class="GtkButton" id="okbutton1">
1743+ <property name="label">gtk-cancel</property>
1744+ <property name="use_action_appearance">False</property>
1745+ <property name="visible">True</property>
1746+ <property name="can_focus">True</property>
1747+ <property name="can_default">True</property>
1748+ <property name="receives_default">True</property>
1749+ <property name="use_action_appearance">False</property>
1750+ <property name="use_stock">True</property>
1751+ </object>
1752+ <packing>
1753+ <property name="expand">False</property>
1754+ <property name="fill">False</property>
1755+ <property name="position">0</property>
1756+ </packing>
1757+ </child>
1758+ <child>
1759+ <object class="GtkButton" id="button2">
1760+ <property name="label" translatable="yes">_Upgrade</property>
1761+ <property name="use_action_appearance">False</property>
1762+ <property name="visible">True</property>
1763+ <property name="can_focus">True</property>
1764+ <property name="can_default">True</property>
1765+ <property name="has_default">True</property>
1766+ <property name="receives_default">True</property>
1767+ <property name="use_action_appearance">False</property>
1768+ <property name="use_underline">True</property>
1769+ </object>
1770+ <packing>
1771+ <property name="expand">False</property>
1772+ <property name="fill">False</property>
1773+ <property name="position">1</property>
1774+ </packing>
1775+ </child>
1776+ </object>
1777+ <packing>
1778+ <property name="expand">False</property>
1779+ <property name="fill">True</property>
1780+ <property name="pack_type">end</property>
1781+ <property name="position">0</property>
1782+ </packing>
1783+ </child>
1784+ <child>
1785+ <object class="GtkScrolledWindow" id="scrolled_notes">
1786+ <property name="visible">True</property>
1787+ <property name="can_focus">True</property>
1788+ <property name="border_width">6</property>
1789+ <property name="shadow_type">in</property>
1790+ <child>
1791+ <placeholder/>
1792+ </child>
1793+ </object>
1794+ <packing>
1795+ <property name="expand">True</property>
1796+ <property name="fill">True</property>
1797+ <property name="position">1</property>
1798+ </packing>
1799+ </child>
1800+ </object>
1801+ </child>
1802+ <action-widgets>
1803+ <action-widget response="-6">okbutton1</action-widget>
1804+ <action-widget response="-5">button2</action-widget>
1805+ </action-widgets>
1806+ </object>
1807+</interface>
1808
1809=== modified file 'data/gtkbuilder/UpdateManager.ui'
1810--- data/gtkbuilder/UpdateManager.ui 2012-06-18 20:03:30 +0000
1811+++ data/gtkbuilder/UpdateManager.ui 2012-06-18 20:03:30 +0000
1812@@ -1,622 +1,11 @@
1813 <?xml version="1.0" encoding="UTF-8"?>
1814 <interface>
1815 <!-- interface-requires gtk+ 3.0 -->
1816- <object class="GtkWindow" id="dialog_cacheprogress">
1817- <property name="can_focus">False</property>
1818- <property name="border_width">6</property>
1819- <property name="resizable">False</property>
1820- <property name="modal">True</property>
1821- <property name="window_position">center-on-parent</property>
1822- <property name="type_hint">dialog</property>
1823- <property name="skip_taskbar_hint">True</property>
1824- <property name="skip_pager_hint">True</property>
1825- <child>
1826- <object class="GtkVBox" id="vbox14">
1827- <property name="visible">True</property>
1828- <property name="can_focus">False</property>
1829- <property name="border_width">6</property>
1830- <property name="spacing">12</property>
1831- <child>
1832- <object class="GtkLabel" id="label_cache_progress_title">
1833- <property name="visible">True</property>
1834- <property name="can_focus">False</property>
1835- <property name="xalign">0</property>
1836- <property name="yalign">0</property>
1837- <property name="label" translatable="yes">&lt;big&gt;&lt;b&gt;Starting Software Updater&lt;/b&gt;&lt;/big&gt;</property>
1838- <property name="use_markup">True</property>
1839- </object>
1840- <packing>
1841- <property name="expand">False</property>
1842- <property name="fill">False</property>
1843- <property name="position">0</property>
1844- </packing>
1845- </child>
1846- <child>
1847- <object class="GtkLabel" id="label22">
1848- <property name="can_focus">False</property>
1849- <property name="xalign">0</property>
1850- <property name="label" translatable="yes">Software updates correct errors, eliminate security vulnerabilities and provide new features.</property>
1851- <property name="use_markup">True</property>
1852- <property name="wrap">True</property>
1853- </object>
1854- <packing>
1855- <property name="expand">False</property>
1856- <property name="fill">False</property>
1857- <property name="position">1</property>
1858- </packing>
1859- </child>
1860- <child>
1861- <object class="GtkVBox" id="vbox16">
1862- <property name="visible">True</property>
1863- <property name="can_focus">False</property>
1864- <property name="spacing">6</property>
1865- <child>
1866- <object class="GtkProgressBar" id="progressbar_cache">
1867- <property name="visible">True</property>
1868- <property name="can_focus">False</property>
1869- <property name="pulse_step">0.10000000149</property>
1870- </object>
1871- <packing>
1872- <property name="expand">False</property>
1873- <property name="fill">False</property>
1874- <property name="position">0</property>
1875- </packing>
1876- </child>
1877- <child>
1878- <object class="GtkLabel" id="label_cache">
1879- <property name="visible">True</property>
1880- <property name="can_focus">False</property>
1881- <property name="xalign">0</property>
1882- <property name="ellipsize">end</property>
1883- </object>
1884- <packing>
1885- <property name="expand">False</property>
1886- <property name="fill">False</property>
1887- <property name="position">1</property>
1888- </packing>
1889- </child>
1890- </object>
1891- <packing>
1892- <property name="expand">False</property>
1893- <property name="fill">False</property>
1894- <property name="position">2</property>
1895- </packing>
1896- </child>
1897- </object>
1898- </child>
1899- </object>
1900- <object class="GtkDialog" id="dialog_dist_upgrade">
1901- <property name="can_focus">False</property>
1902- <property name="border_width">6</property>
1903- <property name="resizable">False</property>
1904- <property name="modal">True</property>
1905- <property name="window_position">center-on-parent</property>
1906- <property name="type_hint">dialog</property>
1907- <property name="skip_taskbar_hint">True</property>
1908- <property name="skip_pager_hint">True</property>
1909- <property name="urgency_hint">True</property>
1910- <child internal-child="vbox">
1911- <object class="GtkBox" id="dialog-vbox5">
1912- <property name="visible">True</property>
1913- <property name="can_focus">False</property>
1914- <property name="spacing">12</property>
1915- <child internal-child="action_area">
1916- <object class="GtkButtonBox" id="dialog-action_area5">
1917- <property name="visible">True</property>
1918- <property name="can_focus">False</property>
1919- <property name="layout_style">end</property>
1920- <child>
1921- <object class="GtkButton" id="cancelbutton2">
1922- <property name="label" translatable="yes">_Partial Upgrade</property>
1923- <property name="use_action_appearance">False</property>
1924- <property name="visible">True</property>
1925- <property name="can_focus">True</property>
1926- <property name="can_default">True</property>
1927- <property name="receives_default">False</property>
1928- <property name="use_action_appearance">False</property>
1929- <property name="use_underline">True</property>
1930- </object>
1931- <packing>
1932- <property name="expand">False</property>
1933- <property name="fill">False</property>
1934- <property name="position">0</property>
1935- </packing>
1936- </child>
1937- <child>
1938- <object class="GtkButton" id="okbutton3">
1939- <property name="label">gtk-close</property>
1940- <property name="use_action_appearance">False</property>
1941- <property name="visible">True</property>
1942- <property name="can_focus">True</property>
1943- <property name="can_default">True</property>
1944- <property name="has_default">True</property>
1945- <property name="receives_default">False</property>
1946- <property name="use_action_appearance">False</property>
1947- <property name="use_stock">True</property>
1948- </object>
1949- <packing>
1950- <property name="expand">False</property>
1951- <property name="fill">False</property>
1952- <property name="position">1</property>
1953- </packing>
1954- </child>
1955- </object>
1956- <packing>
1957- <property name="expand">False</property>
1958- <property name="fill">True</property>
1959- <property name="pack_type">end</property>
1960- <property name="position">0</property>
1961- </packing>
1962- </child>
1963- <child>
1964- <object class="GtkHBox" id="hbox20">
1965- <property name="visible">True</property>
1966- <property name="can_focus">False</property>
1967- <property name="border_width">6</property>
1968- <property name="spacing">12</property>
1969- <child>
1970- <object class="GtkImage" id="image15">
1971- <property name="visible">True</property>
1972- <property name="can_focus">False</property>
1973- <property name="xalign">0</property>
1974- <property name="yalign">0</property>
1975- <property name="stock">gtk-dialog-warning</property>
1976- <property name="icon-size">6</property>
1977- </object>
1978- <packing>
1979- <property name="expand">False</property>
1980- <property name="fill">True</property>
1981- <property name="position">0</property>
1982- </packing>
1983- </child>
1984- <child>
1985- <object class="GtkVBox" id="vbox18">
1986- <property name="visible">True</property>
1987- <property name="can_focus">False</property>
1988- <property name="spacing">12</property>
1989- <child>
1990- <object class="GtkLabel" id="label30">
1991- <property name="visible">True</property>
1992- <property name="can_focus">True</property>
1993- <property name="xalign">0</property>
1994- <property name="label" translatable="yes">&lt;big&gt;&lt;b&gt;Not all updates can be installed&lt;/b&gt;&lt;/big&gt;</property>
1995- <property name="use_markup">True</property>
1996- <property name="selectable">True</property>
1997- </object>
1998- <packing>
1999- <property name="expand">False</property>
2000- <property name="fill">False</property>
2001- <property name="position">0</property>
2002- </packing>
2003- </child>
2004- <child>
2005- <object class="GtkLabel" id="label31">
2006- <property name="visible">True</property>
2007- <property name="can_focus">False</property>
2008- <property name="xalign">0</property>
2009- <property name="label" translatable="yes">Run a partial upgrade, to install as many updates as possible.
2010-
2011-This can be caused by:
2012- * A previous upgrade which didn't complete
2013- * Problems with some of the installed software
2014- * Unofficial software packages not provided by Ubuntu
2015- * Normal changes of a pre-release version of Ubuntu</property>
2016- <property name="wrap">True</property>
2017- </object>
2018- <packing>
2019- <property name="expand">False</property>
2020- <property name="fill">False</property>
2021- <property name="position">1</property>
2022- </packing>
2023- </child>
2024- </object>
2025- <packing>
2026- <property name="expand">True</property>
2027- <property name="fill">True</property>
2028- <property name="position">1</property>
2029- </packing>
2030- </child>
2031- </object>
2032- <packing>
2033- <property name="expand">True</property>
2034- <property name="fill">True</property>
2035- <property name="position">1</property>
2036- </packing>
2037- </child>
2038- </object>
2039- </child>
2040- <action-widgets>
2041- <action-widget response="-8">cancelbutton2</action-widget>
2042- <action-widget response="-7">okbutton3</action-widget>
2043- </action-widgets>
2044- </object>
2045- <object class="GtkDialog" id="dialog_on_battery">
2046- <property name="can_focus">False</property>
2047- <property name="border_width">6</property>
2048- <property name="resizable">False</property>
2049- <property name="modal">True</property>
2050- <property name="window_position">center-on-parent</property>
2051- <property name="type_hint">dialog</property>
2052- <property name="skip_taskbar_hint">True</property>
2053- <property name="skip_pager_hint">True</property>
2054- <property name="urgency_hint">True</property>
2055- <child internal-child="vbox">
2056- <object class="GtkBox" id="dialog-vbox6">
2057- <property name="visible">True</property>
2058- <property name="can_focus">False</property>
2059- <property name="spacing">12</property>
2060- <child internal-child="action_area">
2061- <object class="GtkButtonBox" id="dialog-action_area6">
2062- <property name="visible">True</property>
2063- <property name="can_focus">False</property>
2064- <property name="layout_style">end</property>
2065- <child>
2066- <object class="GtkButton" id="button_on_battery_close">
2067- <property name="label">gtk-cancel</property>
2068- <property name="use_action_appearance">False</property>
2069- <property name="visible">True</property>
2070- <property name="can_focus">True</property>
2071- <property name="can_default">True</property>
2072- <property name="has_default">True</property>
2073- <property name="receives_default">True</property>
2074- <property name="use_action_appearance">False</property>
2075- <property name="use_stock">True</property>
2076- </object>
2077- <packing>
2078- <property name="expand">False</property>
2079- <property name="fill">False</property>
2080- <property name="position">0</property>
2081- </packing>
2082- </child>
2083- <child>
2084- <object class="GtkButton" id="button_on_battery_continue">
2085- <property name="label" translatable="yes">Co_ntinue</property>
2086- <property name="use_action_appearance">False</property>
2087- <property name="visible">True</property>
2088- <property name="can_focus">True</property>
2089- <property name="can_default">True</property>
2090- <property name="receives_default">True</property>
2091- <property name="use_action_appearance">False</property>
2092- <property name="use_underline">True</property>
2093- </object>
2094- <packing>
2095- <property name="expand">False</property>
2096- <property name="fill">False</property>
2097- <property name="position">1</property>
2098- </packing>
2099- </child>
2100- </object>
2101- <packing>
2102- <property name="expand">False</property>
2103- <property name="fill">True</property>
2104- <property name="pack_type">end</property>
2105- <property name="position">0</property>
2106- </packing>
2107- </child>
2108- <child>
2109- <object class="GtkHBox" id="hbox201">
2110- <property name="visible">True</property>
2111- <property name="can_focus">False</property>
2112- <property name="border_width">6</property>
2113- <property name="spacing">12</property>
2114- <child>
2115- <object class="GtkImage" id="image16">
2116- <property name="visible">True</property>
2117- <property name="can_focus">False</property>
2118- <property name="xalign">0</property>
2119- <property name="yalign">0</property>
2120- <property name="stock">gtk-dialog-warning</property>
2121- <property name="icon-size">6</property>
2122- </object>
2123- <packing>
2124- <property name="expand">False</property>
2125- <property name="fill">True</property>
2126- <property name="position">0</property>
2127- </packing>
2128- </child>
2129- <child>
2130- <object class="GtkVBox" id="vbox19">
2131- <property name="visible">True</property>
2132- <property name="can_focus">False</property>
2133- <property name="spacing">12</property>
2134- <child>
2135- <object class="GtkLabel" id="label35">
2136- <property name="visible">True</property>
2137- <property name="can_focus">True</property>
2138- <property name="xalign">0</property>
2139- <property name="label" translatable="yes">&lt;big&gt;&lt;b&gt;Running on battery&lt;/b&gt;&lt;/big&gt;</property>
2140- <property name="use_markup">True</property>
2141- <property name="selectable">True</property>
2142- </object>
2143- <packing>
2144- <property name="expand">False</property>
2145- <property name="fill">False</property>
2146- <property name="position">0</property>
2147- </packing>
2148- </child>
2149- <child>
2150- <object class="GtkLabel" id="label36">
2151- <property name="visible">True</property>
2152- <property name="can_focus">False</property>
2153- <property name="xalign">0</property>
2154- <property name="label" translatable="yes">Your system is running on battery. Are you sure you want to continue?</property>
2155- <property name="wrap">True</property>
2156- </object>
2157- <packing>
2158- <property name="expand">False</property>
2159- <property name="fill">False</property>
2160- <property name="position">1</property>
2161- </packing>
2162- </child>
2163- </object>
2164- <packing>
2165- <property name="expand">True</property>
2166- <property name="fill">True</property>
2167- <property name="position">1</property>
2168- </packing>
2169- </child>
2170- </object>
2171- <packing>
2172- <property name="expand">True</property>
2173- <property name="fill">True</property>
2174- <property name="position">1</property>
2175- </packing>
2176- </child>
2177- </object>
2178- </child>
2179- <action-widgets>
2180- <action-widget response="-7">button_on_battery_close</action-widget>
2181- <action-widget response="-8">button_on_battery_continue</action-widget>
2182- </action-widgets>
2183- </object>
2184- <object class="GtkDialog" id="dialog_release_notes">
2185- <property name="can_focus">False</property>
2186- <property name="border_width">6</property>
2187- <property name="title" translatable="yes">Release Notes</property>
2188- <property name="modal">True</property>
2189- <property name="window_position">center-on-parent</property>
2190- <property name="default_width">600</property>
2191- <property name="default_height">500</property>
2192- <property name="type_hint">dialog</property>
2193- <child internal-child="vbox">
2194- <object class="GtkBox" id="dialog-vbox33">
2195- <property name="visible">True</property>
2196- <property name="can_focus">False</property>
2197- <property name="spacing">6</property>
2198- <child internal-child="action_area">
2199- <object class="GtkButtonBox" id="dialog-action_area33">
2200- <property name="visible">True</property>
2201- <property name="can_focus">False</property>
2202- <property name="layout_style">end</property>
2203- <child>
2204- <object class="GtkButton" id="okbutton1">
2205- <property name="label">gtk-cancel</property>
2206- <property name="use_action_appearance">False</property>
2207- <property name="visible">True</property>
2208- <property name="can_focus">True</property>
2209- <property name="can_default">True</property>
2210- <property name="receives_default">False</property>
2211- <property name="use_action_appearance">False</property>
2212- <property name="use_stock">True</property>
2213- </object>
2214- <packing>
2215- <property name="expand">False</property>
2216- <property name="fill">False</property>
2217- <property name="position">0</property>
2218- </packing>
2219- </child>
2220- <child>
2221- <object class="GtkButton" id="button2">
2222- <property name="label" translatable="yes">_Upgrade</property>
2223- <property name="use_action_appearance">False</property>
2224- <property name="visible">True</property>
2225- <property name="can_focus">True</property>
2226- <property name="has_focus">True</property>
2227- <property name="can_default">True</property>
2228- <property name="has_default">True</property>
2229- <property name="receives_default">False</property>
2230- <property name="use_action_appearance">False</property>
2231- <property name="use_underline">True</property>
2232- </object>
2233- <packing>
2234- <property name="expand">False</property>
2235- <property name="fill">False</property>
2236- <property name="position">1</property>
2237- </packing>
2238- </child>
2239- </object>
2240- <packing>
2241- <property name="expand">False</property>
2242- <property name="fill">True</property>
2243- <property name="pack_type">end</property>
2244- <property name="position">0</property>
2245- </packing>
2246- </child>
2247- <child>
2248- <object class="GtkScrolledWindow" id="scrolled_notes">
2249- <property name="visible">True</property>
2250- <property name="can_focus">True</property>
2251- <property name="border_width">6</property>
2252- <property name="shadow_type">in</property>
2253- <child>
2254- <placeholder/>
2255- </child>
2256- </object>
2257- <packing>
2258- <property name="expand">True</property>
2259- <property name="fill">True</property>
2260- <property name="position">1</property>
2261- </packing>
2262- </child>
2263- </object>
2264- </child>
2265- <action-widgets>
2266- <action-widget response="-6">okbutton1</action-widget>
2267- <action-widget response="-5">button2</action-widget>
2268- </action-widgets>
2269- </object>
2270 <object class="GtkImage" id="image-apply">
2271 <property name="visible">True</property>
2272 <property name="can_focus">False</property>
2273 <property name="stock">gtk-apply</property>
2274 </object>
2275- <object class="GtkWindow" id="window_fetch">
2276- <property name="can_focus">False</property>
2277- <property name="border_width">6</property>
2278- <property name="modal">True</property>
2279- <property name="window_position">center-on-parent</property>
2280- <property name="default_width">400</property>
2281- <property name="type_hint">dialog</property>
2282- <property name="skip_taskbar_hint">True</property>
2283- <property name="skip_pager_hint">True</property>
2284- <child>
2285- <object class="GtkVBox" id="vbox6">
2286- <property name="visible">True</property>
2287- <property name="can_focus">False</property>
2288- <property name="spacing">6</property>
2289- <child>
2290- <object class="GtkVBox" id="vbox7">
2291- <property name="visible">True</property>
2292- <property name="can_focus">False</property>
2293- <property name="border_width">6</property>
2294- <property name="spacing">12</property>
2295- <child>
2296- <object class="GtkLabel" id="label_fetch_summary">
2297- <property name="visible">True</property>
2298- <property name="can_focus">False</property>
2299- <property name="xalign">0</property>
2300- <property name="use_markup">True</property>
2301- <property name="wrap">True</property>
2302- </object>
2303- <packing>
2304- <property name="expand">False</property>
2305- <property name="fill">False</property>
2306- <property name="position">0</property>
2307- </packing>
2308- </child>
2309- <child>
2310- <object class="GtkVBox" id="vbox8">
2311- <property name="visible">True</property>
2312- <property name="can_focus">False</property>
2313- <property name="spacing">6</property>
2314- <child>
2315- <object class="GtkProgressBar" id="progressbar_fetch">
2316- <property name="visible">True</property>
2317- <property name="can_focus">False</property>
2318- <property name="pulse_step">0.10000000149</property>
2319- </object>
2320- <packing>
2321- <property name="expand">True</property>
2322- <property name="fill">False</property>
2323- <property name="position">0</property>
2324- </packing>
2325- </child>
2326- <child>
2327- <object class="GtkLabel" id="label_fetch_status">
2328- <property name="visible">True</property>
2329- <property name="can_focus">False</property>
2330- <property name="xalign">0</property>
2331- </object>
2332- <packing>
2333- <property name="expand">False</property>
2334- <property name="fill">False</property>
2335- <property name="position">1</property>
2336- </packing>
2337- </child>
2338- </object>
2339- <packing>
2340- <property name="expand">False</property>
2341- <property name="fill">False</property>
2342- <property name="position">1</property>
2343- </packing>
2344- </child>
2345- <child>
2346- <object class="GtkExpander" id="expander1">
2347- <property name="can_focus">True</property>
2348- <property name="spacing">6</property>
2349- <child>
2350- <object class="GtkVBox" id="vbox9">
2351- <property name="visible">True</property>
2352- <property name="can_focus">False</property>
2353- <property name="spacing">6</property>
2354- <child>
2355- <object class="GtkScrolledWindow" id="scrolledwindow6">
2356- <property name="height_request">200</property>
2357- <property name="visible">True</property>
2358- <property name="can_focus">True</property>
2359- <property name="shadow_type">in</property>
2360- <child>
2361- <object class="GtkTreeView" id="treeview1">
2362- <property name="visible">True</property>
2363- <property name="can_focus">True</property>
2364- <property name="enable_search">False</property>
2365- <child internal-child="selection">
2366- <object class="GtkTreeSelection" id="treeview-selection1"/>
2367- </child>
2368- </object>
2369- </child>
2370- </object>
2371- <packing>
2372- <property name="expand">True</property>
2373- <property name="fill">True</property>
2374- <property name="position">0</property>
2375- </packing>
2376- </child>
2377- </object>
2378- </child>
2379- <child type="label">
2380- <object class="GtkLabel" id="label19">
2381- <property name="visible">True</property>
2382- <property name="can_focus">False</property>
2383- <property name="label" translatable="yes">Show progress of individual files</property>
2384- </object>
2385- </child>
2386- </object>
2387- <packing>
2388- <property name="expand">True</property>
2389- <property name="fill">True</property>
2390- <property name="position">2</property>
2391- </packing>
2392- </child>
2393- </object>
2394- <packing>
2395- <property name="expand">True</property>
2396- <property name="fill">True</property>
2397- <property name="position">0</property>
2398- </packing>
2399- </child>
2400- <child>
2401- <object class="GtkHButtonBox" id="hbuttonbox7">
2402- <property name="visible">True</property>
2403- <property name="can_focus">False</property>
2404- <property name="layout_style">end</property>
2405- <child>
2406- <object class="GtkButton" id="button_fetch_cancel">
2407- <property name="label">gtk-cancel</property>
2408- <property name="use_action_appearance">False</property>
2409- <property name="visible">True</property>
2410- <property name="can_focus">True</property>
2411- <property name="receives_default">False</property>
2412- <property name="border_width">5</property>
2413- <property name="use_action_appearance">False</property>
2414- <property name="use_stock">True</property>
2415- </object>
2416- <packing>
2417- <property name="expand">False</property>
2418- <property name="fill">False</property>
2419- <property name="position">0</property>
2420- </packing>
2421- </child>
2422- </object>
2423- <packing>
2424- <property name="expand">False</property>
2425- <property name="fill">True</property>
2426- <property name="position">1</property>
2427- </packing>
2428- </child>
2429- </object>
2430- </child>
2431- </object>
2432 <object class="GtkWindow" id="window_updates_available">
2433 <property name="can_focus">False</property>
2434 <child>
2435@@ -676,120 +65,6 @@
2436 </packing>
2437 </child>
2438 <child>
2439- <object class="GtkFrame" id="frame_new_release">
2440- <property name="can_focus">False</property>
2441- <property name="label_xalign">0</property>
2442- <property name="shadow_type">in</property>
2443- <child>
2444- <object class="GtkAlignment" id="alignment5">
2445- <property name="visible">True</property>
2446- <property name="can_focus">False</property>
2447- <child>
2448- <object class="GtkHBox" id="hbox_new_release">
2449- <property name="visible">True</property>
2450- <property name="can_focus">False</property>
2451- <property name="border_width">6</property>
2452- <property name="spacing">6</property>
2453- <child>
2454- <object class="GtkLabel" id="label_new_release">
2455- <property name="visible">True</property>
2456- <property name="can_focus">False</property>
2457- <property name="xalign">0</property>
2458- <property name="use_markup">True</property>
2459- </object>
2460- <packing>
2461- <property name="expand">True</property>
2462- <property name="fill">True</property>
2463- <property name="position">0</property>
2464- </packing>
2465- </child>
2466- <child>
2467- <object class="GtkButton" id="button_dist_upgrade">
2468- <property name="label" translatable="yes">U_pgrade</property>
2469- <property name="use_action_appearance">False</property>
2470- <property name="visible">True</property>
2471- <property name="can_focus">True</property>
2472- <property name="receives_default">True</property>
2473- <property name="use_action_appearance">False</property>
2474- <property name="use_underline">True</property>
2475- <signal name="clicked" handler="on_button_dist_upgrade_clicked" swapped="no"/>
2476- </object>
2477- <packing>
2478- <property name="expand">False</property>
2479- <property name="fill">False</property>
2480- <property name="position">1</property>
2481- </packing>
2482- </child>
2483- </object>
2484- </child>
2485- </object>
2486- </child>
2487- </object>
2488- <packing>
2489- <property name="expand">False</property>
2490- <property name="fill">True</property>
2491- <property name="position">1</property>
2492- </packing>
2493- </child>
2494- <child>
2495- <object class="GtkFrame" id="frame_restart_required">
2496- <property name="can_focus">False</property>
2497- <property name="label_xalign">0</property>
2498- <property name="shadow_type">in</property>
2499- <child>
2500- <object class="GtkAlignment" id="alignment11">
2501- <property name="visible">True</property>
2502- <property name="can_focus">False</property>
2503- <child>
2504- <object class="GtkHBox" id="hbox_reboot">
2505- <property name="visible">True</property>
2506- <property name="can_focus">False</property>
2507- <property name="border_width">6</property>
2508- <property name="spacing">6</property>
2509- <child>
2510- <object class="GtkLabel" id="label_restart_required">
2511- <property name="visible">True</property>
2512- <property name="can_focus">False</property>
2513- <property name="xalign">0</property>
2514- <property name="use_markup">True</property>
2515- <property name="wrap">True</property>
2516- <property name="selectable">True</property>
2517- </object>
2518- <packing>
2519- <property name="expand">True</property>
2520- <property name="fill">True</property>
2521- <property name="position">0</property>
2522- </packing>
2523- </child>
2524- <child>
2525- <object class="GtkButton" id="button_restart_required">
2526- <property name="label" translatable="yes">_Restart Now</property>
2527- <property name="use_action_appearance">False</property>
2528- <property name="visible">True</property>
2529- <property name="can_focus">True</property>
2530- <property name="receives_default">True</property>
2531- <property name="use_action_appearance">False</property>
2532- <property name="use_underline">True</property>
2533- <signal name="clicked" handler="on_button_restart_required_clicked" swapped="no"/>
2534- </object>
2535- <packing>
2536- <property name="expand">False</property>
2537- <property name="fill">False</property>
2538- <property name="position">1</property>
2539- </packing>
2540- </child>
2541- </object>
2542- </child>
2543- </object>
2544- </child>
2545- </object>
2546- <packing>
2547- <property name="expand">False</property>
2548- <property name="fill">True</property>
2549- <property name="position">2</property>
2550- </packing>
2551- </child>
2552- <child>
2553 <object class="GtkExpander" id="expander_details">
2554 <property name="visible">True</property>
2555 <property name="can_focus">True</property>
2556@@ -947,7 +222,7 @@
2557 <packing>
2558 <property name="expand">True</property>
2559 <property name="fill">True</property>
2560- <property name="position">3</property>
2561+ <property name="position">2</property>
2562 </packing>
2563 </child>
2564 <child>
2565@@ -1143,17 +418,7 @@
2566 <packing>
2567 <property name="expand">False</property>
2568 <property name="fill">True</property>
2569- <property name="position">4</property>
2570- </packing>
2571- </child>
2572- <child>
2573- <object class="GtkProgressBar" id="progressbar_cache_inline">
2574- <property name="can_focus">False</property>
2575- </object>
2576- <packing>
2577- <property name="expand">False</property>
2578- <property name="fill">False</property>
2579- <property name="position">5</property>
2580+ <property name="position">3</property>
2581 </packing>
2582 </child>
2583 </object>
2584@@ -1197,8 +462,8 @@
2585 <property name="receives_default">True</property>
2586 <property name="use_action_appearance">False</property>
2587 <property name="use_stock">True</property>
2588+ <accelerator key="W" signal="clicked" modifiers="GDK_CONTROL_MASK"/>
2589 <accelerator key="Q" signal="clicked" modifiers="GDK_CONTROL_MASK"/>
2590- <accelerator key="W" signal="clicked" modifiers="GDK_CONTROL_MASK"/>
2591 </object>
2592 <packing>
2593 <property name="expand">False</property>
2594
2595=== modified file 'tests/interactive_fetch_release_upgrader.py'
2596--- tests/interactive_fetch_release_upgrader.py 2012-05-01 23:20:42 +0000
2597+++ tests/interactive_fetch_release_upgrader.py 2012-06-18 20:03:30 +0000
2598@@ -64,14 +64,17 @@
2599 self.assertTrue(self.new_dist is not None)
2600
2601 def testdownloading(self):
2602- parent = UpdateManager("/usr/share/update-manager/")
2603+ parent = UpdateManager("/usr/share/update-manager/", None)
2604 progress = GtkAcquireProgress(parent,
2605+ "/usr/share/update-manager/",
2606 _("Downloading the upgrade "
2607 "tool"),
2608 _("The upgrade tool will "
2609 "guide you through the "
2610 "upgrade process."))
2611- fetcher = DistUpgradeFetcherGtk(self.new_dist, parent=parent, progress=progress)
2612+ fetcher = DistUpgradeFetcherGtk(self.new_dist, parent=parent,
2613+ progress=progress,
2614+ datadir="/usr/share/update-manager/")
2615 self.assertTrue(fetcher.showReleaseNotes())
2616 self.assertTrue(fetcher.fetchDistUpgrader())
2617 self.assertTrue(fetcher.extractDistUpgrader())
2618
2619=== modified file 'tests/test_end_of_life.py'
2620--- tests/test_end_of_life.py 2012-06-11 16:17:31 +0000
2621+++ tests/test_end_of_life.py 2012-06-18 20:03:30 +0000
2622@@ -23,7 +23,8 @@
2623 def _nag_dialog_close_helper(checker):
2624 # this helper is called to verify that the nag dialog appears
2625 # and that it
2626- dialog = getattr(checker.window_main, "no_longer_supported_nag", None)
2627+ dialog = getattr(checker, "no_longer_supported_nag", None)
2628+ print("testing", checker, dialog)
2629 self.assertNotEqual(dialog, None)
2630 dialog.response(Gtk.ResponseType.DELETE_EVENT)
2631 self.dialog_called = True

Subscribers

People subscribed via source and target branches

to status/vote changes: