GNOME Bugzilla – Bug 347870
Cannot compile with eds in CVS head (20060718)
Last modified: 2013-09-13 00:50:48 UTC
Please describe the problem: Cannot compile with CVS head eds (20060718) e-contact-editor.c: In function 'fill_in_simple_field': e-contact-editor.c:2198: error: 'EContactPhoto' has no member named 'length' e-contact-editor.c:2198: error: incompatible type for argument 2 of 'e_image_chooser_set_image_data' e-contact-editor.c: In function 'extract_simple_field': e-contact-editor.c:2266: error: 'EContactPhoto' has no member named 'length' e-contact-editor.c:2266: warning: passing argument 2 of 'e_image_chooser_get_image_data' from incompatible pointer type e-contact-editor.c:2270: error: 'EContactPhoto' has no member named 'length' e-contact-editor.c:2270: error: incompatible type for argument 2 of 'gdk_pixbuf_loader_write' e-contact-editor.c:2294: error: incompatible type for argument 1 of 'g_free' e-contact-editor.c:2295: error: 'EContactPhoto' has no member named 'length' e-contact-editor.c:2295: warning: passing argument 2 of 'gdk_pixbuf_save_to_buffer' from incompatible pointer type e-contact-editor.c:2308: error: incompatible type for argument 1 of 'g_free' Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Created attachment 69089 [details] [review] a patch
Created attachment 69090 [details] [review] a patch for bbdb plugin
hiroyuki, there is also a patch by sushma at bug 313533, just for yur information
First patch: If the code is examining an existing EContactPhoto it must switch on photo->type first, to determine if the photo is inline or remote. As Evolution only supports inline images at the moment it's acceptable to only handle the case where type == INLINED, and do nothing (as is photo was NULL) if type == URI. Second patch: when creating a new EContactPhoto the type field must be initialised. In this case it would be E_CONTACT_PHOTO_TYPE_INLINED. You should also set the mime_type field, although setting it to NULL is allowed (and implicitly done by calling g_new0 instead of g_new, so you need to do nothing here).
e-contact-list-editor.c:1091 seems to be the same
Created attachment 69123 [details] [review] Revised patch This patch sets mime_type and inspects type as required.
Ross, thank you for your correction. Your patch works perfectly, please commit it.
Eeek, I read the change, and committed. Can Hiroyuki approve patches, or should I revert? Note to self: don't do any work until after the second cup of coffee.
Devashish approved this on IRC, closing.
Ross, I'm sorry for my ambiguos comment. I do not have privilege to approve patches. Devashish, thank you for your wiping up my mess.:-)
Created attachment 69225 [details] [review] Evolution-exchange-storage part of the patch From exhchange plugin, we don't allow adding photo to a contact. but if added from some other client, we show that in Evolution.
Regarding attachment 69225 [details] [review], the first hunk should also be setting photo.type to INLINED and setting photo.data.inlined.mime_type to NULL.
Created attachment 69468 [details] [review] Revised patch for exchange-storage.
That looks good to me, but I can't approve. :)
Tested accessing a contact with photo and it is working. Ross, thanks for the review.