Re: gtk_widget_ensure_style() and gtk_widget_style_get()
- From: "BJörn Lindqvist" <bjourne gmail com>
- To: "Christian Neumair" <cneumair gnome org>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: gtk_widget_ensure_style() and gtk_widget_style_get()
- Date: Fri, 4 Apr 2008 18:53:50 +0200
2008/4/2 Christian Neumair <cneumair gnome org>:
> Today I experienced an odd lockup in Nautilus (cf. attachment for the
> full backtrace). The innermost frames are:
>
> #1 0xb6e783ee in bsearch () from /lib/tls/i686/cmov/libc.so.6
> #2 0xb7c50047 in _gtk_style_peek_property_value ()
> from /opt/gnome/lib/libgtk-x11-2.0.so.0
> #3 0xb7d02dae in gtk_widget_style_get_valist ()
> from /opt/gnome/lib/libgtk-x11-2.0.so.0
> #4 0xb7d02fa2 in gtk_widget_style_get ()
> from /opt/gnome/lib/libgtk-x11-2.0.so.0
> #5 0xb7c0d1c6 in gtk_range_get_props ()
> from /opt/gnome/lib/libgtk-x11-2.0.so.0
>
> Investigating #5 gtk_range_get_props() revealed that it calls #4
> gtk_widget_style_get() correctly.
>
> However, does a widget always have a valid style associated? Reading
> gtk_widget_init() suggests that. It also looks like before realizing or
> calling gtk_widget_ensure_style(), that style is just the default style,
> meaning that no user changes (i.e. to ~/.gtkrc-2.0) are applied.
>
> On the other hand, reading the gtk_widget_ensure_style() docs suggests
> that a widget is not guaranteed to have a style until it is realized.
Then it should be possible to construct some test case in which a
widget does not have a style. But that seems impossible, unless you
cheat and set widget->style = NULL which is cheating so it doesn't
count. gtk_widget_ensure_style() is probably wrong and can be
deprecated.
--
mvh Björn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]