MultiProject/AddProjectDialog.py

branch
5_4_x
changeset 3639
5234afd7a6d7
parent 3160
209a07d7e401
equal deleted inserted replaced
3637:5ac63ebd5c4e 3639:5234afd7a6d7
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the add project dialog. 7 Module implementing the add project dialog.
8 """ 8 """
9
10 import os
9 11
10 from PyQt4.QtCore import pyqtSlot 12 from PyQt4.QtCore import pyqtSlot
11 from PyQt4.QtGui import QDialog, QDialogButtonBox 13 from PyQt4.QtGui import QDialog, QDialogButtonBox
12 14
13 from E5Gui.E5Completers import E5FileCompleter 15 from E5Gui.E5Completers import E5FileCompleter
76 @return tuple of four values (string, string, boolean, string) giving 78 @return tuple of four values (string, string, boolean, string) giving
77 the project name, the name of the project file, a flag telling, 79 the project name, the name of the project file, a flag telling,
78 whether the project shall be the main project and a short 80 whether the project shall be the main project and a short
79 description for the project 81 description for the project
80 """ 82 """
81 return (self.nameEdit.text(), self.filenameEdit.text(), 83 filename = Utilities.toNativeSeparators(self.filenameEdit.text())
84 if not os.path.isabs(filename):
85 filename = Utilities.toNativeSeparators(
86 os.path.join(self.startdir, filename))
87
88 return (self.nameEdit.text(), filename,
82 self.masterCheckBox.isChecked(), 89 self.masterCheckBox.isChecked(),
83 self.descriptionEdit.toPlainText()) 90 self.descriptionEdit.toPlainText())
84 91
85 @pyqtSlot(str) 92 @pyqtSlot(str)
86 def on_nameEdit_textChanged(self, txt): 93 def on_nameEdit_textChanged(self, txt):

eric ide

mercurial