Re: Patches to gtkwidget and gtkwindow for property support
- From: Tim Janik <timj gtk org>
- To: John Margaglione <jmargaglione yahoo com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Patches to gtkwidget and gtkwindow for property support
- Date: Mon, 19 Feb 2001 14:49:57 +0100 (CET)
On Sun, 18 Feb 2001, John Margaglione wrote:
> 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.
yorry, i meant g_param_spec_flags() as owen pointed out already.
>
> John
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]