Andreas Krennmair:
authorak1 <ak1@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sat, 5 Feb 2005 18:32:25 +0000 (18:32 +0000)
committerak1 <ak1@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sat, 5 Feb 2005 18:32:25 +0000 (18:32 +0000)
implemented $signoff_string

git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@52 e385b8ad-14ed-0310-8656-cc95a2468c6d

ChangeLog.mutt-ng
globals.h
init.h
send.c

index cfdfd29..0986c31 100644 (file)
@@ -2,6 +2,7 @@ Changes specific to mutt-ng:
 
 2005-02-05:
   * Made message ID format configurable
+  * Implemented $signoff_string (fixes feature request #552)
 
 2005-02-04:
   * Fixed another bug in ajg.last-folder patch
index b781d87..533c4b3 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -120,6 +120,7 @@ WHERE char *SendCharset;
 WHERE char *Sendmail;
 WHERE char *Shell;
 WHERE char *Signature;
+WHERE char *SignOffString;
 WHERE char *SimpleSearch;
 #if defined(USE_LIBESMTP)
 WHERE char *SmtpAuthUser;
diff --git a/init.h b/init.h
index 6082311..6f85c6f 100644 (file)
--- a/init.h
+++ b/init.h
@@ -2688,6 +2688,16 @@ struct option_t MuttVars[] = {
   ** assumed that filename is a shell command and input should be read from
   ** its stdout.
   */
+  { "signoff_string",  DT_STR, R_NONE, UL &SignOffString, UL 0 },
+  /*
+  ** .pp
+  ** If set, this string will be inserted before the signature. This is useful
+  ** for people that want to sign off every message they send with their name.
+  ** .pp
+  ** If you want to insert your website's URL, additional contact information or 
+  ** witty quotes into your mails, better use a signature file instead of
+  ** the signoff string.
+  */
   { "simple_search",   DT_STR,  R_NONE, UL &SimpleSearch, UL "~f %s | ~s %s" },
   /*
   ** .pp
diff --git a/send.c b/send.c
index d8fa359..7391e91 100644 (file)
--- a/send.c
+++ b/send.c
@@ -54,10 +54,16 @@ static void append_signature (FILE *f)
   FILE *tmpfp;
   pid_t thepid;
 
+  if (SignOffString) {
+    fprintf(f,"\n%s",SignOffString);
+  }
+
   if (Signature && (tmpfp = mutt_open_read (Signature, &thepid)))
   {
     if (option (OPTSIGDASHES))
       fputs ("\n-- \n", f);
+    else if (SignOffString)
+      fputs("\n",f);
     mutt_copy_stream (tmpfp, f);
     fclose (tmpfp);
     if (thepid != -1)
@@ -65,6 +71,10 @@ static void append_signature (FILE *f)
   }
 }
 
+static void append_signoff_string(FILE *f)
+{
+}
+
 /* compare two e-mail addresses and return 1 if they are equivalent */
 static int mutt_addrcmp (ADDRESS *a, ADDRESS *b)
 {