80 pluginDirectory)) |
80 pluginDirectory)) |
81 self.pluginNameCombo.clear() |
81 self.pluginNameCombo.clear() |
82 for pluginName in pluginNames: |
82 for pluginName in pluginNames: |
83 fname = "{0}.py".format(os.path.join(pluginDirectory, pluginName)) |
83 fname = "{0}.py".format(os.path.join(pluginDirectory, pluginName)) |
84 self.pluginNameCombo.addItem(pluginName, fname) |
84 self.pluginNameCombo.addItem(pluginName, fname) |
85 self.buttonBox.button(QDialogButtonBox.Ok)\ |
85 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( |
86 .setEnabled(self.pluginNameCombo.currentText() != "") |
86 self.pluginNameCombo.currentText() != "") |
87 |
87 |
88 @pyqtSlot() |
88 @pyqtSlot() |
89 def on_buttonBox_accepted(self): |
89 def on_buttonBox_accepted(self): |
90 """ |
90 """ |
91 Private slot to handle the accepted signal of the button box. |
91 Private slot to handle the accepted signal of the button box. |
97 """ |
97 """ |
98 Private slot to uninstall the selected plugin. |
98 Private slot to uninstall the selected plugin. |
99 |
99 |
100 @return flag indicating success (boolean) |
100 @return flag indicating success (boolean) |
101 """ |
101 """ |
102 pluginDirectory = self.pluginDirectoryCombo\ |
102 pluginDirectory = self.pluginDirectoryCombo.itemData( |
103 .itemData(self.pluginDirectoryCombo.currentIndex()) |
103 self.pluginDirectoryCombo.currentIndex()) |
104 pluginName = self.pluginNameCombo.currentText() |
104 pluginName = self.pluginNameCombo.currentText() |
105 pluginFile = self.pluginNameCombo\ |
105 pluginFile = self.pluginNameCombo.itemData( |
106 .itemData(self.pluginNameCombo.currentIndex()) |
106 self.pluginNameCombo.currentIndex()) |
107 |
107 |
108 if not self.__pluginManager.unloadPlugin(pluginName): |
108 if not self.__pluginManager.unloadPlugin(pluginName): |
109 E5MessageBox.critical( |
109 E5MessageBox.critical( |
110 self, |
110 self, |
111 self.tr("Plugin Uninstallation"), |
111 self.tr("Plugin Uninstallation"), |
130 if package is None: |
130 if package is None: |
131 package = "None" |
131 package = "None" |
132 packageDir = "" |
132 packageDir = "" |
133 else: |
133 else: |
134 packageDir = os.path.join(pluginDirectory, package) |
134 packageDir = os.path.join(pluginDirectory, package) |
135 if hasattr(module, "prepareUninstall") and \ |
135 if ( |
136 not self.keepConfigurationCheckBox.isChecked(): |
136 hasattr(module, "prepareUninstall") and |
|
137 not self.keepConfigurationCheckBox.isChecked() |
|
138 ): |
137 module.prepareUninstall() |
139 module.prepareUninstall() |
138 internalPackages = [] |
140 internalPackages = [] |
139 if hasattr(module, "internalPackages"): |
141 if hasattr(module, "internalPackages"): |
140 # it is a comma separated string |
142 # it is a comma separated string |
141 internalPackages = [p.strip() for p in |
143 internalPackages = [p.strip() for p in |