openbsd-ports/mail/mutt/snapshot/patches/patch-browser_c
lebel 65975c2510 initial import of mutt/snapshot 1.3.20i:
--
The Mutt Mail User Agent

This is a nifty e-mail client that includes excellent PGP hooks.
Other features include:

- color support
- message threading
- MIME support (including RFC2047 support for encoded headers)
- IMAP (also over SSL) and POP3 support
- support for multiple mailbox formats (mbox, MMDF, MH, maildir)
- highly customizable, including key bindings
- searches using regular expression
- Delivery Status Notification (DSN) support
- PGP/MIME (RFC2015)
- small and efficient

Flavors:
	slang	   - build using the S-Lang library for screen handling.
	imap	   - build with IMAP & SSL support.
	pop	   - build with POP3 support.
	compressed - build with compressed folder support 
		     (see: http://www.spinnaker.de/mutt/compressed/)
        mixmaster  - build with anonymous remailing support.

This is the development version of mutt.

WWW: http://www.mutt.org/
2001-08-20 19:51:53 +00:00

50 lines
1.4 KiB
Plaintext

$OpenBSD: patch-browser_c,v 1.1.1.1 2001/08/20 19:51:53 lebel Exp $
--- browser.c.orig Thu May 24 05:56:48 2001
+++ browser.c Sun Aug 19 20:30:22 2001
@@ -22,6 +22,7 @@
#include "buffy.h"
#include "mapping.h"
#include "sort.h"
+#include "mx.h"
#include "mailbox.h"
#include "browser.h"
#ifdef USE_IMAP
@@ -344,6 +345,21 @@ static void init_state (struct browser_s
menu->data = state->entry;
}
+static void check_maildir_times (BUFFY *buf, struct stat *st)
+{
+ char buffer[_POSIX_PATH_MAX + SHORT_STRING];
+ struct stat s;
+
+ if(!buf || buf->magic != M_MAILDIR)
+ return;
+
+ snprintf (buffer, sizeof (buffer), "%s/tmp", buf->path);
+ if (lstat (buffer, &s) != 0)
+ return;
+
+ st->st_mtime = s.st_mtime;
+}
+
static int examine_directory (MUTTMENU *menu, struct browser_state *state,
char *d, const char *prefix)
{
@@ -407,6 +423,7 @@ static int examine_directory (MUTTMENU *
tmp = Incoming;
while (tmp && mutt_strcmp (buffer, tmp->path))
tmp = tmp->next;
+ check_maildir_times (tmp, &s);
add_folder (menu, state, de->d_name, &s, (tmp) ? tmp->new : 0);
}
closedir (dp);
@@ -452,6 +469,7 @@ static int examine_mailboxes (MUTTMENU *
strfcpy (buffer, NONULL(tmp->path), sizeof (buffer));
mutt_pretty_mailbox (buffer);
+ check_maildir_times (tmp, &s);
add_folder (menu, state, buffer, &s, tmp->new);
}
while ((tmp = tmp->next));