Re: Widget style property from RC file.
- From: Murray Cumming <murrayc murrayc com>
- To: paul linuxaudiosystems com
- Cc: Tommi Komulainen <tommi komulainen iki fi>, gtk-list gnome org
- Subject: Re: Widget style property from RC file.
- Date: Thu, 08 Jun 2006 22:07:43 +0200
On Thu, 2006-06-08 at 14:26 -0400, Paul Davis wrote:
> On Thu, 2006-06-08 at 20:55 +0300, Tommi Komulainen wrote:
> > On 6/8/06, Murray Cumming <murrayc murrayc com> wrote:
> > > Could someone point out what I'm doing wrong in the attached test case?
> > > It's meant to read a value from the rc file, to determine how a widget
> > > would be drawn, making the widget themed.
> > >
> > > I get this output:
> > >
> > > example button gtype name=ExampleButton
> > > example_button_class_init(): Registering example_thing style property.
> > > example_button_init(): example_thing from rc file=0
> > Instance init is too early to get style properties (though I suppose
> > you could call gtk_widget_ensure_style there), you need to wait until
> > 'style-set' is called. You should implement the style-set default
> > handler anyway to work with theme changes.
> > Unless you change widget hierarchies based on the style property it
> > should be enough to access the property in size-request, size-allocate
> > and expose.
> or call widget::ensure_style()
Thanks. gtk_widget_ensure_style() doesn't make any difference for me,
but I can successfully read the value in the realize handler.
murrayc murrayc com
] [Thread Prev