add filter functionnality to the main window
[lttv.git] / ltt / branches / poly / lttv / modules / gui / lttvwindow / lttvwindow / callbacks.c
index ea308414064042faf3f113867b59ab396ca5bfa4..1a5fed3707cbea3fff1b25a7ef65ecdc5f3afb9b 100644 (file)
@@ -2849,9 +2849,9 @@ on_load_module_activate                (GtkMenuItem     *menuitem,
     GPtrArray *name;
     guint nb,i;
     gchar *module_name;
+    nb = lttv_library_module_number(library);
     LttvModuleInfo *module_info = g_new(LttvModuleInfo,nb);
     name = g_ptr_array_new();
-    nb = lttv_library_module_number(library);
     /* ask for the module name */
 
     for(i=0;i<nb;i++){
@@ -3183,7 +3183,7 @@ Mathieu Desnoyers (Directory structure, build with automake/conf,\n\
                    lttv gui, control flow view, gui cooperative trace reading\n\
                    scheduler with interruptible foreground and background\n\
                    computation, detailed event list)\n\
-Benoit Des Ligneris, Éric Clement (Cluster adaptation, work in progress)\n\
+Benoit Des Ligneris, Eric Clement (Cluster adaptation, work in progress)\n\
 Xang-Xiu Yang (new trace reading library and converter, lttv gui, \n\
                detailed event list and statistics view)\n\
 Tom Zanussi (RelayFS)\n\
@@ -3193,7 +3193,8 @@ Karim Yaghmour");
 
   GtkWidget *label3 = gtk_label_new("");
   gtk_label_set_markup(GTK_LABEL(label3), "\
-Linux Trace Toolkit Viewer, Copyright (C) 2004  Michel Dagenais\n\
+Linux Trace Toolkit Viewer, Copyright (C) 2004\n\
+                                                Michel Dagenais\n\
                                                 Mathieu Desnoyers\n\
                                                 Xang-Xiu Yang\n\
 Linux Trace Toolkit comes with ABSOLUTELY NO WARRANTY.\n\
@@ -4499,7 +4500,8 @@ void tab_destructor(Tab * tab)
              ltt_trace_close(lttv_trace(trace));
       }
     }
-  }  
+  }
+  lttv_filter_destroy(tab->filter);
   lttv_traceset_destroy(tab->traceset_info->traceset);
   /* Remove the idle events requests processing function of the tab */
   g_idle_remove_by_data(tab);
@@ -4528,8 +4530,15 @@ Tab* create_tab(MainWindow * mw, Tab *copy_tab,
   if(copy_tab) {
     tab->traceset_info->traceset = 
       lttv_traceset_copy(copy_tab->traceset_info->traceset);
+    
+    /* Copy the previous tab's filter */
+    /* We can clone the filter, as we copy the trace set also */
+    /* The filter must always be in sync with the trace set */
+    tab->filter = lttv_filter_clone(copy_tab->filter);
+
   } else {
     tab->traceset_info->traceset = lttv_traceset_new();
+    tab->filter = NULL;
   }
 
 #ifdef DEBUG
This page took 0.025478 seconds and 4 git commands to generate.