git-svn-id: http://ltt.polymtl.ca/svn@469 04897980-b3bd-0310-b5e0-8ef037075253
[lttv.git] / ltt / branches / poly / lttv / modules / gui / main / src / callbacks.c
index 2d0417193bfdbb9900427d58d3d9d7fa0dfdfe12..98585271c1600ef8f9a167381eace42e32d801fd 100644 (file)
@@ -1016,7 +1016,7 @@ void
 on_button_new_clicked                  (GtkButton       *button,
                                         gpointer         user_data)
 {
-  create_new_window((GtkWidget*)button, user_data, FALSE);
+  create_new_window((GtkWidget*)button, user_data, TRUE);
 }
 
 void
@@ -1133,10 +1133,19 @@ void
 on_MWindow_destroy                     (GtkObject       *object,
                                         gpointer         user_data)
 {
-  MainWindow *Main_Window = (MainWindow*)user_data;
-  
+  MainWindow *Main_Window = get_window_data_struct((GtkWidget*)object);
+  GtkWidget  *widget;
+  Tab *tab = Main_Window->tab;
   g_printf("There are : %d windows\n",g_slist_length(g_main_window_list));
 
+  while(tab){
+    while(tab->multi_vpaned->num_children){
+      gtk_multi_vpaned_widget_delete(tab->multi_vpaned);
+    }    
+    tab = tab->next;
+  }
+  
   g_win_count--;
   if(g_win_count == 0)
     gtk_main_quit ();
@@ -1616,7 +1625,7 @@ void construct_main_window(MainWindow * parent, WindowCreationData * win_creatio
   }
   //for now there is no name field in LttvTraceset structure
   //Use "Traceset" as the label for the default tab
-  create_tab(NULL, new_m_window, notebook,"Traceset");
+  create_tab(parent, new_m_window, notebook,"Traceset");
 
   g_object_set_data_full(
                        G_OBJECT(new_m_window->mwindow),
@@ -1658,8 +1667,9 @@ void tab_destructor(Tab * tab_instance)
       ref_count = lttv_trace_get_ref_number(trace);
       if(ref_count <= 1){
        ltt_trace_close(lttv_trace(trace));
+       lttv_trace_destroy(trace);
       }
-      lttv_trace_destroy(trace);
+      //      lttv_trace_destroy(trace);
     }
   }  
   lttv_traceset_destroy(tab_instance->traceset_info->traceset); 
This page took 0.024678 seconds and 4 git commands to generate.