diff --git a/deluge/plugins/label/label/core.py b/deluge/plugins/label/label/core.py index 70846c1ab..63f8e7f6e 100644 --- a/deluge/plugins/label/label/core.py +++ b/deluge/plugins/label/label/core.py @@ -121,8 +121,7 @@ class Core(CorePluginBase): def disable(self): self.plugin.deregister_status_field("label") component.get("FilterManager").deregister_tree_field("label") - component.get("EventManager").deregister_event_handler("TorrentLoadedEvent", self.post_torrent_load_or_add) - component.get("EventManager").deregister_event_handler("TorrentAddedEvent", self.post_torrent_load_or_add) + component.get("EventManager").deregister_event_handler("TorrentAddedEvent", self.post_torrent_add) component.get("EventManager").deregister_event_handler("TorrentRemovedEvent", self.post_torrent_remove) def update(self): @@ -133,7 +132,7 @@ class Core(CorePluginBase): ## Plugin hooks ## def post_torrent_add(self, torrent_id, from_state): - log.debug("post_torrent_load_or_add") + log.debug("post_torrent_add") torrent = self.torrents[torrent_id] for label_id, options in self.labels.iteritems(): diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py index fc25b7108..637e5a510 100644 --- a/deluge/ui/gtkui/torrentview.py +++ b/deluge/ui/gtkui/torrentview.py @@ -257,8 +257,7 @@ class TorrentView(listview.ListView, component.Component): self.treeview.connect("key-press-event", self.on_key_press_event) client.register_event_handler("TorrentStateChangedEvent", self.on_torrentstatechanged_event) - client.register_event_handler("TorrentLoadedEvent", self.on_torrent_loaded_or_added_event) - client.register_event_handler("TorrentAddedEvent", self.on_torrent_loaded_or_added_event) + client.register_event_handler("TorrentAddedEvent", self.on_torrentadded_event) client.register_event_handler("TorrentRemovedEvent", self.on_torrentremoved_event) client.register_event_handler("SessionPausedEvent", self.on_sessionpaused_event) client.register_event_handler("SessionResumedEvent", self.on_sessionresumed_event) @@ -513,7 +512,7 @@ class TorrentView(listview.ListView, component.Component): def on_drag_drop(self, widget, drag_context, x, y, timestamp): widget.stop_emission("drag-drop") - def on_torrent_loaded_or_added_event(self, torrent_id): + def on_torrentadded_event(self, torrent_id, from_state): self.add_row(torrent_id) self.mark_dirty(torrent_id) diff --git a/deluge/ui/sessionproxy.py b/deluge/ui/sessionproxy.py index 938235531..37f804566 100644 --- a/deluge/ui/sessionproxy.py +++ b/deluge/ui/sessionproxy.py @@ -84,8 +84,7 @@ class SessionProxy(component.Component): def stop(self): client.deregister_event_handler("TorrentStateChangedEvent", self.on_torrent_state_changed) client.deregister_event_handler("TorrentRemovedEvent", self.on_torrent_removed) - client.deregister_event_handler("TorrentLoadedEvent", self.on_torrent_loaded_or_added) - client.deregister_event_handler("TorrentAddedEvent", self.on_torrent_loaded_or_added) + client.deregister_event_handler("TorrentAddedEvent", self.on_torrent_added) self.torrents = {} def create_status_dict(self, torrent_ids, keys):