From: yangxx Date: Wed, 4 Feb 2004 20:25:38 +0000 (+0000) Subject: git-svn-id: http://ltt.polymtl.ca/svn@487 04897980-b3bd-0310-b5e0-8ef037075253 X-Git-Tag: v0.12.20~3002 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0ed9daf7d624cf319e1f510670646bf18d619893;p=lttv.git git-svn-id: ltt.polymtl.ca/svn@487 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c b/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c index c358a822..240aab4c 100644 --- a/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c @@ -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 (); diff --git a/ltt/branches/poly/lttv/modules/gui/main/src/gtkmultivpaned.c b/ltt/branches/poly/lttv/modules/gui/main/src/gtkmultivpaned.c index b5529955..6ce5eb97 100644 --- a/ltt/branches/poly/lttv/modules/gui/main/src/gtkmultivpaned.c +++ b/ltt/branches/poly/lttv/modules/gui/main/src/gtkmultivpaned.c @@ -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)