eric6/PipInterface/PipFileSelectionDialog.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
equal deleted inserted replaced
8141:27f636beebad 8143:2c730d5fd177
64 self.filePicker.setToolTip(self.tr( 64 self.filePicker.setToolTip(self.tr(
65 "Press to select a file through a file selection dialog.")) 65 "Press to select a file through a file selection dialog."))
66 self.filePicker.setFilters(self.tr("All Files (*)")) 66 self.filePicker.setFilters(self.tr("All Files (*)"))
67 self.filePicker.setDefaultDirectory(os.path.expanduser("~")) 67 self.filePicker.setDefaultDirectory(os.path.expanduser("~"))
68 68
69 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) 69 self.buttonBox.button(
70 QDialogButtonBox.StandardButton.Ok).setEnabled(False)
70 71
71 self.userCheckBox.setVisible(install) 72 self.userCheckBox.setVisible(install)
72 73
73 msh = self.minimumSizeHint() 74 msh = self.minimumSizeHint()
74 self.resize(max(self.width(), msh.width()), msh.height()) 75 self.resize(max(self.width(), msh.width()), msh.height())
79 Private slot to handle entering the name of a file. 80 Private slot to handle entering the name of a file.
80 81
81 @param txt name of the file 82 @param txt name of the file
82 @type str 83 @type str
83 """ 84 """
84 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( 85 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(
85 bool(txt) and 86 bool(txt) and
86 os.path.exists(Utilities.toNativeSeparators(txt)) 87 os.path.exists(Utilities.toNativeSeparators(txt))
87 ) 88 )
88 89
89 def getData(self): 90 def getData(self):

eric ide

mercurial