about summary refs log tree commit diff stats
path: root/code/runcontext.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-06 17:51:46 +0200
committerhut <hut@lavabit.com>2009-07-06 17:51:46 +0200
commit3e69b03dc185e85e9c02cc360bc9cde7929be67d (patch)
treebccf574e97c83f11f61a34ff396fe9f11efb7e39 /code/runcontext.rb
parentf037fa4ba89527eff741b3889b70ecb84b0b83f0 (diff)
downloadranger-3e69b03dc185e85e9c02cc360bc9cde7929be67d.tar.gz
allow to set a preferred application at runcontexts
Diffstat (limited to 'code/runcontext.rb')
-rw-r--r--code/runcontext.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/code/runcontext.rb b/code/runcontext.rb
index d3a0b9d1..df9f3a81 100644
--- a/code/runcontext.rb
+++ b/code/runcontext.rb
@@ -33,21 +33,21 @@ class RunContext
 	end
 	## }}}
 
-	def initialize(files, mode=0, flags='')
+	def initialize(files, mode=nil, flags=nil, preferred_app=nil)
 		@mode = mode.to_i
 		if files.is_a? Array
 			@files = files.dup
 		else
 			@files = [files.dup]
 		end
-		self.flags = flags
+		self.flags = flags || ''
 		
 		@files.reject! {|file|
 			file.handler == nil or !file.exists?
 		}
 		@handlers = @files.map {|file| file.handler}
 		@paths = @files.map {|file| file.path}
-		@handler = @handlers.first
+		@handler = preferred_app || @handlers.first
 
 		@multi = (@files.size > 1 and @handlers.uniq.size == 1)
 
19-05-12 11:21:28 -0400 Implement :{next,prev}-field in compose view' href='/akspecs/aerc/commit/aerc.go?h=0.1.0&id=f37508a53980f38c530780650338797e81fe1e3c'>f37508a ^
577248f ^

5d0402a ^




fa04a1e ^
10dd23f ^


8126d82 ^





f42724c ^




aeb7005
648ca98 ^



a21afda ^




1767e4f ^
a21afda ^

f42724c ^
a0be5e8 ^
b275a39 ^

39c93d2 ^
60b351b ^
f406bf5 ^



b60999c ^
8126d82 ^



b275a39 ^
8126d82 ^




de122b1 ^
8126d82 ^





f406bf5 ^
8126d82 ^
b60999c ^

f406bf5 ^
77a0f68 ^


1418e1b ^
60b351b ^
de122b1 ^
a15ea01 ^


1418e1b ^
661e3ec ^

305446a ^
6394e38 ^
aeb7005
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