* remove last remains of the separate attachment struct
authorWilfried Göesgens <willi@citadel.org>
Sat, 13 Dec 2008 11:08:24 +0000 (11:08 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 13 Dec 2008 11:08:24 +0000 (11:08 +0000)
webcit/msg_renderers.c
webcit/static/t/section_attach_select.html
webcit/webcit.h

index 9080b8ced0057d14a2a90baa4894d56e6aad82c2..67ad7a30ffee5f81f99070e20f23bd683af82c3c 100644 (file)
@@ -953,25 +953,6 @@ HashList *iterate_get_registered_Attachments(StrBuf *Target, int nArgs, WCTempla
        return WC->attachments;
 }
 
-void tmplput_ATT_Length(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
-{
-       wc_mime_attachment *att = (wc_mime_attachment*) Context;
-       StrBufAppendPrintf(Target, "%ld", att->length);
-}
-
-void tmplput_ATT_Contenttype(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
-{
-       wc_mime_attachment *att = (wc_mime_attachment*) Context;
-       StrBufAppendTemplate(Target, nArgs, Tokens, Context, ContextType, att->ContentType, 0);
-}
-
-void tmplput_ATT_FileName(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
-{
-       wc_mime_attachment *att = (wc_mime_attachment*) Context;
-       StrBufAppendTemplate(Target, nArgs, Tokens, Context, ContextType, att->FileName, 0);
-}
-
-
 void servcmd_do_search(char *buf, long bufsize)
 {
        snprintf(buf, bufsize, "MSGS SEARCH|%s", bstr("query"));
@@ -1054,9 +1035,6 @@ InitModule_MSGRENDERERS
        RegisterNamespace("MAIL:SUMM:INREPLYTO", 0, 2, tmplput_MAIL_SUMM_INREPLYTO,  CTX_MAILSUM);
        RegisterNamespace("MAIL:BODY", 0, 2, tmplput_MAIL_BODY,  CTX_MAILSUM);
        RegisterNamespace("MAIL:QUOTETEXT", 1, 2, tmplput_QUOTED_MAIL_BODY,  CTX_NONE);
-       RegisterNamespace("ATT:SIZE", 0, 1, tmplput_ATT_Length, CTX_ATT);
-       RegisterNamespace("ATT:TYPE", 0, 1, tmplput_ATT_Contenttype, CTX_ATT);
-       RegisterNamespace("ATT:FILENAME", 0, 1, tmplput_ATT_FileName, CTX_ATT);
 
        RegisterConditional(HKEY("MAIL:SUMM:RFCA"), 0, Conditional_MAIL_SUMM_RFCA,  CTX_MAILSUM);
        RegisterConditional(HKEY("COND:MAIL:SUMM:UNREAD"), 0, Conditional_MAIL_SUMM_UNREAD, CTX_MAILSUM);
@@ -1090,7 +1068,7 @@ InitModule_MSGRENDERERS
        RegisterNamespace("MAIL:MIME:LOADDATA", 0, 0, tmplput_MIME_LoadData, CTX_MIME_ATACH);
 
        RegisterIterator("MSG:ATTACHNAMES", 0, NULL, iterate_get_registered_Attachments, 
-                        NULL, NULL, CTX_ATT, CTX_NONE);
+                        NULL, NULL, CTX_MIME_ATACH, CTX_NONE);
 
        RegisterMimeRenderer(HKEY("message/rfc822"), render_MAIL);
        RegisterMimeRenderer(HKEY("text/x-vcard"), render_MIME_VCard);
index 7247d354859a0a95b3c8bac51000767e8dba15d2..206823fb79a65b9c04b4937d937c71a705676857 100644 (file)
@@ -1,2 +1,2 @@
-<option value="<?ATT:FILENAME("U")>"><?ATT:FILENAME("X")> (<?ATT:TYPE>, <?ATT:SIZE>)</option>
+<option value="<?MAIL:MIME:FILENAME("U")>"><?MAIL:MIME:FILENAME("X")> (<?MAIL:MIME:CONTENTTYPE>, <?MAIL:MIME:LENGTH>)</option>
 
index e2f171cc3c5769e014f1f9b3f7cebe719eae2e0c..fdb2a095ddd650b61c46e1a3a8d5cc43b58f0212 100644 (file)
@@ -319,7 +319,6 @@ typedef struct _wcsubst {
 #define CTX_USERLIST 8
 #define CTX_MAILSUM 9
 #define CTX_MIME_ATACH 10
-#define CTX_ATT 11
 #define CTX_STRBUF 12
 #define CTX_LONGVECTOR 13