Sample Plugin

Markus Zuercher zuerchermarkus at gmail.com
Wed Jul 18 07:31:52 EDT 2007


> You may have figured this out already, but are you changing accounts.xml and
> then you want Pidgin to reload it?  If so, that's not really a good idea.  You
> should just tell Pidgin to create a new account (or modify an existing
> account, or whatever) and let Pidgin take care of writing it to accounts.xml.

I'd love to, but I don't know yet how to use the libpurple functions.

I just want to know how I can change an account's buddy icon. I saw
that Pidgin creates a *.png file with an md5 hash as file name. I want
to set a picture in the Plugin, and the plugin calls the corresponding
libpurple function to change that picture.

In buddyicon.h, I found the following function:

purple_buddy_icons_set_for_user(PurpleAccount *account, const char *username,
                                void *icon_data, size_t icon_len,
                                const char *checksum);

Can anyone pls give me an example so I can understand how it's made? I
don't know what *account is, I thought it was like
"mymsnaccount at hotmail.com", but why the username?

Thank you!




More information about the Devel mailing list