Re: gtk_widget_class_install_style_property



On Tue, 2006-05-30 at 19:32 +0200, Murray Cumming wrote:
> On Fri, 2006-05-26 at 10:43 +0200, Murray Cumming wrote:
> > I've tried to get that working here:
> > http://cvs.gnome.org/viewcvs/gtkmm/examples/book/custom/custom_widget/mywidget.cc?view=markup
> > But while parsing my rc file:
> > http://cvs.gnome.org/viewcvs/gtkmm/examples/book/custom/custom_widget/custom_gtkrc?view=markup
> > 
> > I get this error:
> > "
> > custom_gtkrc:3: error: invalid identifier `examplescale', expected valid
> > identifier
> > "
> > 
> > Maybe someone knows what I am doing wrong.
> 
> I submitted a GTK+ bug about that error:
> http://bugzilla.gnome.org/show_bug.cgi?id=343012
> 
> However, even when I hack glibmm to produce custom types that start with
> a capital letter, which fixes that error, I still can't seem to actually
> get a value out of the rc file.

The GTK+ bug is still there, so we still need to hack glibmm for now,
but with that hack, I now have a working example:
http://cvs.gnome.org/viewcvs/gtkmm/examples/book/custom/custom_widget/

The secret (discovered on gtk-list gnome org) was that the style values
are only available when the widget has been realized. Luckily, that's
when we need them.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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