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

Proposed by Michael Terry
Status: Superseded
Proposed branch: lp:~mterry/update-manager/dialogs
Merge into: lp:update-manager
Diff against target: 3948 lines (+1540/-1757)
24 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 (+93/-0)
UpdateManager/MetaReleaseGObject.py (+10/-8)
UpdateManager/UnitySupport.py (+0/-9)
UpdateManager/UpdateManager.py (+335/-0)
UpdateManager/UpdateProgress.py (+80/-0)
UpdateManager/UpdatesAvailable.py (+63/-601)
UpdateManager/backend/InstallBackendAptdaemon.py (+158/-19)
UpdateManager/backend/__init__.py (+2/-1)
check-new-release-gtk (+9/-5)
data/com.ubuntu.update-manager.gschema.xml.in (+0/-5)
data/gtkbuilder/AcquireProgress.ui (+161/-0)
data/gtkbuilder/Dialog.ui (+123/-0)
data/gtkbuilder/ReleaseNotes.ui (+88/-0)
data/gtkbuilder/UpdateManager.ui (+20/-950)
data/gtkbuilder/UpdateProgress.ui (+96/-0)
data/update-manager.convert (+0/-1)
tests/interactive_fetch_release_upgrader.py (+5/-2)
tests/test_end_of_life.py (+2/-1)
update-manager (+12/-2)
To merge this branch: bzr merge lp:~mterry/update-manager/dialogs
Reviewer Review Type Date Requested Status
Michael Vogt Pending
Review via email: mp+110899@code.launchpad.net

This proposal has been superseded by 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.

To post a comment you must log in.

Unmerged revisions

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:27 +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:27 +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:27 +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:27 +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:27 +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=== added file 'UpdateManager/InstallProgress.py'
565--- UpdateManager/InstallProgress.py 1970-01-01 00:00:00 +0000
566+++ UpdateManager/InstallProgress.py 2012-06-18 20:03:27 +0000
567@@ -0,0 +1,93 @@
568+# InstallProgress.py
569+#
570+# Copyright (c) 2004-2012 Canonical
571+# 2004 Michiel Sikkes
572+# 2005 Martin Willemoes Hansen
573+# 2010 Mohamed Amine IL Idrissi
574+#
575+# Author: Michiel Sikkes <michiel@eyesopened.nl>
576+# Michael Vogt <mvo@debian.org>
577+# Martin Willemoes Hansen <mwh@sysrq.dk>
578+# Mohamed Amine IL Idrissi <ilidrissiamine@gmail.com>
579+# Alex Launi <alex.launi@canonical.com>
580+# Michael Terry <michael.terry@canonical.com>
581+#
582+# This program is free software; you can redistribute it and/or
583+# modify it under the terms of the GNU General Public License as
584+# published by the Free Software Foundation; either version 2 of the
585+# License, or (at your option) any later version.
586+#
587+# This program is distributed in the hope that it will be useful,
588+# but WITHOUT ANY WARRANTY; without even the implied warranty of
589+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
590+# GNU General Public License for more details.
591+#
592+# You should have received a copy of the GNU General Public License
593+# along with this program; if not, write to the Free Software
594+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
595+# USA
596+
597+from __future__ import absolute_import, print_function
598+
599+import warnings
600+warnings.filterwarnings("ignore", "Accessed deprecated property", DeprecationWarning)
601+
602+import os
603+import sys
604+
605+from .backend import get_backend
606+
607+from .Core.utils import (inhibit_sleep,
608+ allow_sleep)
609+
610+class InstallProgress(object):
611+
612+ def __init__(self, app):
613+ self.window_main = app
614+ self.datadir = app.datadir
615+ self.options = app.options
616+
617+ # Used for inhibiting power management
618+ self.sleep_cookie = None
619+ self.sleep_dev = None
620+
621+ # get the install backend
622+ self.install_backend = get_backend(self.datadir, self.window_main)
623+ self.install_backend.connect("action-done", self._on_backend_done)
624+
625+ def invoke_manager(self):
626+ # don't display apt-listchanges, we already showed the changelog
627+ os.environ["APT_LISTCHANGES_FRONTEND"]="none"
628+
629+ # Do not suspend during the update process
630+ (self.sleep_dev, self.sleep_cookie) = inhibit_sleep()
631+
632+ # If the progress dialog should be closed automatically afterwards
633+ #settings = Gio.Settings("com.ubuntu.update-manager")
634+ #close_on_done = settings.get_boolean("autoclose-install-window")
635+ close_on_done = False # FIXME: confirm with mpt whether this should still be a setting
636+
637+ # Get the packages which should be installed and update
638+ pkgs_install = []
639+ pkgs_upgrade = []
640+ for pkg in self.window_main.cache:
641+ if pkg.marked_install:
642+ pkgs_install.append(pkg.name)
643+ elif pkg.marked_upgrade:
644+ pkgs_upgrade.append(pkg.name)
645+ self.install_backend.commit(pkgs_install, pkgs_upgrade, close_on_done)
646+
647+ def _on_backend_done(self, backend, action, authorized, success):
648+ # Allow suspend after synaptic is finished
649+ if self.sleep_cookie:
650+ allow_sleep(self.sleep_dev, self.sleep_cookie)
651+ self.sleep_cookie = self.sleep_dev = None
652+
653+ # Either launch main dialog and continue or quit altogether
654+ if success:
655+ self.window_main.start_available(allow_restart=True)
656+ else:
657+ sys.exit(0)
658+
659+ def main(self):
660+ self.invoke_manager()
661
662=== modified file 'UpdateManager/MetaReleaseGObject.py'
663--- UpdateManager/MetaReleaseGObject.py 2012-05-01 14:01:29 +0000
664+++ UpdateManager/MetaReleaseGObject.py 2012-06-18 20:03:27 +0000
665@@ -30,8 +30,10 @@
666 (GObject.TYPE_PYOBJECT,)),
667 'dist_no_longer_supported' : (GObject.SignalFlags.RUN_LAST,
668 None,
669- ())
670-
671+ ()),
672+ 'done_downloading' : (GObject.SignalFlags.RUN_LAST,
673+ None,
674+ ())
675 }
676
677 def __init__(self, useDevelopmentRelease=False, useProposed=False):
678@@ -43,13 +45,13 @@
679
680 def check(self):
681 # check if we have a metarelease_information file
682- keepRuning = True
683 if self.no_longer_supported is not None:
684- keepRuning = False
685 self.emit("dist_no_longer_supported")
686 if self.new_dist is not None:
687- keepRuning = False
688- self.emit("new_dist_available", self.new_dist)
689- return keepRuning
690-
691+ self.emit("new_dist_available", self.new_dist)
692+ if self.downloading:
693+ return True
694+ else:
695+ self.emit("done_downloading")
696+ return False
697
698
699=== modified file 'UpdateManager/UnitySupport.py'
700--- UpdateManager/UnitySupport.py 2011-08-11 11:47:34 +0000
701+++ UpdateManager/UnitySupport.py 2012-06-18 20:03:27 +0000
702@@ -51,15 +51,6 @@
703
704 def _add_quicklist(self, parent):
705 quicklist = Dbusmenu.Menuitem.new()
706- # update
707- update_dbusmenuitem = Dbusmenu.Menuitem.new()
708- update_dbusmenuitem.property_set(
709- Dbusmenu.MENUITEM_PROP_LABEL, _("Check for Updates"))
710- update_dbusmenuitem.property_set_bool(
711- Dbusmenu.MENUITEM_PROP_VISIBLE, True)
712- update_dbusmenuitem.connect (
713- "item-activated", parent.on_button_reload_clicked, None)
714- quicklist.child_append(update_dbusmenuitem)
715 # install
716 self.install_dbusmenuitem = Dbusmenu.Menuitem.new()
717 self.install_dbusmenuitem.property_set (Dbusmenu.MENUITEM_PROP_LABEL,
718
719=== added file 'UpdateManager/UpdateManager.py'
720--- UpdateManager/UpdateManager.py 1970-01-01 00:00:00 +0000
721+++ UpdateManager/UpdateManager.py 2012-06-18 20:03:27 +0000
722@@ -0,0 +1,335 @@
723+# UpdateManager.py
724+# -*- Mode: Python; indent-tabs-mode: nil; tab-width: 2; coding: utf-8 -*-
725+#
726+# Copyright (c) 2012 Canonical
727+#
728+# Author: Michael Terry <michael.terry@canonical.com>
729+#
730+# This program is free software; you can redistribute it and/or
731+# modify it under the terms of the GNU General Public License as
732+# published by the Free Software Foundation; either version 2 of the
733+# License, or (at your option) any later version.
734+#
735+# This program is distributed in the hope that it will be useful,
736+# but WITHOUT ANY WARRANTY; without even the implied warranty of
737+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
738+# GNU General Public License for more details.
739+#
740+# You should have received a copy of the GNU General Public License
741+# along with this program; if not, write to the Free Software
742+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
743+# USA
744+
745+from __future__ import absolute_import, print_function
746+
747+from gi.repository import Gtk
748+from gi.repository import Gdk
749+from gi.repository import Gio
750+from gi.repository import GLib
751+
752+import warnings
753+warnings.filterwarnings("ignore", "Accessed deprecated property", DeprecationWarning)
754+
755+import apt_pkg
756+import os
757+import sys
758+from gettext import gettext as _
759+
760+import dbus
761+import dbus.service
762+from dbus.mainloop.glib import DBusGMainLoop
763+DBusGMainLoop(set_as_default=True)
764+
765+from .UnitySupport import UnitySupport
766+from .Dialogs import (DistUpgradeDialog,
767+ ErrorDialog,
768+ NeedRestartDialog,
769+ NoUpdatesDialog,
770+ PartialUpgradeDialog,
771+ UnsupportedDialog)
772+from .InstallProgress import InstallProgress
773+from .MetaReleaseGObject import MetaRelease
774+from .UpdateProgress import UpdateProgress
775+from .UpdatesAvailable import UpdatesAvailable
776+from .Core.AlertWatcher import AlertWatcher
777+from .Core.MyCache import MyCache
778+from .Core.roam import NetworkManagerHelper
779+from .Core.UpdateList import UpdateList
780+
781+# file that signals if we need to reboot
782+REBOOT_REQUIRED_FILE = "/var/run/reboot-required"
783+
784+class UpdateManager(Gtk.Window):
785+ """ This class is the main window and work flow controller. Panes will add
786+ themselves to the main window and it will morph between them."""
787+
788+ def __init__(self, datadir, options):
789+ Gtk.Window.__init__(self)
790+
791+ # Public members
792+ self.datadir = datadir
793+ self.options = options
794+ self.unity = UnitySupport()
795+ self.controller = None
796+ self.cache = None
797+ self.update_list = None
798+ self.meta_release = None
799+
800+ # Basic GTK+ parameters
801+ self.set_title(_("Software Updater"))
802+ self.set_icon_name("system-software-update")
803+ self.set_resizable(False)
804+ self.set_position(Gtk.WindowPosition.CENTER)
805+ self.set_size_request(500,-1)
806+
807+ # Signals
808+ self.connect("delete-event", self.close)
809+
810+ self._setup_dbus()
811+
812+ # deal with no-focus-on-map
813+ if self.options and self.options.no_focus_on_map:
814+ self.set_focus_on_map(False)
815+ self.iconify()
816+ self.stick()
817+ self.set_urgency_hint(True)
818+ self.unity.set_urgency(True)
819+ self.initial_focus_id = self.connect(
820+ "focus-in-event", self.on_initial_focus_in)
821+
822+ # Look for a new release in a thread
823+ self.meta_release = MetaRelease(self.options and self.options.devel_release,
824+ self.options and self.options.use_proposed)
825+
826+
827+ def on_initial_focus_in(self, widget, event):
828+ """callback run on initial focus-in (if started unmapped)"""
829+ self.unstick()
830+ self.set_urgency_hint(False)
831+ self.unity.set_urgency(False)
832+ self.disconnect(self.initial_focus_id)
833+ return False
834+
835+ def push(self, pane, controller):
836+ child = self.get_child()
837+ if child is not None:
838+ if self.controller and hasattr(self.controller, "save_state"):
839+ self.controller.save_state()
840+ child.destroy()
841+
842+ if pane is None:
843+ self.controller = None
844+ return
845+
846+ pane.reparent(self)
847+ self.controller = controller
848+
849+ # Reset state
850+ self.set_resizable(False)
851+ self.set_sensitive(True)
852+ if self.get_window() is not None:
853+ self.get_window().set_cursor(None)
854+ self.get_window().set_functions(Gdk.WMFunction.ALL)
855+
856+ if self.controller and hasattr(self.controller, "restore_state"):
857+ self.controller.restore_state()
858+
859+ pane.show()
860+ self.show()
861+
862+ def close(self, widget, data=None):
863+ if not self.get_sensitive():
864+ return True
865+
866+ if self.controller and hasattr(self.controller, "close"):
867+ if self.controller.close(): # let controller handle it as they will
868+ return
869+
870+ self.exit()
871+
872+ def exit(self):
873+ """ exit the application, save the state """
874+ self.push(None, None)
875+ sys.exit(0)
876+
877+ def start_update(self):
878+ if self.options.no_update:
879+ self.start_available()
880+ return
881+
882+ self._start_pane(UpdateProgress(self))
883+
884+ def start_available(self, allow_restart=False):
885+ # If restart is needed, show that. Else show no-update-needed. Else
886+ # actually show the available updates.
887+ if allow_restart and os.path.exists(REBOOT_REQUIRED_FILE):
888+ self._start_pane(NeedRestartDialog(self))
889+ return
890+
891+ self._look_busy()
892+ self.refresh_cache()
893+
894+ if self.cache.install_count == 0:
895+ if not self._check_meta_release():
896+ self._start_pane(NoUpdatesDialog(self))
897+ else:
898+ self._start_pane(UpdatesAvailable(self))
899+
900+ def start_install(self):
901+ self._start_pane(InstallProgress(self))
902+
903+ def start_error(self, header, desc):
904+ self._start_pane(ErrorDialog(self, header, desc))
905+
906+ def _start_pane(self, pane):
907+ self._look_busy()
908+ pane.main()
909+
910+ def _look_busy(self):
911+ self.set_sensitive(False)
912+ if self.get_window() is not None:
913+ self.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
914+
915+ def _check_meta_release(self):
916+ if self.meta_release is None:
917+ return False
918+
919+ if self.meta_release.downloading:
920+ # Block until we get an answer
921+ GLib.idle_add(self._meta_release_wait_idle)
922+ Gtk.main()
923+
924+ # Check if there is anything to upgrade to or a known-broken upgrade
925+ next = self.meta_release.upgradable_to
926+ if not next or next.upgrade_broken:
927+ return False
928+
929+ # Check for end-of-life
930+ if self.meta_release.no_longer_supported:
931+ self._start_pane(UnsupportedDialog(self, self.meta_release))
932+ return True
933+
934+ # Check for new fresh release
935+ settings = Gio.Settings("com.ubuntu.update-manager")
936+ if (self.meta_release.new_dist and
937+ (self.options.check_dist_upgrades or
938+ settings.get_boolean("check-dist-upgrades"))):
939+ self._start_pane(DistUpgradeDialog(self, self.meta_release))
940+ return True
941+
942+ return False
943+
944+ def _meta_release_wait_idle(self):
945+ # 'downloading' is changed in a thread, but the signal 'done_downloading'
946+ # is done in our thread's event loop. So we know that it won't fire while
947+ # we're in this function.
948+ if not self.meta_release.downloading:
949+ Gtk.main_quit()
950+ else:
951+ self.meta_release.connect("done_downloading", Gtk.main_quit)
952+ return False
953+
954+ # fixme: we should probably abstract away all the stuff from libapt
955+ def refresh_cache(self):
956+ # get the lock
957+ try:
958+ apt_pkg.pkgsystem_lock()
959+ except SystemError:
960+ pass
961+
962+ try:
963+ if self.cache is None:
964+ self.cache = MyCache(None)
965+ else:
966+ self.cache.open(None)
967+ self.cache._initDepCache()
968+ except AssertionError:
969+ # if the cache could not be opened for some reason,
970+ # let the release upgrader handle it, it deals
971+ # a lot better with this
972+ self._start_pane(PartialUpgradeDialog(self))
973+ # we assert a clean cache
974+ header = _("Software index is broken")
975+ desc = _("It is impossible to install or remove any software. "
976+ "Please use the package manager \"Synaptic\" or run "
977+ "\"sudo apt-get install -f\" in a terminal to fix "
978+ "this issue at first.")
979+ self.start_error(header, desc)
980+ except SystemError as e:
981+ header = _("Could not initialize the package information")
982+ desc = _("An unresolvable problem occurred while "
983+ "initializing the package information.\n\n"
984+ "Please report this bug against the 'update-manager' "
985+ "package and include the following error message:\n") + e
986+ self.start_error(header, desc)
987+
988+ # Let the Gtk event loop breath if it hasn't had a chance.
989+ while Gtk.events_pending():
990+ Gtk.main_iteration()
991+
992+ self.update_list = UpdateList(self)
993+ try:
994+ self.update_list.update(self.cache)
995+ except SystemError as e:
996+ header = _("Could not calculate the upgrade")
997+ desc = _("An unresolvable problem occurred while "
998+ "calculating the upgrade.\n\n"
999+ "Please report this bug against the 'update-manager' "
1000+ "package and include the following error message:\n") + e
1001+ self.start_error(header, desc)
1002+
1003+ self.unity.set_updates_count(self.cache.install_count)
1004+
1005+ if self.update_list.distUpgradeWouldDelete > 0:
1006+ self._start_pane(PartialUpgradeDialog(self))
1007+
1008+ def _setup_dbus(self):
1009+ """ this sets up a dbus listener if none is installed alread """
1010+ # check if there is another g-a-i already and if not setup one
1011+ # listening on dbus
1012+ try:
1013+ bus = dbus.SessionBus()
1014+ except:
1015+ print("warning: could not initiate dbus")
1016+ return
1017+ try:
1018+ proxy_obj = bus.get_object('org.freedesktop.UpdateManager',
1019+ '/org/freedesktop/UpdateManagerObject')
1020+ iface = dbus.Interface(proxy_obj, 'org.freedesktop.UpdateManagerIFace')
1021+ iface.bringToFront()
1022+ #print("send bringToFront")
1023+ sys.exit(0)
1024+ except dbus.DBusException:
1025+ #print("no listening object (%s) " % e)
1026+ bus_name = dbus.service.BusName('org.freedesktop.UpdateManager',bus)
1027+ self.dbusController = UpdateManagerDbusController(self, bus_name)
1028+
1029+
1030+class UpdateManagerDbusController(dbus.service.Object):
1031+ """ this is a helper to provide the UpdateManagerIFace """
1032+ def __init__(self, parent, bus_name,
1033+ object_path='/org/freedesktop/UpdateManagerObject'):
1034+ dbus.service.Object.__init__(self, bus_name, object_path)
1035+ self.parent = parent
1036+ self.alert_watcher = AlertWatcher ()
1037+ self.alert_watcher.connect("network-alert", self._on_network_alert)
1038+ self.connected = False
1039+
1040+ @dbus.service.method('org.freedesktop.UpdateManagerIFace')
1041+ def bringToFront(self):
1042+ self.parent.present()
1043+ return True
1044+
1045+ @dbus.service.method('org.freedesktop.UpdateManagerIFace')
1046+ def upgrade(self):
1047+ try:
1048+ self.parent.start_install()
1049+ return True
1050+ except:
1051+ return False
1052+
1053+ def _on_network_alert(self, watcher, state):
1054+ if state in NetworkManagerHelper.NM_STATE_CONNECTED_LIST:
1055+ self.connected = True
1056+ else:
1057+ self.connected = False
1058
1059=== added file 'UpdateManager/UpdateProgress.py'
1060--- UpdateManager/UpdateProgress.py 1970-01-01 00:00:00 +0000
1061+++ UpdateManager/UpdateProgress.py 2012-06-18 20:03:27 +0000
1062@@ -0,0 +1,80 @@
1063+# UpdateProgress.py
1064+#
1065+# Copyright (c) 2004-2012 Canonical
1066+# 2004 Michiel Sikkes
1067+# 2005 Martin Willemoes Hansen
1068+# 2010 Mohamed Amine IL Idrissi
1069+#
1070+# Author: Michiel Sikkes <michiel@eyesopened.nl>
1071+# Michael Vogt <mvo@debian.org>
1072+# Martin Willemoes Hansen <mwh@sysrq.dk>
1073+# Mohamed Amine IL Idrissi <ilidrissiamine@gmail.com>
1074+# Alex Launi <alex.launi@canonical.com>
1075+# Michael Terry <michael.terry@canonical.com>
1076+#
1077+# This program is free software; you can redistribute it and/or
1078+# modify it under the terms of the GNU General Public License as
1079+# published by the Free Software Foundation; either version 2 of the
1080+# License, or (at your option) any later version.
1081+#
1082+# This program is distributed in the hope that it will be useful,
1083+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1084+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1085+# GNU General Public License for more details.
1086+#
1087+# You should have received a copy of the GNU General Public License
1088+# along with this program; if not, write to the Free Software
1089+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
1090+# USA
1091+
1092+from __future__ import absolute_import, print_function
1093+
1094+import warnings
1095+warnings.filterwarnings("ignore", "Accessed deprecated property", DeprecationWarning)
1096+
1097+import os
1098+import sys
1099+
1100+from .backend import get_backend
1101+
1102+from .Core.utils import (inhibit_sleep,
1103+ allow_sleep)
1104+
1105+class UpdateProgress(object):
1106+
1107+ def __init__(self, app):
1108+ self.window_main = app
1109+ self.datadir = app.datadir
1110+ self.options = app.options
1111+
1112+ # Used for inhibiting power management
1113+ self.sleep_cookie = None
1114+ self.sleep_dev = None
1115+
1116+ # get the install backend
1117+ self.install_backend = get_backend(self.datadir, self.window_main)
1118+ self.install_backend.connect("action-done", self._on_backend_done)
1119+
1120+ def invoke_manager(self):
1121+ # don't display apt-listchanges
1122+ os.environ["APT_LISTCHANGES_FRONTEND"]="none"
1123+
1124+ # Do not suspend during the update process
1125+ (self.sleep_dev, self.sleep_cookie) = inhibit_sleep()
1126+
1127+ self.install_backend.update()
1128+
1129+ def _on_backend_done(self, backend, action, authorized, success):
1130+ # Allow suspend after synaptic is finished
1131+ if self.sleep_cookie:
1132+ allow_sleep(self.sleep_dev, self.sleep_cookie)
1133+ self.sleep_cookie = self.sleep_dev = None
1134+
1135+ # Either launch main dialog and continue or quit altogether
1136+ if success:
1137+ self.window_main.start_available()
1138+ else:
1139+ sys.exit(0)
1140+
1141+ def main(self):
1142+ self.invoke_manager()
1143
1144=== renamed file 'UpdateManager/UpdateManager.py' => 'UpdateManager/UpdatesAvailable.py'
1145--- UpdateManager/UpdateManager.py 2012-06-12 13:17:46 +0000
1146+++ UpdateManager/UpdatesAvailable.py 2012-06-18 20:03:27 +0000
1147@@ -1,6 +1,6 @@
1148-# UpdateManager.py
1149+# UpdatesAvailable.py
1150 #
1151-# Copyright (c) 2004-2010 Canonical
1152+# Copyright (c) 2004-2012 Canonical
1153 # 2004 Michiel Sikkes
1154 # 2005 Martin Willemoes Hansen
1155 # 2010 Mohamed Amine IL Idrissi
1156@@ -10,6 +10,7 @@
1157 # Martin Willemoes Hansen <mwh@sysrq.dk>
1158 # Mohamed Amine IL Idrissi <ilidrissiamine@gmail.com>
1159 # Alex Launi <alex.launi@canonical.com>
1160+# Michael Terry <michael.terry@canonical.com>
1161 #
1162 # This program is free software; you can redistribute it and/or
1163 # modify it under the terms of the GNU General Public License as
1164@@ -40,12 +41,8 @@
1165
1166 import apt_pkg
1167
1168-import gettext
1169-import sys
1170 import os
1171-import stat
1172 import re
1173-import locale
1174 import logging
1175 import operator
1176 import subprocess
1177@@ -53,33 +50,17 @@
1178 import threading
1179 import xml.sax.saxutils
1180
1181-import dbus
1182-import dbus.service
1183-from dbus.mainloop.glib import DBusGMainLoop
1184-DBusGMainLoop(set_as_default=True)
1185-
1186-from .GtkProgress import GtkAcquireProgress, GtkOpProgressInline
1187-from .backend import get_backend
1188-
1189 from gettext import gettext as _
1190 from gettext import ngettext
1191
1192
1193-from .Core.utils import (humanize_size,
1194- init_proxy,
1195- on_battery,
1196- inhibit_sleep,
1197- allow_sleep)
1198-from .Core.UpdateList import UpdateList
1199-from .Core.MyCache import MyCache
1200+from .Core.utils import humanize_size
1201 from .Core.AlertWatcher import AlertWatcher
1202
1203 from DistUpgrade.DistUpgradeCache import NotEnoughFreeSpaceError
1204-from .DistUpgradeFetcher import DistUpgradeFetcherGtk
1205
1206 from .ChangelogViewer import ChangelogViewer
1207 from .SimpleGtk3builderApp import SimpleGtkbuilderApp
1208-from .MetaReleaseGObject import MetaRelease
1209 from .UnitySupport import UnitySupport
1210
1211
1212@@ -91,99 +72,19 @@
1213 # list constants
1214 (LIST_CONTENTS, LIST_NAME, LIST_PKG, LIST_ORIGIN, LIST_TOGGLE_CHECKED) = range(5)
1215
1216-# actions for "invoke_manager"
1217-(INSTALL, UPDATE) = range(2)
1218-
1219-# file that signals if we need to reboot
1220-REBOOT_REQUIRED_FILE = "/var/run/reboot-required"
1221-
1222 # NetworkManager enums
1223 from .Core.roam import NetworkManagerHelper
1224
1225-def show_dist_no_longer_supported_dialog(parent=None):
1226- """ show a no-longer-supported dialog """
1227- msg = "<big><b>%s</b></big>\n\n%s" % (
1228- _("Your Ubuntu release is not supported anymore."),
1229- _("You will not get any further security fixes or critical "
1230- "updates. "
1231- "Please upgrade to a later version of Ubuntu."))
1232- dialog = Gtk.MessageDialog(parent, 0, Gtk.MessageType.WARNING,
1233- Gtk.ButtonsType.CLOSE,"")
1234- dialog.set_title("")
1235- dialog.set_markup(msg)
1236- button = Gtk.LinkButton(uri="http://www.ubuntu.com/releaseendoflife",
1237- label=_("Upgrade information"))
1238- button.show()
1239- dialog.get_content_area().pack_end(button, True, True, 0)
1240- # this data used in the test to get the dialog
1241- if parent:
1242- parent.no_longer_supported_nag = dialog
1243- dialog.run()
1244- dialog.destroy()
1245- if parent:
1246- del parent.no_longer_supported_nag
1247-
1248-
1249-class UpdateManagerDbusController(dbus.service.Object):
1250- """ this is a helper to provide the UpdateManagerIFace """
1251- def __init__(self, parent, bus_name,
1252- object_path='/org/freedesktop/UpdateManagerObject'):
1253- dbus.service.Object.__init__(self, bus_name, object_path)
1254- self.parent = parent
1255- self.alert_watcher = AlertWatcher ()
1256- self.alert_watcher.connect("network-alert", self._on_network_alert)
1257- self.connected = False
1258-
1259- @dbus.service.method('org.freedesktop.UpdateManagerIFace')
1260- def bringToFront(self):
1261- self.parent.window_main.present()
1262- return True
1263-
1264- @dbus.service.method('org.freedesktop.UpdateManagerIFace')
1265- def update(self):
1266- try:
1267- self.alert_watcher.check_alert_state ()
1268- self.parent.invoke_manager(UPDATE)
1269- return self.connected
1270- except:
1271- return False
1272-
1273- @dbus.service.method('org.freedesktop.UpdateManagerIFace')
1274- def upgrade(self):
1275- try:
1276- self.parent.cache.checkFreeSpace()
1277- self.parent.invoke_manager(INSTALL)
1278- return True
1279- except:
1280- return False
1281-
1282- @dbus.service.signal('org.freedesktop.UpdateManagerIFace', 'b')
1283- def updated(self, success):
1284- pass
1285-
1286- def _on_network_alert(self, watcher, state):
1287- if state in NetworkManagerHelper.NM_STATE_CONNECTED_LIST:
1288- self.connected = True
1289- else:
1290- self.connected = False
1291-
1292-class UpdateManager(SimpleGtkbuilderApp):
1293-
1294- # how many days until u-m warns about manual pressing "check"
1295- NO_UPDATE_WARNING_DAYS = 7
1296-
1297- def __init__(self, datadir, options):
1298- self.setupDbus()
1299- Gtk.Window.set_default_icon_name("system-software-update")
1300- self.datadir = datadir
1301- SimpleGtkbuilderApp.__init__(self, datadir+"gtkbuilder/UpdateManager.ui",
1302+class UpdatesAvailable(SimpleGtkbuilderApp):
1303+
1304+ def __init__(self, app):
1305+ self.window_main = app
1306+ self.datadir = app.datadir
1307+ self.options = app.options
1308+ self.cache = app.cache
1309+ self.list = app.update_list
1310+ SimpleGtkbuilderApp.__init__(self, self.datadir+"/gtkbuilder/UpdateManager.ui",
1311 "update-manager")
1312- gettext.bindtextdomain("update-manager", "/usr/share/locale")
1313- gettext.textdomain("update-manager")
1314- try:
1315- locale.setlocale(locale.LC_ALL, "")
1316- except:
1317- logging.exception("setlocale failed")
1318
1319 # Used for inhibiting power management
1320 self.sleep_cookie = None
1321@@ -192,13 +93,12 @@
1322 # workaround for LP: #945536
1323 self.clearing_store = False
1324
1325- self.image_logo.set_from_icon_name("system-software-update", Gtk.IconSize.DIALOG)
1326- self.window_main.set_sensitive(False)
1327- self.window_main.grab_focus()
1328 self.button_close.grab_focus()
1329 self.dl_size = 0
1330 self.connected = True
1331
1332+ self.settings = Gio.Settings("com.ubuntu.update-manager")
1333+
1334 # create text view
1335 self.textview_changes = ChangelogViewer()
1336 self.textview_changes.show()
1337@@ -207,13 +107,13 @@
1338 changes_buffer.create_tag("versiontag", weight=Pango.Weight.BOLD)
1339
1340 # expander
1341+ self.expander_details.set_expanded(self.settings.get_boolean("show-details"))
1342 self.expander_details.connect("activate", self.pre_activate_details)
1343 self.expander_details.connect("notify::expanded", self.activate_details)
1344 self.expander_desc.connect("notify::expanded", self.activate_desc)
1345
1346 # useful exit stuff
1347- self.window_main.connect("delete_event", self.close)
1348- self.button_close.connect("clicked", lambda w: self.exit())
1349+ self.button_close.connect("clicked", lambda w: self.window_main.exit())
1350
1351 # the treeview (move into it's own code!)
1352 self.store = Gtk.ListStore(str, str, GObject.TYPE_PYOBJECT,
1353@@ -256,47 +156,14 @@
1354 if not os.path.exists("/usr/bin/software-properties-gtk"):
1355 self.button_settings.set_sensitive(False)
1356
1357- self.settings = Gio.Settings("com.ubuntu.update-manager")
1358- init_proxy(self.settings)
1359 # init show version
1360 self.show_versions = self.settings.get_boolean("show-versions")
1361 # init summary_before_name
1362 self.summary_before_name = self.settings.get_boolean("summary-before-name")
1363- # keep track when we run (for update-notifier)
1364- self.settings.set_int("launch-time", int(time.time()))
1365-
1366- # get progress object
1367- self.progress = GtkOpProgressInline(
1368- self.progressbar_cache_inline, self.window_main)
1369-
1370- #set minimum size to prevent the headline label blocking the resize process
1371- self.window_main.set_size_request(500,-1)
1372- # restore details state, which will trigger a resize if necessary
1373- self.expander_details.set_expanded(self.settings.get_boolean("show-details"))
1374- # deal with no-focus-on-map
1375- if options.no_focus_on_map:
1376- self.window_main.set_focus_on_map(False)
1377- if self.progress._window:
1378- self.progress._window.set_focus_on_map(False)
1379- # show the main window
1380- self.window_main.show()
1381- # get the install backend
1382- self.install_backend = get_backend(self.window_main)
1383- self.install_backend.connect("action-done", self._on_backend_done)
1384
1385 # Create Unity launcher quicklist
1386 # FIXME: instead of passing parent we really should just send signals
1387 self.unity = UnitySupport(parent=self)
1388-
1389- # it can only the iconified *after* it is shown (even if the docs
1390- # claim otherwise)
1391- if options.no_focus_on_map:
1392- self.window_main.iconify()
1393- self.window_main.stick()
1394- self.window_main.set_urgency_hint(True)
1395- self.unity.set_urgency(True)
1396- self.initial_focus_id = self.window_main.connect(
1397- "focus-in-event", self.on_initial_focus_in)
1398
1399 # Alert watcher
1400 self.alert_watcher = AlertWatcher()
1401@@ -304,29 +171,10 @@
1402 self.alert_watcher.connect("battery-alert", self._on_battery_alert)
1403 self.alert_watcher.connect("network-3g-alert", self._on_network_3g_alert)
1404
1405-
1406 def install_all_updates (self, menu, menuitem, data):
1407 self.select_all_updgrades (None)
1408 self.on_button_install_clicked (None)
1409
1410- def on_initial_focus_in(self, widget, event):
1411- """callback run on initial focus-in (if started unmapped)"""
1412- widget.unstick()
1413- widget.set_urgency_hint(False)
1414- self.unity.set_urgency(False)
1415- self.window_main.disconnect(self.initial_focus_id)
1416- return False
1417-
1418- def warn_on_battery(self):
1419- """check and warn if on battery"""
1420- if on_battery():
1421- self.dialog_on_battery.set_transient_for(self.window_main)
1422- self.dialog_on_battery.set_title("")
1423- res = self.dialog_on_battery.run()
1424- self.dialog_on_battery.hide()
1425- if res != Gtk.ResponseType.YES:
1426- sys.exit()
1427-
1428 def install_column_view_func(self, cell_layout, renderer, model, iter, data):
1429 pkg = model.get_value(iter, LIST_PKG)
1430 if pkg is None:
1431@@ -344,39 +192,6 @@
1432 else:
1433 renderer.set_property("activatable", True)
1434
1435- def setupDbus(self):
1436- """ this sets up a dbus listener if none is installed alread """
1437- # check if there is another g-a-i already and if not setup one
1438- # listening on dbus
1439- try:
1440- bus = dbus.SessionBus()
1441- except:
1442- print("warning: could not initiate dbus")
1443- return
1444- try:
1445- proxy_obj = bus.get_object('org.freedesktop.UpdateManager',
1446- '/org/freedesktop/UpdateManagerObject')
1447- iface = dbus.Interface(proxy_obj, 'org.freedesktop.UpdateManagerIFace')
1448- iface.bringToFront()
1449- #print("send bringToFront")
1450- sys.exit(0)
1451- except dbus.DBusException:
1452- #print("no listening object (%s) " % e)
1453- bus_name = dbus.service.BusName('org.freedesktop.UpdateManager',bus)
1454- self.dbusController = UpdateManagerDbusController(self, bus_name)
1455-
1456-
1457- def on_checkbutton_reminder_toggled(self, checkbutton):
1458- self.settings.set_boolean("remind-reload",
1459- not checkbutton.get_active())
1460-
1461- def close(self, widget, data=None):
1462- if self.window_main.get_property("sensitive") is False:
1463- return True
1464- else:
1465- self.exit()
1466-
1467-
1468 def set_changes_buffer(self, changes_buffer, text, name, srcpkg):
1469 changes_buffer.set_text("")
1470 lines = text.split("\n")
1471@@ -600,77 +415,11 @@
1472 self.hbox_downsize.show()
1473 self.vbox_alerts.show()
1474
1475- def _get_last_apt_get_update_minutes(self):
1476- """
1477- Return the number of minutes since the last successful apt-get update
1478-
1479- If the date is unknown, return "None"
1480- """
1481- if not os.path.exists("/var/lib/apt/periodic/update-success-stamp"):
1482- return None
1483- # calculate when the last apt-get update (or similar operation)
1484- # was performed
1485- mtime = os.stat("/var/lib/apt/periodic/update-success-stamp")[stat.ST_MTIME]
1486- ago_minutes = int((time.time() - mtime) / 60 )
1487- return ago_minutes
1488-
1489- def _get_last_apt_get_update_text(self):
1490- """
1491- return a human readable string with the information when
1492- the last apt-get update was run
1493- """
1494- ago_minutes = self._get_last_apt_get_update_minutes()
1495- if ago_minutes is None:
1496- return _("It is unknown when the package information was "
1497- "updated last. Please click the 'Check' "
1498- "button to update the information.")
1499- ago_hours = int( ago_minutes / 60 )
1500- ago_days = int( ago_hours / 24 )
1501- if ago_days > self.NO_UPDATE_WARNING_DAYS:
1502- return _("The package information was last updated %(days_ago)s "
1503- "days ago.\n"
1504- "Press the 'Check' button below to check for new software "
1505- "updates.") % { "days_ago" : ago_days, }
1506- elif ago_days > 0:
1507- return ngettext("The package information was last updated %(days_ago)s day ago.",
1508- "The package information was last updated %(days_ago)s days ago.",
1509- ago_days) % { "days_ago" : ago_days, }
1510- elif ago_hours > 0:
1511- return ngettext("The package information was last updated %(hours_ago)s hour ago.",
1512- "The package information was last updated %(hours_ago)s hours ago.",
1513- ago_hours) % { "hours_ago" : ago_hours, }
1514- elif ago_minutes >= 45:
1515- # TRANSLATORS: only in plural form, as %s minutes ago is one of 15, 30, 45 minutes ago
1516- return _("The package information was last updated about %s minutes ago.")%45
1517- elif ago_minutes >= 30:
1518- return _("The package information was last updated about %s minutes ago.")%30
1519- elif ago_minutes >= 15:
1520- return _("The package information was last updated about %s minutes ago.")%15
1521- else:
1522- return _("The package information was just updated.")
1523- return None
1524-
1525- def update_last_updated_text(self, user_data):
1526- """timer that updates the last updated text """
1527- #print("update_last_updated_text")
1528- num_updates = self.cache.install_count
1529- if num_updates == 0:
1530- if self._get_last_apt_get_update_text() is not None:
1531- text_label_main = self._get_last_apt_get_update_text()
1532- self.label_main_details.set_text(text_label_main)
1533- return True
1534- # stop the timer if there are upgrades now
1535- return False
1536-
1537 def update_count(self):
1538 """activate or disable widgets and show dialog texts correspoding to
1539 the number of available updates"""
1540 self.refresh_updates_count()
1541 num_updates = self.cache.install_count
1542- text_label_main = ""
1543-
1544- # setup unity stuff
1545- self.unity.set_updates_count(num_updates)
1546
1547 if num_updates == 0:
1548 text_header= _("The software on this computer is up to date.")
1549@@ -683,18 +432,13 @@
1550 self.button_close.grab_default()
1551 self.textview_changes.get_buffer().set_text("")
1552 self.textview_descr.get_buffer().set_text("")
1553- if self._get_last_apt_get_update_text() is not None:
1554- text_label_main = self._get_last_apt_get_update_text()
1555- if self._get_last_apt_get_update_minutes()> self.NO_UPDATE_WARNING_DAYS*24*60:
1556- text_header = _("Software updates may be available for your computer.")
1557- # add timer to ensure we update the information when the
1558- # last package count update was performed
1559- GObject.timeout_add_seconds(10, self.update_last_updated_text, None)
1560 else:
1561 # show different text on first run (UX team suggestion)
1562 firstrun = self.settings.get_boolean("first-run")
1563 if firstrun:
1564- text_header = _("Updated software has been issued since %s was released. Do you want to install it now?") % self.meta.current_dist_description
1565+ flavor = self.window_main.meta_release.flavor_name
1566+ version = self.window_main.meta_release.current_dist_version
1567+ text_header = _("Updated software has been issued since %s %s was released. Do you want to install it now?") % (flavor, version)
1568 self.settings.set_boolean("first-run", False)
1569 else:
1570 text_header = _("Updated software is available for this computer. Do you want to install it now?")
1571@@ -703,7 +447,6 @@
1572 self.button_install.grab_default()
1573 self.treeview_update.set_cursor(Gtk.TreePath.new_from_string("1"), None, False)
1574 self.label_header.set_markup(text_header)
1575- self.label_main_details.set_text(text_label_main)
1576 return True
1577
1578 # Before we shrink the window, capture the size
1579@@ -717,18 +460,12 @@
1580 self.settings.set_boolean("show-details",expanded)
1581 if expanded:
1582 self.on_treeview_update_cursor_changed(self.treeview_update)
1583- self.restore_state()
1584- self.window_main.set_resizable(expanded)
1585+ self.restore_state()
1586
1587 def activate_desc(self, expander, data):
1588 expanded = self.expander_desc.get_expanded()
1589 self.expander_desc.set_vexpand(expanded)
1590
1591- def on_button_reload_clicked(self, widget, menuitem = None, data = None):
1592- #print("on_button_reload_clicked")
1593- self.check_metarelease()
1594- self.invoke_manager(UPDATE)
1595-
1596 #def on_button_help_clicked(self, widget):
1597 # self.help_viewer.run()
1598
1599@@ -750,6 +487,7 @@
1600 while Gtk.events_pending():
1601 Gtk.main_iteration()
1602 time.sleep(0.05)
1603+ self.window_main.refresh_cache()
1604 self.fillstore()
1605
1606 def on_button_install_clicked(self, widget):
1607@@ -766,101 +504,20 @@
1608 self.cache.checkFreeSpace()
1609 except NotEnoughFreeSpaceError as e:
1610 for req in e.free_space_required_list:
1611- self.error(err_sum, err_long % (req.size_total,
1612- req.dir,
1613- req.size_needed,
1614- req.dir))
1615+ self.window_main.start_error(err_sum, err_long % (req.size_total,
1616+ req.dir,
1617+ req.size_needed,
1618+ req.dir))
1619 return
1620 except SystemError as e:
1621 logging.exception("free space check failed")
1622- self.invoke_manager(INSTALL)
1623-
1624- def on_button_restart_required_clicked(self, button=None):
1625- self._request_reboot_via_session_manager()
1626-
1627- def show_reboot_required_info(self):
1628- self.frame_restart_required.show()
1629- self.label_restart_required.set_text(_("The computer needs to restart to "
1630- "finish installing updates. Please "
1631- "save your work before continuing."))
1632-
1633- def _request_reboot_via_session_manager(self):
1634- try:
1635- bus = dbus.SessionBus()
1636- proxy_obj = bus.get_object("org.gnome.SessionManager",
1637- "/org/gnome/SessionManager")
1638- iface = dbus.Interface(proxy_obj, "org.gnome.SessionManager")
1639- iface.RequestReboot()
1640- except dbus.DBusException:
1641- self._request_reboot_via_consolekit()
1642- except:
1643- pass
1644-
1645- def _request_reboot_via_consolekit(self):
1646- try:
1647- bus = dbus.SystemBus()
1648- proxy_obj = bus.get_object("org.freedesktop.ConsoleKit",
1649- "/org/freedesktop/ConsoleKit/Manager")
1650- iface = dbus.Interface(proxy_obj, "org.freedesktop.ConsoleKit.Manager")
1651- iface.Restart()
1652- except dbus.DBusException:
1653- pass
1654-
1655- def invoke_manager(self, action):
1656- # check first if no other package manager is runing
1657-
1658- # don't display apt-listchanges, we already showed the changelog
1659- os.environ["APT_LISTCHANGES_FRONTEND"]="none"
1660-
1661- # Do not suspend during the update process
1662- (self.sleep_dev, self.sleep_cookie) = inhibit_sleep()
1663-
1664- # set window to insensitive
1665- self.window_main.set_sensitive(False)
1666- self.window_main.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
1667-#
1668- # do it
1669- if action == UPDATE:
1670- self.install_backend.update()
1671- elif action == INSTALL:
1672- # If the progress dialog should be closed automatically afterwards
1673- settings = Gio.Settings("com.ubuntu.update-manager")
1674- close_on_done = settings.get_boolean("autoclose-install-window")
1675- # Get the packages which should be installed and update
1676- pkgs_install = []
1677- pkgs_upgrade = []
1678- for pkg in self.cache:
1679- if pkg.marked_install:
1680- pkgs_install.append(pkg.name)
1681- elif pkg.marked_upgrade:
1682- pkgs_upgrade.append(pkg.name)
1683- self.install_backend.commit(pkgs_install, pkgs_upgrade, close_on_done)
1684-
1685- def _on_backend_done(self, backend, action, authorized, success):
1686- if (action == UPDATE):
1687- self.dbusController.updated(success)
1688- # check if there is a new reboot required notification
1689- if (action == INSTALL and
1690- os.path.exists(REBOOT_REQUIRED_FILE)):
1691- self.show_reboot_required_info()
1692- if authorized:
1693- msg = _("Reading package information")
1694- self.label_cache_progress_title.set_label("<b><big>%s</big></b>" % msg)
1695- self.fillstore()
1696-
1697- # Allow suspend after synaptic is finished
1698- if self.sleep_cookie:
1699- allow_sleep(self.sleep_dev, self.sleep_cookie)
1700- self.sleep_cookie = self.sleep_dev = None
1701- self.window_main.set_sensitive(True)
1702- self.window_main.get_window().set_cursor(None)
1703+ self.window_main.start_install()
1704
1705 def _on_network_alert(self, watcher, state):
1706 # do not set the buttons to sensitive/insensitive until NM
1707 # can deal with dialup connections properly
1708 if state in NetworkManagerHelper.NM_STATE_CONNECTING_LIST:
1709 self.label_offline.set_text(_("Connecting..."))
1710- #self.button_reload.set_sensitive(False)
1711 self.refresh_updates_count()
1712 self.hbox_offline.show()
1713 self.vbox_alerts.show()
1714@@ -868,7 +525,6 @@
1715 # in doubt (STATE_UNKNOWN), assume connected
1716 elif (state in NetworkManagerHelper.NM_STATE_CONNECTED_LIST or
1717 state == NetworkManagerHelper.NM_STATE_UNKNOWN):
1718- #self.button_reload.set_sensitive(True)
1719 self.refresh_updates_count()
1720 self.hbox_offline.hide()
1721 self.connected = True
1722@@ -877,7 +533,6 @@
1723 else:
1724 self.connected = False
1725 self.label_offline.set_text(_("You may not be able to check for updates or download new updates."))
1726- #self.button_reload.set_sensitive(False)
1727 self.refresh_updates_count()
1728 self.hbox_offline.show()
1729 self.vbox_alerts.show()
1730@@ -965,12 +620,6 @@
1731 """
1732 self.toggled(None, path)
1733
1734- def exit(self):
1735- """ exit the application, save the state """
1736- self.save_state()
1737- #Gtk.main_quit()
1738- sys.exit(0)
1739-
1740 def save_state(self):
1741 """ save the state (window-size for now) """
1742 if self.expander_details.get_expanded():
1743@@ -982,7 +631,9 @@
1744 """ restore the state (window-size for now) """
1745 w = self.settings.get_int("window-width")
1746 h = self.settings.get_int("window-height")
1747- if w > 0 and h > 0 and self.expander_details.get_expanded():
1748+ expanded = self.expander_details.get_expanded()
1749+ self.window_main.set_resizable(expanded)
1750+ if w > 0 and h > 0 and expanded:
1751 self.window_main.resize(w, h)
1752 return False
1753
1754@@ -992,237 +643,48 @@
1755 # disconnect the view first
1756 self.treeview_update.set_model(None)
1757 self.store.clear()
1758-
1759 # clean most objects
1760 self.dl_size = 0
1761- try:
1762- self.initCache()
1763- except SystemError as e:
1764- msg = ("<big><b>%s</b></big>\n\n%s\n'%s'" %
1765- (_("Could not initialize the package information"),
1766- _("An unresolvable problem occurred while "
1767- "initializing the package information.\n\n"
1768- "Please report this bug against the 'update-manager' "
1769- "package and include the following error message:\n"),
1770- e)
1771- )
1772- dialog = Gtk.MessageDialog(self.window_main,
1773- 0, Gtk.MessageType.ERROR,
1774- Gtk.ButtonsType.CLOSE,"")
1775- dialog.set_markup(msg)
1776- dialog.get_content_area().set_spacing(6)
1777- dialog.run()
1778- dialog.destroy()
1779- sys.exit(1)
1780- self.list = UpdateList(self)
1781-
1782- while Gtk.events_pending():
1783- Gtk.main_iteration()
1784
1785- # fill them again
1786- try:
1787- # This is a quite nasty hack to stop the initial update
1788- if not self.options.no_update:
1789- self.list.update(self.cache)
1790- else:
1791- self.options.no_update = False
1792- except SystemError as e:
1793- msg = ("<big><b>%s</b></big>\n\n%s\n'%s'" %
1794- (_("Could not calculate the upgrade"),
1795- _("An unresolvable problem occurred while "
1796- "calculating the upgrade.\n\n"
1797- "Please report this bug against the 'update-manager' "
1798- "package and include the following error message:"),
1799- e)
1800- )
1801- dialog = Gtk.MessageDialog(self.window_main,
1802- 0, Gtk.MessageType.ERROR,
1803- Gtk.ButtonsType.CLOSE,"")
1804- dialog.set_markup(msg)
1805- dialog.get_content_area().set_spacing(6)
1806- dialog.run()
1807- dialog.destroy()
1808- if self.list.num_updates > 0:
1809- #self.treeview_update.set_model(None)
1810- self.scrolledwindow_update.show()
1811- origin_list = sorted(
1812- self.list.pkgs, key=operator.attrgetter("importance"), reverse=True)
1813- for origin in origin_list:
1814- self.store.append(['<b><big>%s</big></b>' % origin.description,
1815- origin.description, None, origin,True])
1816- for pkg in self.list.pkgs[origin]:
1817- name = xml.sax.saxutils.escape(pkg.name)
1818- if not pkg.is_installed:
1819- name += _(" (New install)")
1820- summary = xml.sax.saxutils.escape(getattr(pkg.candidate, "summary", None))
1821- if self.summary_before_name:
1822- contents = "%s\n<small>%s</small>" % (summary, name)
1823- else:
1824- contents = "<b>%s</b>\n<small>%s</small>" % (name, summary)
1825- #TRANSLATORS: the b stands for Bytes
1826- size = _("(Size: %s)") % humanize_size(getattr(pkg.candidate, "size", 0))
1827- installed_version = getattr(pkg.installed, "version", None)
1828- candidate_version = getattr(pkg.candidate, "version", None)
1829- if installed_version is not None:
1830- version = _("From version %(old_version)s to %(new_version)s") %\
1831- {"old_version" : installed_version,
1832- "new_version" : candidate_version}
1833- else:
1834- version = _("Version %s") % candidate_version
1835- if self.show_versions:
1836- contents = "%s\n<small>%s %s</small>" % (contents, version, size)
1837- else:
1838- contents = "%s <small>%s</small>" % (contents, size)
1839- self.store.append([contents, pkg.name, pkg, None, True])
1840- self.treeview_update.set_model(self.store)
1841+ self.scrolledwindow_update.show()
1842+ origin_list = sorted(
1843+ self.list.pkgs, key=operator.attrgetter("importance"), reverse=True)
1844+ for origin in origin_list:
1845+ self.store.append(['<b><big>%s</big></b>' % origin.description,
1846+ origin.description, None, origin,True])
1847+ for pkg in self.list.pkgs[origin]:
1848+ name = xml.sax.saxutils.escape(pkg.name)
1849+ if not pkg.is_installed:
1850+ name += _(" (New install)")
1851+ summary = xml.sax.saxutils.escape(getattr(pkg.candidate, "summary", None))
1852+ if self.summary_before_name:
1853+ contents = "%s\n<small>%s</small>" % (summary, name)
1854+ else:
1855+ contents = "<b>%s</b>\n<small>%s</small>" % (name, summary)
1856+ #TRANSLATORS: the b stands for Bytes
1857+ size = _("(Size: %s)") % humanize_size(getattr(pkg.candidate, "size", 0))
1858+ installed_version = getattr(pkg.installed, "version", None)
1859+ candidate_version = getattr(pkg.candidate, "version", None)
1860+ if installed_version is not None:
1861+ version = _("From version %(old_version)s to %(new_version)s") %\
1862+ {"old_version" : installed_version,
1863+ "new_version" : candidate_version}
1864+ else:
1865+ version = _("Version %s") % candidate_version
1866+ if self.show_versions:
1867+ contents = "%s\n<small>%s %s</small>" % (contents, version, size)
1868+ else:
1869+ contents = "%s <small>%s</small>" % (contents, size)
1870+ self.store.append([contents, pkg.name, pkg, None, True])
1871+ self.treeview_update.set_model(self.store)
1872 self.update_count()
1873 self.setBusy(False)
1874 while Gtk.events_pending():
1875 Gtk.main_iteration()
1876- self.check_all_updates_installable()
1877 self.refresh_updates_count()
1878 return False
1879
1880- def dist_no_longer_supported(self, meta_release):
1881- show_dist_no_longer_supported_dialog(self.window_main)
1882-
1883- def error(self, summary, details):
1884- " helper function to display a error message "
1885- msg = ("<big><b>%s</b></big>\n\n%s\n" % (summary, details) )
1886- dialog = Gtk.MessageDialog(self.window_main,
1887- 0, Gtk.MessageType.ERROR,
1888- Gtk.ButtonsType.CLOSE,"")
1889- dialog.set_markup(msg)
1890- dialog.get_content_area().set_spacing(6)
1891- dialog.run()
1892- dialog.destroy()
1893-
1894- def on_button_dist_upgrade_clicked(self, button):
1895- #print("on_button_dist_upgrade_clicked")
1896- if self.new_dist.upgrade_broken:
1897- return self.error(
1898- _("Release upgrade not possible right now"),
1899- _("The release upgrade can not be performed currently, "
1900- "please try again later. The server reported: '%s'") % self.new_dist.upgrade_broken)
1901- fetcher = DistUpgradeFetcherGtk(new_dist=self.new_dist, parent=self, progress=GtkAcquireProgress(self, _("Downloading the release upgrade tool")))
1902- if self.options.sandbox:
1903- fetcher.run_options.append("--sandbox")
1904- fetcher.run()
1905-
1906- def new_dist_available(self, meta_release, upgradable_to):
1907- self.frame_new_release.show()
1908- self.label_new_release.set_markup(_("<b>New Ubuntu release '%s' is available</b>") % upgradable_to.version)
1909- self.new_dist = upgradable_to
1910-
1911-
1912- # fixme: we should probably abstract away all the stuff from libapt
1913- def initCache(self):
1914- # get the lock
1915- try:
1916- apt_pkg.pkgsystem_lock()
1917- except SystemError:
1918- pass
1919- #d = Gtk.MessageDialog(parent=self.window_main,
1920- # flags=Gtk.DialogFlags.MODAL,
1921- # type=Gtk.MessageType.ERROR,
1922- # buttons=Gtk.ButtonsType.CLOSE)
1923- #d.set_markup("<big><b>%s</b></big>\n\n%s" % (
1924- # _("Only one software management tool is allowed to "
1925- # "run at the same time"),
1926- # _("Please close the other application e.g. 'aptitude' "
1927- # "or 'Synaptic' first.")))
1928- #print("error from apt: '%s'" % e)
1929- #d.set_title("")
1930- #res = d.run()
1931- #d.destroy()
1932- #sys.exit()
1933-
1934- try:
1935- if hasattr(self, "cache"):
1936- self.cache.open(self.progress)
1937- self.cache._initDepCache()
1938- else:
1939- self.cache = MyCache(self.progress)
1940- except AssertionError:
1941- # if the cache could not be opened for some reason,
1942- # let the release upgrader handle it, it deals
1943- # a lot better with this
1944- self.ask_run_partial_upgrade()
1945- # we assert a clean cache
1946- msg=("<big><b>%s</b></big>\n\n%s"% \
1947- (_("Software index is broken"),
1948- _("It is impossible to install or remove any software. "
1949- "Please use the package manager \"Synaptic\" or run "
1950- "\"sudo apt-get install -f\" in a terminal to fix "
1951- "this issue at first.")))
1952- dialog = Gtk.MessageDialog(self.window_main,
1953- 0, Gtk.MessageType.ERROR,
1954- Gtk.ButtonsType.CLOSE,"")
1955- dialog.set_markup(msg)
1956- dialog.get_content_area().set_spacing(6)
1957- dialog.run()
1958- dialog.destroy()
1959- sys.exit(1)
1960- else:
1961- self.progress.all_done()
1962-
1963- def check_auto_update(self):
1964- # Check if automatic update is enabled. If not show a dialog to inform
1965- # the user about the need of manual "reloads"
1966- remind = self.settings.get_boolean("remind-reload")
1967- if remind == False:
1968- return
1969-
1970- update_days = apt_pkg.config.find_i("APT::Periodic::Update-Package-Lists")
1971- if update_days < 1:
1972- self.dialog_manual_update.set_transient_for(self.window_main)
1973- self.dialog_manual_update.set_title("")
1974- res = self.dialog_manual_update.run()
1975- self.dialog_manual_update.hide()
1976- if res == Gtk.ResponseType.YES:
1977- self.on_button_reload_clicked(None)
1978-
1979- def check_all_updates_installable(self):
1980- """ Check if all available updates can be installed and suggest
1981- to run a distribution upgrade if not """
1982- if self.list.distUpgradeWouldDelete > 0:
1983- self.ask_run_partial_upgrade()
1984-
1985- def ask_run_partial_upgrade(self):
1986- self.dialog_dist_upgrade.set_transient_for(self.window_main)
1987- self.dialog_dist_upgrade.set_title("")
1988- res = self.dialog_dist_upgrade.run()
1989- self.dialog_dist_upgrade.hide()
1990- if res == Gtk.ResponseType.YES:
1991- os.execl("/usr/bin/gksu",
1992- "/usr/bin/gksu", "--desktop",
1993- "/usr/share/applications/update-manager.desktop",
1994- "--", "/usr/bin/update-manager", "--dist-upgrade")
1995- return False
1996-
1997- def check_metarelease(self):
1998- " check for new meta-release information "
1999- settings = Gio.Settings("com.ubuntu.update-manager")
2000- self.meta = MetaRelease(self.options.devel_release,
2001- self.options.use_proposed)
2002- self.meta.connect("dist_no_longer_supported",self.dist_no_longer_supported)
2003- # check if we are interessted in dist-upgrade information
2004- # (we are not by default on dapper)
2005- if (self.options.check_dist_upgrades or
2006- settings.get_boolean("check-dist-upgrades")):
2007- self.meta.connect("new_dist_available",self.new_dist_available)
2008-
2009-
2010- def main(self, options):
2011- self.options = options
2012-
2013- # check for new distributin information
2014- self.check_metarelease()
2015-
2016- while Gtk.events_pending():
2017- Gtk.main_iteration()
2018-
2019+ def main(self):
2020+ self.window_main.push(self.pane_updates_available, self)
2021 self.fillstore()
2022- self.check_auto_update()
2023 self.alert_watcher.check_alert_state()
2024- Gtk.main()
2025
2026=== modified file 'UpdateManager/backend/InstallBackendAptdaemon.py'
2027--- UpdateManager/backend/InstallBackendAptdaemon.py 2012-05-01 00:29:04 +0000
2028+++ UpdateManager/backend/InstallBackendAptdaemon.py 2012-06-18 20:03:27 +0000
2029@@ -1,28 +1,52 @@
2030 #!/usr/bin/env python
2031 # -*- coding: utf-8 -*-
2032-# (c) 2005-2009 Canonical, GPL
2033+# (c) 2005-2012 Canonical, GPL
2034+# (C) 2008-2009 Sebastian Heinlein <devel@glatzor.de>
2035
2036 from __future__ import print_function
2037
2038+from gi.repository import Gtk
2039+from gi.repository import Gdk
2040+
2041 from aptdaemon import client, errors
2042 from defer import inline_callbacks
2043-from aptdaemon.gtk3widgets import AptProgressDialog
2044-from aptdaemon.enums import EXIT_SUCCESS
2045+from aptdaemon.gtk3widgets import (AptCancelButton,
2046+ AptConfigFileConflictDialog,
2047+ AptDetailsExpander,
2048+ AptErrorDialog,
2049+ AptMediumRequiredDialog,
2050+ AptProgressBar)
2051+from aptdaemon.enums import (EXIT_SUCCESS,
2052+ EXIT_FAILED,
2053+ STATUS_COMMITTING,
2054+ get_status_string_from_enum)
2055
2056 from UpdateManager.backend import InstallBackend
2057 from UpdateManager.UnitySupport import UnitySupport
2058
2059+from gettext import gettext as _
2060+
2061 import apt
2062 import dbus
2063+import sys
2064
2065 class InstallBackendAptdaemon(InstallBackend):
2066
2067 """Makes use of aptdaemon to refresh the cache and to install updates."""
2068
2069- def __init__(self, window_main):
2070- InstallBackend.__init__(self, window_main)
2071+ def __init__(self, datadir, window_main):
2072+ InstallBackend.__init__(self, datadir, window_main)
2073 self.client = client.AptClient()
2074 self.unity = UnitySupport()
2075+ self._expanded_size = None
2076+ self.button_cancel = None
2077+
2078+ def close(self):
2079+ if self.button_cancel:
2080+ self.button_cancel.clicked()
2081+ return True
2082+ else:
2083+ return False
2084
2085 @inline_callbacks
2086 def update(self):
2087@@ -33,7 +57,9 @@
2088 pass
2089 try:
2090 trans = yield self.client.update_cache(defer=True)
2091- yield self._run_in_dialog(trans, self.UPDATE)
2092+ yield self._run_in_dialog(trans, self.UPDATE,
2093+ _("Checking for updatesā€¦"),
2094+ False, False)
2095 except errors.NotAuthorizedError:
2096 self.emit("action-done", self.UPDATE, False, False)
2097 except:
2098@@ -53,7 +79,9 @@
2099 pkgs_install, reinstall, remove, purge, pkgs_upgrade,
2100 downgrade, defer=True)
2101 trans.connect("progress-changed", self._on_progress_changed)
2102- yield self._run_in_dialog(trans, self.INSTALL)
2103+ yield self._run_in_dialog(trans, self.INSTALL,
2104+ _("Installing updatesā€¦"),
2105+ True, close_on_done)
2106 except errors.NotAuthorizedError as e:
2107 self.emit("action-done", self.INSTALL, False, False)
2108 except dbus.DBusException as e:
2109@@ -69,23 +97,134 @@
2110 #print("_on_progress_changed", progress)
2111 self.unity.set_progress(progress)
2112
2113+ def _on_details_changed(self, trans, details, label_details):
2114+ label_details.set_label(details)
2115+
2116+ def _on_status_changed(self, trans, status, label_details, expander):
2117+ label_details.set_label(get_status_string_from_enum(status))
2118+ # Also resize the window if we switch from download details to
2119+ # the terminal window
2120+ if status == STATUS_COMMITTING and expander and expander.terminal.get_visible():
2121+ self._resize_to_show_details(expander)
2122+
2123 @inline_callbacks
2124- def _run_in_dialog(self, trans, action):
2125- dia = AptProgressDialog(trans, parent=self.window_main)
2126- dia.set_icon_name("system-software-update")
2127- dia.connect("finished", self._on_finished, action)
2128- yield dia.run()
2129-
2130- def _on_finished(self, dialog, action):
2131- dialog.hide()
2132+ def _run_in_dialog(self, trans, action, header, show_details, close_on_done):
2133+ builder = Gtk.Builder()
2134+ builder.set_translation_domain("update-manager")
2135+ builder.add_from_file(self.datadir+"/gtkbuilder/UpdateProgress.ui")
2136+
2137+ label_header = builder.get_object("label_header")
2138+ label_header.set_label(header)
2139+
2140+ progressbar = AptProgressBar(trans)
2141+ progressbar.show()
2142+ progressbar_slot = builder.get_object("progressbar_slot")
2143+ progressbar_slot.add(progressbar)
2144+
2145+ self.button_cancel = AptCancelButton(trans)
2146+ self.button_cancel.show()
2147+ button_cancel_slot = builder.get_object("button_cancel_slot")
2148+ button_cancel_slot.add(self.button_cancel)
2149+
2150+ label_details = builder.get_object("label_details")
2151+
2152+ if show_details:
2153+ expander = AptDetailsExpander(trans)
2154+ expander.set_vexpand(True)
2155+ expander.set_hexpand(True)
2156+ expander.show_all()
2157+ expander.connect("notify::expanded", self._on_expanded)
2158+ expander_slot = builder.get_object("expander_slot")
2159+ expander_slot.add(expander)
2160+ expander_slot.show()
2161+ else:
2162+ expander = None
2163+
2164+ trans.connect("status-details-changed", self._on_details_changed, label_details)
2165+ trans.connect("status-changed", self._on_status_changed, label_details, expander)
2166+ trans.connect("finished", self._on_finished, action, close_on_done)
2167+ trans.connect("medium-required", self._on_medium_required)
2168+ trans.connect("config-file-conflict", self._on_config_file_conflict)
2169+
2170+ yield trans.run()
2171+
2172+ self.window_main.push(builder.get_object("pane_update_progress"), self)
2173+
2174+ functions = Gdk.WMFunction.MOVE|Gdk.WMFunction.RESIZE|Gdk.WMFunction.MINIMIZE
2175+ self.window_main.get_window().set_functions(functions)
2176+
2177+ def _on_expanded(self, expander, param):
2178+ # Make the dialog resizable if the expander is expanded
2179+ # try to restore a previous size
2180+ if not expander.get_expanded():
2181+ self._expanded_size = (expander.terminal.get_visible(),
2182+ self.window_main.get_size())
2183+ self.window_main.set_resizable(False)
2184+ elif self._expanded_size:
2185+ self.window_main.set_resizable(True)
2186+ term_visible, (stored_width, stored_height) = self._expanded_size
2187+ # Check if the stored size was for the download details or
2188+ # the terminal widget
2189+ if term_visible != expander.terminal.get_visible():
2190+ # The stored size was for the download details, so we need
2191+ # get a new size for the terminal widget
2192+ self._resize_to_show_details(expander)
2193+ else:
2194+ self.window_main.resize(stored_width, stored_height)
2195+ else:
2196+ self.window_main.set_resizable(True)
2197+ self._resize_to_show_details(expander)
2198+
2199+ def _resize_to_show_details(self, expander):
2200+ """Resize the window to show the expanded details.
2201+
2202+ Unfortunately the expander only expands to the preferred size of the
2203+ child widget (e.g showing all 80x24 chars of the Vte terminal) if
2204+ the window is rendered the first time and the terminal is also visible.
2205+ If the expander is expanded afterwards the window won't change its
2206+ size anymore. So we have to do this manually. See LP#840942
2207+ """
2208+ win_width, win_height = self.window_main.get_size()
2209+ exp_width = expander.get_allocation().width
2210+ exp_height = expander.get_allocation().height
2211+ if expander.terminal.get_visible():
2212+ terminal_width = expander.terminal.get_char_width() * 80
2213+ terminal_height = expander.terminal.get_char_height() * 24
2214+ self.window_main.resize(terminal_width - exp_width + win_width,
2215+ terminal_height - exp_height + win_height)
2216+ else:
2217+ self.window_main.resize(win_width + 100, win_height + 200)
2218+
2219+ def _on_medium_required(self, transaction, medium, drive):
2220+ dialog = AptMediumRequiredDialog(medium, drive, self.window_main)
2221+ res = dialog.run()
2222+ dialog.hide()
2223+ if res == Gtk.ResponseType.OK:
2224+ transaction.provide_medium(medium)
2225+ else:
2226+ transaction.cancel()
2227+
2228+ def _on_config_file_conflict(self, transaction, old, new):
2229+ dialog = AptConfigFileConflictDialog(old, new, self.window_main)
2230+ res = dialog.run()
2231+ dialog.hide()
2232+ if res == Gtk.ResponseType.YES:
2233+ transaction.resolve_config_file_conflict(old, "replace")
2234+ else:
2235+ transaction.resolve_config_file_conflict(old, "keep")
2236+
2237+ def _on_finished(self, trans, status, action, close_on_done):
2238+ if status == EXIT_FAILED:
2239+ err_dia = AptErrorDialog(trans.error, self.window_main)
2240+ err_dia.run()
2241+ err_dia.hide()
2242+ elif status == EXIT_SUCCESS and close_on_done:
2243+ sys.exit(0)
2244 # tell unity to hide the progress again
2245 self.unity.set_progress(-1)
2246- self.emit("action-done", action,
2247- True, dialog._transaction.exit == EXIT_SUCCESS)
2248+ self.emit("action-done", action, True, status == EXIT_SUCCESS)
2249
2250 if __name__ == "__main__":
2251 b = InstallBackendAptdaemon(None)
2252 b.commit(["2vcard"], [], False)
2253-
2254- from gi.repository import Gtk
2255 Gtk.main()
2256
2257=== modified file 'UpdateManager/backend/__init__.py'
2258--- UpdateManager/backend/__init__.py 2012-05-01 14:01:29 +0000
2259+++ UpdateManager/backend/__init__.py 2012-06-18 20:03:27 +0000
2260@@ -23,11 +23,12 @@
2261
2262 (INSTALL, UPDATE) = range(2)
2263
2264- def __init__(self, window_main):
2265+ def __init__(self, datadir, window_main):
2266 """init backend
2267 takes a gtk main window as parameter
2268 """
2269 GObject.GObject.__init__(self)
2270+ self.datadir = datadir
2271 self.window_main = window_main
2272
2273 def commit(self, pkgs_install, pkgs_upgrade, close_on_done):
2274
2275=== modified file 'check-new-release-gtk'
2276--- check-new-release-gtk 2012-06-13 22:45:57 +0000
2277+++ check-new-release-gtk 2012-06-18 20:03:27 +0000
2278@@ -72,7 +72,9 @@
2279 FETCH_TIMEOUT = 20
2280
2281 def __init__(self, options):
2282- SimpleGtkbuilderApp.__init__(self, options.datadir+"/gtkbuilder/UpgradePromptDialog.ui", "update-manager")
2283+ self.options = options
2284+ self.datadir = options.datadir
2285+ SimpleGtkbuilderApp.__init__(self, self.datadir+"/gtkbuilder/UpgradePromptDialog.ui", "update-manager")
2286 self.new_dist = None
2287 logging.debug("running with devel=%s proposed=%s" % (
2288 options.devel_release, options.proposed_release))
2289@@ -107,9 +109,9 @@
2290 self.show_uri(html_uri)
2291 # show alert on unsupported distros
2292 if meta_release.no_longer_supported is not None:
2293- from UpdateManager.UpdateManager import show_dist_no_longer_supported_dialog
2294- self.window_main.realize()
2295- show_dist_no_longer_supported_dialog(self.window_main)
2296+ from UpdateManager.Dialogs import UnsupportedDialog
2297+ dialog = UnsupportedDialog(self, meta_release)
2298+ dialog.run(self.window_main)
2299
2300 def build_ui(self):
2301 from gi.repository import WebKit
2302@@ -123,9 +125,11 @@
2303
2304 def on_button_upgrade_now_clicked(self, button):
2305 logging.debug("upgrade now")
2306- progress=UpdateManager.GtkProgress.GtkAcquireProgress(self, _("Downloading the release upgrade tool"))
2307+ progress=UpdateManager.GtkProgress.GtkAcquireProgress(self, self.datadir,
2308+ _("Downloading the release upgrade tool"))
2309 fetcher = DistUpgradeFetcher(new_dist=self.new_dist,
2310 parent=self,
2311+ datadir=self.datadir,
2312 progress=progress)
2313 res = fetcher.run()
2314 res # pyflakes
2315
2316=== modified file 'data/com.ubuntu.update-manager.gschema.xml.in'
2317--- data/com.ubuntu.update-manager.gschema.xml.in 2012-05-31 22:18:33 +0000
2318+++ data/com.ubuntu.update-manager.gschema.xml.in 2012-06-18 20:03:27 +0000
2319@@ -1,10 +1,5 @@
2320 <schemalist>
2321 <schema id="com.ubuntu.update-manager" path="/apps/update-manager/">
2322- <key name="remind-reload" type="b">
2323- <default>true</default>
2324- <summary>Remind to reload the channel list</summary>
2325- <description>If automatic checking for updates is disabled, you have to reload the channel list manually. This option allows to hide the reminder shown in this case.</description>
2326- </key>
2327 <key name="show-details" type="b">
2328 <default>false</default>
2329 <summary>Show details of an update</summary>
2330
2331=== added file 'data/gtkbuilder/AcquireProgress.ui'
2332--- data/gtkbuilder/AcquireProgress.ui 1970-01-01 00:00:00 +0000
2333+++ data/gtkbuilder/AcquireProgress.ui 2012-06-18 20:03:27 +0000
2334@@ -0,0 +1,161 @@
2335+<?xml version="1.0" encoding="UTF-8"?>
2336+<interface>
2337+ <!-- interface-requires gtk+ 3.0 -->
2338+ <object class="GtkWindow" id="window_fetch">
2339+ <property name="can_focus">False</property>
2340+ <property name="border_width">6</property>
2341+ <property name="modal">True</property>
2342+ <property name="window_position">center-on-parent</property>
2343+ <property name="default_width">400</property>
2344+ <property name="type_hint">dialog</property>
2345+ <property name="skip_taskbar_hint">True</property>
2346+ <property name="skip_pager_hint">True</property>
2347+ <child>
2348+ <object class="GtkVBox" id="pane_fetch">
2349+ <property name="visible">True</property>
2350+ <property name="can_focus">False</property>
2351+ <property name="spacing">6</property>
2352+ <child>
2353+ <object class="GtkVBox" id="vbox7">
2354+ <property name="visible">True</property>
2355+ <property name="can_focus">False</property>
2356+ <property name="border_width">6</property>
2357+ <property name="spacing">12</property>
2358+ <child>
2359+ <object class="GtkLabel" id="label_fetch_summary">
2360+ <property name="visible">True</property>
2361+ <property name="can_focus">False</property>
2362+ <property name="xalign">0</property>
2363+ <property name="use_markup">True</property>
2364+ <property name="wrap">True</property>
2365+ </object>
2366+ <packing>
2367+ <property name="expand">False</property>
2368+ <property name="fill">False</property>
2369+ <property name="position">0</property>
2370+ </packing>
2371+ </child>
2372+ <child>
2373+ <object class="GtkVBox" id="vbox8">
2374+ <property name="visible">True</property>
2375+ <property name="can_focus">False</property>
2376+ <property name="spacing">6</property>
2377+ <child>
2378+ <object class="GtkProgressBar" id="progressbar_fetch">
2379+ <property name="visible">True</property>
2380+ <property name="can_focus">False</property>
2381+ <property name="pulse_step">0.10000000149</property>
2382+ </object>
2383+ <packing>
2384+ <property name="expand">True</property>
2385+ <property name="fill">False</property>
2386+ <property name="position">0</property>
2387+ </packing>
2388+ </child>
2389+ <child>
2390+ <object class="GtkLabel" id="label_fetch_status">
2391+ <property name="visible">True</property>
2392+ <property name="can_focus">False</property>
2393+ <property name="xalign">0</property>
2394+ </object>
2395+ <packing>
2396+ <property name="expand">False</property>
2397+ <property name="fill">False</property>
2398+ <property name="position">1</property>
2399+ </packing>
2400+ </child>
2401+ </object>
2402+ <packing>
2403+ <property name="expand">False</property>
2404+ <property name="fill">False</property>
2405+ <property name="position">1</property>
2406+ </packing>
2407+ </child>
2408+ <child>
2409+ <object class="GtkExpander" id="expander1">
2410+ <property name="can_focus">True</property>
2411+ <property name="spacing">6</property>
2412+ <child>
2413+ <object class="GtkVBox" id="vbox9">
2414+ <property name="visible">True</property>
2415+ <property name="can_focus">False</property>
2416+ <property name="spacing">6</property>
2417+ <child>
2418+ <object class="GtkScrolledWindow" id="scrolledwindow6">
2419+ <property name="height_request">200</property>
2420+ <property name="visible">True</property>
2421+ <property name="can_focus">True</property>
2422+ <property name="shadow_type">in</property>
2423+ <child>
2424+ <object class="GtkTreeView" id="treeview1">
2425+ <property name="visible">True</property>
2426+ <property name="can_focus">True</property>
2427+ <property name="enable_search">False</property>
2428+ <child internal-child="selection">
2429+ <object class="GtkTreeSelection" id="treeview-selection"/>
2430+ </child>
2431+ </object>
2432+ </child>
2433+ </object>
2434+ <packing>
2435+ <property name="expand">True</property>
2436+ <property name="fill">True</property>
2437+ <property name="position">0</property>
2438+ </packing>
2439+ </child>
2440+ </object>
2441+ </child>
2442+ <child type="label">
2443+ <object class="GtkLabel" id="label19">
2444+ <property name="visible">True</property>
2445+ <property name="can_focus">False</property>
2446+ <property name="label" translatable="yes">Show progress of individual files</property>
2447+ </object>
2448+ </child>
2449+ </object>
2450+ <packing>
2451+ <property name="expand">True</property>
2452+ <property name="fill">True</property>
2453+ <property name="position">2</property>
2454+ </packing>
2455+ </child>
2456+ </object>
2457+ <packing>
2458+ <property name="expand">True</property>
2459+ <property name="fill">True</property>
2460+ <property name="position">0</property>
2461+ </packing>
2462+ </child>
2463+ <child>
2464+ <object class="GtkHButtonBox" id="hbuttonbox7">
2465+ <property name="visible">True</property>
2466+ <property name="can_focus">False</property>
2467+ <property name="layout_style">end</property>
2468+ <child>
2469+ <object class="GtkButton" id="button_fetch_cancel">
2470+ <property name="label">gtk-cancel</property>
2471+ <property name="use_action_appearance">False</property>
2472+ <property name="visible">True</property>
2473+ <property name="can_focus">True</property>
2474+ <property name="receives_default">True</property>
2475+ <property name="border_width">5</property>
2476+ <property name="use_action_appearance">False</property>
2477+ <property name="use_stock">True</property>
2478+ </object>
2479+ <packing>
2480+ <property name="expand">False</property>
2481+ <property name="fill">False</property>
2482+ <property name="position">0</property>
2483+ </packing>
2484+ </child>
2485+ </object>
2486+ <packing>
2487+ <property name="expand">False</property>
2488+ <property name="fill">True</property>
2489+ <property name="position">1</property>
2490+ </packing>
2491+ </child>
2492+ </object>
2493+ </child>
2494+ </object>
2495+</interface>
2496
2497=== added file 'data/gtkbuilder/Dialog.ui'
2498--- data/gtkbuilder/Dialog.ui 1970-01-01 00:00:00 +0000
2499+++ data/gtkbuilder/Dialog.ui 2012-06-18 20:03:27 +0000
2500@@ -0,0 +1,123 @@
2501+<?xml version="1.0" encoding="UTF-8"?>
2502+<interface>
2503+ <!-- interface-requires gtk+ 3.0 -->
2504+ <object class="GtkDialog" id="window_dialog">
2505+ <property name="can_focus">False</property>
2506+ <property name="type_hint">dialog</property>
2507+ <child internal-child="vbox">
2508+ <object class="GtkBox" id="dialog-vbox1">
2509+ <property name="can_focus">False</property>
2510+ <property name="orientation">vertical</property>
2511+ <child internal-child="action_area">
2512+ <object class="GtkButtonBox" id="dialog-action_area1">
2513+ <property name="can_focus">False</property>
2514+ <property name="layout_style">end</property>
2515+ <child>
2516+ <placeholder/>
2517+ </child>
2518+ </object>
2519+ <packing>
2520+ <property name="expand">False</property>
2521+ <property name="fill">True</property>
2522+ <property name="pack_type">end</property>
2523+ <property name="position">0</property>
2524+ </packing>
2525+ </child>
2526+ <child>
2527+ <object class="GtkGrid" id="pane_dialog">
2528+ <property name="visible">True</property>
2529+ <property name="can_focus">False</property>
2530+ <property name="hexpand">True</property>
2531+ <property name="vexpand">True</property>
2532+ <property name="border_width">12</property>
2533+ <property name="row_spacing">12</property>
2534+ <property name="column_spacing">12</property>
2535+ <child>
2536+ <object class="GtkImage" id="image_logo">
2537+ <property name="visible">True</property>
2538+ <property name="can_focus">False</property>
2539+ <property name="yalign">0</property>
2540+ <property name="pixel_size">48</property>
2541+ <property name="icon_name">system-software-update</property>
2542+ </object>
2543+ <packing>
2544+ <property name="left_attach">0</property>
2545+ <property name="top_attach">0</property>
2546+ <property name="width">1</property>
2547+ <property name="height">1</property>
2548+ </packing>
2549+ </child>
2550+ <child>
2551+ <object class="GtkLabel" id="label_header">
2552+ <property name="visible">True</property>
2553+ <property name="can_focus">False</property>
2554+ <property name="margin_top">6</property>
2555+ <property name="hexpand">True</property>
2556+ <property name="xalign">0</property>
2557+ <property name="yalign">0</property>
2558+ <property name="wrap">True</property>
2559+ <property name="width_chars">40</property>
2560+ <property name="max_width_chars">40</property>
2561+ <attributes>
2562+ <attribute name="weight" value="bold"/>
2563+ <attribute name="scale" value="1.25"/>
2564+ </attributes>
2565+ </object>
2566+ <packing>
2567+ <property name="left_attach">1</property>
2568+ <property name="top_attach">0</property>
2569+ <property name="width">1</property>
2570+ <property name="height">1</property>
2571+ </packing>
2572+ </child>
2573+ <child>
2574+ <object class="GtkLabel" id="label_desc">
2575+ <property name="can_focus">False</property>
2576+ <property name="no_show_all">True</property>
2577+ <property name="hexpand">True</property>
2578+ <property name="vexpand">True</property>
2579+ <property name="xalign">0</property>
2580+ <property name="yalign">0</property>
2581+ <property name="wrap">True</property>
2582+ <property name="max_width_chars">40</property>
2583+ </object>
2584+ <packing>
2585+ <property name="left_attach">1</property>
2586+ <property name="top_attach">1</property>
2587+ <property name="width">1</property>
2588+ <property name="height">1</property>
2589+ </packing>
2590+ </child>
2591+ <child>
2592+ <object class="GtkButtonBox" id="buttonbox">
2593+ <property name="visible">True</property>
2594+ <property name="can_focus">False</property>
2595+ <property name="hexpand">True</property>
2596+ <property name="spacing">6</property>
2597+ <property name="homogeneous">True</property>
2598+ <property name="layout_style">end</property>
2599+ <child>
2600+ <placeholder/>
2601+ </child>
2602+ </object>
2603+ <packing>
2604+ <property name="left_attach">0</property>
2605+ <property name="top_attach">2</property>
2606+ <property name="width">2</property>
2607+ <property name="height">1</property>
2608+ </packing>
2609+ </child>
2610+ <child>
2611+ <placeholder/>
2612+ </child>
2613+ </object>
2614+ <packing>
2615+ <property name="expand">False</property>
2616+ <property name="fill">True</property>
2617+ <property name="position">1</property>
2618+ </packing>
2619+ </child>
2620+ </object>
2621+ </child>
2622+ </object>
2623+</interface>
2624
2625=== added file 'data/gtkbuilder/ReleaseNotes.ui'
2626--- data/gtkbuilder/ReleaseNotes.ui 1970-01-01 00:00:00 +0000
2627+++ data/gtkbuilder/ReleaseNotes.ui 2012-06-18 20:03:27 +0000
2628@@ -0,0 +1,88 @@
2629+<?xml version="1.0" encoding="UTF-8"?>
2630+<interface>
2631+ <!-- interface-requires gtk+ 3.0 -->
2632+ <object class="GtkDialog" id="dialog_release_notes">
2633+ <property name="can_focus">False</property>
2634+ <property name="border_width">6</property>
2635+ <property name="title" translatable="yes">Release Notes</property>
2636+ <property name="modal">True</property>
2637+ <property name="window_position">center-on-parent</property>
2638+ <property name="default_width">600</property>
2639+ <property name="default_height">500</property>
2640+ <property name="type_hint">dialog</property>
2641+ <child internal-child="vbox">
2642+ <object class="GtkBox" id="dialog-vbox">
2643+ <property name="visible">True</property>
2644+ <property name="can_focus">False</property>
2645+ <property name="orientation">vertical</property>
2646+ <property name="spacing">6</property>
2647+ <child internal-child="action_area">
2648+ <object class="GtkButtonBox" id="dialog-action_area">
2649+ <property name="can_focus">False</property>
2650+ <child>
2651+ <object class="GtkButton" id="okbutton1">
2652+ <property name="label">gtk-cancel</property>
2653+ <property name="use_action_appearance">False</property>
2654+ <property name="visible">True</property>
2655+ <property name="can_focus">True</property>
2656+ <property name="can_default">True</property>
2657+ <property name="receives_default">True</property>
2658+ <property name="use_action_appearance">False</property>
2659+ <property name="use_stock">True</property>
2660+ </object>
2661+ <packing>
2662+ <property name="expand">False</property>
2663+ <property name="fill">False</property>
2664+ <property name="position">0</property>
2665+ </packing>
2666+ </child>
2667+ <child>
2668+ <object class="GtkButton" id="button2">
2669+ <property name="label" translatable="yes">_Upgrade</property>
2670+ <property name="use_action_appearance">False</property>
2671+ <property name="visible">True</property>
2672+ <property name="can_focus">True</property>
2673+ <property name="can_default">True</property>
2674+ <property name="has_default">True</property>
2675+ <property name="receives_default">True</property>
2676+ <property name="use_action_appearance">False</property>
2677+ <property name="use_underline">True</property>
2678+ </object>
2679+ <packing>
2680+ <property name="expand">False</property>
2681+ <property name="fill">False</property>
2682+ <property name="position">1</property>
2683+ </packing>
2684+ </child>
2685+ </object>
2686+ <packing>
2687+ <property name="expand">False</property>
2688+ <property name="fill">True</property>
2689+ <property name="pack_type">end</property>
2690+ <property name="position">0</property>
2691+ </packing>
2692+ </child>
2693+ <child>
2694+ <object class="GtkScrolledWindow" id="scrolled_notes">
2695+ <property name="visible">True</property>
2696+ <property name="can_focus">True</property>
2697+ <property name="border_width">6</property>
2698+ <property name="shadow_type">in</property>
2699+ <child>
2700+ <placeholder/>
2701+ </child>
2702+ </object>
2703+ <packing>
2704+ <property name="expand">True</property>
2705+ <property name="fill">True</property>
2706+ <property name="position">1</property>
2707+ </packing>
2708+ </child>
2709+ </object>
2710+ </child>
2711+ <action-widgets>
2712+ <action-widget response="-6">okbutton1</action-widget>
2713+ <action-widget response="-5">button2</action-widget>
2714+ </action-widgets>
2715+ </object>
2716+</interface>
2717
2718=== modified file 'data/gtkbuilder/UpdateManager.ui'
2719--- data/gtkbuilder/UpdateManager.ui 2012-05-31 22:18:33 +0000
2720+++ data/gtkbuilder/UpdateManager.ui 2012-06-18 20:03:27 +0000
2721@@ -1,781 +1,15 @@
2722 <?xml version="1.0" encoding="UTF-8"?>
2723 <interface>
2724 <!-- interface-requires gtk+ 3.0 -->
2725- <object class="GtkWindow" id="dialog_cacheprogress">
2726- <property name="can_focus">False</property>
2727- <property name="border_width">6</property>
2728- <property name="resizable">False</property>
2729- <property name="modal">True</property>
2730- <property name="window_position">center-on-parent</property>
2731- <property name="type_hint">dialog</property>
2732- <property name="skip_taskbar_hint">True</property>
2733- <property name="skip_pager_hint">True</property>
2734- <child>
2735- <object class="GtkVBox" id="vbox14">
2736- <property name="visible">True</property>
2737- <property name="can_focus">False</property>
2738- <property name="border_width">6</property>
2739- <property name="spacing">12</property>
2740- <child>
2741- <object class="GtkLabel" id="label_cache_progress_title">
2742- <property name="visible">True</property>
2743- <property name="can_focus">False</property>
2744- <property name="xalign">0</property>
2745- <property name="yalign">0</property>
2746- <property name="label" translatable="yes">&lt;big&gt;&lt;b&gt;Starting Software Updater&lt;/b&gt;&lt;/big&gt;</property>
2747- <property name="use_markup">True</property>
2748- </object>
2749- <packing>
2750- <property name="expand">False</property>
2751- <property name="fill">False</property>
2752- <property name="position">0</property>
2753- </packing>
2754- </child>
2755- <child>
2756- <object class="GtkLabel" id="label22">
2757- <property name="can_focus">False</property>
2758- <property name="xalign">0</property>
2759- <property name="label" translatable="yes">Software updates correct errors, eliminate security vulnerabilities and provide new features.</property>
2760- <property name="use_markup">True</property>
2761- <property name="wrap">True</property>
2762- </object>
2763- <packing>
2764- <property name="expand">False</property>
2765- <property name="fill">False</property>
2766- <property name="position">1</property>
2767- </packing>
2768- </child>
2769- <child>
2770- <object class="GtkVBox" id="vbox16">
2771- <property name="visible">True</property>
2772- <property name="can_focus">False</property>
2773- <property name="spacing">6</property>
2774- <child>
2775- <object class="GtkProgressBar" id="progressbar_cache">
2776- <property name="visible">True</property>
2777- <property name="can_focus">False</property>
2778- <property name="pulse_step">0.10000000149</property>
2779- </object>
2780- <packing>
2781- <property name="expand">False</property>
2782- <property name="fill">False</property>
2783- <property name="position">0</property>
2784- </packing>
2785- </child>
2786- <child>
2787- <object class="GtkLabel" id="label_cache">
2788- <property name="visible">True</property>
2789- <property name="can_focus">False</property>
2790- <property name="xalign">0</property>
2791- <property name="ellipsize">end</property>
2792- </object>
2793- <packing>
2794- <property name="expand">False</property>
2795- <property name="fill">False</property>
2796- <property name="position">1</property>
2797- </packing>
2798- </child>
2799- </object>
2800- <packing>
2801- <property name="expand">False</property>
2802- <property name="fill">False</property>
2803- <property name="position">2</property>
2804- </packing>
2805- </child>
2806- </object>
2807- </child>
2808- </object>
2809- <object class="GtkDialog" id="dialog_dist_upgrade">
2810- <property name="can_focus">False</property>
2811- <property name="border_width">6</property>
2812- <property name="resizable">False</property>
2813- <property name="modal">True</property>
2814- <property name="window_position">center-on-parent</property>
2815- <property name="type_hint">dialog</property>
2816- <property name="skip_taskbar_hint">True</property>
2817- <property name="skip_pager_hint">True</property>
2818- <property name="urgency_hint">True</property>
2819- <child internal-child="vbox">
2820- <object class="GtkBox" id="dialog-vbox5">
2821- <property name="visible">True</property>
2822- <property name="can_focus">False</property>
2823- <property name="spacing">12</property>
2824- <child internal-child="action_area">
2825- <object class="GtkButtonBox" id="dialog-action_area5">
2826- <property name="visible">True</property>
2827- <property name="can_focus">False</property>
2828- <property name="layout_style">end</property>
2829- <child>
2830- <object class="GtkButton" id="cancelbutton2">
2831- <property name="label" translatable="yes">_Partial Upgrade</property>
2832- <property name="use_action_appearance">False</property>
2833- <property name="visible">True</property>
2834- <property name="can_focus">True</property>
2835- <property name="can_default">True</property>
2836- <property name="receives_default">False</property>
2837- <property name="use_action_appearance">False</property>
2838- <property name="use_underline">True</property>
2839- </object>
2840- <packing>
2841- <property name="expand">False</property>
2842- <property name="fill">False</property>
2843- <property name="position">0</property>
2844- </packing>
2845- </child>
2846- <child>
2847- <object class="GtkButton" id="okbutton3">
2848- <property name="label">gtk-close</property>
2849- <property name="use_action_appearance">False</property>
2850- <property name="visible">True</property>
2851- <property name="can_focus">True</property>
2852- <property name="can_default">True</property>
2853- <property name="has_default">True</property>
2854- <property name="receives_default">False</property>
2855- <property name="use_action_appearance">False</property>
2856- <property name="use_stock">True</property>
2857- </object>
2858- <packing>
2859- <property name="expand">False</property>
2860- <property name="fill">False</property>
2861- <property name="position">1</property>
2862- </packing>
2863- </child>
2864- </object>
2865- <packing>
2866- <property name="expand">False</property>
2867- <property name="fill">True</property>
2868- <property name="pack_type">end</property>
2869- <property name="position">0</property>
2870- </packing>
2871- </child>
2872- <child>
2873- <object class="GtkHBox" id="hbox20">
2874- <property name="visible">True</property>
2875- <property name="can_focus">False</property>
2876- <property name="border_width">6</property>
2877- <property name="spacing">12</property>
2878- <child>
2879- <object class="GtkImage" id="image15">
2880- <property name="visible">True</property>
2881- <property name="can_focus">False</property>
2882- <property name="xalign">0</property>
2883- <property name="yalign">0</property>
2884- <property name="stock">gtk-dialog-warning</property>
2885- <property name="icon-size">6</property>
2886- </object>
2887- <packing>
2888- <property name="expand">False</property>
2889- <property name="fill">True</property>
2890- <property name="position">0</property>
2891- </packing>
2892- </child>
2893- <child>
2894- <object class="GtkVBox" id="vbox18">
2895- <property name="visible">True</property>
2896- <property name="can_focus">False</property>
2897- <property name="spacing">12</property>
2898- <child>
2899- <object class="GtkLabel" id="label30">
2900- <property name="visible">True</property>
2901- <property name="can_focus">True</property>
2902- <property name="xalign">0</property>
2903- <property name="label" translatable="yes">&lt;big&gt;&lt;b&gt;Not all updates can be installed&lt;/b&gt;&lt;/big&gt;</property>
2904- <property name="use_markup">True</property>
2905- <property name="selectable">True</property>
2906- </object>
2907- <packing>
2908- <property name="expand">False</property>
2909- <property name="fill">False</property>
2910- <property name="position">0</property>
2911- </packing>
2912- </child>
2913- <child>
2914- <object class="GtkLabel" id="label31">
2915- <property name="visible">True</property>
2916- <property name="can_focus">False</property>
2917- <property name="xalign">0</property>
2918- <property name="label" translatable="yes">Run a partial upgrade, to install as many updates as possible.
2919-
2920-This can be caused by:
2921- * A previous upgrade which didn't complete
2922- * Problems with some of the installed software
2923- * Unofficial software packages not provided by Ubuntu
2924- * Normal changes of a pre-release version of Ubuntu</property>
2925- <property name="wrap">True</property>
2926- </object>
2927- <packing>
2928- <property name="expand">False</property>
2929- <property name="fill">False</property>
2930- <property name="position">1</property>
2931- </packing>
2932- </child>
2933- </object>
2934- <packing>
2935- <property name="expand">True</property>
2936- <property name="fill">True</property>
2937- <property name="position">1</property>
2938- </packing>
2939- </child>
2940- </object>
2941- <packing>
2942- <property name="expand">True</property>
2943- <property name="fill">True</property>
2944- <property name="position">1</property>
2945- </packing>
2946- </child>
2947- </object>
2948- </child>
2949- <action-widgets>
2950- <action-widget response="-8">cancelbutton2</action-widget>
2951- <action-widget response="-7">okbutton3</action-widget>
2952- </action-widgets>
2953- </object>
2954- <object class="GtkDialog" id="dialog_manual_update">
2955- <property name="can_focus">False</property>
2956- <property name="border_width">6</property>
2957- <property name="resizable">False</property>
2958- <property name="modal">True</property>
2959- <property name="window_position">center-on-parent</property>
2960- <property name="type_hint">dialog</property>
2961- <property name="skip_taskbar_hint">True</property>
2962- <property name="skip_pager_hint">True</property>
2963- <child internal-child="vbox">
2964- <object class="GtkBox" id="dialog-vbox4">
2965- <property name="visible">True</property>
2966- <property name="can_focus">False</property>
2967- <property name="spacing">12</property>
2968- <child internal-child="action_area">
2969- <object class="GtkButtonBox" id="dialog-action_area4">
2970- <property name="visible">True</property>
2971- <property name="can_focus">False</property>
2972- <property name="layout_style">end</property>
2973- <child>
2974- <object class="GtkButton" id="cancelbutton1">
2975- <property name="label" translatable="yes">Chec_k</property>
2976- <property name="use_action_appearance">False</property>
2977- <property name="visible">True</property>
2978- <property name="can_focus">True</property>
2979- <property name="can_default">True</property>
2980- <property name="receives_default">False</property>
2981- <property name="use_action_appearance">False</property>
2982- <property name="image">image-refresh</property>
2983- <property name="use_underline">True</property>
2984- </object>
2985- <packing>
2986- <property name="expand">False</property>
2987- <property name="fill">False</property>
2988- <property name="position">0</property>
2989- </packing>
2990- </child>
2991- <child>
2992- <object class="GtkButton" id="okbutton2">
2993- <property name="label">gtk-close</property>
2994- <property name="use_action_appearance">False</property>
2995- <property name="visible">True</property>
2996- <property name="can_focus">True</property>
2997- <property name="can_default">True</property>
2998- <property name="receives_default">False</property>
2999- <property name="use_action_appearance">False</property>
3000- <property name="use_stock">True</property>
3001- </object>
3002- <packing>
3003- <property name="expand">False</property>
3004- <property name="fill">False</property>
3005- <property name="position">1</property>
3006- </packing>
3007- </child>
3008- </object>
3009- <packing>
3010- <property name="expand">False</property>
3011- <property name="fill">True</property>
3012- <property name="pack_type">end</property>
3013- <property name="position">0</property>
3014- </packing>
3015- </child>
3016- <child>
3017- <object class="GtkHBox" id="hbox16">
3018- <property name="visible">True</property>
3019- <property name="can_focus">False</property>
3020- <property name="border_width">6</property>
3021- <property name="spacing">11</property>
3022- <child>
3023- <object class="GtkImage" id="image12">
3024- <property name="visible">True</property>
3025- <property name="can_focus">False</property>
3026- <property name="xalign">0</property>
3027- <property name="yalign">0</property>
3028- <property name="stock">gtk-dialog-info</property>
3029- <property name="icon-size">6</property>
3030- </object>
3031- <packing>
3032- <property name="expand">False</property>
3033- <property name="fill">True</property>
3034- <property name="position">0</property>
3035- </packing>
3036- </child>
3037- <child>
3038- <object class="GtkVBox" id="vbox17">
3039- <property name="visible">True</property>
3040- <property name="can_focus">False</property>
3041- <property name="spacing">12</property>
3042- <child>
3043- <object class="GtkLabel" id="label27">
3044- <property name="visible">True</property>
3045- <property name="can_focus">True</property>
3046- <property name="xalign">0</property>
3047- <property name="yalign">0</property>
3048- <property name="label" translatable="yes">&lt;b&gt;&lt;big&gt;You must check for updates manually&lt;/big&gt;&lt;/b&gt;
3049-
3050-Your system does not check for updates automatically. You can configure this behavior in &lt;i&gt;Software Sources&lt;/i&gt; on the &lt;i&gt;Updates&lt;/i&gt; tab.</property>
3051- <property name="use_markup">True</property>
3052- <property name="wrap">True</property>
3053- <property name="selectable">True</property>
3054- </object>
3055- <packing>
3056- <property name="expand">False</property>
3057- <property name="fill">False</property>
3058- <property name="position">0</property>
3059- </packing>
3060- </child>
3061- <child>
3062- <object class="GtkCheckButton" id="checkbutton_reminder">
3063- <property name="label" translatable="yes">_Hide this information in the future</property>
3064- <property name="use_action_appearance">False</property>
3065- <property name="visible">True</property>
3066- <property name="can_focus">True</property>
3067- <property name="receives_default">False</property>
3068- <property name="use_action_appearance">False</property>
3069- <property name="use_underline">True</property>
3070- <property name="xalign">0.5</property>
3071- <property name="draw_indicator">True</property>
3072- <signal name="toggled" handler="on_checkbutton_reminder_toggled" swapped="no"/>
3073- </object>
3074- <packing>
3075- <property name="expand">False</property>
3076- <property name="fill">False</property>
3077- <property name="position">1</property>
3078- </packing>
3079- </child>
3080- </object>
3081- <packing>
3082- <property name="expand">False</property>
3083- <property name="fill">False</property>
3084- <property name="position">1</property>
3085- </packing>
3086- </child>
3087- </object>
3088- <packing>
3089- <property name="expand">True</property>
3090- <property name="fill">True</property>
3091- <property name="position">1</property>
3092- </packing>
3093- </child>
3094- </object>
3095- </child>
3096- <action-widgets>
3097- <action-widget response="-8">cancelbutton1</action-widget>
3098- <action-widget response="-7">okbutton2</action-widget>
3099- </action-widgets>
3100- </object>
3101- <object class="GtkDialog" id="dialog_on_battery">
3102- <property name="can_focus">False</property>
3103- <property name="border_width">6</property>
3104- <property name="resizable">False</property>
3105- <property name="modal">True</property>
3106- <property name="window_position">center-on-parent</property>
3107- <property name="type_hint">dialog</property>
3108- <property name="skip_taskbar_hint">True</property>
3109- <property name="skip_pager_hint">True</property>
3110- <property name="urgency_hint">True</property>
3111- <child internal-child="vbox">
3112- <object class="GtkBox" id="dialog-vbox6">
3113- <property name="visible">True</property>
3114- <property name="can_focus">False</property>
3115- <property name="spacing">12</property>
3116- <child internal-child="action_area">
3117- <object class="GtkButtonBox" id="dialog-action_area6">
3118- <property name="visible">True</property>
3119- <property name="can_focus">False</property>
3120- <property name="layout_style">end</property>
3121- <child>
3122- <object class="GtkButton" id="button_on_battery_close">
3123- <property name="label">gtk-cancel</property>
3124- <property name="use_action_appearance">False</property>
3125- <property name="visible">True</property>
3126- <property name="can_focus">True</property>
3127- <property name="can_default">True</property>
3128- <property name="has_default">True</property>
3129- <property name="receives_default">True</property>
3130- <property name="use_action_appearance">False</property>
3131- <property name="use_stock">True</property>
3132- </object>
3133- <packing>
3134- <property name="expand">False</property>
3135- <property name="fill">False</property>
3136- <property name="position">0</property>
3137- </packing>
3138- </child>
3139- <child>
3140- <object class="GtkButton" id="button_on_battery_continue">
3141- <property name="label" translatable="yes">Co_ntinue</property>
3142- <property name="use_action_appearance">False</property>
3143- <property name="visible">True</property>
3144- <property name="can_focus">True</property>
3145- <property name="can_default">True</property>
3146- <property name="receives_default">True</property>
3147- <property name="use_action_appearance">False</property>
3148- <property name="use_underline">True</property>
3149- </object>
3150- <packing>
3151- <property name="expand">False</property>
3152- <property name="fill">False</property>
3153- <property name="position">1</property>
3154- </packing>
3155- </child>
3156- </object>
3157- <packing>
3158- <property name="expand">False</property>
3159- <property name="fill">True</property>
3160- <property name="pack_type">end</property>
3161- <property name="position">0</property>
3162- </packing>
3163- </child>
3164- <child>
3165- <object class="GtkHBox" id="hbox201">
3166- <property name="visible">True</property>
3167- <property name="can_focus">False</property>
3168- <property name="border_width">6</property>
3169- <property name="spacing">12</property>
3170- <child>
3171- <object class="GtkImage" id="image16">
3172- <property name="visible">True</property>
3173- <property name="can_focus">False</property>
3174- <property name="xalign">0</property>
3175- <property name="yalign">0</property>
3176- <property name="stock">gtk-dialog-warning</property>
3177- <property name="icon-size">6</property>
3178- </object>
3179- <packing>
3180- <property name="expand">False</property>
3181- <property name="fill">True</property>
3182- <property name="position">0</property>
3183- </packing>
3184- </child>
3185- <child>
3186- <object class="GtkVBox" id="vbox19">
3187- <property name="visible">True</property>
3188- <property name="can_focus">False</property>
3189- <property name="spacing">12</property>
3190- <child>
3191- <object class="GtkLabel" id="label35">
3192- <property name="visible">True</property>
3193- <property name="can_focus">True</property>
3194- <property name="xalign">0</property>
3195- <property name="label" translatable="yes">&lt;big&gt;&lt;b&gt;Running on battery&lt;/b&gt;&lt;/big&gt;</property>
3196- <property name="use_markup">True</property>
3197- <property name="selectable">True</property>
3198- </object>
3199- <packing>
3200- <property name="expand">False</property>
3201- <property name="fill">False</property>
3202- <property name="position">0</property>
3203- </packing>
3204- </child>
3205- <child>
3206- <object class="GtkLabel" id="label36">
3207- <property name="visible">True</property>
3208- <property name="can_focus">False</property>
3209- <property name="xalign">0</property>
3210- <property name="label" translatable="yes">Your system is running on battery. Are you sure you want to continue?</property>
3211- <property name="wrap">True</property>
3212- </object>
3213- <packing>
3214- <property name="expand">False</property>
3215- <property name="fill">False</property>
3216- <property name="position">1</property>
3217- </packing>
3218- </child>
3219- </object>
3220- <packing>
3221- <property name="expand">True</property>
3222- <property name="fill">True</property>
3223- <property name="position">1</property>
3224- </packing>
3225- </child>
3226- </object>
3227- <packing>
3228- <property name="expand">True</property>
3229- <property name="fill">True</property>
3230- <property name="position">1</property>
3231- </packing>
3232- </child>
3233- </object>
3234- </child>
3235- <action-widgets>
3236- <action-widget response="-7">button_on_battery_close</action-widget>
3237- <action-widget response="-8">button_on_battery_continue</action-widget>
3238- </action-widgets>
3239- </object>
3240- <object class="GtkDialog" id="dialog_release_notes">
3241- <property name="can_focus">False</property>
3242- <property name="border_width">6</property>
3243- <property name="title" translatable="yes">Release Notes</property>
3244- <property name="modal">True</property>
3245- <property name="window_position">center-on-parent</property>
3246- <property name="default_width">600</property>
3247- <property name="default_height">500</property>
3248- <property name="type_hint">dialog</property>
3249- <child internal-child="vbox">
3250- <object class="GtkBox" id="dialog-vbox33">
3251- <property name="visible">True</property>
3252- <property name="can_focus">False</property>
3253- <property name="spacing">6</property>
3254- <child internal-child="action_area">
3255- <object class="GtkButtonBox" id="dialog-action_area33">
3256- <property name="visible">True</property>
3257- <property name="can_focus">False</property>
3258- <property name="layout_style">end</property>
3259- <child>
3260- <object class="GtkButton" id="okbutton1">
3261- <property name="label">gtk-cancel</property>
3262- <property name="use_action_appearance">False</property>
3263- <property name="visible">True</property>
3264- <property name="can_focus">True</property>
3265- <property name="can_default">True</property>
3266- <property name="receives_default">False</property>
3267- <property name="use_action_appearance">False</property>
3268- <property name="use_stock">True</property>
3269- </object>
3270- <packing>
3271- <property name="expand">False</property>
3272- <property name="fill">False</property>
3273- <property name="position">0</property>
3274- </packing>
3275- </child>
3276- <child>
3277- <object class="GtkButton" id="button2">
3278- <property name="label" translatable="yes">_Upgrade</property>
3279- <property name="use_action_appearance">False</property>
3280- <property name="visible">True</property>
3281- <property name="can_focus">True</property>
3282- <property name="has_focus">True</property>
3283- <property name="can_default">True</property>
3284- <property name="has_default">True</property>
3285- <property name="receives_default">False</property>
3286- <property name="use_action_appearance">False</property>
3287- <property name="use_underline">True</property>
3288- </object>
3289- <packing>
3290- <property name="expand">False</property>
3291- <property name="fill">False</property>
3292- <property name="position">1</property>
3293- </packing>
3294- </child>
3295- </object>
3296- <packing>
3297- <property name="expand">False</property>
3298- <property name="fill">True</property>
3299- <property name="pack_type">end</property>
3300- <property name="position">0</property>
3301- </packing>
3302- </child>
3303- <child>
3304- <object class="GtkScrolledWindow" id="scrolled_notes">
3305- <property name="visible">True</property>
3306- <property name="can_focus">True</property>
3307- <property name="border_width">6</property>
3308- <property name="shadow_type">in</property>
3309- <child>
3310- <placeholder/>
3311- </child>
3312- </object>
3313- <packing>
3314- <property name="expand">True</property>
3315- <property name="fill">True</property>
3316- <property name="position">1</property>
3317- </packing>
3318- </child>
3319- </object>
3320- </child>
3321- <action-widgets>
3322- <action-widget response="-6">okbutton1</action-widget>
3323- <action-widget response="-5">button2</action-widget>
3324- </action-widgets>
3325- </object>
3326 <object class="GtkImage" id="image-apply">
3327 <property name="visible">True</property>
3328 <property name="can_focus">False</property>
3329 <property name="stock">gtk-apply</property>
3330 </object>
3331- <object class="GtkImage" id="image-refresh">
3332- <property name="visible">True</property>
3333- <property name="can_focus">False</property>
3334- <property name="stock">gtk-refresh</property>
3335- </object>
3336- <object class="GtkWindow" id="window_fetch">
3337- <property name="can_focus">False</property>
3338- <property name="border_width">6</property>
3339- <property name="modal">True</property>
3340- <property name="window_position">center-on-parent</property>
3341- <property name="default_width">400</property>
3342- <property name="type_hint">dialog</property>
3343- <property name="skip_taskbar_hint">True</property>
3344- <property name="skip_pager_hint">True</property>
3345- <child>
3346- <object class="GtkVBox" id="vbox6">
3347- <property name="visible">True</property>
3348- <property name="can_focus">False</property>
3349- <property name="spacing">6</property>
3350- <child>
3351- <object class="GtkVBox" id="vbox7">
3352- <property name="visible">True</property>
3353- <property name="can_focus">False</property>
3354- <property name="border_width">6</property>
3355- <property name="spacing">12</property>
3356- <child>
3357- <object class="GtkLabel" id="label_fetch_summary">
3358- <property name="visible">True</property>
3359- <property name="can_focus">False</property>
3360- <property name="xalign">0</property>
3361- <property name="use_markup">True</property>
3362- <property name="wrap">True</property>
3363- </object>
3364- <packing>
3365- <property name="expand">False</property>
3366- <property name="fill">False</property>
3367- <property name="position">0</property>
3368- </packing>
3369- </child>
3370- <child>
3371- <object class="GtkVBox" id="vbox8">
3372- <property name="visible">True</property>
3373- <property name="can_focus">False</property>
3374- <property name="spacing">6</property>
3375- <child>
3376- <object class="GtkProgressBar" id="progressbar_fetch">
3377- <property name="visible">True</property>
3378- <property name="can_focus">False</property>
3379- <property name="pulse_step">0.10000000149</property>
3380- </object>
3381- <packing>
3382- <property name="expand">True</property>
3383- <property name="fill">False</property>
3384- <property name="position">0</property>
3385- </packing>
3386- </child>
3387- <child>
3388- <object class="GtkLabel" id="label_fetch_status">
3389- <property name="visible">True</property>
3390- <property name="can_focus">False</property>
3391- <property name="xalign">0</property>
3392- </object>
3393- <packing>
3394- <property name="expand">False</property>
3395- <property name="fill">False</property>
3396- <property name="position">1</property>
3397- </packing>
3398- </child>
3399- </object>
3400- <packing>
3401- <property name="expand">False</property>
3402- <property name="fill">False</property>
3403- <property name="position">1</property>
3404- </packing>
3405- </child>
3406- <child>
3407- <object class="GtkExpander" id="expander1">
3408- <property name="can_focus">True</property>
3409- <property name="spacing">6</property>
3410- <child>
3411- <object class="GtkVBox" id="vbox9">
3412- <property name="visible">True</property>
3413- <property name="can_focus">False</property>
3414- <property name="spacing">6</property>
3415- <child>
3416- <object class="GtkScrolledWindow" id="scrolledwindow6">
3417- <property name="height_request">200</property>
3418- <property name="visible">True</property>
3419- <property name="can_focus">True</property>
3420- <property name="shadow_type">in</property>
3421- <child>
3422- <object class="GtkTreeView" id="treeview1">
3423- <property name="visible">True</property>
3424- <property name="can_focus">True</property>
3425- <property name="enable_search">False</property>
3426- <child internal-child="selection">
3427- <object class="GtkTreeSelection" id="treeview-selection1"/>
3428- </child>
3429- </object>
3430- </child>
3431- </object>
3432- <packing>
3433- <property name="expand">True</property>
3434- <property name="fill">True</property>
3435- <property name="position">0</property>
3436- </packing>
3437- </child>
3438- </object>
3439- </child>
3440- <child type="label">
3441- <object class="GtkLabel" id="label19">
3442- <property name="visible">True</property>
3443- <property name="can_focus">False</property>
3444- <property name="label" translatable="yes">Show progress of individual files</property>
3445- </object>
3446- </child>
3447- </object>
3448- <packing>
3449- <property name="expand">True</property>
3450- <property name="fill">True</property>
3451- <property name="position">2</property>
3452- </packing>
3453- </child>
3454- </object>
3455- <packing>
3456- <property name="expand">True</property>
3457- <property name="fill">True</property>
3458- <property name="position">0</property>
3459- </packing>
3460- </child>
3461- <child>
3462- <object class="GtkHButtonBox" id="hbuttonbox7">
3463- <property name="visible">True</property>
3464- <property name="can_focus">False</property>
3465- <property name="layout_style">end</property>
3466- <child>
3467- <object class="GtkButton" id="button_fetch_cancel">
3468- <property name="label">gtk-cancel</property>
3469- <property name="use_action_appearance">False</property>
3470- <property name="visible">True</property>
3471- <property name="can_focus">True</property>
3472- <property name="receives_default">False</property>
3473- <property name="border_width">5</property>
3474- <property name="use_action_appearance">False</property>
3475- <property name="use_stock">True</property>
3476- </object>
3477- <packing>
3478- <property name="expand">False</property>
3479- <property name="fill">False</property>
3480- <property name="position">0</property>
3481- </packing>
3482- </child>
3483- </object>
3484- <packing>
3485- <property name="expand">False</property>
3486- <property name="fill">True</property>
3487- <property name="position">1</property>
3488- </packing>
3489- </child>
3490- </object>
3491- </child>
3492- </object>
3493- <object class="GtkWindow" id="window_main">
3494- <property name="can_focus">False</property>
3495- <property name="title" translatable="yes">Software Updater</property>
3496- <property name="resizable">False</property>
3497- <property name="window_position">center</property>
3498- <child>
3499- <object class="GtkVBox" id="vbox_main">
3500+ <object class="GtkWindow" id="window_updates_available">
3501+ <property name="can_focus">False</property>
3502+ <child>
3503+ <object class="GtkVBox" id="pane_updates_available">
3504 <property name="visible">True</property>
3505 <property name="can_focus">False</property>
3506 <property name="border_width">6</property>
3507@@ -796,6 +30,8 @@
3508 <property name="visible">True</property>
3509 <property name="can_focus">False</property>
3510 <property name="yalign">0</property>
3511+ <property name="pixel_size">48</property>
3512+ <property name="icon_name">system-software-update</property>
3513 </object>
3514 <packing>
3515 <property name="expand">False</property>
3516@@ -804,46 +40,19 @@
3517 </packing>
3518 </child>
3519 <child>
3520- <object class="GtkVBox" id="vbox_label_main">
3521+ <object class="GtkLabel" id="label_header">
3522 <property name="visible">True</property>
3523 <property name="can_focus">False</property>
3524- <property name="spacing">6</property>
3525- <child>
3526- <object class="GtkLabel" id="label_header">
3527- <property name="visible">True</property>
3528- <property name="can_focus">False</property>
3529- <property name="xalign">0</property>
3530- <property name="yalign">0</property>
3531- <property name="label" translatable="yes">Starting Software Updater</property>
3532- <property name="use_underline">True</property>
3533- <property name="wrap">True</property>
3534- <attributes>
3535- <attribute name="weight" value="bold"/>
3536- <attribute name="scale" value="1.25"/>
3537- </attributes>
3538- </object>
3539- <packing>
3540- <property name="expand">False</property>
3541- <property name="fill">False</property>
3542- <property name="position">0</property>
3543- </packing>
3544- </child>
3545- <child>
3546- <object class="GtkLabel" id="label_main_details">
3547- <property name="visible">True</property>
3548- <property name="can_focus">False</property>
3549- <property name="xalign">0</property>
3550- <property name="wrap">True</property>
3551- </object>
3552- <packing>
3553- <property name="expand">False</property>
3554- <property name="fill">False</property>
3555- <property name="position">1</property>
3556- </packing>
3557- </child>
3558+ <property name="xalign">0</property>
3559+ <property name="use_underline">True</property>
3560+ <property name="wrap">True</property>
3561+ <attributes>
3562+ <attribute name="weight" value="bold"/>
3563+ <attribute name="scale" value="1.25"/>
3564+ </attributes>
3565 </object>
3566 <packing>
3567- <property name="expand">True</property>
3568+ <property name="expand">False</property>
3569 <property name="fill">True</property>
3570 <property name="position">1</property>
3571 </packing>
3572@@ -856,120 +65,6 @@
3573 </packing>
3574 </child>
3575 <child>
3576- <object class="GtkFrame" id="frame_new_release">
3577- <property name="can_focus">False</property>
3578- <property name="label_xalign">0</property>
3579- <property name="shadow_type">in</property>
3580- <child>
3581- <object class="GtkAlignment" id="alignment5">
3582- <property name="visible">True</property>
3583- <property name="can_focus">False</property>
3584- <child>
3585- <object class="GtkHBox" id="hbox_new_release">
3586- <property name="visible">True</property>
3587- <property name="can_focus">False</property>
3588- <property name="border_width">6</property>
3589- <property name="spacing">6</property>
3590- <child>
3591- <object class="GtkLabel" id="label_new_release">
3592- <property name="visible">True</property>
3593- <property name="can_focus">False</property>
3594- <property name="xalign">0</property>
3595- <property name="use_markup">True</property>
3596- </object>
3597- <packing>
3598- <property name="expand">True</property>
3599- <property name="fill">True</property>
3600- <property name="position">0</property>
3601- </packing>
3602- </child>
3603- <child>
3604- <object class="GtkButton" id="button_dist_upgrade">
3605- <property name="label" translatable="yes">U_pgrade</property>
3606- <property name="use_action_appearance">False</property>
3607- <property name="visible">True</property>
3608- <property name="can_focus">True</property>
3609- <property name="receives_default">True</property>
3610- <property name="use_action_appearance">False</property>
3611- <property name="use_underline">True</property>
3612- <signal name="clicked" handler="on_button_dist_upgrade_clicked" swapped="no"/>
3613- </object>
3614- <packing>
3615- <property name="expand">False</property>
3616- <property name="fill">False</property>
3617- <property name="position">1</property>
3618- </packing>
3619- </child>
3620- </object>
3621- </child>
3622- </object>
3623- </child>
3624- </object>
3625- <packing>
3626- <property name="expand">False</property>
3627- <property name="fill">True</property>
3628- <property name="position">1</property>
3629- </packing>
3630- </child>
3631- <child>
3632- <object class="GtkFrame" id="frame_restart_required">
3633- <property name="can_focus">False</property>
3634- <property name="label_xalign">0</property>
3635- <property name="shadow_type">in</property>
3636- <child>
3637- <object class="GtkAlignment" id="alignment11">
3638- <property name="visible">True</property>
3639- <property name="can_focus">False</property>
3640- <child>
3641- <object class="GtkHBox" id="hbox_reboot">
3642- <property name="visible">True</property>
3643- <property name="can_focus">False</property>
3644- <property name="border_width">6</property>
3645- <property name="spacing">6</property>
3646- <child>
3647- <object class="GtkLabel" id="label_restart_required">
3648- <property name="visible">True</property>
3649- <property name="can_focus">False</property>
3650- <property name="xalign">0</property>
3651- <property name="use_markup">True</property>
3652- <property name="wrap">True</property>
3653- <property name="selectable">True</property>
3654- </object>
3655- <packing>
3656- <property name="expand">True</property>
3657- <property name="fill">True</property>
3658- <property name="position">0</property>
3659- </packing>
3660- </child>
3661- <child>
3662- <object class="GtkButton" id="button_restart_required">
3663- <property name="label" translatable="yes">_Restart Now</property>
3664- <property name="use_action_appearance">False</property>
3665- <property name="visible">True</property>
3666- <property name="can_focus">True</property>
3667- <property name="receives_default">True</property>
3668- <property name="use_action_appearance">False</property>
3669- <property name="use_underline">True</property>
3670- <signal name="clicked" handler="on_button_restart_required_clicked" swapped="no"/>
3671- </object>
3672- <packing>
3673- <property name="expand">False</property>
3674- <property name="fill">False</property>
3675- <property name="position">1</property>
3676- </packing>
3677- </child>
3678- </object>
3679- </child>
3680- </object>
3681- </child>
3682- </object>
3683- <packing>
3684- <property name="expand">False</property>
3685- <property name="fill">True</property>
3686- <property name="position">2</property>
3687- </packing>
3688- </child>
3689- <child>
3690 <object class="GtkExpander" id="expander_details">
3691 <property name="visible">True</property>
3692 <property name="can_focus">True</property>
3693@@ -998,6 +93,9 @@
3694 </child>
3695 <signal name="cursor-changed" handler="on_treeview_update_cursor_changed" swapped="no"/>
3696 <signal name="row-activated" handler="on_treeview_update_row_activated" swapped="no"/>
3697+ <child internal-child="selection">
3698+ <object class="GtkTreeSelection" id="treeview-selection"/>
3699+ </child>
3700 </object>
3701 </child>
3702 </object>
3703@@ -1124,7 +222,7 @@
3704 <packing>
3705 <property name="expand">True</property>
3706 <property name="fill">True</property>
3707- <property name="position">3</property>
3708+ <property name="position">2</property>
3709 </packing>
3710 </child>
3711 <child>
3712@@ -1320,17 +418,7 @@
3713 <packing>
3714 <property name="expand">False</property>
3715 <property name="fill">True</property>
3716- <property name="position">4</property>
3717- </packing>
3718- </child>
3719- <child>
3720- <object class="GtkProgressBar" id="progressbar_cache_inline">
3721- <property name="can_focus">False</property>
3722- </object>
3723- <packing>
3724- <property name="expand">False</property>
3725- <property name="fill">False</property>
3726- <property name="position">5</property>
3727+ <property name="position">3</property>
3728 </packing>
3729 </child>
3730 </object>
3731@@ -1365,24 +453,6 @@
3732 </packing>
3733 </child>
3734 <child>
3735- <object class="GtkButton" id="button_reload">
3736- <property name="label" translatable="yes">Chec_k</property>
3737- <property name="use_action_appearance">False</property>
3738- <property name="visible">True</property>
3739- <property name="can_focus">True</property>
3740- <property name="receives_default">True</property>
3741- <property name="use_action_appearance">False</property>
3742- <property name="image">image-refresh</property>
3743- <property name="use_underline">True</property>
3744- <signal name="clicked" handler="on_button_reload_clicked" swapped="no"/>
3745- </object>
3746- <packing>
3747- <property name="expand">False</property>
3748- <property name="fill">True</property>
3749- <property name="position">1</property>
3750- </packing>
3751- </child>
3752- <child>
3753 <object class="GtkButton" id="button_close">
3754 <property name="label">gtk-close</property>
3755 <property name="use_action_appearance">False</property>
3756
3757=== added file 'data/gtkbuilder/UpdateProgress.ui'
3758--- data/gtkbuilder/UpdateProgress.ui 1970-01-01 00:00:00 +0000
3759+++ data/gtkbuilder/UpdateProgress.ui 2012-06-18 20:03:27 +0000
3760@@ -0,0 +1,96 @@
3761+<?xml version="1.0" encoding="UTF-8"?>
3762+<interface>
3763+ <!-- interface-requires gtk+ 3.0 -->
3764+ <object class="GtkWindow" id="window_update_progress">
3765+ <property name="can_focus">False</property>
3766+ <child>
3767+ <object class="GtkGrid" id="pane_update_progress">
3768+ <property name="visible">True</property>
3769+ <property name="can_focus">False</property>
3770+ <property name="border_width">12</property>
3771+ <property name="row_spacing">6</property>
3772+ <property name="column_spacing">6</property>
3773+ <child>
3774+ <object class="GtkLabel" id="label_header">
3775+ <property name="visible">True</property>
3776+ <property name="can_focus">False</property>
3777+ <property name="xalign">0</property>
3778+ </object>
3779+ <packing>
3780+ <property name="left_attach">0</property>
3781+ <property name="top_attach">0</property>
3782+ <property name="width">2</property>
3783+ <property name="height">1</property>
3784+ </packing>
3785+ </child>
3786+ <child>
3787+ <object class="GtkLabel" id="label_details">
3788+ <property name="visible">True</property>
3789+ <property name="can_focus">False</property>
3790+ <property name="xalign">0</property>
3791+ <property name="ellipsize">end</property>
3792+ <property name="max_width_chars">15</property>
3793+ <attributes>
3794+ <attribute name="scale" value="0.90000000000000002"/>
3795+ </attributes>
3796+ </object>
3797+ <packing>
3798+ <property name="left_attach">0</property>
3799+ <property name="top_attach">2</property>
3800+ <property name="width">2</property>
3801+ <property name="height">1</property>
3802+ </packing>
3803+ </child>
3804+ <child>
3805+ <object class="GtkAlignment" id="progressbar_slot">
3806+ <property name="width_request">350</property>
3807+ <property name="visible">True</property>
3808+ <property name="can_focus">False</property>
3809+ <property name="hexpand">True</property>
3810+ <property name="yscale">0.5</property>
3811+ <child>
3812+ <placeholder/>
3813+ </child>
3814+ </object>
3815+ <packing>
3816+ <property name="left_attach">0</property>
3817+ <property name="top_attach">1</property>
3818+ <property name="width">1</property>
3819+ <property name="height">1</property>
3820+ </packing>
3821+ </child>
3822+ <child>
3823+ <object class="GtkGrid" id="button_cancel_slot">
3824+ <property name="visible">True</property>
3825+ <property name="can_focus">False</property>
3826+ <child>
3827+ <placeholder/>
3828+ </child>
3829+ </object>
3830+ <packing>
3831+ <property name="left_attach">1</property>
3832+ <property name="top_attach">1</property>
3833+ <property name="width">1</property>
3834+ <property name="height">1</property>
3835+ </packing>
3836+ </child>
3837+ <child>
3838+ <object class="GtkGrid" id="expander_slot">
3839+ <property name="can_focus">False</property>
3840+ <property name="hexpand">True</property>
3841+ <property name="vexpand">True</property>
3842+ <child>
3843+ <placeholder/>
3844+ </child>
3845+ </object>
3846+ <packing>
3847+ <property name="left_attach">0</property>
3848+ <property name="top_attach">3</property>
3849+ <property name="width">2</property>
3850+ <property name="height">1</property>
3851+ </packing>
3852+ </child>
3853+ </object>
3854+ </child>
3855+ </object>
3856+</interface>
3857
3858=== modified file 'data/update-manager.convert'
3859--- data/update-manager.convert 2012-05-31 22:18:33 +0000
3860+++ data/update-manager.convert 2012-06-18 20:03:27 +0000
3861@@ -1,5 +1,4 @@
3862 [com.ubuntu.update-manager]
3863-remind-reload = /apps/update-manager/remind_reload
3864 show-details = /apps/update-manager/show_details
3865 check-dist-upgrades = /apps/update-manager/check_dist_upgrades
3866 autoclose-install-window = /apps/update-manager/autoclose_install_window
3867
3868=== modified file 'tests/interactive_fetch_release_upgrader.py'
3869--- tests/interactive_fetch_release_upgrader.py 2012-05-01 23:20:42 +0000
3870+++ tests/interactive_fetch_release_upgrader.py 2012-06-18 20:03:27 +0000
3871@@ -64,14 +64,17 @@
3872 self.assertTrue(self.new_dist is not None)
3873
3874 def testdownloading(self):
3875- parent = UpdateManager("/usr/share/update-manager/")
3876+ parent = UpdateManager("/usr/share/update-manager/", None)
3877 progress = GtkAcquireProgress(parent,
3878+ "/usr/share/update-manager/",
3879 _("Downloading the upgrade "
3880 "tool"),
3881 _("The upgrade tool will "
3882 "guide you through the "
3883 "upgrade process."))
3884- fetcher = DistUpgradeFetcherGtk(self.new_dist, parent=parent, progress=progress)
3885+ fetcher = DistUpgradeFetcherGtk(self.new_dist, parent=parent,
3886+ progress=progress,
3887+ datadir="/usr/share/update-manager/")
3888 self.assertTrue(fetcher.showReleaseNotes())
3889 self.assertTrue(fetcher.fetchDistUpgrader())
3890 self.assertTrue(fetcher.extractDistUpgrader())
3891
3892=== modified file 'tests/test_end_of_life.py'
3893--- tests/test_end_of_life.py 2012-06-11 16:17:31 +0000
3894+++ tests/test_end_of_life.py 2012-06-18 20:03:27 +0000
3895@@ -23,7 +23,8 @@
3896 def _nag_dialog_close_helper(checker):
3897 # this helper is called to verify that the nag dialog appears
3898 # and that it
3899- dialog = getattr(checker.window_main, "no_longer_supported_nag", None)
3900+ dialog = getattr(checker, "no_longer_supported_nag", None)
3901+ print("testing", checker, dialog)
3902 self.assertNotEqual(dialog, None)
3903 dialog.response(Gtk.ResponseType.DELETE_EVENT)
3904 self.dialog_called = True
3905
3906=== modified file 'update-manager'
3907--- update-manager 2012-06-13 22:45:57 +0000
3908+++ update-manager 2012-06-18 20:03:27 +0000
3909@@ -26,13 +26,16 @@
3910 from __future__ import print_function
3911
3912 from gi.repository import Gtk
3913+from gi.repository import Gio
3914 import gi
3915 gi.require_version("Gtk", "3.0")
3916
3917 import os
3918 import sys
3919+import time
3920
3921 from UpdateManager.UpdateManager import UpdateManager
3922+from UpdateManager.Core.utils import init_proxy
3923 from DistUpgrade.DistUpgradeVersion import VERSION
3924 import locale
3925 import gettext
3926@@ -42,7 +45,8 @@
3927 if __name__ == "__main__":
3928
3929 Gtk.init_check(sys.argv)
3930-
3931+ Gtk.Window.set_default_icon_name("system-software-update")
3932+
3933 #FIXME: Workaround a bug in optparser which doesn't handle unicode/str
3934 # correctly, see http://bugs.python.org/issue4391
3935 # Should be resolved by Python3
3936@@ -117,5 +121,11 @@
3937 controller = DistUpgradeController(view, datadir=data_dir)
3938 controller.doPartialUpgrade()
3939 else:
3940+ # keep track when we run (for update-notifier)
3941+ settings = Gio.Settings("com.ubuntu.update-manager")
3942+ settings.set_int("launch-time", int(time.time()))
3943+ init_proxy(settings)
3944+
3945 app = UpdateManager(data_dir, options)
3946- app.main(options)
3947+ app.start_update()
3948+ Gtk.main()

Subscribers

People subscribed via source and target branches

to status/vote changes: