Philipp Hörist pushed to branch master at gajim / gajim
Commits:
2 changed files:
Changes:
| ... | ... | @@ -96,6 +96,8 @@ def load_config(self) -> None: |
| 96 | 96 | self.config.load()
|
| 97 | 97 | |
| 98 | 98 | def __eq__(self, plugin: Any) -> bool:
|
| 99 | + if not isinstance(plugin, GajimPlugin):
|
|
| 100 | + return False
|
|
| 99 | 101 | return self.manifest.short_name == plugin.manifest.short_name
|
| 100 | 102 | |
| 101 | 103 | def __ne__(self, plugin: Any) -> bool:
|
| ... | ... | @@ -543,10 +543,12 @@ def deactivate_plugin(self, plugin: GajimPlugin) -> None: |
| 543 | 543 | |
| 544 | 544 | self._remove_events_handler_from_ged(plugin)
|
| 545 | 545 | self._remove_name_from_encryption_plugins(plugin)
|
| 546 | - self._unregister_modules_with_handlers(plugin)
|
|
| 547 | 546 | |
| 548 | - # removing plug-in from active plug-ins list
|
|
| 547 | + # deactivate() must be before _unregister_modules_with_handlers(),
|
|
| 548 | + # because plugin.deactivate() may want to use the module
|
|
| 549 | 549 | plugin.deactivate()
|
| 550 | + |
|
| 551 | + self._unregister_modules_with_handlers(plugin)
|
|
| 550 | 552 | self.active_plugins.remove(plugin)
|
| 551 | 553 | app.settings.set_plugin_setting(plugin.manifest.short_name,
|
| 552 | 554 | 'active',
|