Libpurple buddy icon

Benjamin Arnaud bunjeee at free.fr
Sat Mar 22 18:59:54 EDT 2008


Hi purple team,

I'm trying to set my buddy picture using libpurple 2.4.0

I'm setting a 96*96 Png Image file on the gmail.com server, it's working perfect using Pidgin 2.4.0.

On my app though I get some random results:

- Sometimes the icon isn't set.

- Sometimes the service is disconnected (???).

- Sometimes the app crashes.



Here is the code :

unsigned char * filedata;

size_t sizet;

if (g_file_get_contents(path, (char **) &filedata, &sizet, NULL))

{

    PurpleStoredImage * image = purple_buddy_icons_set_account_icon(account, filedata, sizet);

    purple_account_set_buddy_icon_path(account, purple_imgstore_get_filename(image));

}

else

{

    purple_buddy_icons_set_account_icon(account, NULL, 0);

    purple_account_set_buddy_icon_path(account, NULL);

}



Am I doing something wrong ? Am I missing something ?

Thanks for the help,

Mr Arnaud.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20080322/511a5976/attachment.html>


More information about the Devel mailing list