Merge lp:~eapache/update-manager/unity-urgency-hint into lp:update-manager

Proposed by Evan Huus
Status: Merged
Merged at revision: 2145
Proposed branch: lp:~eapache/update-manager/unity-urgency-hint
Merge into: lp:update-manager
Diff against target: 69 lines (+12/-6)
2 files modified
UpdateManager/UnitySupport.py (+5/-3)
UpdateManager/UpdateManager.py (+7/-3)
To merge this branch: bzr merge lp:~eapache/update-manager/unity-urgency-hint
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Review via email: mp+65602@code.launchpad.net

Description of the change

Make sure the unity urgency hint is set and unset the same as the classic window-manager urgency hint.

Fixes bug #799173

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

Thanks a bunch! merged into trunk now :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'UpdateManager/UnitySupport.py'
2--- UpdateManager/UnitySupport.py 2011-06-17 16:02:52 +0000
3+++ UpdateManager/UnitySupport.py 2011-06-23 00:34:28 +0000
4@@ -33,6 +33,7 @@
5 """ interface for unity support """
6 def __init__(self, parent): pass
7 def set_updates_count(self, num_updates): pass
8+ def set_urgency(self, urgent): pass
9 def set_install_menuitem_visible(self, visible): pass
10 def set_progress(self, progress): pass
11
12@@ -80,13 +81,14 @@
13
14 def set_updates_count(self, num_updates):
15 self._unity.set_property("count", num_updates)
16- # FIXME: setup emblem as well(?) and add urgency only for security
17+ # FIXME: setup emblem as well(?)
18 if num_updates > 0:
19 self._unity.set_property("count-visible", True)
20- self._unity.set_property("urgent", True)
21 else:
22 self._unity.set_property("count-visible", False)
23- self._unity.set_property("urgent", False)
24+
25+ def set_urgency(self, urgent):
26+ self._unity.set_property("urgent", urgent)
27
28 def set_install_menuitem_visible(self, visible):
29 self.install_dbusmenuitem.property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, visible)
30
31=== modified file 'UpdateManager/UpdateManager.py'
32--- UpdateManager/UpdateManager.py 2011-06-10 13:43:24 +0000
33+++ UpdateManager/UpdateManager.py 2011-06-23 00:34:28 +0000
34@@ -283,12 +283,18 @@
35 # get the install backend
36 self.install_backend = backend.get_backend(self.window_main)
37 self.install_backend.connect("action-done", self._on_backend_done)
38+
39+ # Create Unity launcher quicklist
40+ # FIXME: instead of passing parent we really should just send signals
41+ self.unity = UnitySupport(parent=self)
42+
43 # it can only the iconified *after* it is shown (even if the docs
44 # claim otherwise)
45 if options.no_focus_on_map:
46 self.window_main.iconify()
47 self.window_main.stick()
48 self.window_main.set_urgency_hint(True)
49+ self.unity.set_urgency(True)
50 self.initial_focus_id = self.window_main.connect(
51 "focus-in-event", self.on_initial_focus_in)
52
53@@ -298,9 +304,6 @@
54 self.alert_watcher.connect("battery-alert", self._on_battery_alert)
55 self.alert_watcher.connect("network-3g-alert", self._on_network_3g_alert)
56
57- # Create Unity launcher quicklist
58- # FIXME: instead of passing parent we really should just send signals
59- self.unity = UnitySupport(parent=self)
60
61 def install_all_updates (self, menu, menuitem, data):
62 self.select_all_updgrades (None)
63@@ -310,6 +313,7 @@
64 """callback run on initial focus-in (if started unmapped)"""
65 widget.unstick()
66 widget.set_urgency_hint(False)
67+ self.unity.set_urgency(False)
68 self.window_main.disconnect(self.initial_focus_id)
69 return False
70

Subscribers

People subscribed via source and target branches

to status/vote changes: