+ //This is unnecessary, since widgets will be destroyed
+ //by the main window widget anyway.
+ //remove_all_menu_toolbar_constructors(main_window, NULL);
+
+ g_assert(lttv_iattribute_find_by_path(attributes,
+ "viewers/menu", LTTV_POINTER, &value));
+ lttv_menus_destroy((LttvMenus*)*(value.v_pointer));
+
+ g_assert(lttv_iattribute_find_by_path(attributes_global,
+ "viewers/toolbar", LTTV_POINTER, &value));
+ lttv_toolbars_destroy((LttvToolbars*)*(value.v_pointer));
+
+ while(main_window->tab){
+ lttv_state_remove_event_hooks(
+ (LttvTracesetState*)main_window->tab->traceset_info->traceset_context);
+ main_window->tab = main_window->tab->next;
+ }
+ g_object_unref(main_window->attributes);
+ g_main_window_list = g_slist_remove(g_main_window_list, main_window);