Re: [evolution-patches] Updated patch for bugzilla bug 72285




There are some problems with this patch.

Just simple stuff, yoiu've added a lot of white space - try to avoid that if possible.  Especially in cases like this:
-static GPtrArray *
+       static GPtrArray *
 groupwise_folder_search_by_uids(CamelFolder *folder, const char *_expression_, GPtrArray *uids, CamelException *ex)
{


Also: stick to k&r style indenting (brace on same line as if/else), so not this:

+                               if (!recp->email)
+                               {
+                                       ha=camel_header_address_new_group(recp->display_name);
+                               }
+                               else
+                               {
+                                       ha=camel_header_address_new_name(recp->display_name,recp->email);
+                               }


Now to the serious problems, this code creates a header with a single entry for each address encountered.  It should accumulate all addresses into a single list and set just one header instead.

i.e. you need to do what the old code had, have a separate list for each address type, but instead use the camel_header_address*() api's to build the list and then add each as a header if they're not empty.

somehing like:

struct _header_address *cc_list = NULL, *to_list = NULL;

loop{
if (recp->email)
   ha = camel_header_address_new_name(name, email);
else
   ha = camel_header_address_new_group(name);

if (cc) {
    camel_header_address_list_append(&cc_list, ha);
} else if (to)
   camel_header_address_list_append(&to_list, ha);
}

etc.


On Wed, 2005-02-23 at 15:42 +0530, Sankar P wrote:
Hi,

Attached with this mail is the updated patch for bugzilla bug 72285.
Instead of setting a null address field, _camel_header_address structure
is used to enable display of gwpoa generated messages.

Thanks & Regards,
Sankar P


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