Merge lp:~ralsina/ubuntuone-windows-installer/select-by-default into lp:ubuntuone-windows-installer

Proposed by Roberto Alsina
Status: Merged
Approved by: Roberto Alsina
Approved revision: 62
Merged at revision: 64
Proposed branch: lp:~ralsina/ubuntuone-windows-installer/select-by-default
Merge into: lp:ubuntuone-windows-installer
Diff against target: 31 lines (+12/-1)
2 files modified
ubuntuone_installer/gui/qt/local_folders.py (+3/-1)
ubuntuone_installer/gui/qt/tests/test_local_folders.py (+9/-0)
To merge this branch: bzr merge lp:~ralsina/ubuntuone-windows-installer/select-by-default
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Review via email: mp+75103@code.launchpad.net

Commit message

If the user manually adds a UDF, start with that UDF selected.

Description of the change

If the user manually adds a UDF, start with that UDF selected.

To test IRL:

* Start the installer.
* In the computer-to-cloud page, choose a valid UDF
* It should appear "checked"

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Code looks good!

Could you please share instructions how to test this IRL? Thanks!

review: Needs Information
Revision history for this message
Roberto Alsina (ralsina) wrote :

> Code looks good!
>
> Could you please share instructions how to test this IRL? Thanks!

Sure! added to the MP.

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Looks good and works ok, though I found bug #848981 in the process (will be fixed on a separated branch).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone_installer/gui/qt/local_folders.py'
2--- ubuntuone_installer/gui/qt/local_folders.py 2011-09-12 17:05:18 +0000
3+++ ubuntuone_installer/gui/qt/local_folders.py 2011-09-13 02:14:41 +0000
4@@ -302,4 +302,6 @@
5 'home_folder': user_home}
6 QtGui.QMessageBox.warning(self, '', text, QtGui.QMessageBox.Close)
7 return
8- yield self.add_folder(folder, validate=False, volume_id=False)
9+ item = yield self.add_folder(folder, validate=False, volume_id=False)
10+ if item is not None:
11+ item.setCheckState(0, QtCore.Qt.Checked)
12
13=== modified file 'ubuntuone_installer/gui/qt/tests/test_local_folders.py'
14--- ubuntuone_installer/gui/qt/tests/test_local_folders.py 2011-09-12 17:31:03 +0000
15+++ ubuntuone_installer/gui/qt/tests/test_local_folders.py 2011-09-13 02:14:41 +0000
16@@ -449,6 +449,15 @@
17 self.assertEqual(self._called,
18 ((u'c:\\whatever',), {'validate': False, 'volume_id': False}))
19
20+ @defer.inlineCallbacks
21+ def test_add_folder_valid_starts_selected(self):
22+ """When adding a valid folder, it starts as selected."""
23+ self.patch(QtGui, "QFileDialog", FakeFileDialog())
24+ yield self.ui.on_add_folder_button_clicked()
25+ self.assertEqual(
26+ self.ui.items[u'c:\\whatever'].checkState(0),
27+ QtCore.Qt.Checked)
28+
29 def test_add_folder_clicked_invalid(self):
30 """Test behaviour when adding an invalid folder via the button."""
31 self.patch(QtGui, "QFileDialog", FakeFileDialog())

Subscribers

People subscribed via source and target branches