130 if hasattr(module, "prepareUninstall"): |
130 if hasattr(module, "prepareUninstall"): |
131 module.prepareUninstall() |
131 module.prepareUninstall() |
132 internalPackages = [] |
132 internalPackages = [] |
133 if hasattr(module, "internalPackages"): |
133 if hasattr(module, "internalPackages"): |
134 # it is a comma separated string |
134 # it is a comma separated string |
135 internalPackages = [p.strip() for p in |
135 internalPackages = [p.strip() for p in |
136 module.internalPackages.split(",")] |
136 module.internalPackages.split(",")] |
137 del module |
137 del module |
138 |
138 |
139 # clean sys.modules |
139 # clean sys.modules |
140 self.__pluginManager.removePluginFromSysModules( |
140 self.__pluginManager.removePluginFromSysModules( |
181 ui.showNotification( |
181 ui.showNotification( |
182 UI.PixmapCache.getPixmap("plugin48.png"), |
182 UI.PixmapCache.getPixmap("plugin48.png"), |
183 self.trUtf8("Plugin Uninstallation"), |
183 self.trUtf8("Plugin Uninstallation"), |
184 self.trUtf8( |
184 self.trUtf8( |
185 """<p>The plugin <b>{0}</b> was uninstalled""" |
185 """<p>The plugin <b>{0}</b> was uninstalled""" |
186 """ successfully from {1}.</p>""")\ |
186 """ successfully from {1}.</p>""") |
187 .format(pluginName, pluginDirectory)) |
187 .format(pluginName, pluginDirectory)) |
188 return True |
188 return True |
189 |
189 |
190 E5MessageBox.information( |
190 E5MessageBox.information( |
191 self, |
191 self, |
192 self.trUtf8("Plugin Uninstallation"), |
192 self.trUtf8("Plugin Uninstallation"), |
193 self.trUtf8( |
193 self.trUtf8( |
194 """<p>The plugin <b>{0}</b> was uninstalled successfully""" |
194 """<p>The plugin <b>{0}</b> was uninstalled successfully""" |
195 """ from {1}.</p>""")\ |
195 """ from {1}.</p>""") |
196 .format(pluginName, pluginDirectory)) |
196 .format(pluginName, pluginDirectory)) |
197 return True |
197 return True |
198 |
198 |
199 |
199 |
200 class PluginUninstallDialog(QDialog): |
200 class PluginUninstallDialog(QDialog): |