Merge lp:~dobey/ubuntuone-client/transient-notify into lp:ubuntuone-client

Proposed by dobey on 2012-03-09
Status: Merged
Approved by: dobey on 2012-03-12
Approved revision: 1205
Merged at revision: 1205
Proposed branch: lp:~dobey/ubuntuone-client/transient-notify
Merge into: lp:ubuntuone-client
Diff against target: 57 lines (+9/-0)
2 files modified
tests/platform/linux/test_notification.py (+6/-0)
ubuntuone/platform/linux/notification.py (+3/-0)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/transient-notify
Reviewer Review Type Date Requested Status
Roberto Alsina (community) 2012-03-09 Approve on 2012-03-12
Review via email: mp+96815@code.launchpad.net

Commit Message

Set the transient hint on the notifications to True

To post a comment you must log in.
Roberto Alsina (ralsina) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/platform/linux/test_notification.py'
2--- tests/platform/linux/test_notification.py 2012-01-26 19:28:55 +0000
3+++ tests/platform/linux/test_notification.py 2012-03-09 19:32:20 +0000
4@@ -73,6 +73,7 @@
5 self._set_up_mock_notify(FAKE_TITLE, FAKE_MESSAGE, ICON_NAME)
6 mock_notification = self.mocker.mock()
7 self.mocker.result(mock_notification)
8+ mock_notification.set_hint('transient', True)
9 mock_notification.show()
10 self.mocker.replay()
11 Notification(FAKE_APP_NAME).send_notification(FAKE_TITLE, FAKE_MESSAGE)
12@@ -82,9 +83,11 @@
13 self._set_up_mock_notify(FAKE_TITLE, FAKE_MESSAGE, ICON_NAME)
14 mock_notification = self.mocker.mock()
15 self.mocker.result(mock_notification)
16+ mock_notification.set_hint('transient', True)
17 mock_notification.show()
18 mock_notification.update(
19 FAKE_TITLE + '2', FAKE_MESSAGE + '2', ICON_NAME)
20+ mock_notification.set_hint('transient', True)
21 mock_notification.show()
22 self.mocker.replay()
23 notifier = Notification(FAKE_APP_NAME)
24@@ -96,6 +99,7 @@
25 self._set_up_mock_notify(FAKE_TITLE, FAKE_MESSAGE, FAKE_ICON)
26 mock_notification = self.mocker.mock()
27 self.mocker.result(mock_notification)
28+ mock_notification.set_hint('transient', True)
29 mock_notification.show()
30 self.mocker.replay()
31 Notification(FAKE_APP_NAME).send_notification(
32@@ -107,9 +111,11 @@
33 mock_notification = self.mocker.mock()
34 self.mocker.result(mock_notification)
35 mock_notification.set_hint_string('x-canonical-append', '')
36+ mock_notification.set_hint('transient', True)
37 mock_notification.show()
38 mock_notification.update(FAKE_TITLE, FAKE_APPENDAGE, ICON_NAME)
39 mock_notification.set_hint_string('x-canonical-append', '')
40+ mock_notification.set_hint('transient', True)
41 mock_notification.show()
42 self.mocker.replay()
43 notifier = Notification(FAKE_APP_NAME)
44
45=== modified file 'ubuntuone/platform/linux/notification.py'
46--- ubuntuone/platform/linux/notification.py 2012-01-25 22:40:02 +0000
47+++ ubuntuone/platform/linux/notification.py 2012-03-09 19:32:20 +0000
48@@ -68,6 +68,9 @@
49 self.notification = Notify.Notification(title, message, icon)
50 else:
51 self.notification.update(title, message, icon)
52+
53 if append:
54 self.notification.set_hint_string('x-canonical-append', '')
55+
56+ self.notification.set_hint('transient', True)
57 self.notification.show()

Subscribers

People subscribed via source and target branches