src/eric7/Project/TranslationPropertiesDialog.py

branch
eric7
changeset 9426
e2a52d98ad20
parent 9413
80c06d472826
child 9473
3f23dbf37dbe
equal deleted inserted replaced
9425:b1707793e213 9426:e2a52d98ad20
48 self.exceptionCompleter = EricFileCompleter(self.exceptionEdit) 48 self.exceptionCompleter = EricFileCompleter(self.exceptionEdit)
49 49
50 self.initFilters() 50 self.initFilters()
51 if not new: 51 if not new:
52 self.initDialog() 52 self.initDialog()
53
54 if self.project.getProjectType() in ("PyQt6", "PyQt6C", "E7Plugin"):
55 self.exceptionsGroup.setEnabled(False)
56 self.exceptionsGroup.setVisible(False)
57
58 msh = self.minimumSizeHint()
59 self.resize(max(self.width(), msh.width()), msh.height())
53 60
54 def initFilters(self): 61 def initFilters(self):
55 """ 62 """
56 Public method to initialize the filters. 63 Public method to initialize the filters.
57 """ 64 """
70 ) 77 )
71 self.filters += self.tr("All Files (*)") 78 self.filters += self.tr("All Files (*)")
72 79
73 def initDialog(self): 80 def initDialog(self):
74 """ 81 """
75 Public method to initialize the dialogs data. 82 Public method to initialize the dialog's data.
76 """ 83 """
77 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False) 84 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False)
78 self.transPatternPicker.setText(self.project.pdata["TRANSLATIONPATTERN"]) 85 self.transPatternPicker.setText(self.project.pdata["TRANSLATIONPATTERN"])
79 self.transBinPathPicker.setText(self.project.pdata["TRANSLATIONSBINPATH"]) 86 self.transBinPathPicker.setText(self.project.pdata["TRANSLATIONSBINPATH"])
87 self.sourceStartPathEdit.setText(
88 self.project.pdata["TRANSLATIONSOURCESTARTPATH"]
89 )
80 self.exceptionsList.clear() 90 self.exceptionsList.clear()
81 for texcept in self.project.pdata["TRANSLATIONEXCEPTIONS"]: 91 if self.project.getProjectType() not in ("PyQt6", "PyQt6C", "E7Plugin"):
82 if texcept: 92 for texcept in self.project.pdata["TRANSLATIONEXCEPTIONS"]:
83 self.exceptionsList.addItem(texcept) 93 if texcept:
94 self.exceptionsList.addItem(texcept)
84 95
85 @pyqtSlot(str) 96 @pyqtSlot(str)
86 def on_transPatternPicker_pathSelected(self, path): 97 def on_transPatternPicker_pathSelected(self, path):
87 """ 98 """
88 Private slot handling the selection of a translation path. 99 Private slot handling the selection of a translation path.
210 self.project.pdata["TRANSLATIONSBINPATH"] = "" 221 self.project.pdata["TRANSLATIONSBINPATH"] = ""
211 exceptList = [] 222 exceptList = []
212 for i in range(self.exceptionsList.count()): 223 for i in range(self.exceptionsList.count()):
213 exceptList.append(self.exceptionsList.item(i).text()) 224 exceptList.append(self.exceptionsList.item(i).text())
214 self.project.pdata["TRANSLATIONEXCEPTIONS"] = exceptList[:] 225 self.project.pdata["TRANSLATIONEXCEPTIONS"] = exceptList[:]
226 self.project.pdata[
227 "TRANSLATIONSOURCESTARTPATH"
228 ] = self.sourceStartPathEdit.text()

eric ide

mercurial