--- a/Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/LfConvertDataDialog.py Sun Nov 29 17:25:42 2015 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/LfConvertDataDialog.py Sun Nov 29 19:29:34 2015 +0100 @@ -14,15 +14,13 @@ from PyQt5.QtCore import pyqtSlot from PyQt5.QtWidgets import QDialog, QDialogButtonBox -from E5Gui import E5FileDialog -from E5Gui.E5Completers import E5DirCompleter +from E5Gui.E5PathPicker import E5PathPickerModes from .Ui_LfConvertDataDialog import Ui_LfConvertDataDialog from . import getDefaults import Utilities -import UI.PixmapCache class LfConvertDataDialog(QDialog, Ui_LfConvertDataDialog): @@ -40,15 +38,13 @@ super(LfConvertDataDialog, self).__init__(parent) self.setupUi(self) - self.newProjectButton.setIcon(UI.PixmapCache.getIcon("open.png")) - - self.__newProjectCompleter = E5DirCompleter(self.newProjectEdit) + self.newProjectPicker.setMode(E5PathPickerModes.DirectoryMode) self.__defaults = getDefaults() self.__currentPath = Utilities.toNativeSeparators(currentPath) self.currentProjectLabel.setPath(currentPath) - self.newProjectEdit.setText(os.path.dirname(currentPath)) + self.newProjectPicker.setText(os.path.dirname(currentPath)) self.lfFileSizeSpinBox.setValue(self.__defaults["minsize"]) self.lfFilePatternsEdit.setText(" ".join(self.__defaults["pattern"])) @@ -61,7 +57,7 @@ self.resize(max(self.width(), msh.width()), msh.height()) @pyqtSlot(str) - def on_newProjectEdit_textChanged(self, txt): + def on_newProjectPicker_textChanged(self, txt): """ Private slot to handle editing of the new project directory. @@ -71,22 +67,6 @@ txt and Utilities.toNativeSeparators(txt) != os.path.dirname( self.__currentPath)) - @pyqtSlot() - def on_newProjectButton_clicked(self): - """ - Private slot to select the new project directory name via a directory - selection dialog. - """ - directory = Utilities.fromNativeSeparators(self.newProjectEdit.text()) - directory = E5FileDialog.getExistingDirectory( - self, - self.tr("New Project Directory"), - directory, - E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) - if directory: - self.newProjectEdit.setText( - Utilities.toNativeSeparators(directory)) - def getData(self): """ Public method to retrieve the entered data. @@ -99,7 +79,7 @@ patterns = [] return ( - Utilities.toNativeSeparators(self.newProjectEdit.text()), + self.newProjectPicker.text(), self.lfFileSizeSpinBox.value(), patterns, )