Adjust the includes now that some paths have changed
[lttv.git] / ltt / branches / poly / lttv / modules / gui / main / src / gtkmultivpaned.c
index 43d9d5c3481bfc528741c254b3371b64615afa5f..6bf873a4c7c64dd0786eb0312b08e60a0f04c647 100644 (file)
@@ -1,9 +1,27 @@
+/* This file is part of the Linux Trace Toolkit viewer
+ * Copyright (C) 2003-2004 XangXiu Yang
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License Version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, 
+ * MA 02111-1307, USA.
+ */
+
 #include <gtk/gtk.h>
 
-#include <lttv/gtkmultivpaned.h>
+#include <lttvgui/gtkmultivpaned.h>
 //#include "gtkintl.h"
-#include <lttv/mainWindow.h>
-#include <lttv/gtkTraceSet.h>
+#include <lttvgui/mainwindow.h>
+#include <lttvgui/gtktraceset.h>
 
 static void gtk_multi_vpaned_class_init (GtkMultiVPanedClass    *klass);
 static void gtk_multi_vpaned_init       (GtkMultiVPaned         *multi_vpaned);
@@ -16,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)
 {
@@ -78,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.023253 seconds and 4 git commands to generate.