X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=mutt-cd.signatures_menu.patch;h=2267d31e06c22d852e3d288956ed0762ff6315be;hb=37de898;hp=404cb22b778ba24137e228f8e38859a88a925a7c;hpb=68667aa0ed1fc56216772476aa2d361b44934221;p=packages%2Fmutt.git diff --git a/mutt-cd.signatures_menu.patch b/mutt-cd.signatures_menu.patch index 404cb22..2267d31 100644 --- a/mutt-cd.signatures_menu.patch +++ b/mutt-cd.signatures_menu.patch @@ -28,7 +28,7 @@ diff -pruN2 mutt-1.3.27.orig/OPS mutt-1.3.27/OPS OP_PREV_PAGE "move to the previous page" +OP_PREV_SIG "move to the previous signature" OP_PRINT "print the current entry" - OP_PURGE_MESSAGE "really delete the current entry, bypassing the trash folder" + OP_PURGE_MESSAGE "delete the current entry, bypassing the trash folder" OP_QUERY "query external program for addresses" OP_QUERY_APPEND "append new query results to current results" OP_QUIT "save changes to mailbox and quit" @@ -44,20 +44,19 @@ diff -pruN2 mutt-1.3.27.orig/OPS mutt-1.3.27/OPS diff -pruN2 mutt-1.3.27.orig/compose.c mutt-1.3.27/compose.c --- mutt-1.3.27.orig/compose.c Mon Dec 3 11:17:57 2001 +++ mutt-1.3.27/compose.c Wed Jan 23 22:35:32 2002 -@@ -1103,4 +1103,10 @@ int mutt_compose_menu (HEADER *msg, /* +@@ -1103,4 +1103,9 @@ int mutt_compose_menu (HEADER *msg, /* break; + case OP_COMPOSE_SIG: + mutt_signature(msg->content->filename); -+ MAYBE_REDRAW (menu->redraw); + mutt_update_encoding (msg->content); + break; + case OP_PIPE: case OP_FILTER: diff -pruN2 mutt-1.3.27.orig/doc/manual.sgml.head mutt-1.3.27/doc/manual.sgml.head ---- mutt-1.3.27.orig/doc/manual.sgml.head Sat Jan 12 12:35:43 2002 -+++ mutt-1.3.27/doc/manual.sgml.head Wed Jan 23 22:35:32 2002 +--- mutt-1.3.27.orig/doc/manual.xml.head Sat Jan 12 12:35:43 2002 ++++ mutt-1.3.27/doc/manual.xml.head Wed Jan 23 22:35:32 2002 @@ -526,4 +526,5 @@ c edit-cc edit the b edit-bcc edit the Bcc field y send-message send the message @@ -179,7 +178,7 @@ diff -pruN2 mutt-1.3.27.orig/protos.h mutt-1.3.27/protos.h diff -pruN2 mutt-1.3.27.orig/signature.c mutt-1.3.27/signature.c --- mutt-1.3.27.orig/signature.c Thu Jan 1 01:00:00 1970 +++ mutt-1.3.27/signature.c Wed Jan 23 22:35:32 2002 -@@ -0,0 +1,495 @@ +@@ -0,0 +1,499 @@ +/* + * Copyright (C) 2001 Cedric Duval + * @@ -198,6 +197,10 @@ diff -pruN2 mutt-1.3.27.orig/signature.c mutt-1.3.27/signature.c + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + */ + ++#if HAVE_CONFIG_H ++# include "config.h" ++#endif ++ +#include "mutt.h" +#include "mutt_menu.h" +#include "mapping.h" @@ -348,11 +351,10 @@ diff -pruN2 mutt-1.3.27.orig/signature.c mutt-1.3.27/signature.c + + SETCOLOR (MT_COLOR_STATUS); + mvaddstr (SIG_DISPLAY_LINES + 1, 0, _("-- Signature")); -+ BKGDSET (MT_COLOR_STATUS); ++ SETCOLOR (MT_COLOR_STATUS); + clrtoeol (); + -+ BKGDSET (MT_COLOR_NORMAL); -+ SETCOLOR (MT_COLOR_NORMAL); ++ NORMAL_COLOR; +} + +static void free_sig_list (SIG_LIST **sigs) @@ -398,11 +400,10 @@ diff -pruN2 mutt-1.3.27.orig/signature.c mutt-1.3.27/signature.c + + snprintf (title, sizeof (title), _("Signature : %s"), file); + -+ menu = mutt_new_menu (); ++ menu = mutt_new_menu (MENU_SIG); + menu->make_entry = sig_make_entry; + menu->tag = NULL; + menu->search = sig_menu_search; -+ menu->menu = MENU_SIG; + menu->title = title; + menu->help = mutt_compile_help (helpstr, sizeof (helpstr), + MENU_SIG, SigHelp); @@ -449,7 +450,6 @@ diff -pruN2 mutt-1.3.27.orig/signature.c mutt-1.3.27/signature.c + break; + + case OP_EXIT: -+ set_option (OPTNEEDREDRAW); + done = 1; + break; + } @@ -460,21 +460,29 @@ diff -pruN2 mutt-1.3.27.orig/signature.c mutt-1.3.27/signature.c + return result; +} + ++extern char* SearchBuffers[MENU_MAX]; ++ +static SIG_LIST *sig_search_filter (MUTTMENU *menu, char *path) +{ + regex_t re; + char buf[STRING]; + SIG_LIST *result = NULL; + int i; ++ char* searchBuf = menu->menu >= 0 && menu->menu < MENU_MAX ? ++ SearchBuffers[menu->menu] : NULL; + -+ snprintf (buf, sizeof(buf), menu->searchBuf ? menu->searchBuf : ""); ++ snprintf (buf, sizeof(buf), searchBuf ? searchBuf : ""); + if (mutt_get_field (_("Search for: "), buf, -+ sizeof (buf), M_CLEAR) != 0 || !buf[0]) ++ sizeof (buf), MUTT_CLEAR) != 0 || !buf[0]) + return (NULL); -+ mutt_str_replace (&menu->searchBuf, buf); ++ if (menu->menu >= 0 && menu->menu < MENU_MAX) ++ { ++ mutt_str_replace (&SearchBuffers[menu->menu], buf); ++ searchBuf = SearchBuffers[menu->menu]; ++ } + -+ if ((i = regcomp (&re, menu->searchBuf, REG_NOSUB | REG_EXTENDED | REG_WORDS -+ | mutt_which_case (menu->searchBuf))) != 0) ++ if ((i = regcomp (&re, searchBuf, REG_NOSUB | REG_EXTENDED | REG_WORDS ++ | mutt_which_case (searchBuf))) != 0) + { + regerror (i, &re, buf, sizeof (buf)); + regfree (&re); @@ -585,11 +593,10 @@ diff -pruN2 mutt-1.3.27.orig/signature.c mutt-1.3.27/signature.c + + snprintf (title, sizeof (title), "Signature directory : %s", path); + -+ menu = mutt_new_menu (); ++ menu = mutt_new_menu (MENU_SIG_DIR); + menu->make_entry = sig_dir_make_entry; + menu->search = NULL; /* search within files with sig_search_filter() */ + menu->tag = sig_dir_tag; -+ menu->menu = MENU_SIG_DIR; + menu->title = title; + menu->help = mutt_compile_help (helpstr, sizeof (helpstr), + MENU_SIG_DIR, SigDirHelp); @@ -620,7 +627,6 @@ diff -pruN2 mutt-1.3.27.orig/signature.c mutt-1.3.27/signature.c + done = 1; + } + -+ MAYBE_REDRAW (menu->redraw); + free_sig_list (&sigl); + } + break; @@ -639,7 +645,6 @@ diff -pruN2 mutt-1.3.27.orig/signature.c mutt-1.3.27/signature.c + done = 1; + } + -+ MAYBE_REDRAW (menu->redraw); + free_sig_list (&sigl); + } + break; @@ -672,11 +677,30 @@ diff -pruN2 mutt-1.3.27.orig/signature.c mutt-1.3.27/signature.c + + if (sig_dir_menu (SigDirectory, msg_file) == -1) + mutt_error (_("%s: no files in this directory"), SigDirectory); -+ else -+ set_option (OPTNEEDREDRAW); +} diff -pruN mutt-1.3.27.orig/PATCHES mutt-1.3.27/PATCHES --- mutt-1.3.27.orig/PATCHES Mon Nov 26 20:16:52 2001 +++ mutt-1.3.27/PATCHES Thu Dec 6 16:27:55 2001 -@@ -1,0 +1 @@ +@@ -1,0 +2 @@ +patch-1.3.27.cd.signatures_menu.2.1 +diff --git a/menu.c b/menu.c +--- a/menu.c ++++ b/menu.c +@@ -642,7 +642,7 @@ + mutt_error _("No entries."); + } + +-static void menu_next_entry (MUTTMENU *menu) ++void menu_next_entry (MUTTMENU *menu) + { + if (menu->current < menu->max - 1) + { +@@ -653,7 +653,7 @@ + mutt_error _("You are on the last entry."); + } + +-static void menu_prev_entry (MUTTMENU *menu) ++void menu_prev_entry (MUTTMENU *menu) + { + if (menu->current) + {