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
=== modified file 'tests/status/test_aggregator.py'
--- tests/status/test_aggregator.py 2011-03-14 18:36:26 +0000
+++ tests/status/test_aggregator.py 2011-03-18 13:57:38 +0000
@@ -1018,11 +1018,7 @@
1018 self.status_frontend.aggregator.connected = True1018 self.status_frontend.aggregator.connected = True
1019 self.listener.handle_SYS_CONNECTION_LOST()1019 self.listener.handle_SYS_CONNECTION_LOST()
1020 self.assertEqual(1020 self.assertEqual(
1021 1, len(self.status_frontend.notification.notifications_shown))1021 0, len(self.status_frontend.notification.notifications_shown))
1022 self.assertEqual(
1023 (aggregator.UBUNTUONE_TITLE,
1024 aggregator.ConnectionLostStatus.MESSAGE_ONE, None, False),
1025 self.status_frontend.notification.notifications_shown[0])
1026 self.assertFalse(self.status_frontend.aggregator.connected)1022 self.assertFalse(self.status_frontend.aggregator.connected)
10271023
1028 def test_server_connection_made(self):1024 def test_server_connection_made(self):
@@ -1030,11 +1026,7 @@
1030 self.status_frontend.aggregator.connected = False1026 self.status_frontend.aggregator.connected = False
1031 self.listener.handle_SYS_CONNECTION_MADE()1027 self.listener.handle_SYS_CONNECTION_MADE()
1032 self.assertEqual(1028 self.assertEqual(
1033 1, len(self.status_frontend.notification.notifications_shown))1029 0, len(self.status_frontend.notification.notifications_shown))
1034 self.assertEqual(
1035 (aggregator.UBUNTUONE_TITLE,
1036 aggregator.ConnectionMadeStatus.MESSAGE_ONE, None, False),
1037 self.status_frontend.notification.notifications_shown[0])
1038 self.assertTrue(self.status_frontend.aggregator.connected)1030 self.assertTrue(self.status_frontend.aggregator.connected)
10391031
1040 def test_set_show_all_notifications(self):1032 def test_set_show_all_notifications(self):
10411033
=== modified file 'ubuntuone/status/aggregator.py'
--- ubuntuone/status/aggregator.py 2011-03-14 18:36:26 +0000
+++ ubuntuone/status/aggregator.py 2011-03-18 13:57:38 +0000
@@ -487,7 +487,7 @@
487 self.timer = Timer(self.sleep_delay, clock=self.clock)487 self.timer = Timer(self.sleep_delay, clock=self.clock)
488 self.timer.addCallback(self._timeout)488 self.timer.addCallback(self._timeout)
489489
490 def _timeout(self, result):490 def _timeout(self, _):
491 """Show the bubble."""491 """Show the bubble."""
492 self.notification = self.status_aggregator.get_notification()492 self.notification = self.status_aggregator.get_notification()
493 text = self.status_aggregator.get_progress_message()493 text = self.status_aggregator.get_progress_message()
@@ -843,15 +843,11 @@
843 def server_connection_lost(self):843 def server_connection_lost(self):
844 """The client lost the connection to the server."""844 """The client lost the connection to the server."""
845 logger.debug("server connection lost")845 logger.debug("server connection lost")
846 self.notification.send_notification(
847 UBUNTUONE_TITLE, ConnectionLostStatus().one())
848 self.aggregator.connection_lost()846 self.aggregator.connection_lost()
849847
850 def server_connection_made(self):848 def server_connection_made(self):
851 """The client made the connection to the server."""849 """The client made the connection to the server."""
852 logger.debug("server connection made")850 logger.debug("server connection made")
853 self.notification.send_notification(
854 UBUNTUONE_TITLE, ConnectionMadeStatus().one())
855 self.aggregator.connection_made()851 self.aggregator.connection_made()
856852
857 def set_show_all_notifications(self, value):853 def set_show_all_notifications(self, value):

Subscribers

People subscribed via source and target branches