X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/3dba9e5c9fc1d796291f92d6bf08ed88ef540637..b1eb6e1b6009874e848940b9263ce223c3905c35:/debian/patches/mutt-patched/sidebar?ds=sidebyside diff --git a/debian/patches/mutt-patched/sidebar b/debian/patches/mutt-patched/sidebar index 1792d1f..b34a73e 100644 --- a/debian/patches/mutt-patched/sidebar +++ b/debian/patches/mutt-patched/sidebar @@ -1,15 +1,47 @@ ---- a/buffy.c -+++ b/buffy.c -@@ -261,7 +261,7 @@ +This is the sidebar patch. + +When enabled, mutt will show a list of mailboxes with (new) message counts in a +separate column on the left side of the screen. + +As this feature is still considered to be unstable, this patch is only applied +in the "mutt-patched" package. + +* Configuration variables: + + sidebar_delim (string, default "|") + + This specifies the delimiter between the sidebar (if visible) and + other screens. + + sidebar_visible (boolean, default no) + + This specifies whether or not to show sidebar (left-side list of folders). + + sidebar_width (integer, default 0) +- + The width of the sidebar. + +* Patch source: + - http://www.lunar-linux.org/index.php?page=mutt-sidebar + - http://lunar-linux.org/~tchan/mutt/patch-1.5.19.sidebar.20090522.txt + +* Changes made: + - 2008-08-02 myon: Refreshed patch using quilt push -f to remove hunks we do + not need (Makefile.in). + +Index: mutt/buffy.c +=================================================================== +--- mutt.orig/buffy.c 2009-06-25 12:36:44.000000000 +0200 ++++ mutt/buffy.c 2009-06-25 12:36:53.000000000 +0200 +@@ -289,6 +289,7 @@ char path[_POSIX_PATH_MAX]; struct stat contex_sb; time_t t; -- + CONTEXT *ctx; - #ifdef USE_IMAP - /* update postponed count as well, on force */ - if (force) -@@ -296,6 +296,8 @@ + + sb.st_size=0; + contex_sb.st_dev=0; +@@ -328,6 +329,8 @@ for (tmp = Incoming; tmp; tmp = tmp->next) { @@ -18,7 +50,7 @@ #ifdef USE_IMAP if (tmp->magic != M_IMAP) #endif -@@ -353,10 +355,27 @@ +@@ -384,10 +387,27 @@ case M_MBOX: case M_MMDF: @@ -49,7 +81,7 @@ } else if (option(OPTCHECKMBOXSIZE)) { -@@ -366,35 +385,86 @@ +@@ -397,35 +417,86 @@ if (tmp->newly_created && (sb.st_ctime != sb.st_mtime || sb.st_ctime != sb.st_atime)) tmp->newly_created = 0; @@ -141,10 +173,12 @@ break; } } ---- a/buffy.h -+++ b/buffy.h +Index: mutt/buffy.h +=================================================================== +--- mutt.orig/buffy.h 2009-06-24 19:37:58.000000000 +0200 ++++ mutt/buffy.h 2009-06-25 12:36:53.000000000 +0200 @@ -25,7 +25,12 @@ - char *path; + char path[_POSIX_PATH_MAX]; off_t size; struct buffy_t *next; + struct buffy_t *prev; @@ -156,8 +190,10 @@ short notified; /* user has been notified */ short magic; /* mailbox type */ short newly_created; /* mbox or mmdf just popped into existence */ ---- a/color.c -+++ b/color.c +Index: mutt/color.c +=================================================================== +--- mutt.orig/color.c 2009-06-24 19:37:58.000000000 +0200 ++++ mutt/color.c 2009-06-25 12:36:53.000000000 +0200 @@ -93,6 +93,8 @@ { "bold", MT_COLOR_BOLD }, { "underline", MT_COLOR_UNDERLINE }, @@ -167,8 +203,10 @@ { NULL, 0 } }; ---- a/compose.c -+++ b/compose.c +Index: mutt/compose.c +=================================================================== +--- mutt.orig/compose.c 2009-06-24 19:37:58.000000000 +0200 ++++ mutt/compose.c 2009-06-25 12:36:53.000000000 +0200 @@ -72,7 +72,7 @@ #define HDR_XOFFSET 10 @@ -294,8 +332,10 @@ mutt_paddstr (W, fcc); fccSet = 1; } ---- a/curs_main.c -+++ b/curs_main.c +Index: mutt/curs_main.c +=================================================================== +--- mutt.orig/curs_main.c 2009-06-25 12:36:26.000000000 +0200 ++++ mutt/curs_main.c 2009-06-25 12:36:53.000000000 +0200 @@ -26,7 +26,9 @@ #include "mailbox.h" #include "mapping.h" @@ -331,7 +371,7 @@ @@ -571,10 +578,13 @@ - if (menu->redraw & REDRAW_STATUS) + if (menu->redraw & REDRAW_STATUS) { + DrawFullLine = 1; menu_status_line (buf, sizeof (buf), menu, NONULL (Status)); @@ -352,15 +392,15 @@ else if (option (OPTBRAILLEFRIENDLY)) move (menu->current - menu->top + menu->offset, 0); else -@@ -1068,6 +1078,7 @@ +@@ -1075,6 +1085,7 @@ menu->redraw = REDRAW_FULL; break; + case OP_SIDEBAR_OPEN: case OP_MAIN_CHANGE_FOLDER: case OP_MAIN_NEXT_UNREAD_MAILBOX: - -@@ -1099,7 +1110,11 @@ + +@@ -1106,7 +1117,11 @@ { mutt_buffy (buf, sizeof (buf)); @@ -373,7 +413,7 @@ { if (menu->menu == MENU_PAGER) { -@@ -1117,6 +1132,7 @@ +@@ -1124,6 +1139,7 @@ } mutt_expand_path (buf, sizeof (buf)); @@ -381,7 +421,7 @@ if (mx_get_magic (buf) <= 0) { mutt_error (_("%s is not a mailbox."), buf); -@@ -2209,6 +2225,12 @@ +@@ -2216,6 +2232,12 @@ mutt_what_key(); break; @@ -394,8 +434,10 @@ default: if (menu->menu == MENU_MAIN) km_error_key (MENU_MAIN); ---- a/flags.c -+++ b/flags.c +Index: mutt/flags.c +=================================================================== +--- mutt.orig/flags.c 2009-06-25 12:36:14.000000000 +0200 ++++ mutt/flags.c 2009-06-25 12:36:53.000000000 +0200 @@ -22,8 +22,10 @@ #include "mutt.h" @@ -415,8 +457,10 @@ } void mutt_tag_set_flag (int flag, int bf) ---- a/functions.h -+++ b/functions.h +Index: mutt/functions.h +=================================================================== +--- mutt.orig/functions.h 2009-06-25 12:36:35.000000000 +0200 ++++ mutt/functions.h 2009-06-25 12:36:53.000000000 +0200 @@ -169,6 +169,11 @@ { "decrypt-save", OP_DECRYPT_SAVE, NULL }, @@ -429,7 +473,7 @@ { NULL, 0, NULL } }; -@@ -268,6 +273,11 @@ +@@ -270,6 +275,11 @@ { "what-key", OP_WHAT_KEY, NULL }, @@ -441,9 +485,11 @@ { NULL, 0, NULL } }; ---- a/globals.h -+++ b/globals.h -@@ -116,6 +116,7 @@ +Index: mutt/globals.h +=================================================================== +--- mutt.orig/globals.h 2009-06-25 12:36:22.000000000 +0200 ++++ mutt/globals.h 2009-06-25 12:36:53.000000000 +0200 +@@ -117,6 +117,7 @@ WHERE char *SendCharset; WHERE char *Sendmail; WHERE char *Shell; @@ -451,7 +497,7 @@ WHERE char *Signature; WHERE char *SimpleSearch; #if USE_SMTP -@@ -208,6 +209,9 @@ +@@ -209,6 +210,9 @@ WHERE short ScoreThresholdRead; WHERE short ScoreThresholdFlag; @@ -461,11 +507,13 @@ #ifdef USE_IMAP WHERE short ImapKeepalive; WHERE short ImapPipelineDepth; ---- a/init.h -+++ b/init.h -@@ -1594,6 +1594,22 @@ - ** you may \fIunset\fP this setting. - ** (Crypto only) +Index: mutt/init.h +=================================================================== +--- mutt.orig/init.h 2009-06-25 12:36:40.000000000 +0200 ++++ mutt/init.h 2009-06-25 12:36:53.000000000 +0200 +@@ -1953,6 +1953,22 @@ + ** not used. + ** (PGP only) */ + {"sidebar_delim", DT_STR, R_BOTH, UL &SidebarDelim, "|"}, + /* @@ -486,8 +534,10 @@ { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0}, /* ** .pp ---- a/mailbox.h -+++ b/mailbox.h +Index: mutt/mailbox.h +=================================================================== +--- mutt.orig/mailbox.h 2009-06-24 19:37:58.000000000 +0200 ++++ mutt/mailbox.h 2009-06-25 12:36:53.000000000 +0200 @@ -27,6 +27,7 @@ #define M_NEWFOLDER (1<<4) /* create a new folder - same as M_APPEND, but uses * safe_fopen() for mbox-style folders. @@ -496,8 +546,10 @@ /* mx_open_new_message() */ #define M_ADD_FROM 1 /* add a From_ line */ ---- a/Makefile.am -+++ b/Makefile.am +Index: mutt/Makefile.am +=================================================================== +--- mutt.orig/Makefile.am 2009-06-25 12:36:26.000000000 +0200 ++++ mutt/Makefile.am 2009-06-25 12:36:53.000000000 +0200 @@ -29,7 +29,8 @@ score.c send.c sendlib.c signal.c sort.c \ status.c system.c thread.c charset.c history.c lib.c \ @@ -508,38 +560,10 @@ nodist_mutt_SOURCES = $(BUILT_SOURCES) ---- a/Makefile.in -+++ b/Makefile.in -@@ -84,7 +84,7 @@ - thread.$(OBJEXT) charset.$(OBJEXT) history.$(OBJEXT) \ - lib.$(OBJEXT) muttlib.$(OBJEXT) editmsg.$(OBJEXT) \ - mbyte.$(OBJEXT) url.$(OBJEXT) ascii.$(OBJEXT) \ -- crypt-mod.$(OBJEXT) -+ crypt-mod.$(OBJEXT) sidebar.$(OBJEXT) - am__objects_1 = patchlist.$(OBJEXT) - nodist_mutt_OBJECTS = $(am__objects_1) - mutt_OBJECTS = $(am_mutt_OBJECTS) $(nodist_mutt_OBJECTS) -@@ -310,7 +310,8 @@ - score.c send.c sendlib.c signal.c sort.c \ - status.c system.c thread.c charset.c history.c lib.c \ - muttlib.c editmsg.c mbyte.c \ -- url.c ascii.c crypt-mod.c crypt-mod.h -+ url.c ascii.c crypt-mod.c crypt-mod.h \ -+ sidebar.c - - nodist_mutt_SOURCES = $(BUILT_SOURCES) - mutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(MUTTLIBS) \ -@@ -342,7 +343,7 @@ - README.SSL smime.h \ - muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \ - ChangeLog mkchangelog.sh mutt_idna.h \ -- snprintf.c regex.c crypt-gpgme.h hcachever.sh.in -+ snprintf.c regex.c crypt-gpgme.h sidebar.h hcachever.sh.in - - EXTRA_SCRIPTS = smime_keys - mutt_dotlock_SOURCES = mutt_dotlock.c ---- a/mbox.c -+++ b/mbox.c +Index: mutt/mbox.c +=================================================================== +--- mutt.orig/mbox.c 2009-06-25 12:36:45.000000000 +0200 ++++ mutt/mbox.c 2009-06-25 12:36:53.000000000 +0200 @@ -104,6 +104,7 @@ mutt_perror (ctx->path); return (-1); @@ -556,8 +580,10 @@ #ifdef NFS_ATTRIBUTE_HACK if (sb.st_mtime > sb.st_atime) ---- a/menu.c -+++ b/menu.c +Index: mutt/menu.c +=================================================================== +--- mutt.orig/menu.c 2009-06-25 12:36:19.000000000 +0200 ++++ mutt/menu.c 2009-06-25 12:36:53.000000000 +0200 @@ -24,6 +24,7 @@ #include "mutt_curses.h" #include "mutt_menu.h" @@ -652,7 +678,7 @@ menu_make_entry (buf, sizeof (buf), menu, menu->current); menu_pad_string (buf, sizeof (buf)); -@@ -886,7 +888,7 @@ +@@ -885,7 +887,7 @@ if (option (OPTARROWCURSOR)) @@ -661,8 +687,10 @@ else if (option (OPTBRAILLEFRIENDLY)) move (menu->current - menu->top + menu->offset, 0); else ---- a/mutt_curses.h -+++ b/mutt_curses.h +Index: mutt/mutt_curses.h +=================================================================== +--- mutt.orig/mutt_curses.h 2009-06-24 19:37:58.000000000 +0200 ++++ mutt/mutt_curses.h 2009-06-25 12:36:53.000000000 +0200 @@ -64,6 +64,7 @@ #undef lines #endif /* lines */ @@ -680,9 +708,11 @@ MT_COLOR_MAX }; ---- a/mutt.h -+++ b/mutt.h -@@ -417,6 +417,7 @@ +Index: mutt/mutt.h +=================================================================== +--- mutt.orig/mutt.h 2009-06-25 12:36:26.000000000 +0200 ++++ mutt/mutt.h 2009-06-25 12:36:53.000000000 +0200 +@@ -425,6 +425,7 @@ OPTSAVEEMPTY, OPTSAVENAME, OPTSCORE, @@ -690,7 +720,7 @@ OPTSIGDASHES, OPTSIGONTOP, OPTSORTRE, -@@ -854,6 +855,7 @@ +@@ -864,6 +865,7 @@ { char *path; FILE *fp; @@ -698,7 +728,7 @@ time_t mtime; off_t size; off_t vsize; -@@ -894,6 +896,7 @@ +@@ -904,6 +906,7 @@ unsigned int quiet : 1; /* inhibit status messages? */ unsigned int collapsed : 1; /* are all threads collapsed? */ unsigned int closing : 1; /* mailbox is being closed */ @@ -706,9 +736,11 @@ /* driver hooks */ void *data; /* driver specific data */ ---- a/muttlib.c -+++ b/muttlib.c -@@ -1217,6 +1217,8 @@ +Index: mutt/muttlib.c +=================================================================== +--- mutt.orig/muttlib.c 2009-06-25 12:35:48.000000000 +0200 ++++ mutt/muttlib.c 2009-06-25 12:36:53.000000000 +0200 +@@ -1232,6 +1232,8 @@ pl = pw = 1; /* see if there's room to add content, else ignore */ @@ -717,7 +749,7 @@ if ((col < COLS && wlen < destlen) || soft) { int pad; -@@ -1259,6 +1261,52 @@ +@@ -1274,6 +1276,52 @@ col += wid; src += pl; } @@ -770,9 +802,11 @@ break; /* skip rest of input */ } else if (ch == '|') ---- a/mx.c -+++ b/mx.c -@@ -626,6 +626,7 @@ +Index: mutt/mx.c +=================================================================== +--- mutt.orig/mx.c 2009-06-25 12:36:45.000000000 +0200 ++++ mutt/mx.c 2009-06-25 12:36:53.000000000 +0200 +@@ -595,6 +595,7 @@ * M_APPEND open mailbox for appending * M_READONLY open mailbox in read-only mode * M_QUIET only print error messages @@ -780,7 +814,7 @@ * ctx if non-null, context struct to use */ CONTEXT *mx_open_mailbox (const char *path, int flags, CONTEXT *pctx) -@@ -648,6 +649,8 @@ +@@ -617,6 +618,8 @@ ctx->quiet = 1; if (flags & M_READONLY) ctx->readonly = 1; @@ -789,7 +823,7 @@ if (flags & (M_APPEND|M_NEWFOLDER)) { -@@ -752,9 +755,21 @@ +@@ -721,9 +724,21 @@ void mx_fastclose_mailbox (CONTEXT *ctx) { int i; @@ -811,8 +845,10 @@ if (ctx->mx_close) ctx->mx_close (ctx); ---- a/OPS -+++ b/OPS +Index: mutt/OPS +=================================================================== +--- mutt.orig/OPS 2009-06-25 12:36:14.000000000 +0200 ++++ mutt/OPS 2009-06-25 12:36:53.000000000 +0200 @@ -179,3 +179,8 @@ OP_MAIN_SHOW_LIMIT "show currently active limit pattern" OP_MAIN_COLLAPSE_THREAD "collapse/uncollapse current thread" @@ -822,8 +858,10 @@ +OP_SIDEBAR_NEXT "go down to next mailbox" +OP_SIDEBAR_PREV "go to previous mailbox" +OP_SIDEBAR_OPEN "open hilighted mailbox" ---- a/pager.c -+++ b/pager.c +Index: mutt/pager.c +=================================================================== +--- mutt.orig/pager.c 2009-06-25 12:36:14.000000000 +0200 ++++ mutt/pager.c 2009-06-25 12:36:53.000000000 +0200 @@ -29,6 +29,7 @@ #include "pager.h" #include "attach.h" @@ -832,7 +870,7 @@ #include "mutt_crypt.h" -@@ -1060,6 +1061,8 @@ +@@ -1071,6 +1072,8 @@ mbstate_t mbstate; int wrap_cols = mutt_term_width ((flags & M_PAGER_NOWRAP) ? 0 : Wrap); @@ -841,7 +879,7 @@ /* FIXME: this should come from lineInfo */ memset(&mbstate, 0, sizeof(mbstate)); -@@ -1694,7 +1697,7 @@ +@@ -1717,7 +1720,7 @@ if ((redraw & REDRAW_BODY) || topline != oldtopline) { do { @@ -850,7 +888,7 @@ curline = oldtopline = topline; lines = 0; force_redraw = 0; -@@ -1707,6 +1710,7 @@ +@@ -1730,6 +1733,7 @@ &QuoteList, &q_level, &force_redraw, &SearchRE) > 0) lines++; curline++; @@ -858,7 +896,7 @@ } last_offset = lineInfo[curline].offset; } while (force_redraw); -@@ -1720,6 +1724,7 @@ +@@ -1743,6 +1747,7 @@ addch ('~'); addch ('\n'); lines++; @@ -866,34 +904,30 @@ } /* We are going to update the pager status bar, so it isn't * necessary to reset to normal color now. */ -@@ -1743,22 +1748,22 @@ +@@ -1766,11 +1771,11 @@ /* print out the pager status bar */ SETCOLOR (MT_COLOR_STATUS); BKGDSET (MT_COLOR_STATUS); - CLEARLINE (statusoffset); + CLEARLINE_WIN (statusoffset); - if (IsHeader (extra)) + + if (IsHeader (extra) || IsMsgAttach (extra)) { - size_t l1 = COLS * MB_LEN_MAX; -+ size_t l1 = (COLS-SidebarWidth) * MB_LEN_MAX; ++ size_t l1 = (COLS-SidebarWidth) * MB_LEN_MAX; size_t l2 = sizeof (buffer); - hfi.hdr = extra->hdr; + hfi.hdr = (IsHeader (extra)) ? extra->hdr : extra->bdy->hdr; mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT); - } - else if (IsMsgAttach (extra)) +@@ -1780,7 +1785,7 @@ { -- size_t l1 = COLS * MB_LEN_MAX; -+ size_t l1 = (COLS-SidebarWidth) * MB_LEN_MAX; - size_t l2 = sizeof (buffer); - hfi.hdr = extra->bdy->hdr; - mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT); + char bn[STRING]; + snprintf (bn, sizeof (bn), "%s (%s)", banner, pager_progress_str); +- mutt_paddstr (COLS, bn); ++ mutt_paddstr (COLS, IsHeader (extra) || IsMsgAttach (extra) ? buffer : banner); } -- mutt_paddstr (COLS, IsHeader (extra) || IsMsgAttach (extra) ? buffer : banner); -+ mutt_paddstr (COLS-SidebarWidth, IsHeader (extra) || IsMsgAttach (extra) ? buffer : banner); BKGDSET (MT_COLOR_NORMAL); SETCOLOR (MT_COLOR_NORMAL); - if (option(OPTXTERMSETTITLES)) -@@ -1775,18 +1780,23 @@ +@@ -1798,18 +1803,23 @@ /* redraw the pager_index indicator, because the * flags for this message might have changed. */ menu_redraw_current (index); @@ -919,7 +953,7 @@ redraw = 0; if (option(OPTBRAILLEFRIENDLY)) { -@@ -2684,6 +2694,13 @@ +@@ -2742,6 +2752,13 @@ mutt_what_key (); break; @@ -933,15 +967,10 @@ default: ch = -1; break; ---- a/PATCHES -+++ b/PATCHES -@@ -1,3 +1,4 @@ -+patch-1.5.19.sidebar.20090522.txt - patch-1.5.18.rr.compressed.1 - patch-1.5.4.vk.pgp_verbose_mime - patch-1.5.13.cd.purge_message.3.4 ---- /dev/null -+++ b/sidebar.c +Index: mutt/sidebar.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ mutt/sidebar.c 2009-06-25 12:36:53.000000000 +0200 @@ -0,0 +1,333 @@ +/* + * Copyright (C) ????-2004 Justin Hibbits @@ -1276,8 +1305,10 @@ + draw_sidebar(menu); +} + ---- /dev/null -+++ b/sidebar.h +Index: mutt/sidebar.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ mutt/sidebar.h 2009-06-25 12:36:53.000000000 +0200 @@ -0,0 +1,36 @@ +/* + * Copyright (C) ????-2004 Justin Hibbits @@ -1315,10 +1346,12 @@ +void set_buffystats(CONTEXT*); + +#endif /* SIDEBAR_H */ ---- a/doc/Muttrc -+++ b/doc/Muttrc -@@ -2167,6 +2167,26 @@ - # function. +Index: mutt/doc/Muttrc +=================================================================== +--- mutt.orig/doc/Muttrc 2009-06-24 19:37:58.000000000 +0200 ++++ mutt/doc/Muttrc 2009-06-25 12:36:53.000000000 +0200 +@@ -657,6 +657,26 @@ + # $crypt_autosign, $crypt_replysign and $smime_is_default. # # +# set sidebar_visible=no @@ -1344,9 +1377,11 @@ # set crypt_autosign=no # # Name: crypt_autosign ---- a/imap/imap.c -+++ b/imap/imap.c -@@ -1513,7 +1513,7 @@ +Index: mutt/imap/imap.c +=================================================================== +--- mutt.orig/imap/imap.c 2009-06-24 19:37:58.000000000 +0200 ++++ mutt/imap/imap.c 2009-06-25 12:36:53.000000000 +0200 +@@ -1521,7 +1521,7 @@ imap_munge_mbox_name (munged, sizeof (munged), name); snprintf (command, sizeof (command), @@ -1355,8 +1390,10 @@ if (imap_exec (idata, command, IMAP_CMD_QUEUE) < 0) { ---- a/imap/command.c -+++ b/imap/command.c +Index: mutt/imap/command.c +=================================================================== +--- mutt.orig/imap/command.c 2009-06-24 19:37:58.000000000 +0200 ++++ mutt/imap/command.c 2009-06-25 12:36:53.000000000 +0200 @@ -1009,6 +1009,13 @@ opened */ status->uidnext = oldun;