From 7579c34f5f63fe5c7250351a8c4f0afebc3cbafc Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 29 Sep 2005 04:10:40 +0000 Subject: [PATCH] * sig is done, but need to add proper handling of linebreaks --- webcit/ChangeLog | 4 +++- webcit/messages.c | 29 ++++++++++++++++++++++++++--- webcit/preferences.c | 39 +++++++++++++++++++++++++++++++-------- 3 files changed, 60 insertions(+), 12 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 3c41e7945..451b942ae 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,7 @@ $Log$ +Revision 625.30 2005/09/29 04:10:40 ajc +* sig is done, but need to add proper handling of linebreaks + Revision 625.29 2005/09/29 02:54:17 ajc * Began implementing the "signature" feature. It doesn't work yet. @@ -3087,4 +3090,3 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix - diff --git a/webcit/messages.c b/webcit/messages.c index a87651e0a..f41c12694 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -8,6 +8,7 @@ #include "webcit.h" #include "vcard.h" #include "webserver.h" +#include "groupdav.h" /* Address book entry (keep it short and sweet, it's just a quickie lookup @@ -2349,10 +2350,12 @@ void post_message(void) void display_enter(void) { char buf[SIZ]; + char ebuf[SIZ]; long now; struct wc_attachment *att; int recipient_required = 0; int recipient_bad = 0; + int i; if (strlen(bstr("force_room")) > 0) { gotoroom(bstr("force_room")); @@ -2517,19 +2520,36 @@ void display_enter(void) wprintf(""); wprintf("
\n"); @@ -2576,6 +2596,11 @@ void display_enter(void) wprintf("\"> " "\n", _("Cancel")); + /* Make sure we only insert our signature once */ + if (strcmp(bstr("sig_inserted"), "yes")) { + wprintf("\n"); + } + wprintf("\n"); wprintf("\n"); @@ -2636,9 +2661,7 @@ void confirm_move_msg(void) wprintf("
\n"); wprintf("
\n"); - wprintf("\n", - bstr("msgid")); - + wprintf("\n", bstr("msgid")); wprintf(" " + " function show_or_hide_sigbox() { " + " if ( $F('yes_sig') ) { " + " $('signature_box').style.display = 'inline'; " + " } " + " else { " + " $('signature_box').style.display = 'none'; " + " } " + " } " + " " + ); + + wprintf(""); + wprintf(" onChange=\"show_or_hide_sigbox();\" >"); wprintf(_("No signature")); wprintf("
\n"); - wprintf(""); + wprintf(" onChange=\"show_or_hide_sigbox();\" >"); wprintf(_("Use this signature:")); wprintf("
" "
" "
" ); @@ -272,6 +287,10 @@ void display_preferences(void) wprintf("\n"); + wprintf(" " + ); wprintf("\n" @@ -296,6 +315,8 @@ void display_preferences(void) */ void set_preferences(void) { + char ebuf[300]; + if (strlen(bstr("change_button")) == 0) { safestrncpy(WC->ImportantMessage, _("Cancelled. No settings were changed."), @@ -310,7 +331,9 @@ void set_preferences(void) set_preference("roomlistview", bstr("roomlistview"), 0); set_preference("calhourformat", bstr("calhourformat"), 0); set_preference("use_sig", bstr("use_sig"), 0); - set_preference("signature", bstr("signature"), 1); + + euid_escapize(ebuf, bstr("signature")); + set_preference("signature", ebuf, 1); display_main_menu(); } -- 2.39.2