CxFreeze/CxfreezeConfigDialog.py

changeset 39
27dcfe29985b
parent 36
aa766140aff8
child 43
122dd6b685f7
equal deleted inserted replaced
38:31dcf0f6b684 39:27dcfe29985b
10 import sys 10 import sys
11 import os 11 import os
12 import copy 12 import copy
13 13
14 from PyQt4.QtCore import pyqtSlot, QDir 14 from PyQt4.QtCore import pyqtSlot, QDir
15 from PyQt4.QtGui import QDialog, QFileDialog 15 from PyQt4.QtGui import QDialog
16 16
17 from E5Gui import E5FileDialog
17 from E5Gui.E5Completers import E5FileCompleter, E5DirCompleter 18 from E5Gui.E5Completers import E5FileCompleter, E5DirCompleter
18 19
19 from .Ui_CxfreezeConfigDialog import Ui_CxfreezeConfigDialog 20 from .Ui_CxfreezeConfigDialog import Ui_CxfreezeConfigDialog
20 21
21 import Utilities 22 import Utilities
214 Private slot to select the external list file. 215 Private slot to select the external list file.
215 216
216 It displays a file selection dialog to select the external list file, 217 It displays a file selection dialog to select the external list file,
217 the list of include modules is written to. 218 the list of include modules is written to.
218 """ 219 """
219 extList = QFileDialog.getOpenFileName( 220 extList = E5FileDialog.getOpenFileName(
220 self, 221 self,
221 self.trUtf8("Select external list file"), 222 self.trUtf8("Select external list file"),
222 self.extListFileEdit.text(), 223 self.extListFileEdit.text(),
223 "", 224 "")
224 QFileDialog.DontUseNativeDialog)
225 225
226 if extList: 226 if extList:
227 # make it relative, if it is in a subdirectory of the project path 227 # make it relative, if it is in a subdirectory of the project path
228 lf = Utilities.toNativeSeparators(extList) 228 lf = Utilities.toNativeSeparators(extList)
229 lf = self.project.getRelativePath(lf) 229 lf = self.project.getRelativePath(lf)
235 Private slot to select the target directory. 235 Private slot to select the target directory.
236 236
237 It displays a directory selection dialog to 237 It displays a directory selection dialog to
238 select the directory the files are written to. 238 select the directory the files are written to.
239 """ 239 """
240 directory = QFileDialog.getExistingDirectory( 240 directory = E5FileDialog.getExistingDirectory(
241 self, 241 self,
242 self.trUtf8("Select target directory"), 242 self.trUtf8("Select target directory"),
243 self.targetDirEdit.text(), 243 self.targetDirEdit.text(),
244 QFileDialog.Options(QFileDialog.ShowDirsOnly | 244 E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
245 QFileDialog.DontUseNativeDialog))
246 245
247 if directory: 246 if directory:
248 # make it relative, if it is a subdirectory of the project path 247 # make it relative, if it is a subdirectory of the project path
249 dn = Utilities.toNativeSeparators(directory) 248 dn = Utilities.toNativeSeparators(directory)
250 dn = self.project.getRelativePath(dn) 249 dn = self.project.getRelativePath(dn)

eric ide

mercurial