Sat, 10 May 2025 10:45:03 +0200
Modified the 'eric Plug-in' wizard slightly and corrected a typo in one of its code templates.
--- a/src/eric7/Documentation/Source/eric7.Plugins.WizardPlugins.EricPluginWizard.Templates.html Sat May 10 10:26:27 2025 +0200 +++ b/src/eric7/Documentation/Source/eric7.Plugins.WizardPlugins.EricPluginWizard.Templates.html Sat May 10 10:45:03 2025 +0200 @@ -35,7 +35,7 @@ </tr> <tr> <td><a href="#deactivate">deactivate</a></td> -<td>Function to create the Translator configuration page.</td> +<td>Function to create the plug-in configuration page.</td> </tr> <tr> <td><a href="#getConfigData">getConfigData</a></td> @@ -104,7 +104,7 @@ <h2>deactivate</h2> <b>deactivate</b>(<i>self</i>) <p> - Function to create the Translator configuration page. + Function to create the plug-in configuration page. </p> <dl>
--- a/src/eric7/Plugins/WizardPlugins/EricPluginWizard/PluginWizardDialog.py Sat May 10 10:26:27 2025 +0200 +++ b/src/eric7/Plugins/WizardPlugins/EricPluginWizard/PluginWizardDialog.py Sat May 10 10:45:03 2025 +0200 @@ -26,8 +26,8 @@ installDependenciesTemplate, mainTemplate, moduleSetupTemplate, - onDemandTemplate, pluginTypeTemplate, + pluginTypeNameTemplate, previewPixmapTemplate, ) from .Ui_PluginWizardDialog import Ui_PluginWizardDialog @@ -186,21 +186,20 @@ templateData["config2"] = "" templateData["config3"] = "" + templateData["pluginType"] = ( + pluginTypeTemplate.format( + pluginType=self.pluginTypeCombo.currentText() + ) + if bool(self.pluginTypeCombo.currentText()) + else "" + ) + if self.autoActivateCheckBox.isChecked(): - templateData["onDemand"] = "" - templateData["pluginType"] = ( - pluginTypeTemplate.format( - pluginType=self.pluginTypeCombo.currentText() - ) - if bool(self.pluginTypeCombo.currentText()) - else "" - ) + templateData["pluginTypeName"] = "" else: - templateData["onDemand"] = onDemandTemplate.format( - pluginType=self.pluginTypeCombo.currentText(), + templateData["pluginTypeName"] = pluginTypeNameTemplate.format( pluginTypename=self.pluginTypeNameEdit.text(), ) - templateData["pluginType"] = "" if self.pixmapCheckBox.isChecked(): templateData["preview"] = previewPixmapTemplate
--- a/src/eric7/Plugins/WizardPlugins/EricPluginWizard/Templates.py Sat May 10 10:26:27 2025 +0200 +++ b/src/eric7/Plugins/WizardPlugins/EricPluginWizard/Templates.py Sat May 10 10:45:03 2025 +0200 @@ -28,7 +28,7 @@ "deactivateable": {deactivateable}, "version": "{version}", {pluginType}\ -{onDemand}\ +{pluginTypeName}\ "className": "{className}", "packageName": "{packageName}", "shortDescription": "{shortDescription}", @@ -92,7 +92,7 @@ configTemplate1 = '''def pageCreationFunction(configDlg): """ - Function to create the Translator configuration page. + Function to create the plug-in configuration page. @param configDlg reference to the configuration dialog @type ConfigurationWidget @@ -158,11 +158,10 @@ pass ''' -onDemandTemplate = """ "pluginType": "{pluginType}", - "pluginTypename": "{pluginTypename}", +pluginTypeTemplate = """ "pluginType": "{pluginType}", """ -pluginTypeTemplate = """ "pluginType": "{pluginType}", +pluginTypeNameTemplate = """ "pluginTypename": "{pluginTypename}", """ previewPixmapTemplate = '''def previewPix():