]> code.citadel.org Git - citadel.git/blobdiff - webcit/vcard_edit.c
Adapted c-files to new iconset "Essen"
[citadel.git] / webcit / vcard_edit.c
index e17eba14b6c9350e1ab5de6aacf16f17a8c6ca8e..4934cf6ee4a9b39083d01f6586f4093f0e4f5e51 100644 (file)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 1996-2011 by the citadel.org team
+ *
+ * This program is open source software.  You can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
 
 #include "webcit.h"
 #include "webserver.h"
@@ -394,7 +411,7 @@ void display_parsed_vcard(StrBuf *Target, struct vCard *v, int full, wc_mime_att
        
                        else if (!strcasecmp(firsttoken, "email")) {
                                size_t len;
-                               if (!IsEmptyStr(mailto)) strcat(mailto, "<br />");
+                               if (!IsEmptyStr(mailto)) strcat(mailto, "<br>");
                                strcat(mailto,
                                        "<a href=\"display_enter"
                                        "?force_room=_MAIL_?recp=");
@@ -416,7 +433,7 @@ void display_parsed_vcard(StrBuf *Target, struct vCard *v, int full, wc_mime_att
                                strcat(mailto, "</A>");
                        }
                        else if (!strcasecmp(firsttoken, "tel")) {
-                               if (!IsEmptyStr(phone)) strcat(phone, "<br />");
+                               if (!IsEmptyStr(phone)) strcat(phone, "<br>");
                                strcat(phone, thisvalue);
                                for (j=0; j<num_tokens(thisname, ';'); ++j) {
                                        extract_token(buf, thisname, j, ';', sizeof buf);
@@ -444,7 +461,7 @@ void display_parsed_vcard(StrBuf *Target, struct vCard *v, int full, wc_mime_att
                                                extract_token(buf, thisvalue, j, ';', sizeof buf);
                                                if (!IsEmptyStr(buf)) {
                                                        StrEscAppend(Target, NULL, buf, 0, 0);
-                                                       if (j<3) StrBufAppendPrintf(Target, "<br />");
+                                                       if (j<3) StrBufAppendPrintf(Target, "<br>");
                                                        else StrBufAppendPrintf(Target, " ");
                                                }
                                        }
@@ -488,7 +505,7 @@ void display_parsed_vcard(StrBuf *Target, struct vCard *v, int full, wc_mime_att
                if (pass == 1) {
                        StrBufAppendPrintf(Target, "<tr bgcolor=\"#aaaaaa\">"
       "<td colspan=2 bgcolor=\"#ffffff\">"
-      "<img align=\"center\" src=\"static/viewcontacts_48x.gif\">"
+      "<img align=\"center\" src=\"static/icons/essen/32x32/contact.png\">"
       "<font size=\"+1\"><b>");
                        StrEscAppend(Target, NULL, fullname, 0, 0);
                        StrBufAppendPrintf(Target, "</b></font>");
@@ -593,7 +610,7 @@ void parse_vcard(StrBuf *Target, struct vCard *v, HashList *VC, int full, wc_mim
                        StrBufDecodeBase64(Val);
 
                }
-               lprintf(1, "%s [%s][%s]",
+               syslog(1, "%s [%s][%s]",
                        firsttoken,
                        ChrPtr(Val),
                        v->prop[i].value);
@@ -601,11 +618,11 @@ void parse_vcard(StrBuf *Target, struct vCard *v, HashList *VC, int full, wc_mim
                {
                        eVC evc = (eVC) V;
                        Put(VC, IKEY(evc), Val, HFreeStrBuf);
-                       lprintf(1, "[%ld]\n", evc);
+                       syslog(1, "[%ld]\n", evc);
                        Val = NULL;
                }
                else
-                       lprintf(1, "[]\n");
+                       syslog(1, "[]\n");
 /*
 TODO: check for layer II
                else 
@@ -730,7 +747,7 @@ void display_vcard(StrBuf *Target,
                 ((!isalpha(alpha)) && (!isalpha(this_alpha)))
                ) 
        {
-#ifdef TECH_PREVIEW
+#ifdef XXX_XXX
                new_vcard (Target, v, full, Mime);
 #else
                display_parsed_vcard(Target, v, full, Mime);
@@ -763,7 +780,7 @@ void do_addrbook_view(addrbookent *addrbook, int num_ab) {
        char **tablabels;
 
        if (num_ab == 0) {
-               wc_printf("<br /><br /><br /><div align=\"center\"><i>");
+               wc_printf("<br><br><br><div align=\"center\"><i>");
                wc_printf(_("This address book is empty."));
                wc_printf("</i></div>\n");
                return;
@@ -777,7 +794,7 @@ void do_addrbook_view(addrbookent *addrbook, int num_ab) {
 
        tablabels = malloc(num_pages * sizeof (char *));
        if (tablabels == NULL) {
-               wc_printf("<br /><br /><br /><div align=\"center\"><i>");
+               wc_printf("<br><br><br><div align=\"center\"><i>");
                wc_printf(_("An internal error has occurred."));
                wc_printf("</i></div>\n");
                return;
@@ -1032,9 +1049,9 @@ void do_edit_vcard(long msgnum, char *partnum,
        /* Display the form */
        output_headers(1, 1, 1, 0, 0, 0);
 
-       do_template("beginbox_1", NULL);
+       do_template("beginbox_1");
        StrBufAppendBufPlain(WC->WBuf, _("Edit contact information"), -1, 0);
-       do_template("beginbox_2", NULL);
+       do_template("beginbox_2");
 
        wc_printf("<form method=\"POST\" action=\"submit_vcard\">\n");
        wc_printf("<input type=\"hidden\" name=\"nonce\" value=\"%d\">\n", WC->nonce);
@@ -1173,14 +1190,14 @@ void do_edit_vcard(long msgnum, char *partnum,
        wc_printf("<table border=0><TR>"
                "<td valign=top>");
        wc_printf(_("Primary Internet e-mail address"));
-       wc_printf("<br />"
+       wc_printf("<br>"
                "<input type=\"text\" name=\"primary_inetemail\" "
                "size=40 maxlength=60 value=\"");
        escputs(primary_inetemail);
-       wc_printf("\"><br />"
+       wc_printf("\"><br>"
                "</td><td valign=top>");
        wc_printf(_("Internet e-mail aliases"));
-       wc_printf("<br />"
+       wc_printf("<br>"
                "<textarea name=\"other_inetemail\" rows=5 cols=40 width=40>");
        escputs(other_inetemail);
        wc_printf("</textarea></td></tr></table>\n");
@@ -1205,7 +1222,7 @@ void do_edit_vcard(long msgnum, char *partnum,
        );
        
        wc_printf("</td></tr></table>\n");
-       do_template("endbox", NULL);
+       do_template("endbox");
        wDumpContent(1);
        if (Msg != NULL) {
                DestroyMessageSummary(Msg);