67 Private slot to populate the plugin name combo upon a change of the |
67 Private slot to populate the plugin name combo upon a change of the |
68 plugin area. |
68 plugin area. |
69 |
69 |
70 @param index index of the selected item (integer) |
70 @param index index of the selected item (integer) |
71 """ |
71 """ |
72 pluginDirectory = self.pluginDirectoryCombo\ |
72 pluginDirectory = self.pluginDirectoryCombo.itemData(index) |
73 .itemData(index) |
|
74 pluginNames = sorted(self.__pluginManager.getPluginModules( |
73 pluginNames = sorted(self.__pluginManager.getPluginModules( |
75 pluginDirectory)) |
74 pluginDirectory)) |
76 self.pluginNameCombo.clear() |
75 self.pluginNameCombo.clear() |
77 for pluginName in pluginNames: |
76 for pluginName in pluginNames: |
78 fname = "{0}.py".format(os.path.join(pluginDirectory, pluginName)) |
77 fname = "{0}.py".format(os.path.join(pluginDirectory, pluginName)) |
93 Private slot to uninstall the selected plugin. |
92 Private slot to uninstall the selected plugin. |
94 |
93 |
95 @return flag indicating success (boolean) |
94 @return flag indicating success (boolean) |
96 """ |
95 """ |
97 pluginDirectory = self.pluginDirectoryCombo\ |
96 pluginDirectory = self.pluginDirectoryCombo\ |
98 .itemData(self.pluginDirectoryCombo.currentIndex()) |
97 .itemData(self.pluginDirectoryCombo.currentIndex()) |
99 pluginName = self.pluginNameCombo.currentText() |
98 pluginName = self.pluginNameCombo.currentText() |
100 pluginFile = self.pluginNameCombo\ |
99 pluginFile = self.pluginNameCombo\ |
101 .itemData(self.pluginNameCombo.currentIndex()) |
100 .itemData(self.pluginNameCombo.currentIndex()) |
102 |
101 |
103 if not self.__pluginManager.unloadPlugin(pluginName): |
102 if not self.__pluginManager.unloadPlugin(pluginName): |
104 E5MessageBox.critical( |
103 E5MessageBox.critical( |
105 self, |
104 self, |
106 self.trUtf8("Plugin Uninstallation"), |
105 self.trUtf8("Plugin Uninstallation"), |
191 self, |
190 self, |
192 self.trUtf8("Plugin Uninstallation"), |
191 self.trUtf8("Plugin Uninstallation"), |
193 self.trUtf8( |
192 self.trUtf8( |
194 """<p>The plugin <b>{0}</b> was uninstalled successfully""" |
193 """<p>The plugin <b>{0}</b> was uninstalled successfully""" |
195 """ from {1}.</p>""") |
194 """ from {1}.</p>""") |
196 .format(pluginName, pluginDirectory)) |
195 .format(pluginName, pluginDirectory)) |
197 return True |
196 return True |
198 |
197 |
199 |
198 |
200 class PluginUninstallDialog(QDialog): |
199 class PluginUninstallDialog(QDialog): |
201 """ |
200 """ |