summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2013-02-15 18:34:44 +0100
committerhut <hut@lavabit.com>2013-02-15 18:34:57 +0100
commita471b6e1a778112c857a10093c6ccf16070ed1e2 (patch)
tree2cde9a27bf2588374d996aa466d244deac58b191
parent9b065d0ac7ea3a26f73146b33e087e1ad35980f3 (diff)
downloadranger-a471b6e1a778112c857a10093c6ccf16070ed1e2.tar.gz
fsobject.directory: check for temporary_filter
this can be used in commands which temporarily filter the directory,
without disrupting the user-defined filter.
-rw-r--r--ranger/fsobject/directory.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index a71b00a9..0c4f10bd 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -41,6 +41,8 @@ def accept_file(fname, directory, hidden_filter, name_filter):
         return False
     if name_filter and name_filter not in fname:
         return False
+    if directory.temporary_filter and not directory.temporary_filter.search(fname):
+        return False
     return True
 
 class Directory(FileSystemObject, Accumulator, Loadable, SettingsAware):
@@ -54,6 +56,7 @@ class Directory(FileSystemObject, Accumulator, Loadable, SettingsAware):
     filenames = None
     files = None
     filter = None
+    temporary_filter = None
     marked_items = None
     scroll_begin = 0
 
>bc643692 ^
c76b49e7 ^









ac0e9db5 ^
827898fc ^
c76b49e7 ^
3a622511 ^
c76b49e7 ^





363be37f ^
166e3c0d ^



c76b49e7 ^

0487a30e ^
c76b49e7 ^

827898fc ^
4082acd2 ^
c76b49e7 ^





ac0e9db5 ^
05d17773 ^
9d670bb5 ^
827898fc ^
35064671 ^
05d17773 ^
3a622511 ^
c76b49e7 ^

363685b8 ^
1ea1bd9c ^
363685b8 ^


bc643692 ^
5497090a ^

363685b8 ^
5497090a ^
363685b8 ^

bc643692 ^
363685b8 ^
6e698858 ^




363685b8 ^




ac0e9db5 ^
363685b8 ^





363be37f ^
166e3c0d ^
363685b8 ^
166e3c0d ^

e4630643 ^

166e3c0d ^

e4630643 ^

166e3c0d ^



e4630643 ^
4814bf94 ^
e4630643 ^

363685b8 ^
6e698858 ^
35064671 ^
363685b8 ^



9d670bb5 ^


ac0e9db5 ^
05d17773 ^

ac0e9db5 ^
e4630643 ^
ac0e9db5 ^
6e698858 ^
35064671 ^
05d17773 ^

363685b8 ^


134dad7c ^



363be37f ^
166e3c0d ^



134dad7c ^

ac0e9db5 ^
134dad7c ^

134dad7c ^






ac0e9db5 ^

134dad7c ^







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