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
1=== modified file 'ubuntuone/controlpanel/gtk/gui.py'
2--- ubuntuone/controlpanel/gtk/gui.py 2011-03-22 19:14:37 +0000
3+++ ubuntuone/controlpanel/gtk/gui.py 2011-03-25 20:53:25 +0000
4@@ -1507,13 +1507,14 @@
5 self._update_quota(msg='')
6
7
8-class ControlPanel(gtk.Notebook):
9+class ControlPanel(gtk.Notebook, ControlPanelMixin):
10 """The control panel per se, can be added into any other widget."""
11
12 # should not be any larger than 736x525
13
14 def __init__(self, main_window):
15 gtk.Notebook.__init__(self)
16+ ControlPanelMixin.__init__(self)
17 gtk.link_button_set_uri_hook(uri_hook)
18
19 self.main_window = main_window
20@@ -1550,6 +1551,9 @@
21 if credentials_are_new:
22 # redirect user to services page to start using Ubuntu One
23 self.management.services_button.clicked()
24+ # instruct syncdaemon to connect
25+ self.backend.connect_files(reply_handler=NO_OP,
26+ error_handler=error_handler)
27
28 self.next_page()
29
30
31=== modified file 'ubuntuone/controlpanel/gtk/tests/test_gui_basic.py'
32--- ubuntuone/controlpanel/gtk/tests/test_gui_basic.py 2011-03-23 14:40:16 +0000
33+++ ubuntuone/controlpanel/gtk/tests/test_gui_basic.py 2011-03-25 20:53:25 +0000
34@@ -179,7 +179,7 @@
35
36 self.assert_current_tab_correct(self.ui.management)
37
38- def test_credentials_found_shows_dashboard_management_panel(self):
39+ def test_credentials_found_shows_dashboard_panel(self):
40 """On 'credentials-found' signal, the management panel is shown.
41
42 If first signal parameter is False, visible tab should be dashboard.
43@@ -193,7 +193,7 @@
44 self.ui.management.DASHBOARD_PAGE)
45 self.assertEqual(self._called, ((), {}))
46
47- def test_credentials_found_shows_volumes_management_panel(self):
48+ def test_credentials_found_shows_services_panel(self):
49 """On 'credentials-found' signal, the management panel is shown.
50
51 If first signal parameter is True, visible tab should be services.
52@@ -206,6 +206,12 @@
53 self.assertEqual(self.ui.management.notebook.get_current_page(),
54 self.ui.management.SERVICES_PAGE)
55
56+ def test_credentials_found_connects_syncdaemon(self):
57+ """On 'credentials-found' signal, ask syncdaemon to connect."""
58+ # credentials are new
59+ self.ui.overview.emit('credentials-found', True, object())
60+ self.assert_backend_called('connect_files', ())
61+
62 def test_local_device_removed_shows_overview_panel(self):
63 """On 'local-device-removed' signal, the overview panel is shown."""
64 self.ui.overview.emit('credentials-found', True, object())

Subscribers

People subscribed via source and target branches