eric6/Project/PropertiesDialog.py

changeset 7998
cd41c844862f
parent 7923
91e843545d9a
child 8047
b5594178c7fa
equal deleted inserted replaced
7997:2ca23396c25c 7998:cd41c844862f
14 14
15 from E5Gui.E5Application import e5App 15 from E5Gui.E5Application import e5App
16 from E5Gui.E5PathPicker import E5PathPickerModes 16 from E5Gui.E5PathPicker import E5PathPickerModes
17 17
18 from .Ui_PropertiesDialog import Ui_PropertiesDialog 18 from .Ui_PropertiesDialog import Ui_PropertiesDialog
19
20 from QScintilla.DocstringGenerator import getSupportedDocstringTypes
19 21
20 import Utilities 22 import Utilities
21 import Preferences 23 import Preferences
22 import UI.PixmapCache 24 import UI.PixmapCache
23 25
42 44
43 self.dirPicker.setMode(E5PathPickerModes.DirectoryMode) 45 self.dirPicker.setMode(E5PathPickerModes.DirectoryMode)
44 self.mainscriptPicker.setMode(E5PathPickerModes.OpenFileMode) 46 self.mainscriptPicker.setMode(E5PathPickerModes.OpenFileMode)
45 47
46 self.makeButton.setIcon(UI.PixmapCache.getIcon("makefile")) 48 self.makeButton.setIcon(UI.PixmapCache.getIcon("makefile"))
49
50 self.docstringStyleComboBox.addItem(self.tr("None"), "")
51 for docstringType, docstringStyle in sorted(
52 getSupportedDocstringTypes()
53 ):
54 self.docstringStyleComboBox.addItem(docstringStyle, docstringType)
47 55
48 self.project = project 56 self.project = project
49 self.newProject = new 57 self.newProject = new
50 self.transPropertiesDlg = None 58 self.transPropertiesDlg = None
51 self.spellPropertiesDlg = None 59 self.spellPropertiesDlg = None
120 self.tr("The project is not version controlled.")) 128 self.tr("The project is not version controlled."))
121 self.vcsInfoButton.hide() 129 self.vcsInfoButton.hide()
122 self.vcsCheckBox.hide() 130 self.vcsCheckBox.hide()
123 self.makeCheckBox.setChecked( 131 self.makeCheckBox.setChecked(
124 self.project.pdata["MAKEPARAMS"]["MakeEnabled"]) 132 self.project.pdata["MAKEPARAMS"]["MakeEnabled"])
133 cindex = self.docstringStyleComboBox.findData(
134 self.project.pdata["DOCSTRING"])
135 self.docstringStyleComboBox.setCurrentIndex(cindex)
125 else: 136 else:
126 self.languageComboBox.setCurrentIndex( 137 self.languageComboBox.setCurrentIndex(
127 self.languageComboBox.findText("Python3")) 138 self.languageComboBox.findText("Python3"))
128 self.projectTypeComboBox.setCurrentIndex( 139 self.projectTypeComboBox.setCurrentIndex(
129 self.projectTypeComboBox.findData("PyQt5")) 140 self.projectTypeComboBox.findData("PyQt5"))
316 self.project.pdata["MAKEPARAMS"]["MakeEnabled"] = ( 327 self.project.pdata["MAKEPARAMS"]["MakeEnabled"] = (
317 self.makeCheckBox.isChecked() 328 self.makeCheckBox.isChecked()
318 ) 329 )
319 if self.makePropertiesDlg is not None: 330 if self.makePropertiesDlg is not None:
320 self.makePropertiesDlg.storeData() 331 self.makePropertiesDlg.storeData()
332
333 self.project.pdata["DOCSTRING"] = (
334 self.docstringStyleComboBox.currentData()
335 )

eric ide

mercurial