adding a property to the spinbutton widget
- From: timf <timf trdlnk com>
- To: gtk-list gnome org
- Subject: adding a property to the spinbutton widget
- Date: Tue, 4 Nov 2003 14:28:29 -0600
hello all,
i am trying to figure out how to add a property to the spinbutton widget,
which can be set from a gtkrc(-2.0) file. the property is arrow layout, and
the options would be one on top of the other (as is current), or side by
side.
i added a new enumerated value (PROP_ARROWS_SIDE_BY_SIDE) to
the properties enumeration, and cases to the switch statements in the get and
set properties functions, and in gtk_spin_button_class_init, i added:
g_object_class_install_property(gobject_class,
PROP_ARROWS_SIDE_BY_SIDE,
g_param_spec_boolean ("arrows_side_by_side",
_("Layout of arrows"),
_("Whether to lay the
arrows side by side, or not"),
FALSE,
G_PARAM_READWRITE));
now i can explicitly set and get this property, but i have a
simple .gtkrc-2.0, which has the following:
style "tradelink-spinbutton"
{
font_name = "sans 12"
GtkSpinButton::arrows_side_by_side = TRUE
GtkSpinButton::value = 42
}
class "GtkSpinButton" style "tradelink-spinbutton"
and my new property isn't getting set for all spinbuttons as they are
instantiated. could someone tell me what i forgot to add to make this
happen?
thanks!
-tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]