git-svn-id: http://ltt.polymtl.ca/svn@487 04897980-b3bd-0310-b5e0-8ef037075253
authoryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 4 Feb 2004 20:25:38 +0000 (20:25 +0000)
committeryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 4 Feb 2004 20:25:38 +0000 (20:25 +0000)
ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c
ltt/branches/poly/lttv/modules/gui/main/src/gtkmultivpaned.c

index c358a822360bc7b5b9910d755841ecdd03682c1c..240aab4cc69dab02175c1bf2ba080e6afc415164 100644 (file)
@@ -1285,13 +1285,6 @@ on_MWindow_destroy                     (GtkObject       *object,
  
   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 ();
index b5529955c9c3ce75c2e6b1a744c7703135888c7f..6ce5eb975c7562d05116eb775f9b08cf86159760 100644 (file)
@@ -34,6 +34,16 @@ static void     gtk_multi_vpaned_size_allocate  (GtkWidget      *widget,
 
 void gtk_multi_vpaned_scroll_value_changed (GtkRange *range, gpointer multi_vpaned);
 
+gboolean gtk_multi_vpaned_destroy(GtkObject       *object,
+                                  gpointer           user_data)
+{
+  GtkMultiVPaned * multi_vpaned = (GtkMultiVPaned * )object;
+  while(multi_vpaned->num_children){
+    gtk_multi_vpaned_widget_delete(multi_vpaned);
+  }    
+  return FALSE;
+}
+
 GType
 gtk_multi_vpaned_get_type (void)
 {
@@ -96,7 +106,11 @@ gtk_multi_vpaned_init (GtkMultiVPaned * multi_vpaned)
 
 GtkWidget* gtk_multi_vpaned_new ()
 {
-  return GTK_WIDGET (g_object_new (gtk_multi_vpaned_get_type (), NULL));
+  GtkWidget * widget = GTK_WIDGET (g_object_new (gtk_multi_vpaned_get_type (), NULL));
+  g_signal_connect(G_OBJECT(widget), "destroy",
+                  G_CALLBACK(gtk_multi_vpaned_destroy),NULL);
+  
+  return widget;
 }
 
 GtkWidget * gtk_multi_vpaned_get_widget(GtkMultiVPaned * multi_vpaned)
This page took 0.026553 seconds and 4 git commands to generate.