UI/FindFileNameDialog.py

changeset 3190
a9a94491c4fd
parent 3186
a05eff845522
child 3484
645c12de6b0c
equal deleted inserted replaced
3189:9a21c547de5f 3190:a9a94491c4fd
20 from .Ui_FindFileNameDialog import Ui_FindFileNameDialog 20 from .Ui_FindFileNameDialog import Ui_FindFileNameDialog
21 21
22 from Utilities import direntries 22 from Utilities import direntries
23 import Utilities 23 import Utilities
24 import UI.PixmapCache 24 import UI.PixmapCache
25
25 26
26 class FindFileNameDialog(QWidget, Ui_FindFileNameDialog): 27 class FindFileNameDialog(QWidget, Ui_FindFileNameDialog):
27 """ 28 """
28 Class implementing a dialog to search for files. 29 Class implementing a dialog to search for files.
29 30
52 self.searchDirCompleter = E5DirCompleter(self.searchDirEdit) 53 self.searchDirCompleter = E5DirCompleter(self.searchDirEdit)
53 54
54 self.fileList.headerItem().setText(self.fileList.columnCount(), "") 55 self.fileList.headerItem().setText(self.fileList.columnCount(), "")
55 56
56 self.stopButton = self.buttonBox.addButton( 57 self.stopButton = self.buttonBox.addButton(
57 self.trUtf8("Stop"), QDialogButtonBox.ActionRole) 58 self.tr("Stop"), QDialogButtonBox.ActionRole)
58 self.stopButton.setToolTip(self.trUtf8("Press to stop the search")) 59 self.stopButton.setToolTip(self.tr("Press to stop the search"))
59 self.stopButton.setEnabled(False) 60 self.stopButton.setEnabled(False)
60 self.buttonBox.button(QDialogButtonBox.Open).setToolTip( 61 self.buttonBox.button(QDialogButtonBox.Open).setToolTip(
61 self.trUtf8("Opens the selected file")) 62 self.tr("Opens the selected file"))
62 self.buttonBox.button(QDialogButtonBox.Open).setEnabled(False) 63 self.buttonBox.button(QDialogButtonBox.Open).setEnabled(False)
63 64
64 self.project = project 65 self.project = project
65 self.extsepLabel.setText(os.extsep) 66 self.extsepLabel.setText(os.extsep)
66 67
199 Private slot to handle the clicked signal of the search directory 200 Private slot to handle the clicked signal of the search directory
200 selection button. 201 selection button.
201 """ 202 """
202 searchDir = E5FileDialog.getExistingDirectory( 203 searchDir = E5FileDialog.getExistingDirectory(
203 None, 204 None,
204 self.trUtf8("Select search directory"), 205 self.tr("Select search directory"),
205 self.searchDirEdit.text(), 206 self.searchDirEdit.text(),
206 E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) 207 E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
207 208
208 if searchDir: 209 if searchDir:
209 self.searchDirEdit.setText(Utilities.toNativeSeparators(searchDir)) 210 self.searchDirEdit.setText(Utilities.toNativeSeparators(searchDir))

eric ide

mercurial