diff options
author | hut <hut@lepus.uberspace.de> | 2016-06-21 00:47:31 +0200 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2016-06-21 00:47:31 +0200 |
commit | 319be03a88fa48364bd791cd6bc6825f6391abb8 (patch) | |
tree | 384b358bc70c77408991f4cff2ed8ae946377355 /ranger | |
parent | 904d3df13a96c2ded55919ff2a3ed873b8da3c9e (diff) | |
download | ranger-319be03a88fa48364bd791cd6bc6825f6391abb8.tar.gz |
core.loader: added signals 'loader.{before,after,destroy}'
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/loader.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ranger/core/loader.py b/ranger/core/loader.py index aebd6efe..00dff6ae 100644 --- a/ranger/core/loader.py +++ b/ranger/core/loader.py @@ -305,6 +305,7 @@ class Loader(FileManagerAware): self.queue.append(obj) else: self.queue.appendleft(obj) + self.fm.signal_emit("loader.before", loadable=obj, fm=self.fm) if self.paused: obj.pause() else: @@ -341,6 +342,7 @@ class Loader(FileManagerAware): item = self.queue[index] if hasattr(item, 'unload'): item.unload() + self.fm.signal_emit("loader.destroy", loadable=item, fm=self.fm) item.destroy() del self.queue[index] if item.progressbar_supported: @@ -408,6 +410,7 @@ class Loader(FileManagerAware): def _remove_current_process(self, item): item.load_generator = None self.queue.remove(item) + self.fm.signal_emit("loader.after", loadable=item, fm=self.fm) if item.progressbar_supported: self.fm.ui.status.request_redraw() |