querying a style property



For one of my app's controls I'd like to query the "shadow-type"
style property of GtkMenuBar (so as to ensure that the appearance of another element "blends in"). I'm trying to do this as follows ("mbar" is a GtkMenuBar):

GtkStyle *style = gtk_widget_get_style(mbar);
GValue val = G_VALUE_INIT;

gtk_style_get_style_property(style,
                             GTK_TYPE_MENU_BAR,
                             "shadow-type",
                             &val);

But GTK (version 3.2.3 on Fedora 16) is squawking at me:

Gtk-CRITICAL **: gtk_style_provider_get_style_property: assertion `g_type_is_a (gtk_widget_path_get_object_type (path), pspec->owner_type)' failed

(repeated 5 times) and is not filling out "val".

Am I doing something wrong here or is this a bug? Thanks.

--
Allin Cottrell
Department of Economics
Wake Forest University



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