summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-10-08 19:33:22 +0200
committerhut <hut@lavabit.com>2011-10-08 19:33:22 +0200
commit027ded1507f17b3b8d732a1806d8fccec1aaf4ff (patch)
tree2d0fdf62b3dd2e3a01f8c6fe2ed3b95aebd1aed3
parent7dc8fef89688b92ff03ec8005e57286751d0c539 (diff)
downloadranger-027ded1507f17b3b8d732a1806d8fccec1aaf4ff.tar.gz
defaults/apps: moved file chooser code to Actions.execute_file
-rw-r--r--ranger/core/actions.py5
-rw-r--r--ranger/defaults/apps.py5
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')
 
/mu/blame/cpp/015jump?h=hlt&id=c7c822b27aac56de1e44555c9c2366ac6bbf13f2'>^
795f5244 ^
d855b0a0 ^
f2818edc ^
d855b0a0 ^
2b250717 ^
e4630643 ^

4f5bb5b6 ^
2b250717 ^
e4630643 ^

f7d3dc0e ^



d855b0a0 ^



dc1323e9 ^
1066660e ^
cdd6fd09 ^
59874868 ^



f2818edc ^

6f8f9fb5 ^

795f5244 ^
f2818edc ^
88be3dbc ^
1ead3562 ^
100157d1 ^
d7494165 ^
100157d1 ^


acc4792d ^


201b2e6c ^
f7d3dc0e ^






1848b18f ^

201b2e6c ^
795f5244 ^
d855b0a0 ^
201b2e6c ^
d855b0a0 ^
2b250717 ^
e4630643 ^

23d3a022 ^
2b250717 ^
e4630643 ^

4f5bb5b6 ^
2b250717 ^
e4630643 ^

f7d3dc0e ^



4f5bb5b6 ^
d855b0a0 ^



dc1323e9 ^
23d3a022 ^
cdd6fd09 ^
201b2e6c ^

1066660e ^
cdd6fd09 ^
59874868 ^



201b2e6c ^

88be3dbc ^
1ead3562 ^
bc643692 ^
192d59d3 ^
201b2e6c ^
acc4792d ^
201b2e6c ^
23d3a022 ^
d7494165 ^
201b2e6c ^
88be3dbc ^
1ead3562 ^
bc643692 ^
192d59d3 ^
201b2e6c ^
acc4792d ^
201b2e6c ^
acc4792d ^
57699011 ^
201b2e6c ^
23d3a022 ^










1848b18f ^

201b2e6c ^
795f5244 ^
d855b0a0 ^
201b2e6c ^
d855b0a0 ^
2b250717 ^
e4630643 ^

23d3a022 ^
2b250717 ^
e4630643 ^

4f5bb5b6 ^
2b250717 ^
e4630643 ^

f7d3dc0e ^



4f5bb5b6 ^
d855b0a0 ^



dc1323e9 ^
23d3a022 ^
cdd6fd09 ^
201b2e6c ^

1066660e ^
cdd6fd09 ^
59874868 ^



201b2e6c ^

88be3dbc ^
1ead3562 ^
bc643692 ^
192d59d3 ^
201b2e6c ^
acc4792d ^
201b2e6c ^
acc4792d ^
d7494165 ^
201b2e6c ^
88be3dbc ^
1ead3562 ^
bc643692 ^
192d59d3 ^
201b2e6c ^
acc4792d ^
201b2e6c ^
acc4792d ^
57699011 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194