1 written by Nicolas Rachinsky <nr@rachinsky.de>
2 http://www.rachinsky.de
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published
6 by the Free Software Foundation; version 2 of the License.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
13 --- curs_lib.c.orig Thu Nov 15 23:56:51 2001
14 +++ curs_lib.c Thu Nov 15 23:57:02 2001
16 * is impossible to unget function keys in SLang, so roll our own input
19 -static size_t UngetCount = 0;
20 +size_t UngetCount = 0;
21 static size_t UngetBufLen = 0;
22 static event_t *KeyEvent;
24 --- PATCHES~ Tue Nov 6 19:59:33 2001
25 +++ PATCHES Tue Nov 6 19:59:42 2001
27 +1.3.23.2.nr.tag_prefix_cond
28 --- OPS.orig Tue Sep 11 12:50:50 2001
29 +++ OPS Sun Dec 2 01:52:49 2001
31 OP_NULL "null operation"
32 +OP_SPECIAL "special operation (does nothing)"
33 OP_ATTACH_VIEW_MAILCAP "force viewing of attachment using mailcap"
34 OP_ATTACH_VIEW_TEXT "view attachment as text"
35 OP_ATTACH_COLLAPSE "Toggle display of subparts"
37 OP_SORT_REVERSE "sort messages in reverse order"
38 OP_TAG "tag the current entry"
39 OP_TAG_PREFIX "apply next function to tagged messages"
40 +OP_TAG_PREFIX_COND "apply next function ONLY to tagged messages"
41 OP_TAG_SUBTHREAD "tag the current subthread"
42 OP_TAG_THREAD "tag the current thread"
43 OP_TOGGLE_NEW "toggle a message's 'new' flag"
44 --- curs_main.c.orig Sun Dec 2 01:50:43 2001
45 +++ curs_main.c Sun Dec 2 01:59:14 2001
51 +extern size_t UngetCount;
56 else if (option (OPTAUTOTAG) && Context && Context->tagged)
59 + if (op == OP_TAG_PREFIX_COND)
63 + mutt_error _("No mailbox is open.");
67 + if (!Context->tagged)
73 + if(tmp.op==OP_SPECIAL)break;
75 + mutt_message _("Nothing todo.");
80 + /* give visual indication that the next command is a tag- command */
81 + mvaddstr (LINES - 1, 0, "tag-");
84 + /* get the real command */
85 + if ((op = km_dokey (MENU_MAIN)) == OP_TAG_PREFIX)
87 + /* abort tag sequence */
88 + CLEARLINE (LINES-1);
97 if (CURHDR->attach_del)
99 menu->redraw = REDRAW_FULL;
106 --- functions.h.orig Tue Sep 11 12:51:39 2001
107 +++ functions.h Sun Dec 2 01:53:51 2001
109 { "half-down", OP_HALF_DOWN, "]" },
110 { "help", OP_HELP, "?" },
111 { "tag-prefix", OP_TAG_PREFIX, ";" },
112 + { "tag-prefix-cond", OP_TAG_PREFIX_COND, NULL },
113 + { "special", OP_SPECIAL, NULL },
114 { "shell-escape", OP_SHELL_ESCAPE, "!" },
115 { "select-entry", OP_GENERIC_SELECT_ENTRY,M_ENTER_S },
116 { "search", OP_SEARCH, "/" },
117 --- menu.c.orig Tue Nov 6 21:36:57 2001
118 +++ menu.c Sun Dec 2 02:02:30 2001
121 extern int Charset_is_utf8; /* FIXME: bad modularisation */
123 +extern size_t UngetCount;
125 static void print_enriched_string (int attr, unsigned char *s, int do_color)
132 + if (i == OP_TAG_PREFIX_COND)
136 + mvaddstr (LINES - 1, 0, "Tag-");
138 + i = km_dokey (menu->menu);
139 + menu->tagprefix = 1;
140 + CLEARLINE (LINES - 1);
145 + while(UngetCount>0)
148 + if(tmp.op==OP_SPECIAL)break;
150 + mutt_message _("Nothing todo.");
154 else if (menu->tagged && option (OPTAUTOTAG))
157 @@ -1021,6 +1045,9 @@
160 km_error_key (menu->menu);