Re: GtkCombobox and GtkCellLayout



On Sat, Jan 29, 2011 at 10:14 PM, Tristan Van Berkom
<tristanvb openismus com> wrote:
> On Sat, 2011-01-29 at 13:55 +0100, Philippe Rouquier wrote:
>> Hi,
>>
>> I have an object that is derived from GtkComboBox (machine works with
>> fedora and has gtk3 version 2.99.2). However, I recently noticed that
>> GtkComboBox object does not seem to provide the GtkCellLayout
>> interface any more. I checked a recent documentation which does not
>> mention that fact.

Actually, if you are deriving the GtkComboBox and trying to access the
GtkCellLayout interface from my_derived_combo_box_init(), the problem
is that you have not waited for the combo box to completely be built yet
(in a sense, you can say that at _init() time, the parent GtkComboBoxClass
has just not finished becoming a GtkCellLayout yet).

If this is the case for you, just move the code that accesses the GtkCellLayout
iface from my_combo_box_init() to my_combo_box_constructor() and you will
be fine (i.e. at that point you know that the parent object has
finished initializing
completely).

I know others will disagree and throw pizza at me, but that's alright
(I like pizza).

Cheers,
          -Tristan

>>
>> So my question is: is this a bug somewhere (probably in GTK+ as my
>> code was not changed) and should I file a bug? or is this a change
>> that was part of GTK+3 update and which remained undocumented.
>>
>
> A GtkComboBox is still indeed a GtkCellLayout.
>
> This has not changed, it's possible there was an error generating
> the documentation however, that would be a bug in the documentation
> or doc building scripts somewhere.
>
> Cheers,
>        -Tristan
>
>
>
>> Thanks,
>>
>> Philippe Rouquier
>> _______________________________________________
>> gtk-devel-list mailing list
>> gtk-devel-list gnome org
>> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]