[Glade-users] [Fwd: Why the frame with a label always can not be loaded correctly?]



hi:

I'm using Glade-3.1.2 now, and generate my first.glade with a frame in it.

But when I use libglade to load it. It report the following errors:

(<unknown>:11405): libglade-WARNING **: unknown property `type' for class
`GtkLabel'

(<unknown>:11405): Gtk-WARNING **: Attempting to add a widget with type
GtkLabel to a GtkFrame, but as a GtkBin subclass a GtkFrame can only
contain one widget at a time; it already contains a widget of type
GtkAlignment

And the frame label is not shown.

The libglade is 2.6.0

So I found the following code in libglade/glade/glade-gtk.c:

        for (j = 0; j < info->children[i].n_properties; j++) {
            if (!strcmp (info->children[i].properties[j].name, "type")) {
                const char *value = info->children[i].properties[j].value;

                if (!strcmp (value, "label_item"))
                    type = LABEL_ITEM;
                break;
            }
        }

        if (type == LABEL_ITEM) {
            gtk_frame_set_label_widget (GTK_FRAME (parent), child);
        } else {
            gtk_container_add (GTK_CONTAINER (parent), child);
        }

Here is the only place with call gtk_frame_set_label or
gtk_frame_set_label_widget, so I add <property
name="type">label_item</property> into the label widget in first.glade
directly. But it still not work.

What's wrong with my work? How can I load a frame with label or label widget?

Do I have to report this problem to libglade mailing list? Where is the
libglade mailing list?

Thanks Greatly.

Charles  Jan 17, 2007.







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