<<< Date Index >>>     <<< Thread Index >>>

Re: Multiple IMAP accounts



Oops, sorry, first patch copy-paste error occured...
Right version :

--- globals.h.orig      Tue Apr 10 18:59:53 2007
+++ globals.h   Tue Apr 10 18:59:14 2007
@@ -67,6 +69,7 @@
 WHERE char *Inbox;
 WHERE char *Ispell;
 WHERE char *Locale;
+WHERE char *MailAlert;
 WHERE char *MailcapPath;
 WHERE char *Maildir;
 #if defined(USE_IMAP) || defined(USE_POP)
--- init.h.orig Tue Apr 10 19:00:02 2007
+++ init.h      Tue Apr 10 18:58:40 2007
@@ -1061,6 +1093,11 @@
   ** .pp
   ** The locale used by \fIstrftime(3)\fP to format dates. Legal values are
   ** the strings your system accepts for the locale variable \fILC_TIME\fP.
+  */
+  { "mailalert",       DT_STR,  R_NONE, UL &MailAlert, UL "" },
+  /*
+  ** .pp
+  ** When set, this is the path of executable script
   */
   { "mail_check",      DT_NUM,  R_NONE, UL &BuffyTimeout, 5 },
   /*
--- curs_main.c.orig    Tue Apr 10 19:00:14 2007
+++ curs_main.c Tue Apr 10 18:58:32 2007
@@ -499,6 +499,8 @@
          mutt_message _("New mail in this mailbox.");
          if (option (OPTBEEPNEW))
            beep ();
+      if (MailAlert && *MailAlert)
+        system (MailAlert);
        } else if (check == M_FLAGS)
          mutt_message _("Mailbox was externally modified.");
 
@@ -525,8 +527,11 @@
        menu->redraw |= REDRAW_STATUS;
      if (do_buffy_notify)
      {
-       if (mutt_buffy_notify () && option (OPTBEEPNEW))
+       int new_mails = mutt_buffy_notify ();
+       if (new_mails && option (OPTBEEPNEW))
        beep ();
+       if (new_mails && MailAlert && *MailAlert)
+         system (MailAlert);
      }
      else
        do_buffy_notify = 1;


-- 
12.04.2007 21:38:23

Cheers,
Oleg A. Mamontov

mailto:  oleg@xxxxxxxxxxxx

icq uin: 79-521-617
cell:    +7-903-798-1352