Re: Patches to gtkwidget and gtkwindow for property support
- From: John Margaglione <jmargaglione yahoo com>
- To: gtk-devel-list gnome org
- Subject: Re: Patches to gtkwidget and gtkwindow for property support
- Date: Sun, 18 Feb 2001 17:37:42 -0600
OK, I'm working in all the suggestions, and I'll have a UNIFIED diff
ready soon :)
A few things, though:
> > g_object_class_install_property (gobject_class,
> > PROP_EVENTS,
> > g_param_spec_int ("events",
> > _("Events"),
> > _("Widget events"),
> > 0,
> > GDK_ALL_EVENTS_MASK,
> > 0,
> > G_PARAM_READABLE | G_PARAM_WRITABLE));
>
> here you changed the property type, that should not
> happen. simply use g_param_spec_enum (,GTK_TYPE_GDK_EVENT_MASK,)
> here.
What is being passed into the PROP_EVENTS param is not of type
GTK_TYPE_GDK_EVENT_MASK, since it is actually an OR of several
GTK_TYPE_GDK_EVENT_MASKs. That is, once you start OR'ing these enums
together, you no longer have an enum, since the OR'd value is not one of
the listed enumerated types. Plus, properties should use the same type
as the normal get/set calls, which in this case pass gint values:
gtk_widget_set_events (GtkWidget* widget, gint events). That is why I
changed it. If you still feel that this is incorrect, I'll leave it be.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]