Merge lp:~thisfred/ubuntuone-client/lp-737150 into lp:ubuntuone-client

Proposed by Eric Casteleijn on 2011-03-18
Status: Merged
Approved by: Eric Casteleijn on 2011-03-18
Approved revision: 924
Merged at revision: 921
Proposed branch: lp:~thisfred/ubuntuone-client/lp-737150
Merge into: lp:ubuntuone-client
Diff against target: 58 lines (+3/-15)
2 files modified
tests/status/test_aggregator.py (+2/-10)
ubuntuone/status/aggregator.py (+1/-5)
To merge this branch: bzr merge lp:~thisfred/ubuntuone-client/lp-737150
Reviewer Review Type Date Requested Status
dobey (community) Approve on 2011-03-18
Roberto Alsina (community) 2011-03-18 Approve on 2011-03-18
Review via email: mp+53989@code.launchpad.net

Commit message

Remove all notifications of connection made/lost events.

Description of the change

Remove all notifications of connection made/lost events.

To post a comment you must log in.
924. By Eric Casteleijn on 2011-03-18

unchanged: attach bugC

Roberto Alsina (ralsina) wrote :

+1

review: Approve
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/status/test_aggregator.py'
2--- tests/status/test_aggregator.py 2011-03-14 18:36:26 +0000
3+++ tests/status/test_aggregator.py 2011-03-18 13:57:38 +0000
4@@ -1018,11 +1018,7 @@
5 self.status_frontend.aggregator.connected = True
6 self.listener.handle_SYS_CONNECTION_LOST()
7 self.assertEqual(
8- 1, len(self.status_frontend.notification.notifications_shown))
9- self.assertEqual(
10- (aggregator.UBUNTUONE_TITLE,
11- aggregator.ConnectionLostStatus.MESSAGE_ONE, None, False),
12- self.status_frontend.notification.notifications_shown[0])
13+ 0, len(self.status_frontend.notification.notifications_shown))
14 self.assertFalse(self.status_frontend.aggregator.connected)
15
16 def test_server_connection_made(self):
17@@ -1030,11 +1026,7 @@
18 self.status_frontend.aggregator.connected = False
19 self.listener.handle_SYS_CONNECTION_MADE()
20 self.assertEqual(
21- 1, len(self.status_frontend.notification.notifications_shown))
22- self.assertEqual(
23- (aggregator.UBUNTUONE_TITLE,
24- aggregator.ConnectionMadeStatus.MESSAGE_ONE, None, False),
25- self.status_frontend.notification.notifications_shown[0])
26+ 0, len(self.status_frontend.notification.notifications_shown))
27 self.assertTrue(self.status_frontend.aggregator.connected)
28
29 def test_set_show_all_notifications(self):
30
31=== modified file 'ubuntuone/status/aggregator.py'
32--- ubuntuone/status/aggregator.py 2011-03-14 18:36:26 +0000
33+++ ubuntuone/status/aggregator.py 2011-03-18 13:57:38 +0000
34@@ -487,7 +487,7 @@
35 self.timer = Timer(self.sleep_delay, clock=self.clock)
36 self.timer.addCallback(self._timeout)
37
38- def _timeout(self, result):
39+ def _timeout(self, _):
40 """Show the bubble."""
41 self.notification = self.status_aggregator.get_notification()
42 text = self.status_aggregator.get_progress_message()
43@@ -843,15 +843,11 @@
44 def server_connection_lost(self):
45 """The client lost the connection to the server."""
46 logger.debug("server connection lost")
47- self.notification.send_notification(
48- UBUNTUONE_TITLE, ConnectionLostStatus().one())
49 self.aggregator.connection_lost()
50
51 def server_connection_made(self):
52 """The client made the connection to the server."""
53 logger.debug("server connection made")
54- self.notification.send_notification(
55- UBUNTUONE_TITLE, ConnectionMadeStatus().one())
56 self.aggregator.connection_made()
57
58 def set_show_all_notifications(self, value):

Subscribers

People subscribed via source and target branches