API enhancement for 2.8.0

Andrew Victor avictor.za at gmail.com
Mon Apr 4 08:13:11 EDT 2011

hi Elliott,

>> It will provide a mechanism for prpl's to provide some
>> context-sensitive help on Request UI forms.

>> ============================================================
>> --- libpurple/request.h f3460d06e7653696508046113ed3205809fb4add
>> +++ libpurple/request.h 105dff1d6175f3637652a91a0aaf8475fb91e709
>> @@ -108,6 +108,7 @@ struct _PurpleRequestField
>>        char *id;
>>        char *label;
>>        char *type_hint;
>> +       char *tooltip;
>>        gboolean visible;
>>        gboolean required;
> I'm not sure what the macro stuff around it does, but I don't think
> this is ABI compatible, and would have to wait for 3.0.0. Perhaps
> something could be done with the type_hint field. It's a string that
> could potentially hold some sort of tooltip, but since the semantics
> aren't really defined, I don't know how ABI-compatible that would be
> considered.

I thought ABI/API changes where being accepted for 2.8.0?
There have been some merged already (eg, add_buddy_with_invite,
add_buddies_with_invite, etc)

gtk_widget_set_tooltip_text was only added in GTK 2.12.0, and the
minimum GTK version fro Pidgin is still 2.10.0.
So if you're still compiling against an old library you need the
macro's to exclude calls to those newer functions.

>> +               if (tooltip != NULL)
>> +                       gtk_widget_set_tooltip_text(textview, tooltip);
> Why are you checking for NULL here? Doesn't
> gtk_widget_set_tooltip_text handle it? I would assume that would mean
> "remove the current tooltip", though I don't think the libpurple API
> would be able to do that anyway.

The GTK documentation isn't clear on what tooltip-text=NULL would do.

  Andrew Victor

More information about the Devel mailing list