src/eric7/Project/TranslationPropertiesDialog.py

branch
eric7
changeset 9426
e2a52d98ad20
parent 9413
80c06d472826
child 9473
3f23dbf37dbe
--- a/src/eric7/Project/TranslationPropertiesDialog.py	Thu Oct 20 08:23:37 2022 +0200
+++ b/src/eric7/Project/TranslationPropertiesDialog.py	Thu Oct 20 10:22:41 2022 +0200
@@ -51,6 +51,13 @@
         if not new:
             self.initDialog()
 
+        if self.project.getProjectType() in ("PyQt6", "PyQt6C", "E7Plugin"):
+            self.exceptionsGroup.setEnabled(False)
+            self.exceptionsGroup.setVisible(False)
+
+            msh = self.minimumSizeHint()
+            self.resize(max(self.width(), msh.width()), msh.height())
+
     def initFilters(self):
         """
         Public method to initialize the filters.
@@ -72,15 +79,19 @@
 
     def initDialog(self):
         """
-        Public method to initialize the dialogs data.
+        Public method to initialize the dialog's data.
         """
         self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False)
         self.transPatternPicker.setText(self.project.pdata["TRANSLATIONPATTERN"])
         self.transBinPathPicker.setText(self.project.pdata["TRANSLATIONSBINPATH"])
+        self.sourceStartPathEdit.setText(
+            self.project.pdata["TRANSLATIONSOURCESTARTPATH"]
+        )
         self.exceptionsList.clear()
-        for texcept in self.project.pdata["TRANSLATIONEXCEPTIONS"]:
-            if texcept:
-                self.exceptionsList.addItem(texcept)
+        if self.project.getProjectType() not in ("PyQt6", "PyQt6C", "E7Plugin"):
+            for texcept in self.project.pdata["TRANSLATIONEXCEPTIONS"]:
+                if texcept:
+                    self.exceptionsList.addItem(texcept)
 
     @pyqtSlot(str)
     def on_transPatternPicker_pathSelected(self, path):
@@ -212,3 +223,6 @@
         for i in range(self.exceptionsList.count()):
             exceptList.append(self.exceptionsList.item(i).text())
         self.project.pdata["TRANSLATIONEXCEPTIONS"] = exceptList[:]
+        self.project.pdata[
+            "TRANSLATIONSOURCESTARTPATH"
+        ] = self.sourceStartPathEdit.text()

eric ide

mercurial