I thought I was misunderstanding so gave options. it was the ``GtkNotebook menubar on the window'' that did it. Sorry didn't want to elaborate on too long if I wasn't on the ball. The following is for gtk+2 in c.
You need to connect a signal to the tab (here vbox is the box that you would pack the menubar into - if you want to encapsulate further rather than use global variables then you'd have to build a structure to pass):
Code:
g_signal_connect(notebook, "switch-page", G_CALLBACK(remenu), (gpointer) vbox);
you then create the callback function according to the switch-age prototype:
Code:
void remenu(GtkNotebook* notebook, gpointer new_page, guint page_number, gpointer data)
{
gtk_widget_destroy(menu_bar);/*this destroys all contents of the menubar as well*/
menu_bar=gtk_menu_bar_new();
gtk_box_pack_start(GTK_BOX(vbox), menu_bar, FALSE, FALSE, 2);
gtk_widget_show(mnb);
switch (page_number)
{
case 1:
.../*rebuild the contents of your menubar case by case*/
break;
default:
...
break;
}
}