[evolution-patches] Re: [Evolution-hackers] Mailing lista actions bounty patch



On Mon, Dec 01, 2003 at 02:58:57PM +1100, Not Zed wrote:
> Put the "list-post" case in em-format.c:efh_format_header below all the
> address stuff, i.e. after the 'bcc' check.  Its a hell of a lot neater
> to look at.

I guess you mean in the source code (displaying order to be the same)

> 
> em-format-html can't output any buttons (i.e. <object>/s) they have to
> be done in em-format-html-display.  But since this is a lot of work
> (need to virtualise some of the header output methods and move stuff
> around), and since i think this might not be the right approach anyway,
> it should probably be done via a url link instead of an object.
> 
> This could be done like this (it looks like a lot of work, but it isn't
> really, there's a lot of helper stuff in evolution).
> 

So, I have to move the code to em-format-html-display anyway??

> 
> 
> - When we output the list-post header, we parse the address ourselves
> (rather than sending text to the text->html filter) , and output a
> mailto: uri, but add extra args, all of the list-post stuff we need
> later.  Do this using a CamelURL.  like
> 
> address = g_strdup_printf("mailto:%s";, list_post);
> url = camel_url_new(address, NULL);
> camel_url_set_param(url, "x-list-help", list_help);
> camel_url_set_param(url, "x-list-unsubscribe", list_unsubscribe);
> 
> etc. (but do it similar to the way the popup callbacks are done, with
> paramaterised glue)
> text = camel_url_to_string(url, 0);
> 
> Then create the anchor and embed the image reference too, hook the image
> in using similar code to the other image code.
> 
> Use efh_format_text_header to output the html (add
> EM_FORMAT_HTML_HEADER_HTML flag so it doesn't reformat it), dont just
> printf() it.
> 

I don't understand at all, you mean to do this in efh_format_header or
in another place?

> And finally, the list-post parsing code needs to be more robust, it
> assumes the address is in a proper format (i.e. searhces for < followed
> by > and doesn't check if its not).  Needs to check all returns from
> calls to strchr, etc.  You also leak the url string!
> 

Ok, now it's cleaner


-- 
"Dios es real, a no ser que sea declarado como entero"

Jorge Bernal "Koke" http://sindominio.net/~koke/
Jabber-ID: koke zgzjabber ath cx
<koke sindominio net> || <kokecillo eresmas com>
.: www.augustux.org   ::	pulsar.gotdns.org	 :.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]