Merge lp:~evfool/update-manager/fix727069 into lp:update-manager

Proposed by Robert Roth
Status: Merged
Merged at revision: 2087
Proposed branch: lp:~evfool/update-manager/fix727069
Merge into: lp:update-manager
Diff against target: 40 lines (+18/-2)
1 file modified
UpdateManager/UpdateManager.py (+18/-2)
To merge this branch: bzr merge lp:~evfool/update-manager/fix727069
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+55972@code.launchpad.net

Description of the change

If unity is running, refer to Applications, otherwise to Administration menu when pointing the user where to find the Update Manager later.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks again, looks fine! Merged

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'UpdateManager/UpdateManager.py'
2--- UpdateManager/UpdateManager.py 2011-03-09 09:24:58 +0000
3+++ UpdateManager/UpdateManager.py 2011-04-01 16:48:33 +0000
4@@ -102,6 +102,16 @@
5 # NetworkManager enums
6 from Core.roam import NetworkManagerHelper
7
8+def is_unity_running():
9+ """ return True if Unity is currently running """
10+ unity_running = False
11+ try:
12+ bus = dbus.SessionBus()
13+ unity_running = bus.name_has_owner("com.canonical.Unity")
14+ except:
15+ LOG.exception("could not check for Unity dbus service")
16+ return unity_running
17+
18 def show_dist_no_longer_supported_dialog(parent=None):
19 """ show a no-longer-supported dialog """
20 msg = "<big><b>%s</b></big>\n\n%s" % (
21@@ -650,11 +660,17 @@
22 firstrun = self.gconfclient.get_bool("/apps/update-manager/first_run")
23 if firstrun:
24 text_header = "<big><b>%s</b></big>" % _("Welcome to Ubuntu")
25- text_label_main = _("These software updates have been issued since Ubuntu was released. If you don't want to install them now, choose \"Update Manager\" from the Administration Menu later.")
26+ if is_unity_running():
27+ text_label_main = _("These software updates have been issued since Ubuntu was released. If you don't want to install them now, choose \"Update Manager\" from Applications later.")
28+ else:
29+ text_label_main = _("These software updates have been issued since Ubuntu was released. If you don't want to install them now, choose \"Update Manager\" from the Administration Menu later.")
30 self.gconfclient.set_bool("/apps/update-manager/first_run", False)
31 else:
32 text_header = "<big><b>%s</b></big>" % _("Software updates are available for this computer")
33- text_label_main = _("If you don't want to install them now, choose \"Update Manager\" from the Administration menu later.")
34+ if is_unity_running():
35+ text_label_main = _("If you don't want to install them now, choose \"Update Manager\" from Applications later.")
36+ else:
37+ text_label_main = _("If you don't want to install them now, choose \"Update Manager\" from the Administration menu later.")
38 self.notebook_details.set_sensitive(True)
39 self.treeview_update.set_sensitive(True)
40 self.button_install.grab_default()

Subscribers

People subscribed via source and target branches

to status/vote changes: