Merge lp:~nataliabidart/ubuntuone-control-panel/connect-after-computer-adding into lp:ubuntuone-control-panel

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 115
Merged at revision: 114
Proposed branch: lp:~nataliabidart/ubuntuone-control-panel/connect-after-computer-adding
Merge into: lp:ubuntuone-control-panel
Diff against target: 64 lines (+13/-3)
2 files modified
ubuntuone/controlpanel/gtk/gui.py (+5/-1)
ubuntuone/controlpanel/gtk/tests/test_gui_basic.py (+8/-2)
To merge this branch: bzr merge lp:~nataliabidart/ubuntuone-control-panel/connect-after-computer-adding
Reviewer Review Type Date Requested Status
Eric Casteleijn (community) Approve
dobey (community) Approve
Review via email: mp+54929@code.launchpad.net

Commit message

- After initial computer adding, syncdameon is asked to connect (LP: #715873).

Description of the change

To test IRL, please remove your current device from the cloud, and verify that syncdaemon is not running. Run the control panel from this branch with:

PYTHONPATH=. bin/ubuntuone-control-panel-gtk

Once you login, you should confirm that syncdaemon is not only started, but its state is connected.
If you try this same procedure in trunk, you will notice that after login, syncdameon is started but not connected.

To post a comment you must log in.
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
Eric Casteleijn (thisfred) wrote :

Looks good, and connects on adding the device.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ubuntuone/controlpanel/gtk/gui.py'
--- ubuntuone/controlpanel/gtk/gui.py 2011-03-22 19:14:37 +0000
+++ ubuntuone/controlpanel/gtk/gui.py 2011-03-25 20:53:25 +0000
@@ -1507,13 +1507,14 @@
1507 self._update_quota(msg='')1507 self._update_quota(msg='')
15081508
15091509
1510class ControlPanel(gtk.Notebook):1510class ControlPanel(gtk.Notebook, ControlPanelMixin):
1511 """The control panel per se, can be added into any other widget."""1511 """The control panel per se, can be added into any other widget."""
15121512
1513 # should not be any larger than 736x5251513 # should not be any larger than 736x525
15141514
1515 def __init__(self, main_window):1515 def __init__(self, main_window):
1516 gtk.Notebook.__init__(self)1516 gtk.Notebook.__init__(self)
1517 ControlPanelMixin.__init__(self)
1517 gtk.link_button_set_uri_hook(uri_hook)1518 gtk.link_button_set_uri_hook(uri_hook)
15181519
1519 self.main_window = main_window1520 self.main_window = main_window
@@ -1550,6 +1551,9 @@
1550 if credentials_are_new:1551 if credentials_are_new:
1551 # redirect user to services page to start using Ubuntu One1552 # redirect user to services page to start using Ubuntu One
1552 self.management.services_button.clicked()1553 self.management.services_button.clicked()
1554 # instruct syncdaemon to connect
1555 self.backend.connect_files(reply_handler=NO_OP,
1556 error_handler=error_handler)
15531557
1554 self.next_page()1558 self.next_page()
15551559
15561560
=== modified file 'ubuntuone/controlpanel/gtk/tests/test_gui_basic.py'
--- ubuntuone/controlpanel/gtk/tests/test_gui_basic.py 2011-03-23 14:40:16 +0000
+++ ubuntuone/controlpanel/gtk/tests/test_gui_basic.py 2011-03-25 20:53:25 +0000
@@ -179,7 +179,7 @@
179179
180 self.assert_current_tab_correct(self.ui.management)180 self.assert_current_tab_correct(self.ui.management)
181181
182 def test_credentials_found_shows_dashboard_management_panel(self):182 def test_credentials_found_shows_dashboard_panel(self):
183 """On 'credentials-found' signal, the management panel is shown.183 """On 'credentials-found' signal, the management panel is shown.
184184
185 If first signal parameter is False, visible tab should be dashboard.185 If first signal parameter is False, visible tab should be dashboard.
@@ -193,7 +193,7 @@
193 self.ui.management.DASHBOARD_PAGE)193 self.ui.management.DASHBOARD_PAGE)
194 self.assertEqual(self._called, ((), {}))194 self.assertEqual(self._called, ((), {}))
195195
196 def test_credentials_found_shows_volumes_management_panel(self):196 def test_credentials_found_shows_services_panel(self):
197 """On 'credentials-found' signal, the management panel is shown.197 """On 'credentials-found' signal, the management panel is shown.
198198
199 If first signal parameter is True, visible tab should be services.199 If first signal parameter is True, visible tab should be services.
@@ -206,6 +206,12 @@
206 self.assertEqual(self.ui.management.notebook.get_current_page(),206 self.assertEqual(self.ui.management.notebook.get_current_page(),
207 self.ui.management.SERVICES_PAGE)207 self.ui.management.SERVICES_PAGE)
208208
209 def test_credentials_found_connects_syncdaemon(self):
210 """On 'credentials-found' signal, ask syncdaemon to connect."""
211 # credentials are new
212 self.ui.overview.emit('credentials-found', True, object())
213 self.assert_backend_called('connect_files', ())
214
209 def test_local_device_removed_shows_overview_panel(self):215 def test_local_device_removed_shows_overview_panel(self):
210 """On 'local-device-removed' signal, the overview panel is shown."""216 """On 'local-device-removed' signal, the overview panel is shown."""
211 self.ui.overview.emit('credentials-found', True, object())217 self.ui.overview.emit('credentials-found', True, object())

Subscribers

People subscribed via source and target branches