From: Art Cancro Date: Thu, 22 Feb 2007 22:24:14 +0000 (+0000) Subject: Enter message / write mail dialog : present a drop-down box X-Git-Tag: v7.86~3559 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=c713812e3f356250bd1af7903ba34937f64b4094;p=citadel.git Enter message / write mail dialog : present a drop-down box allowing the user to enter a message using their account's screen name, the friendly name on their vCard, or anonymous (if allowed in the current room). --- diff --git a/webcit/configure.ac b/webcit/configure.ac index b07cd2660..a2e214ce6 100644 --- a/webcit/configure.ac +++ b/webcit/configure.ac @@ -4,7 +4,7 @@ AC_INIT(webserver.c) PACKAGE=webcit -VERSION=7.02 +VERSION=7.05 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION") AC_SUBST(PACKAGE) diff --git a/webcit/messages.c b/webcit/messages.c index ad561f75a..ed89b4899 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -2657,8 +2657,11 @@ void post_message(void) static long dont_post = (-1L); struct wc_attachment *att, *aptr; int is_anonymous = 0; + char *display_name; - if (!strcasecmp(bstr("is_anonymous"), "yes")) { + display_name = bstr("display_name"); + if (!strcmp(display_name, "__ANONYMOUS__")) { + display_name = ""; is_anonymous = 1; } @@ -2717,10 +2720,11 @@ void post_message(void) "saved this message.")); } else { rfc2047encode(encoded_subject, sizeof encoded_subject, bstr("subject")); - sprintf(buf, "ENT0 1|%s|%d|4|%s|||%s|%s|%s", + sprintf(buf, "ENT0 1|%s|%d|4|%s|%s||%s|%s|%s", bstr("recp"), is_anonymous, encoded_subject, + display_name, bstr("cc"), bstr("bcc"), bstr("wikipage") @@ -2781,6 +2785,7 @@ void display_enter(void) char buf[SIZ]; char ebuf[SIZ]; long now; + char *display_name; struct wc_attachment *att; int recipient_required = 0; int recipient_bad = 0; @@ -2794,7 +2799,9 @@ void display_enter(void) gotoroom(bstr("force_room")); } - if (!strcasecmp(bstr("is_anonymous"), "yes")) { + display_name = bstr("display_name"); + if (!strcmp(display_name, "__ANONYMOUS__")) { + display_name = ""; is_anonymous = 1; } @@ -2853,7 +2860,10 @@ void display_enter(void) /** Now check our actual recipients if there are any */ if (recipient_required) { - sprintf(buf, "ENT0 0|%s|%d|0||||%s|%s|%s", bstr("recp"), is_anonymous, + sprintf(buf, "ENT0 0|%s|%d|0||%s||%s|%s|%s", + bstr("recp"), + is_anonymous, + display_name, bstr("cc"), bstr("bcc"), bstr("wikipage")); serv_puts(buf); serv_getln(buf, sizeof buf); @@ -2892,17 +2902,34 @@ void display_enter(void) wprintf("%s ", buf); wprintf(_(" from ")); - escputs(WC->wc_fullname); - wprintf(_(" in ")); - escputs(WC->wc_roomname); + + wprintf("", - (is_anonymous ? "checked" : "") + wprintf("\n", + ((!strcasecmp(bstr("__ANONYMOUS__"), WC->wc_fullname)) ? "selected" : ""), + _("Anonymous") ); - wprintf("Anonymous"); } + + wprintf("\n"); + + wprintf(_(" in ")); + escputs(WC->wc_roomname); wprintf("
\n"); /** header bar */ wprintf("\n"); diff --git a/webcit/webcit.h b/webcit/webcit.h index 6dc14d2f1..3f8cf1602 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -122,11 +122,11 @@ extern locale_t wc_locales[]; #define SLEEPING 180 /* TCP connection timeout */ #define WEBCIT_TIMEOUT 900 /* WebCit session timeout */ #define PORT_NUM 2000 /* port number to listen on */ -#define SERVER "WebCit v7.02" /* who's in da house */ +#define SERVER "WebCit v7.05" /* who's in da house */ #define DEVELOPER_ID 0 #define CLIENT_ID 4 -#define CLIENT_VERSION 702 /* This version of WebCit */ -#define MINIMUM_CIT_VERSION 690 /* min required Citadel ver. */ +#define CLIENT_VERSION 705 /* This version of WebCit */ +#define MINIMUM_CIT_VERSION 705 /* min required Citadel ver. */ #define DEFAULT_HOST "localhost" /* Default Citadel server */ #define DEFAULT_PORT "504" #define LB (1) /* Internal escape chars */