diff --git a/ChangeLog b/ChangeLog index 3e15077ee..49456bd69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ Deluge 0.5.7 (xx November 2007) list or wrong type * Local discovery of peers * Add torrent in paused state option + * Fix bug where loaded plugins were forgotten if Deluge crashed * Fix ratio bugs (hopefully for the last time) * Scheduler plugin revamp by Ben Klein * Fix ETA from going backwards diff --git a/src/interface.py b/src/interface.py index 16c765d4d..1166ab62d 100644 --- a/src/interface.py +++ b/src/interface.py @@ -1662,9 +1662,6 @@ want to remove all seeding torrents?")): self.save_column_widths() self.save_window_settings() self.save_tabs_order() - enabled_plugins = ':'.join(self.plugins.get_enabled_plugins()) - self.config.set('enabled_plugins', enabled_plugins) - self.config.save() self.plugins.shutdown_all_plugins() #for the sake of windows, hide tray_icon self.tray_icon.set_visible(False) diff --git a/src/plugins.py b/src/plugins.py index 941394015..822e5fbe2 100644 --- a/src/plugins.py +++ b/src/plugins.py @@ -74,6 +74,9 @@ class PluginManager: def enable_plugin(self, name): plugin = self.available_plugins[name] self.enabled_plugins[name] = plugin.enable(self.core, self.interface) + enabled_plugins = ':'.join(self.get_enabled_plugins()) + self.interface.config.set('enabled_plugins', enabled_plugins) + self.interface.config.save() def get_enabled_plugins(self): return self.enabled_plugins.keys() @@ -83,7 +86,10 @@ class PluginManager: if 'unload' in dir(plugin): plugin.unload() del self.enabled_plugins[name] - + enabled_plugins = ':'.join(self.get_enabled_plugins()) + self.interface.config.set('enabled_plugins', enabled_plugins) + self.interface.config.save() + def configurable_plugin(self, name): if name in self.enabled_plugins: return 'configure' in dir(self.enabled_plugins[name])