[Glade-users] append a page to a notebook

jerome despatis wrote:


I have a problem to append a page to a notebook, in
fact it works on my computer (linux 2.2.16, Mandrake
7.1), but not on another distriution such as Redhat

In fact, I create a window, with in it ann example of
a complex page, I then find the widget of the page to
Here is the piece of code:

my_widget = create_window_notebook_ex();
intab = lookup_widget(my_widget,"vbox_tab");
sprintf(server_label_text,"new tab");

and when i launch the program under a Redhat for
example, i get:
Gtk-CRITICAL **: file gtkwidget.c: line 3360
(gtk_widget_set_parent): assertion
'widget->parent==NULL' failed.

It looks like your intab widget is already a child of something.
You will have to remove it from its parent before adding it to the

You can usually use something like:

  /* Ref intab so it doesn't get destroyed automatically. */
  gtk_widget_ref (intab);
  gtk_container_remove (GTK_CONTAINER (intab->parent), intab);

  gtk_widget_unref (intab);


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