Re: gtk_object_setv()



Hi,

just found a little problem with this GParam stuff:

In gnome-dock-item.c (gnome-libs HEAD), I have:

===
  g_object_class_install_property (gobject_class,
                                   PROP_ORIENTATION,
                                   g_param_spec_enum ("orientation",
                                                      _("Orientation"),
                                                      _("Orientation"),
                                                      GTK_TYPE_ORIENTATION,
                                                      GTK_ORIENTATION_HORIZONTAL,
                                                      (G_PARAM_READABLE |
                                                       G_PARAM_WRITABLE)));
===

and then, around line 1061:

===
  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (widget),
					"orientation");
  if (pspec != NULL) {
    GValue value = { 0, };

    g_value_init (&value, GTK_TYPE_ORIENTATION);
    g_value_set_enum (&value, dock_item->orientation);
    g_object_set_property (G_OBJECT (widget), "orientation", &value);
    g_value_unset (&value);
  }
===

When I run this, I get

---
GRuntime-WARNING **: gobject.c:1153:g_object_set_property(): cannot convert `GtkOrientation' value to property `orientation' value of type `GEnum'
---

Any idea what I am doing wrong ?

-- 
Martin Baulig
martin gnome org (private)
baulig suse de (work)




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