Merge lp:~ralsina/ubuntuone-control-panel/fix_906541 into lp:ubuntuone-control-panel

Proposed by Roberto Alsina on 2011-12-26
Status: Merged
Approved by: Roberto Alsina on 2011-12-26
Approved revision: 249
Merged at revision: 247
Proposed branch: lp:~ralsina/ubuntuone-control-panel/fix_906541
Merge into: lp:ubuntuone-control-panel
Diff against target: 24 lines (+3/-1)
2 files modified
ubuntuone/controlpanel/gui/qt/addfolder.py (+2/-1)
ubuntuone/controlpanel/gui/qt/tests/test_addfolder.py (+1/-0)
To merge this branch: bzr merge lp:~ralsina/ubuntuone-control-panel/fix_906541
Reviewer Review Type Date Requested Status
Guillermo Gonzalez 2011-12-26 Approve on 2011-12-26
Review via email: mp+86911@code.launchpad.net

Commit Message

Make addfolder open the file dialog in $HOME instead of in the WD.

Description of the Change

Make addfolder open the file dialog in $HOME instead of in the WD.

To post a comment you must log in.
249. By Roberto Alsina on 2011-12-26

It's directory in PyQt, not dir

Guillermo Gonzalez (verterok) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/controlpanel/gui/qt/addfolder.py'
2--- ubuntuone/controlpanel/gui/qt/addfolder.py 2011-09-07 16:56:39 +0000
3+++ ubuntuone/controlpanel/gui/qt/addfolder.py 2011-12-26 19:49:23 +0000
4@@ -57,7 +57,8 @@
5 """The 'Sync another folder' button was clicked."""
6 # The options argument is because of LP: #835013
7 folder = QtGui.QFileDialog.getExistingDirectory(
8- parent=self, options=QtGui.QFileDialog.DontUseNativeDialog)
9+ parent=self, directory=os.path.expanduser('~'),
10+ options=QtGui.QFileDialog.DontUseNativeDialog)
11 folder = unicode(QtCore.QDir.toNativeSeparators(folder))
12 logger.debug('on_add_folder_button_clicked: user requested folder '
13 'creation for path %r', folder)
14
15=== modified file 'ubuntuone/controlpanel/gui/qt/tests/test_addfolder.py'
16--- ubuntuone/controlpanel/gui/qt/tests/test_addfolder.py 2011-10-05 16:35:59 +0000
17+++ ubuntuone/controlpanel/gui/qt/tests/test_addfolder.py 2011-12-26 19:49:23 +0000
18@@ -83,6 +83,7 @@
19 self.assertEqual(FakedFileDialog.args, ())
20 self.assertEqual(FakedFileDialog.kwargs, {
21 'options': gui.QtGui.QFileDialog.DontUseNativeDialog,
22+ 'directory': os.path.expanduser('~'),
23 'parent': self.ui,
24 })
25

Subscribers

People subscribed via source and target branches