Plugins/VcsPlugins/vcsMercurial/HgImportDialog.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3190
a9a94491c4fd
child 3656
441956d8fce5
equal deleted inserted replaced
3456:96232974dcdb 3484:645c12de6b0c
16 from E5Gui.E5Completers import E5FileCompleter 16 from E5Gui.E5Completers import E5FileCompleter
17 17
18 from .Ui_HgImportDialog import Ui_HgImportDialog 18 from .Ui_HgImportDialog import Ui_HgImportDialog
19 19
20 import Utilities 20 import Utilities
21 import UI.PixmapCache
21 22
22 23
23 class HgImportDialog(QDialog, Ui_HgImportDialog): 24 class HgImportDialog(QDialog, Ui_HgImportDialog):
24 """ 25 """
25 Class implementing a dialog to enter data for the Mercurial import command. 26 Class implementing a dialog to enter data for the Mercurial import command.
30 31
31 @param parent reference to the parent widget (QWidget) 32 @param parent reference to the parent widget (QWidget)
32 """ 33 """
33 super(HgImportDialog, self).__init__(parent) 34 super(HgImportDialog, self).__init__(parent)
34 self.setupUi(self) 35 self.setupUi(self)
36
37 self.patchFileButton.setIcon(UI.PixmapCache.getIcon("open.png"))
35 38
36 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) 39 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
37 40
38 self.__patchFileCompleter = E5FileCompleter(self.patchFileEdit) 41 self.__patchFileCompleter = E5FileCompleter(self.patchFileEdit)
39 42
64 """ 67 """
65 Private slot called by pressing the file selection button. 68 Private slot called by pressing the file selection button.
66 """ 69 """
67 fn = E5FileDialog.getOpenFileName( 70 fn = E5FileDialog.getOpenFileName(
68 self, 71 self,
69 self.trUtf8("Select patch file"), 72 self.tr("Select patch file"),
70 self.patchFileEdit.text(), 73 self.patchFileEdit.text(),
71 self.trUtf8("Patch Files (*.diff *.patch);;All Files (*)")) 74 self.tr("Patch Files (*.diff *.patch);;All Files (*)"))
72 75
73 if fn: 76 if fn:
74 self.patchFileEdit.setText(Utilities.toNativeSeparators(fn)) 77 self.patchFileEdit.setText(Utilities.toNativeSeparators(fn))
75 78
76 def getParameters(self): 79 def getParameters(self):

eric ide

mercurial