diff options
author | hut <hut@lavabit.com> | 2011-10-30 01:20:39 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2011-10-30 01:22:13 +0200 |
commit | fdd390452b1937db7ba3ba7f30d0a6ece44ca02f (patch) | |
tree | 5bcab589ec0a7985bd841d5481e06d18543e74fe /ranger | |
parent | 0439e68883ae73b713761243a2611f3615ac3b5d (diff) | |
download | ranger-fdd390452b1937db7ba3ba7f30d0a6ece44ca02f.tar.gz |
core.runner: added "fm" attribute to Context, as documented
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/fm.py | 2 | ||||
-rw-r--r-- | ranger/core/runner.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ranger/core/fm.py b/ranger/core/fm.py index 59eb4e18..7ba07484 100644 --- a/ranger/core/fm.py +++ b/ranger/core/fm.py @@ -85,7 +85,7 @@ class FM(Actions, SignalDispatcher): def mylogfunc(text): self.notify(text, bad=True) self.run = Runner(ui=self.ui, apps=self.apps, - logfunc=mylogfunc) + logfunc=mylogfunc, fm=self) self.env.signal_bind('cd', self._update_current_tab) diff --git a/ranger/core/runner.py b/ranger/core/runner.py index 940f410e..8adf01d7 100644 --- a/ranger/core/runner.py +++ b/ranger/core/runner.py @@ -94,8 +94,9 @@ class Context(object): class Runner(object): - def __init__(self, ui=None, logfunc=None, apps=None): + def __init__(self, ui=None, logfunc=None, apps=None, fm=None): self.ui = ui + self.fm = fm self.logfunc = logfunc self.apps = apps self.zombies = set() @@ -132,7 +133,7 @@ class Runner(object): # creating a Context object and passing it to # an Application object. - context = Context(app=app, files=files, mode=mode, + context = Context(app=app, files=files, mode=mode, fm=self.fm, flags=flags, wait=wait, popen_kws=popen_kws, file=files and files[0] or None) |