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
=== modified file 'UpdateManager/UnitySupport.py'
--- UpdateManager/UnitySupport.py 2011-06-17 16:02:52 +0000
+++ UpdateManager/UnitySupport.py 2011-06-23 00:34:28 +0000
@@ -33,6 +33,7 @@
33 """ interface for unity support """33 """ interface for unity support """
34 def __init__(self, parent): pass34 def __init__(self, parent): pass
35 def set_updates_count(self, num_updates): pass35 def set_updates_count(self, num_updates): pass
36 def set_urgency(self, urgent): pass
36 def set_install_menuitem_visible(self, visible): pass37 def set_install_menuitem_visible(self, visible): pass
37 def set_progress(self, progress): pass38 def set_progress(self, progress): pass
3839
@@ -80,13 +81,14 @@
8081
81 def set_updates_count(self, num_updates):82 def set_updates_count(self, num_updates):
82 self._unity.set_property("count", num_updates)83 self._unity.set_property("count", num_updates)
83 # FIXME: setup emblem as well(?) and add urgency only for security84 # FIXME: setup emblem as well(?)
84 if num_updates > 0:85 if num_updates > 0:
85 self._unity.set_property("count-visible", True)86 self._unity.set_property("count-visible", True)
86 self._unity.set_property("urgent", True)
87 else:87 else:
88 self._unity.set_property("count-visible", False)88 self._unity.set_property("count-visible", False)
89 self._unity.set_property("urgent", False)89
90 def set_urgency(self, urgent):
91 self._unity.set_property("urgent", urgent)
9092
91 def set_install_menuitem_visible(self, visible):93 def set_install_menuitem_visible(self, visible):
92 self.install_dbusmenuitem.property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, visible)94 self.install_dbusmenuitem.property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, visible)
9395
=== modified file 'UpdateManager/UpdateManager.py'
--- UpdateManager/UpdateManager.py 2011-06-10 13:43:24 +0000
+++ UpdateManager/UpdateManager.py 2011-06-23 00:34:28 +0000
@@ -283,12 +283,18 @@
283 # get the install backend283 # get the install backend
284 self.install_backend = backend.get_backend(self.window_main)284 self.install_backend = backend.get_backend(self.window_main)
285 self.install_backend.connect("action-done", self._on_backend_done)285 self.install_backend.connect("action-done", self._on_backend_done)
286
287 # Create Unity launcher quicklist
288 # FIXME: instead of passing parent we really should just send signals
289 self.unity = UnitySupport(parent=self)
290
286 # it can only the iconified *after* it is shown (even if the docs291 # it can only the iconified *after* it is shown (even if the docs
287 # claim otherwise)292 # claim otherwise)
288 if options.no_focus_on_map:293 if options.no_focus_on_map:
289 self.window_main.iconify()294 self.window_main.iconify()
290 self.window_main.stick()295 self.window_main.stick()
291 self.window_main.set_urgency_hint(True)296 self.window_main.set_urgency_hint(True)
297 self.unity.set_urgency(True)
292 self.initial_focus_id = self.window_main.connect(298 self.initial_focus_id = self.window_main.connect(
293 "focus-in-event", self.on_initial_focus_in)299 "focus-in-event", self.on_initial_focus_in)
294 300
@@ -298,9 +304,6 @@
298 self.alert_watcher.connect("battery-alert", self._on_battery_alert)304 self.alert_watcher.connect("battery-alert", self._on_battery_alert)
299 self.alert_watcher.connect("network-3g-alert", self._on_network_3g_alert)305 self.alert_watcher.connect("network-3g-alert", self._on_network_3g_alert)
300306
301 # Create Unity launcher quicklist
302 # FIXME: instead of passing parent we really should just send signals
303 self.unity = UnitySupport(parent=self)
304307
305 def install_all_updates (self, menu, menuitem, data):308 def install_all_updates (self, menu, menuitem, data):
306 self.select_all_updgrades (None)309 self.select_all_updgrades (None)
@@ -310,6 +313,7 @@
310 """callback run on initial focus-in (if started unmapped)"""313 """callback run on initial focus-in (if started unmapped)"""
311 widget.unstick()314 widget.unstick()
312 widget.set_urgency_hint(False)315 widget.set_urgency_hint(False)
316 self.unity.set_urgency(False)
313 self.window_main.disconnect(self.initial_focus_id)317 self.window_main.disconnect(self.initial_focus_id)
314 return False318 return False
315319

Subscribers

People subscribed via source and target branches

to status/vote changes: