diff options
author | hut <hut@lavabit.com> | 2011-10-08 19:33:22 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2011-10-08 19:33:22 +0200 |
commit | 027ded1507f17b3b8d732a1806d8fccec1aaf4ff (patch) | |
tree | 2d0fdf62b3dd2e3a01f8c6fe2ed3b95aebd1aed3 /ranger | |
parent | 7dc8fef89688b92ff03ec8005e57286751d0c539 (diff) | |
download | ranger-027ded1507f17b3b8d732a1806d8fccec1aaf4ff.tar.gz |
defaults/apps: moved file chooser code to Actions.execute_file
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/actions.py | 5 | ||||
-rw-r--r-- | ranger/defaults/apps.py | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 9f7321be..b382a684 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -222,6 +222,11 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): mode is a positive integer. Both flags and mode specify how the program is run.""" + # ranger can act as a file chooser when running with --choosefile=... + if ranger.arg.choosefile: + open(ranger.arg.choosefile, 'w').write(self.fm.env.cf.path) + raise SystemExit() + if isinstance(files, set): files = list(files) elif type(files) not in (list, tuple): diff --git a/ranger/defaults/apps.py b/ranger/defaults/apps.py index f889387d..2579f882 100644 --- a/ranger/defaults/apps.py +++ b/ranger/defaults/apps.py @@ -55,11 +55,6 @@ class CustomApplications(Applications): """How to determine the default application?""" f = c.file - # ranger can act as a file chooser when running with --choosefile=... - if ranger.arg.choosefile: - open(ranger.arg.choosefile, 'w').write(f.path) - raise SystemExit() - if f.basename.lower() == 'makefile': return self.either(c, 'make') |