fix build with the new libebook API (Closes: #348821)
This commit is contained in:
parent
598b331489
commit
4b54253c4a
4 changed files with 17 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-08-07 Sebastien Bacher <seb128@debian.org>
|
||||
|
||||
* gnome-about-me.c: (about_me_load_photo), (about_me_update_photo):
|
||||
- fix build with the new libebook API (Closes: #348821)
|
||||
|
||||
2006-07-23 Sebastien Bacher <seb128@debian.org>
|
||||
|
||||
* gnome-about-me.desktop.in.in: don't list the Application category,
|
||||
|
|
|
@ -417,9 +417,9 @@ about_me_load_photo (GnomeAboutMe *me, EContact *contact)
|
|||
|
||||
photo = e_contact_get (contact, E_CONTACT_PHOTO);
|
||||
|
||||
if (photo) {
|
||||
if (photo && photo->type == E_CONTACT_PHOTO_TYPE_INLINED) {
|
||||
me->have_image = TRUE;
|
||||
e_image_chooser_set_image_data (E_IMAGE_CHOOSER (widget), photo->data, photo->length);
|
||||
e_image_chooser_set_image_data (E_IMAGE_CHOOSER (widget), photo->data.inlined.data, photo->data.inlined.length);
|
||||
e_contact_photo_free (photo);
|
||||
} else {
|
||||
me->have_image = FALSE;
|
||||
|
@ -490,15 +490,16 @@ about_me_update_photo (GnomeAboutMe *me)
|
|||
}
|
||||
|
||||
photo = g_new0 (EContactPhoto, 1);
|
||||
photo->data = data;
|
||||
photo->length = length;
|
||||
photo->type = E_CONTACT_PHOTO_TYPE_INLINED;
|
||||
photo->data.inlined.data = data;
|
||||
photo->data.inlined.length = length;
|
||||
e_contact_set (me->contact, E_CONTACT_PHOTO, photo);
|
||||
|
||||
/* Save the image for GDM */
|
||||
/* FIXME: I would have to read the default used by the gdmgreeter program */
|
||||
file = g_strdup_printf ("%s/.face", g_get_home_dir ());
|
||||
fp = fopen (file, "wb");
|
||||
fwrite (photo->data, 1, photo->length, fp);
|
||||
fwrite (photo->data.inlined.data, 1, photo->data.inlined.length, fp);
|
||||
fclose (fp);
|
||||
|
||||
g_free (file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue