Isn't the XfceColorButton typdef and type macro wrong
Benedikt Meurer
benedikt.meurer at unix-ag.uni-siegen.de
Sat Sep 3 14:20:21 CEST 2005
Brian J. Tarricone wrote:
> Jeff Franks wrote:
>
>>>Brain,
>>>
>>>Aren't the XfceColorButton typdef and 'get_type' macro wrong. Shouldn't
>>>
>>>#define XFCE_TYPE_COLOR_BUTTON (gtk_button_get_type())
>>>typedef GtkButton XfceColorButton;
>>>typedef GtkButtonClass XfceColorButtonClass;
>>>
>>>actually be:
>>>
>>>#define XFCE_TYPE_COLOR_BUTTON (gtk_color_button_get_type())
>>>typedef GtkColorButton XfceColorButton;
>>>typedef GtkColorButtonClass XfceColorButtonClass;
>
>
> Nope. The whole point of XfceColorButton was to work with gtk 2.2,
> which doesn't have GtkColorButton. I also didn't want to force
> recompiles if people change their gtk version from underneath
> libxfcegui4. It's kinda ugly, yes, because it makes XfceColorButton not
> a real widget. At any rate, it's deprecated and you don't need to bind it.
I'd suggest to define XFCE_TYPE_COLOR_BUTTON to
xfce_color_button_get_type () and implement xfce_color_button_get_type
() like this:
GType
xfce_color_button_get_type (void)
{
return gtk_color_button_get_type ();
}
This way you maintain full source and binary compatibility. And while
you are at it, you can ditch the Gtk2.2 compat code from the
implementation and turn all xfce_color_button_* () calls into proxies.
> -brian
Benedikt
More information about the Xfce4-dev
mailing list