After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 347870 - Cannot compile with eds in CVS head (20060718)
Cannot compile with eds in CVS head (20060718)
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Contacts
2.8.x (obsolete)
Other All
: Urgent major
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2006-07-18 04:11 UTC by Hiroyuki Ikezoe
Modified: 2013-09-13 00:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
a patch (5.23 KB, patch)
2006-07-18 04:46 UTC, Hiroyuki Ikezoe
needs-work Details | Review
a patch for bbdb plugin (1.33 KB, patch)
2006-07-18 04:58 UTC, Hiroyuki Ikezoe
needs-work Details | Review
Revised patch (7.20 KB, patch)
2006-07-18 15:13 UTC, Ross Burton
committed Details | Review
Evolution-exchange-storage part of the patch (2.98 KB, patch)
2006-07-20 07:19 UTC, Sushma Rai
needs-work Details | Review
Revised patch for exchange-storage. (3.07 KB, patch)
2006-07-24 10:36 UTC, Sushma Rai
committed Details | Review

Description Hiroyuki Ikezoe 2006-07-18 04:11:52 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:
Comment 1 Hiroyuki Ikezoe 2006-07-18 04:46:54 UTC
Created attachment 69089 [details] [review]
a patch
Comment 2 Hiroyuki Ikezoe 2006-07-18 04:58:19 UTC
Created attachment 69090 [details] [review]
a patch for bbdb plugin
Comment 3 André Klapper 2006-07-18 08:08:13 UTC
hiroyuki, there is also a patch by sushma at bug 313533, just for yur information
Comment 4 Ross Burton 2006-07-18 08:33:49 UTC
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).
Comment 5 André Klapper 2006-07-18 10:41:03 UTC
e-contact-list-editor.c:1091 seems to be the same
Comment 6 Ross Burton 2006-07-18 15:13:01 UTC
Created attachment 69123 [details] [review]
Revised patch

This patch sets mime_type and inspects type as required.
Comment 7 Hiroyuki Ikezoe 2006-07-19 06:42:51 UTC
Ross, thank you for your correction.

Your patch works perfectly, please commit it.
Comment 8 Ross Burton 2006-07-19 07:18:42 UTC
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.
Comment 9 Ross Burton 2006-07-19 09:01:56 UTC
Devashish approved this on IRC, closing.
Comment 10 Hiroyuki Ikezoe 2006-07-20 02:39:51 UTC
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.:-)
Comment 11 Sushma Rai 2006-07-20 07:19:02 UTC
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.
Comment 12 Ross Burton 2006-07-20 07:25:15 UTC
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.
Comment 13 Sushma Rai 2006-07-24 10:36:28 UTC
Created attachment 69468 [details] [review]
Revised patch for exchange-storage.
Comment 14 Ross Burton 2006-07-24 10:48:58 UTC
That looks good to me, but I can't approve. :)
Comment 15 Sushma Rai 2006-07-24 10:58:11 UTC
Tested accessing a contact with photo and it is working.
Ross, thanks for the review.