Changes specific to mutt-ng:
+2005-02-24:
+ * Integrated another sidebar fix and a build fix from Rocco Rutte.
+
2005-02-23:
* Integrated assume_charset patch from http://www.emaillab.org/mutt/download15.html.en
* Integrated patch by Rocco Rutte to correct minor bugs
## Use aclocal -I m4; automake --foreign
AUTOMAKE_OPTIONS = foreign
-EXTRA_PROGRAMS = muttng_dotlock pgpring makedoc
+EXTRA_PROGRAMS = muttng_dotlock pgpringng pgpewrapng makedoc
if BUILD_IMAP
IMAP_SUBDIR = imap
muttng_dotlock_LDADD = @LIBOBJS@
muttng_dotlock_DEPENDENCIES = @LIBOBJS@
-pgpring_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c md5c.c pgppacket.c ascii.c
-pgpring_LDADD = @LIBOBJS@ $(INTLLIBS)
-pgpring_DEPENDENCIES = @LIBOBJS@ $(INTLDEPS)
+pgpringng_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c md5c.c pgppacket.c ascii.c
+pgpringng_LDADD = @LIBOBJS@ $(INTLLIBS)
+pgpringng_DEPENDENCIES = @LIBOBJS@ $(INTLDEPS)
+
+pgpewrapng_SOURCES = pgpewrap.c
+pgpewrapng_LDADD =
+pgpewrapng_DEPENDENCIES =
mutt_dotlock.c: dotlock.c
cp $(srcdir)/dotlock.c mutt_dotlock.c
cp muttbug.sh fleang
chmod +x fleang
-smime_keys: $(srcdir)/smime_keys.pl
- cp $(srcdir)/smime_keys.pl smime_keys
- chmod +x smime_keys
+smime_keysng: $(srcdir)/smime_keys.pl
+ cp $(srcdir)/smime_keys.pl smime_keysng
+ chmod +x smime_keysng
Makefile: $(BUILT_SOURCES)
$(INSTALL) -m 644 $(srcdir)/Muttngrc $(DESTDIR)$(sysconfdir) ; \
fi
-if [ ! -f $(DESTDIR)$(sysconfdir)/mime.types ]; then \
- $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir); \
+ $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/muttng-mime.types; \
fi
-Here's a list of all mutt-ng specific TODOs:
+Here's a list of all mutt-ng specific TODOs (not in priority order):
-rename smime_keys, pgpewrap and pgpring
muttngbug must call fleang, not flea
-We need to modify the build scripts and paths in the source so that mutt-ng doesn't conflict in any
-way with mutt.
+Really make sure that there're no more files installed with conflicting
+paths between mutt <-> mutt-ng. Update documentation to state that
+there're new version of all helper programs.
We need to do a security audit. At least remove all the unsafe function calls, even when they're
marked with "secure" or "checked", and replace it with secure alternatives instead.
if test x$have_pgp != xno ; then
AC_DEFINE(CRYPT_BACKEND_CLASSIC_PGP,1,
[ Define if you want classic PGP support. ])
- PGPAUX_TARGET="pgpring pgpewrap"
+ PGPAUX_TARGET="pgpringng pgpewrapng"
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pgp.o pgpinvoke.o pgpkey.o pgplib.o gnupgparse.o pgpmicalg.o pgppacket.o crypt-mod-pgp-classic.o"
fi
AC_DEFINE(CRYPT_BACKEND_CLASSIC_SMIME,1,
[ Define if you want clasic S/MIME support. ])
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS smime.o crypt-mod-smime-classic.o"
- SMIMEAUX_TARGET="smime_keys"
+ SMIMEAUX_TARGET="smime_keysng"
fi
AC_ARG_WITH(mixmaster, AC_HELP_STRING([--with-mixmaster[=PATH]], [Include Mixmaster support]),
set pgp_clearsign_command="/usr/bin/gpg --charset utf-8 --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
# create a pgp/mime encrypted attachment
-# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
-set pgp_encrypt_only_command="pgpewrap /usr/bin/gpg --charset utf-8 --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
+# set pgp_encrypt_only_command="pgpewrapng gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
+set pgp_encrypt_only_command="pgpewrapng /usr/bin/gpg --charset utf-8 --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
# create a pgp/mime encrypted and signed attachment
-# set pgp_encrypt_sign_command="pgpewrap gpg-2comp --passphrase-fd 0 -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
-set pgp_encrypt_sign_command="pgpewrap /usr/bin/gpg --charset utf-8 %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
+# set pgp_encrypt_sign_command="pgpewrapng gpg-2comp --passphrase-fd 0 -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
+set pgp_encrypt_sign_command="pgpewrapng /usr/bin/gpg --charset utf-8 %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
# import a key into the public key ring
set pgp_import_command="/usr/bin/gpg --no-verbose --import %f"
set pgp_verify_key_command="pgp -kcc +language=mutt %r"
# read in the public key ring
-set pgp_list_pubring_command="pgpring -2 %r"
+set pgp_list_pubring_command="pgpringng -2 %r"
# read in the secret key ring
-set pgp_list_secring_command="pgpring -s -2 %r"
+set pgp_list_secring_command="pgpringng -s -2 %r"
# pattern for good signature
set pgp_good_sign="Good signature"
set pgp_sign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgps +language=mutt +verbose=0 +batchmode -abft %?a? -u %a?"
# create a pgp/mime encrypted attachment
-set pgp_encrypt_only_command="pgpewrap pgpe +language=mutt +verbose=0 +batchmode +nobatchinvalidkeys=off -aft -- -r %r < %f"
+set pgp_encrypt_only_command="pgpewrapng pgpe +language=mutt +verbose=0 +batchmode +nobatchinvalidkeys=off -aft -- -r %r < %f"
# create a pgp/mime encrypted and signed attachment
-set pgp_encrypt_sign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgpewrap pgpe +language=mutt +verbose=0 +batchmode +nobatchinvalidkeys=off -afts %?a? -u %a? -- -r %r"
+set pgp_encrypt_sign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgpewrapng pgpe +language=mutt +verbose=0 +batchmode +nobatchinvalidkeys=off -afts %?a? -u %a? -- -r %r"
# import a key into the public key ring
set pgp_import_command="pgpk -a +language=mutt --OutputInformationFD=1 %f"
set pgp_verify_key_command="pgpk -c +batchmode +language=mutt --OutputInformationFD=1 %r"
# read in the public key ring
-set pgp_list_pubring_command="pgpring -5 %r"
+set pgp_list_pubring_command="pgpringng -5 %r"
# read in the secret key ring
-set pgp_list_secring_command="pgpring -5 -s %r"
+set pgp_list_secring_command="pgpringng -5 -s %r"
set pgp_verify_key_command="pgp6 +compatible -kcc %r"
# read in the public key ring
-set pgp_list_pubring_command="pgpring -5 %r"
+set pgp_list_pubring_command="pgpringng -5 %r"
# read in the secret key ring
-set pgp_list_secring_command="pgpring -s -5 %r"
+set pgp_list_secring_command="pgpringng -s -5 %r"
# create a clearsigned message
set pgp_clearsign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgp6 +compatible +verbose=0 +batchmode +clearsig -afst %?a? -u %a?"
# This is used to get the email address the certificate was issued to.
set smime_get_cert_email_command="openssl x509 -in %f -noout -email"
-# Add a certificate to the database using smime_keys.
-set smime_import_cert_command="smime_keys add_cert %f"
+# Add a certificate to the database using smime_keysng.
+set smime_import_cert_command="smime_keysng add_cert %f"
SETCOLOR (MT_COLOR_STATUS);
mutt_paddstr (COLS, buf);
SETCOLOR (MT_COLOR_NORMAL);
+ set_buffystats (Context);
menu->redraw &= ~REDRAW_STATUS;
if (option(OPTXTERMSETTITLES))
{
#include <libgen.h>
#include "keymap.h"
#include <stdbool.h>
+#include <ctype.h>
/*BUFFY *CurBuffy = 0;*/
static BUFFY *TopBuffy = 0;
return (++len);
}
+static int cur_is_hidden (int maxline)
+{
+ int l = 0, seen = 0;
+ BUFFY* tmp = TopBuffy;
+ if (!CurBuffy)
+ return (0);
+ while (tmp && l < maxline && !seen)
+ {
+ if (strcmp (tmp->path, CurBuffy->path) == 0)
+ seen = 1;
+ else
+ tmp = tmp->next;
+ l++;
+ }
+ return (seen == 0 || l == maxline);
+}
+
void calc_boundaries (int menu)
{
BUFFY *tmp = Incoming;
if ( TopBuffy == 0 && BottomBuffy == 0 )
TopBuffy = Incoming;
if ( BottomBuffy == 0 ) {
- int count = LINES - 2 - (menu != MENU_PAGER);
+ int count = LINES - 2 - (menu != MENU_PAGER || option (OPTSTATUSONTOP));
BottomBuffy = TopBuffy;
while ( --count && BottomBuffy->next )
BottomBuffy = BottomBuffy->next;
char * last_dot;
int i,j;
char * new_box;
- for (i=0;i<strlen(box);++i)
+ for (i=0;i<strlen(box);++i) {
if (box[i] == '.') ++dots;
+ else if (isupper (box[i]))
+ return (safe_strdup (box));
+ }
last_dot = strrchr(box,'.');
if (last_dot) {
++last_dot;
}
}
+void set_buffystats (CONTEXT* Context)
+{
+ BUFFY* tmp = Incoming;
+ while (tmp)
+ {
+ if (strcmp (tmp->path, Context->path) == 0)
+ {
+ tmp->msg_unread = Context->unread;
+ tmp->msgcount = Context->msgcount;
+ break;
+ }
+ tmp = tmp->next;
+ }
+}
+
int draw_sidebar(int menu) {
int lines = option(OPTHELP) ? 1 : 0;
BUFFY *tmp;
-#ifndef USE_SLANG_CURSES
- attr_t attrs;
-#endif
- short color_pair;
short delim_len = mutt_strlen (SidebarDelim);
/* initialize first time */
prev_show_value = option(OPTMBOXPANE);
}
-
if ( SidebarWidth == 0 ) return 0;
- /* get attributes for divider */
- SETCOLOR(MT_COLOR_STATUS);
-#ifndef USE_SLANG_CURSES
- attr_get(&attrs, &color_pair, 0);
-#else
- color_pair = attr_get();
-#endif
- SETCOLOR(MT_COLOR_NORMAL);
-
/* draw the divider */
-
- for ( ; lines < LINES-1-(menu != MENU_PAGER); lines++ ) {
+ SETCOLOR(MT_COLOR_STATUS);
+ for (lines = option (OPTSTATUSONTOP) ? 0 : 1;
+ lines < LINES-1-(menu != MENU_PAGER || option (OPTSTATUSONTOP)); lines++ ) {
move(lines, SidebarWidth - delim_len);
addstr (NONULL (SidebarDelim));
- #ifndef USE_SLANG_CURSES
- mvchgat(lines, SidebarWidth - delim_len, delim_len, 0, color_pair, NULL);
- #endif
}
+ SETCOLOR(MT_COLOR_NORMAL);
+
if ( Incoming == 0 ) return 0;
lines = option(OPTHELP) ? 1 : 0; /* go back to the top */
+ if (cur_is_hidden (LINES-1-(menu != MENU_PAGER)))
+ CurBuffy = TopBuffy;
+
if ( known_lines != LINES || TopBuffy == 0 || BottomBuffy == 0 )
calc_boundaries(menu);
if ( CurBuffy == 0 ) CurBuffy = Incoming;
tmp = TopBuffy;
- SETCOLOR(MT_COLOR_NORMAL);
-
- for ( ; tmp && lines < LINES-1 - (menu != MENU_PAGER); tmp = tmp->next ) {
+ for ( ; tmp && lines < LINES-1 - (menu != MENU_PAGER || option (OPTSTATUSONTOP)); tmp = tmp->next ) {
if ( tmp == CurBuffy )
SETCOLOR(MT_COLOR_INDICATOR);
else if ( tmp->msg_unread > 0 )
lines++;
}
SETCOLOR(MT_COLOR_NORMAL);
- for ( ; lines < LINES - 1 - (menu != MENU_PAGER); lines++ ) {
+ for ( ; lines < LINES - 1 - (menu != MENU_PAGER || option (OPTSTATUSONTOP)); lines++ ) {
int i = 0;
move( lines, 0 );
for ( ; i < SidebarWidth - delim_len; i++ )
#ifndef SIDEBAR_H
#define SIDEBAR_H
-struct MBOX_LIST {
- char *path;
- int msgcount;
- int new;
-} MBLIST;
-
/* parameter is whether or not to go to the status line */
/* used for omitting the last | that covers up the status bar in the index */
int draw_sidebar(int);
void scroll_sidebar(int, int);
void set_curbuffy(char*);
+void set_buffystats (CONTEXT*);
#endif /* SIDEBAR_H */