--- a/ProjectFlask/FlaskBabelExtension/PyBabelProjectExtension.py Sat Dec 23 17:08:59 2023 +0100 +++ b/ProjectFlask/FlaskBabelExtension/PyBabelProjectExtension.py Mon Oct 28 17:11:28 2024 +0100 @@ -40,13 +40,14 @@ @type ProjectFlaskPlugin @param project reference to the project object @type Project - @param parent parent - @type QObject + @param parent reference to the parent widget + @type QWidget """ super().__init__(parent) self.__plugin = plugin self.__project = project + self.__ui = parent self.__ericProject = ericApp().getObject("Project") @@ -278,7 +279,7 @@ from .PyBabelConfigDialog import PyBabelConfigDialog config = self.__project.getData("flask-babel", "") - dlg = PyBabelConfigDialog(config) + dlg = PyBabelConfigDialog(config, parent=self.__ui) if dlg.exec() == QDialog.DialogCode.Accepted: config = dlg.getConfiguration() self.__project.setData("flask-babel", "", config) @@ -480,7 +481,10 @@ args += ["-o", os.path.relpath(potFile, workdir), "."] dlg = PyBabelCommandDialog( - self, title, msgSuccess=self.tr("\nMessages extracted successfully.") + self, + title, + msgSuccess=self.tr("\nMessages extracted successfully."), + parent=self.__ui, ) res = dlg.startCommand("extract", args, workdir) if res: @@ -516,6 +520,7 @@ self, title, msgSuccess=self.tr("\nMessage catalog initialized successfully."), + parent=self.__ui, ) res = dlg.startCommand("init", args, workdir) if res: @@ -551,6 +556,7 @@ self, title, msgSuccess=self.tr("\nMessage catalogs compiled successfully."), + parent=self.__ui, ) res = dlg.startCommand("compile", args, workdir) if res: @@ -606,6 +612,7 @@ self, title=title, msgSuccess=self.tr("\nMessage catalogs compiled successfully."), + parent=self.__ui, ) res = dlg.startBatchCommand(argsList, workdir) if res: @@ -651,6 +658,7 @@ self, title, msgSuccess=self.tr("\nMessage catalogs updated successfully."), + parent=self.__ui, ) res = dlg.startCommand("update", args, workdir) if res: @@ -714,6 +722,7 @@ self, title=title, msgSuccess=self.tr("\nMessage catalogs updated successfully."), + parent=self.__ui, ) res = dlg.startBatchCommand(argsList, workdir) if res: