Finish last commit, forgot to revert some of the files.
This commit is contained in:
parent
63fa5bf85b
commit
1c7676bfe5
|
@ -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():
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue