> I'm not sure I follow. What specifically is lacking in the current buddy
> icon architecture?
This question is answered the easiest by looking in buddyicon.c. Let's
say that, for whatever reason, I want to create a buddy icon for a user
called "foo," but foo is not in my buddy list, and I am not having a
conversation with foo.
The call to gaym_buddy_icon_new basically does the following:
*Calls gaym_buddy_icon_create (a static function) to initialize the
GaimBuddyIcon structure, and register it in a hash table.
*Adds one reference to the icon's reference count.
*Calls gaim_buddy_icon_set_data. Which does the following:
*Looks for all conversations with the user associated with the buddy
icon, and bumps the reference count up by one if one is found.
*Looks for the user in the buddy list, and bumps the reference count up
by one, if found.
*Removes a reference to the icon's reference count.
So, in the case of the icon for foo, it will be created, and then
immediately destroyed, because the reference count will be decremented
back to 0 right there in the creation function.
This is what I want to avoid.
If gaym_buddy_icon_create wasn't static, my problem would be solved!
> Also, it may help if you could be more specific about what you're trying
> to do.
More specifics will not be of any help for the question I have. It's
completely independent of any higher-level stuff. I'll just hope that
I've explained myself better this time.