129 |
PrefixOrRight, PrefixOrLeft, EventKey, \ |
PrefixOrRight, PrefixOrLeft, EventKey, \ |
130 |
InsertChar, TextCursorLeft, \ |
InsertChar, TextCursorLeft, \ |
131 |
TextCursorRight, SwitchToTextMode, \ |
TextCursorRight, SwitchToTextMode, \ |
132 |
SwitchToNormalMode |
SwitchToNormalMode, MarkHalfRank, \ |
133 |
|
ExtEdit, ViewContainedText, AndFilterFn, \ |
134 |
|
OrFilterFn |
135 |
|
|
136 |
|
from gzz.modules.email import AllEmailsThat, SubjectFilterFn, FromFilterFn, \ |
137 |
|
ToFilterFn, OlderFilterFn, NewerFilterFn |
138 |
|
|
139 |
|
def fn(fn): |
140 |
|
return call(fn, gzz.potion.FunctionCall) |
141 |
|
|
142 |
def const(i): |
def const(i): |
143 |
from gzz.potion.potions import ConstantExpression |
from gzz.potion.potions import ConstantExpression |
161 |
'T': action([Clone,[PrefixOrLeft], None]), |
'T': action([Clone,[PrefixOrLeft], None]), |
162 |
'm': action([ToggleMark, [ThisWindow]], 1), |
'm': action([ToggleMark, [ThisWindow]], 1), |
163 |
'M': action([ToggleMark, [ThisWindow]], 0), |
'M': action([ToggleMark, [ThisWindow]], 0), |
164 |
|
'Alt-M': action([MarkHalfRank, [PrefixOrThis], None]), |
165 |
'q': action(call([Quit])), |
'q': action(call([Quit])), |
166 |
'Q': action(call([Quit])), |
'Q': action(call([Quit])), |
167 |
'x': action(call([ChangeDim, const(0), const(1)])), |
'x': action(call([ChangeDim, const(0), const(1)])), |
177 |
'o': action(call([GoToOriginal, [ThisWindow]]), 1), |
'o': action(call([GoToOriginal, [ThisWindow]]), 1), |
178 |
'O': action(call([GoToOriginal, [ThisWindow]]), 0), |
'O': action(call([GoToOriginal, [ThisWindow]]), 0), |
179 |
'Tab': action(call([SwitchToTextMode])), |
'Tab': action(call([SwitchToTextMode])), |
180 |
'Tabulator': action(([SwitchToTextMode])), |
'Tabulator': action(call([SwitchToTextMode])), |
181 |
|
'Ctrl-E': action(call([ExtEdit, [PrefixOrThis]]), 1), |
182 |
|
'Ctrl-Shift-E': action(call([ExtEdit, [PrefixOrThis]]), 0), |
183 |
|
'Ctrl-V': action(call([ViewContainedText, [PrefixOrThis]]), 1), |
184 |
|
'Ctrl-Shift-V': action(call([ViewContainedText, [PrefixOrThis]]), 0), |
185 |
|
|
186 |
|
'Ctrl-A': fn([AllEmailsThat, None]), |
187 |
|
'Ctrl-F': fn([FromFilterFn, None]), |
188 |
|
'Ctrl-T': fn([ToFilterFn, None]), |
189 |
|
'Ctrl-O': fn([OlderFilterFn, None]), |
190 |
|
'Ctrl-Alt-O': fn([NewerFilterFn, None]), |
191 |
|
'Alt-S': fn([SubjectFilterFn, None]), |
192 |
|
'&': fn([AndFilterFn, None, None]), |
193 |
|
'|': fn([OrFilterFn, None, None]), |
194 |
} |
} |
195 |
|
|
196 |
text_bindings = { |
text_bindings = { |
199 |
'Left': action(call([TextCursorLeft])), |
'Left': action(call([TextCursorLeft])), |
200 |
'Right': action(call([TextCursorRight])), |
'Right': action(call([TextCursorRight])), |
201 |
'Tab': action(call([SwitchToNormalMode])), |
'Tab': action(call([SwitchToNormalMode])), |
202 |
'Tabulator': action(([SwitchToNormalMode])), |
'Tabulator': action(call([SwitchToNormalMode])), |
203 |
} |
} |
204 |
|
|
205 |
bindings = map(bindings) |
bindings = map(bindings) |