From 25dcc0b87ac3ab29a4cc35ded91386558b4bc637 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 7 Nov 2000 12:33:01 +0000 Subject: God, I sure wish people would listen when i'm saying i'm changing and API. 2000-11-07 Not Zed * mail-display.c (on_object_requested): God, I sure wish people would listen when i'm saying i'm changing and API. I mean I even mailed everyone and everything. Can't see any changelog either. 2000-11-06 Not Zed * mail-autofilter.c (rule_from_message): Updates for api changes. * mail-tools.c (mail_tool_generate_forward_subject): Fixed for api changes. Sigh, whoever wrote the multithread code of the mailer, had little idea. You can't just lock for getting a const value, until you are finished with it, cause the owner still owns it. Fixed this too. Yuck, what a horrid forwarding format, can we change this, or make it configurable? The mail headers show who forwarded it, we dont need to duplicate it in that UGLY subject. * mail-format.c (write_field_to_stream): Removed some jeffness. dont g_strdup stuff we dont need to, and remove the value_is_encoded thing since we can get the unencoded address now. (write_address): New function to write an address field. (write_headers): Uses write_address to write addresses, cleaner, fixed the god-awful unreadable indenting too. (handle_text_plain): Use a 'smarter' printf format, so we dont need to allocate and copy substrings unecessarily (esp since they're about to be allocated any copied another few times anyway *sigh*). (write_field_to_stream): Commented out the isprint check, which afaik serves no purpose. (list_add_addresses): New function to build a list of display-ready addresses. Although I think the composer then uses these as internet-ready addresses. It should probably take a list of CamelAddress's if thats what it wants. (mail_generate_reply): Cleaned up the address list creation stuff a heap, and fixes for camel api changes. Also fixed a small memory leak as a side effect (fulladdr wasn't freed if it was the same as the sender). * mail-display.c (on_object_requested): Changed for interface changes to the from address. I think passing the encoded (internet version) of the address is right here. svn path=/trunk/; revision=6475 --- mail/mail-display.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'mail/mail-display.c') diff --git a/mail/mail-display.c b/mail/mail-display.c index 6ac113414b..350d1e1772 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -471,7 +471,6 @@ on_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data) BonoboStream *bstream; BonoboControlFrame *control_frame; Bonobo_PropertyBag prop_bag; - const char *from_address; char *cid; cid = eb->classid; @@ -554,24 +553,16 @@ on_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data) the iTip control, and it needs only the From email address, but perhaps in the future we can generalize this section of code to pass a bunch of useful things to all embedded controls. */ - - CamelInternetAddress *ia; - const char *addr; - const char *name; + const CamelInternetAddress *from; + char *from_address; CORBA_exception_init (&ev); - ia = camel_internet_address_new (); - addr = camel_mime_message_get_from (md->current_message); - camel_address_decode (CAMEL_ADDRESS (ia), (const char *) addr); - - camel_internet_address_get (ia, 0, &name, &from_address); - + from = camel_mime_message_get_from (md->current_message); + from_address = camel_address_encode((CamelAddress *)from); bonobo_property_bag_client_set_value_string (prop_bag, "from_address", from_address, &ev); - - camel_object_unref (CAMEL_OBJECT (ia)); - + g_free(from_address); CORBA_exception_free (&ev); } } -- cgit