+ g_assert(lttv_iattribute_find_by_path(attributes,
+ "viewers/menu", LTTV_POINTER, &value));
+ menu = (LttvMenus*)*(value.v_pointer);
+
+ if(menu){
+ for(i=0;i<menu->len;i++){
+ menuItem = &g_array_index(menu, lttv_menu_closure, i);
+ constructor = menuItem->con;
+ ToolMenuTitle_menu = lookup_widget(mw->MWindow,"ToolMenuTitle_menu");
+ insert_view = gtk_menu_item_new_with_mnemonic (menuItem->menuText);
+ gtk_widget_show (insert_view);
+ gtk_container_add (GTK_CONTAINER (ToolMenuTitle_menu), insert_view);
+ g_signal_connect ((gpointer) insert_view, "activate",
+ G_CALLBACK (insertViewTest),
+ constructor);
+ }
+ }
+
+ g_assert(lttv_iattribute_find_by_path(attributes,
+ "viewers/toolbar", LTTV_POINTER, &value));
+ toolbar = (LttvToolbars*)*(value.v_pointer);
+
+ if(toolbar){
+ for(i=0;i<toolbar->len;i++){
+ toolbarItem = &g_array_index(toolbar, lttv_toolbar_closure, i);
+ constructor = toolbarItem->con;
+ ToolMenuTitle_menu = lookup_widget(mw->MWindow,"MToolbar2");
+ pixbuf = gdk_pixbuf_new_from_xpm_data ((const char**)toolbarItem->pixmap);
+ pixmap = gtk_image_new_from_pixbuf(pixbuf);
+ insert_view = gtk_toolbar_append_element (GTK_TOOLBAR (ToolMenuTitle_menu),
+ GTK_TOOLBAR_CHILD_BUTTON,
+ NULL,
+ "",
+ toolbarItem->tooltip, NULL,
+ pixmap, NULL, NULL);
+ gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (ToolMenuTitle_menu)->children)->data))->label), TRUE);
+ gtk_widget_show (insert_view);
+ gtk_container_set_border_width (GTK_CONTAINER (insert_view), 1);
+ g_signal_connect ((gpointer) insert_view, "clicked",G_CALLBACK (insertViewTest),constructor);
+ }
+ }