Filter for selecting trace and tracefile
authoryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 7 Nov 2003 20:50:37 +0000 (20:50 +0000)
committeryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 7 Nov 2003 20:50:37 +0000 (20:50 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@333 04897980-b3bd-0310-b5e0-8ef037075253

18 files changed:
ltt/branches/poly/include/ltt/trace.h
ltt/branches/poly/include/lttv/Makefile.am
ltt/branches/poly/include/lttv/common.h
ltt/branches/poly/include/lttv/gtkmultivpaned.h
ltt/branches/poly/include/lttv/lttvfilter.h [new file with mode: 0644]
ltt/branches/poly/include/lttv/traceset.h
ltt/branches/poly/ltt/tracefile.c
ltt/branches/poly/lttv/modules/gui/mainWin/src/Makefile.am
ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c
ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.h
ltt/branches/poly/lttv/modules/gui/mainWin/src/gtkmultivpaned.c
ltt/branches/poly/lttv/modules/gui/mainWin/src/interface.c
ltt/branches/poly/lttv/modules/gui/mainWin/src/lttvfilter.c [new file with mode: 0644]
ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c
ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h
ltt/branches/poly/lttv/modules/guiEvents.c
ltt/branches/poly/lttv/modules/guiStatistic/guiStatistic.c
ltt/branches/poly/lttv/traceset.c

index aa5cb6ba0d525c9bf5de0305e2a7a082f21aa60c..191422c693ec8cf2733943a13ebb65d77fefe89c 100644 (file)
@@ -15,6 +15,8 @@ LttTrace *ltt_trace_open(const char *pathname);
 /* copy reopens a trace */
 LttTrace *ltt_trace_copy(LttTrace *self);
 
+char * ltt_trace_name(LttTrace *t);
+
 void ltt_trace_close(LttTrace *t); 
 
 
index 230e9ef36393b9705c46450b4ed3f8838b83268f..3dc065b89d3176001e2117c643e35ac8a5a98818 100644 (file)
@@ -17,4 +17,5 @@ lttvinclude_HEADERS = \
        stats.h\
        textDump.h\
        toolbar.h\
-       traceset.h
+       traceset.h\
+       lttvfilter.h
index 0da0ccd7cee30e3b56b30154b654a90cdbdce883..81bf7c63a22d1289e43601212739234ad5bb20cc 100644 (file)
@@ -4,12 +4,14 @@
 #include <stdio.h>
 #include <ltt/ltt.h>
 #include <gtk/gtk.h>
+#include <lttv/lttvfilter.h>
 
 typedef struct _MainWindow MainWindow;
 typedef struct _Tab Tab;
 
 /* constructor of the viewer */
-typedef GtkWidget * (*lttv_constructor)(MainWindow * main_window);
+typedef GtkWidget * (*lttv_constructor)(MainWindow * main_window, 
+                           LttvTracesetSelector * s, char *key);
 typedef lttv_constructor view_constructor;
 
 typedef struct _TimeWindow {
index 8819a895cacc1cf8f4c30e1c6f29ed821bc7fa01..7acaf19dedffd9a9cb16baa4b5e2f7c9d5a92e18 100644 (file)
@@ -33,6 +33,7 @@ struct _GtkMultiVPaned
   GtkPaned * first_pane;
   GtkPaned * last_pane;
   GtkPaned * focused_pane;
+  GtkPaned * iter;
   guint num_children;
 
   GtkWidget * vbox;
@@ -58,8 +59,11 @@ void gtk_multi_vpaned_widget_delete(GtkMultiVPaned * multi_vpaned);
 void gtk_multi_vpaned_widget_move_up(GtkMultiVPaned * multi_vpaned);
 void gtk_multi_vpaned_widget_move_down(GtkMultiVPaned * multi_vpaned);
 void gtk_multi_vpaned_set_adjust(GtkMultiVPaned * multi_vpaned, gboolean first_time);
-
-
+void gtk_multi_vpaned_set_data(GtkMultiVPaned * multi_vpaned, char * key, gpointer value);
+gpointer gtk_multi_vpaned_get_data(GtkMultiVPaned * multi_vpaned, char * key);
+GtkWidget * gtk_multi_vpaned_get_widget(GtkMultiVPaned * multi_vpaned);
+GtkWidget * gtk_multi_vpaned_get_first_widget(GtkMultiVPaned * multi_vpaned);
+GtkWidget * gtk_multi_vpaned_get_next_widget(GtkMultiVPaned * multi_vpaned);
 
 #ifdef __cplusplus
 }
diff --git a/ltt/branches/poly/include/lttv/lttvfilter.h b/ltt/branches/poly/include/lttv/lttvfilter.h
new file mode 100644 (file)
index 0000000..b0d22bc
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef LTTV_FILTER_H
+#define LTTV_FILTER_H
+
+#include <ltt/ltt.h>
+
+
+typedef struct _LttvTracesetSelector  LttvTracesetSelector;
+typedef struct _LttvTraceSelector     LttvTraceSelector;
+typedef struct _LttvTracefileSelector LttvTracefileSelector;
+
+
+LttvTracesetSelector *lttv_traceset_selector_new(char * name);
+LttvTraceSelector *lttv_trace_selector_new(LttTrace *t);
+LttvTracefileSelector *lttv_tracefile_selector_new(LttTracefile *t);
+void lttv_traceset_selector_destroy(LttvTracesetSelector *s);
+void lttv_trace_selector_destroy(LttvTraceSelector *t);
+void lttv_tracefile_selector_destroy(LttvTracefileSelector *t);
+
+
+void lttv_traceset_selector_add(LttvTracesetSelector *s, LttvTraceSelector *t);
+unsigned lttv_traceset_selector_number(LttvTracesetSelector *s);
+LttvTraceSelector *lttv_traceset_selector_get(LttvTracesetSelector *s, unsigned i);
+void lttv_traceset_selector_remove(LttvTracesetSelector *s, unsigned i);
+
+
+void lttv_trace_selector_add(LttvTraceSelector *s, LttvTracefileSelector *t);
+unsigned lttv_trace_selector_number(LttvTraceSelector *s);
+LttvTracefileSelector *lttv_trace_selector_get(LttvTraceSelector *s, unsigned i);
+void lttv_trace_selector_remove(LttvTraceSelector *s, unsigned i);
+
+void lttv_trace_selector_set_selected(LttvTraceSelector *s, gboolean g);
+void lttv_tracefile_selector_set_selected(LttvTracefileSelector *s, gboolean g);
+gboolean lttv_trace_selector_get_selected(LttvTraceSelector *s);
+gboolean lttv_tracefile_selector_get_selected(LttvTracefileSelector *s);
+char * lttv_trace_selector_get_name(LttvTraceSelector *s);
+char * lttv_tracefile_selector_get_name(LttvTracefileSelector *s);
+
+#endif // LTTV_FILTER_H
+
index 2f43a22894a94bbaed77a82d4355ff19ec34c897..cb844220740cabd81f37d0eb21d03d393073c482 100644 (file)
@@ -15,6 +15,8 @@ typedef struct _LttvTrace LttvTrace;
 
 LttvTraceset *lttv_traceset_new();
 
+char * lttv_traceset_name(LttvTraceset * s);
+
 LttvTrace *lttv_trace_new(LttTrace *t);
 
 LttvTraceset *lttv_traceset_copy(LttvTraceset *s_orig);
index f98c171c585e63e1ea789bd1918a2e5595ff5df4..3d213971e4721b6f05c678f054b50b6a7b922f41 100644 (file)
@@ -458,6 +458,12 @@ LttTrace *ltt_trace_open(const char *pathname)
   return t;
 }
 
+char * ltt_trace_name(LttTrace *t)
+{
+  return t->pathname;
+}
+
+
 /******************************************************************************
  * When we copy a trace, we want all the opening actions to happen again :
  * the trace will be reopened and totally independant from the original.
index 4e12e16ee3bffc8ea902c96a3c740e0b57ba76af..e65b712e98e8e628d5d840e8ad0a636155b7b8fb 100644 (file)
@@ -24,7 +24,8 @@ libmainwin_la_SOURCES = \
        interface.c \
        callbacks.c \
        gtkmultivpaned.c \
-       gtkdirsel.c
+       gtkdirsel.c \
+       lttvfilter.c
 
 noinst_HEADERS = \
        support.h \
index b279afec5ff0f8c0e1eb9fc17eeb439ab9182221..df9aa693072b9109ac23c9ec84b8c6e2ed1cf2b6 100644 (file)
 #include <lttv/module.h>
 #include <lttv/gtkdirsel.h>
 #include <lttv/iattribute.h>
+#include <lttv/lttvfilter.h>
 
 #define PATH_LENGTH          256
 #define DEFAULT_TIME_WIDTH_S   1
 
-extern LttTrace *g_init_trace ;
+extern LttvTrace *g_init_trace ;
 
 
 /** Array containing instanced objects. */
@@ -31,10 +32,27 @@ MainWindow * get_window_data_struct(GtkWidget * widget);
 char * get_unload_module(char ** loaded_module_name, int nb_module);
 char * get_remove_trace(char ** all_trace_name, int nb_trace);
 char * get_selection(char ** all_name, int nb, char *title, char * column_title);
+void get_filter_selection(LttvTracesetSelector *s, char *title, char * column_title);
 void * create_tab(MainWindow * parent, MainWindow * current_window,
                  GtkNotebook * notebook, char * label);
 
 void insert_viewer(GtkWidget* widget, view_constructor constructor);
+void update_filter(LttvTracesetSelector *s,  GtkTreeStore *store );
+
+void checkbox_changed(GtkTreeView *treeview,
+                     GtkTreePath *arg1,
+                     GtkTreeViewColumn *arg2,
+                     gpointer user_data);
+void remove_trace_from_traceset_selector(GtkMultiVPaned * paned, unsigned i);
+void add_trace_into_traceset_selector(GtkMultiVPaned * paned, LttTrace * trace);
+
+LttvTracesetSelector * construct_traceset_selector(LttvTraceset * traceset);
+
+enum {
+  CHECKBOX_COLUMN,
+  NAME_COLUMN,
+  TOTAL_COLUMNS
+};
 
 enum
 {
@@ -43,6 +61,39 @@ enum
 };
 
 
+LttvTracesetSelector * construct_traceset_selector(LttvTraceset * traceset)
+{
+  LttvTracesetSelector  * s;
+  LttvTraceSelector     * trace;
+  LttvTracefileSelector * tracefile;
+  int i, j, nb_trace, nb_tracefile, nb_control, nb_per_cpu;
+  LttvTrace * trace_v;
+  LttTrace  * t;
+  LttTracefile *tf;
+
+  s = lttv_traceset_selector_new(lttv_traceset_name(traceset));
+  nb_trace = lttv_traceset_number(traceset);
+  for(i=0;i<nb_trace;i++){
+    trace_v = lttv_traceset_get(traceset, i);
+    t       = lttv_trace(trace_v);
+    trace   = lttv_trace_selector_new(t);
+    lttv_traceset_selector_add(s, trace);
+    nb_control = ltt_trace_control_tracefile_number(t);
+    nb_per_cpu = ltt_trace_per_cpu_tracefile_number(t);
+    nb_tracefile = nb_control + nb_per_cpu;
+
+    for(j = 0 ; j < nb_tracefile ; j++) {
+      if(j < nb_control)
+        tf = ltt_trace_control_tracefile_get(t, j);
+      else
+        tf = ltt_trace_per_cpu_tracefile_get(t, j - nb_control);     
+      tracefile = lttv_tracefile_selector_new(tf);  
+      lttv_trace_selector_add(trace, tracefile);
+    }
+  } 
+  return s;
+}
+
 void
 insert_viewer_wrap(GtkWidget *menuitem, gpointer user_data)
 {
@@ -74,12 +125,14 @@ void insert_viewer(GtkWidget* widget, view_constructor constructor)
   GtkMultiVPaned * multi_vpaned;
   MainWindow * mw_data;  
   GtkWidget * viewer;
+  LttvTracesetSelector  * s;
 
   mw_data = get_window_data_struct(widget);
   if(!mw_data->current_tab) return;
   multi_vpaned = mw_data->current_tab->multi_vpaned;
 
-  viewer = (GtkWidget*)constructor(mw_data);
+  s = construct_traceset_selector(mw_data->current_tab->traceset_info->traceset);
+  viewer = (GtkWidget*)constructor(mw_data, s, "Traceset_Selector");
   if(viewer)
   {
     gtk_multi_vpaned_widget_add(multi_vpaned, viewer); 
@@ -212,6 +265,38 @@ void open_traceset(GtkWidget * widget, gpointer user_data)
 
 }
 
+void add_trace_into_traceset_selector(GtkMultiVPaned * paned, LttTrace * t)
+{
+  int j, nb_tracefile, nb_control, nb_per_cpu;
+  LttvTracesetSelector  * s;
+  LttvTraceSelector     * trace;
+  LttvTracefileSelector * tracefile;
+  LttTracefile          * tf;
+  GtkWidget             * w;
+
+  w = gtk_multi_vpaned_get_first_widget(paned);  
+  while(w){
+    s = g_object_get_data(G_OBJECT(w), "Traceset_Selector");
+
+    trace   = lttv_trace_selector_new(t);
+    lttv_traceset_selector_add(s, trace);
+    nb_control = ltt_trace_control_tracefile_number(t);
+    nb_per_cpu = ltt_trace_per_cpu_tracefile_number(t);
+    nb_tracefile = nb_control + nb_per_cpu;
+    
+    for(j = 0 ; j < nb_tracefile ; j++) {
+      if(j < nb_control)
+        tf = ltt_trace_control_tracefile_get(t, j);
+      else
+       tf = ltt_trace_per_cpu_tracefile_get(t, j - nb_control);     
+      tracefile = lttv_tracefile_selector_new(tf);  
+      lttv_trace_selector_add(trace, tracefile);
+    }
+
+    w = gtk_multi_vpaned_get_next_widget(paned);  
+  }
+}
+
 void add_trace(GtkWidget * widget, gpointer user_data)
 {
   LttTrace *trace;
@@ -242,14 +327,36 @@ void add_trace(GtkWidget * widget, gpointer user_data)
        g_object_new(LTTV_TRACESET_STATS_TYPE, NULL);
       lttv_context_init(
        LTTV_TRACESET_CONTEXT(mw_data->current_tab->traceset_info->
-                             traceset_context),traceset);      
+                             traceset_context),traceset); 
+      add_trace_into_traceset_selector(mw_data->current_tab->multi_vpaned, trace);
+
+      gtk_widget_destroy((GtkWidget*)file_selector);
+      
+      //update current tab
+      //      set_current_time(mw_data, &(mw_data->current_tab->current_time));
+      break;
     case GTK_RESPONSE_REJECT:
     case GTK_RESPONSE_CANCEL:
     default:
       gtk_widget_destroy((GtkWidget*)file_selector);
       break;
   }
-  g_printf("add a trace to a trace set\n");
+}
+
+void remove_trace_from_traceset_selector(GtkMultiVPaned * paned, unsigned i)
+{
+  LttvTracesetSelector * s;
+  LttvTraceSelector * t;
+  GtkWidget * w; 
+  
+  w = gtk_multi_vpaned_get_first_widget(paned);  
+  while(w){
+    s = g_object_get_data(G_OBJECT(w), "Traceset_Selector");
+    t = lttv_traceset_selector_get(s,i);
+    lttv_traceset_selector_remove(s, i);
+    lttv_trace_selector_destroy(t);
+    w = gtk_multi_vpaned_get_next_widget(paned);  
+  }
 }
 
 void remove_trace(GtkWidget * widget, gpointer user_data)
@@ -260,6 +367,10 @@ void remove_trace(GtkWidget * widget, gpointer user_data)
   gint i, nb_trace;
   char ** name, *remove_trace_name;
   MainWindow * mw_data = get_window_data_struct(widget);
+  LttvTracesetSelector * s;
+  LttvTraceSelector * t;
+  GtkWidget * w; 
+  gboolean selected;
   
   nb_trace =lttv_traceset_number(mw_data->current_tab->traceset_info->traceset); 
   name = g_new(char*,nb_trace);
@@ -275,25 +386,52 @@ void remove_trace(GtkWidget * widget, gpointer user_data)
   if(remove_trace_name){
     for(i=0; i<nb_trace; i++){
       if(strcmp(remove_trace_name,name[i]) == 0){
-       traceset = mw_data->current_tab->traceset_info->traceset;
-       if(mw_data->current_tab->traceset_info->traceset_context != NULL){
-         lttv_context_fini(LTTV_TRACESET_CONTEXT(mw_data->current_tab->
-                                                 traceset_info->traceset_context));
-         g_object_unref(mw_data->current_tab->traceset_info->traceset_context);
+       //unselect the trace from the current viewer
+       w = gtk_multi_vpaned_get_widget(mw_data->current_tab->multi_vpaned);  
+       s = g_object_get_data(G_OBJECT(w), "Traceset_Selector");
+       t = lttv_traceset_selector_get(s,i);
+       lttv_trace_selector_set_selected(t, FALSE);
+
+       //check if other viewers select the trace
+       w = gtk_multi_vpaned_get_first_widget(mw_data->current_tab->multi_vpaned);  
+       while(w){
+         s = g_object_get_data(G_OBJECT(w), "Traceset_Selector");
+         t = lttv_traceset_selector_get(s,i);
+         selected = lttv_trace_selector_get_selected(t);
+         if(selected)break;
+         w = gtk_multi_vpaned_get_next_widget(mw_data->current_tab->multi_vpaned);  
+       }
+
+       //if no viewer selects the trace, remove it
+       if(!selected){
+         remove_trace_from_traceset_selector(mw_data->current_tab->multi_vpaned, i);
+
+         traceset = mw_data->current_tab->traceset_info->traceset;
+         trace_v = lttv_traceset_get(traceset, i);
+         if(lttv_trace_get_ref_number(trace_v) <= 1)
+           ltt_trace_close(lttv_trace(trace_v));
+
+         if(mw_data->current_tab->traceset_info->traceset_context != NULL){
+           lttv_context_fini(LTTV_TRACESET_CONTEXT(mw_data->current_tab->
+                                                   traceset_info->traceset_context));
+           g_object_unref(mw_data->current_tab->traceset_info->traceset_context);
+         }
+         lttv_traceset_remove(traceset, i);
+         lttv_trace_destroy(trace_v);
+         mw_data->current_tab->traceset_info->traceset_context =
+           g_object_new(LTTV_TRACESET_STATS_TYPE, NULL);
+         lttv_context_init(
+                           LTTV_TRACESET_CONTEXT(mw_data->current_tab->
+                                     traceset_info->traceset_context),traceset);      
+         //update current tab
+         //      set_current_time(mw_data, &(mw_data->current_tab->current_time));
        }
-       lttv_traceset_remove(traceset, i);
-       mw_data->current_tab->traceset_info->traceset_context =
-         g_object_new(LTTV_TRACESET_STATS_TYPE, NULL);
-       lttv_context_init(
-         LTTV_TRACESET_CONTEXT(mw_data->current_tab->
-                               traceset_info->traceset_context),traceset);      
        break;
       }
     }
   }
 
   g_free(name);
-  g_printf("remove a trace from a trace set\n");
 }
 
 void save(GtkWidget * widget, gpointer user_data)
@@ -587,6 +725,28 @@ on_remove_viewer_activate              (GtkMenuItem     *menuitem,
   delete_viewer((GtkWidget*)menuitem, user_data);
 }
 
+void
+on_trace_filter_activate              (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+  MainWindow * mw_data = get_window_data_struct((GtkWidget*)menuitem);
+  LttvTracesetSelector * s;
+  GtkWidget * w = gtk_multi_vpaned_get_widget(mw_data->current_tab->multi_vpaned);
+  
+  s = g_object_get_data(G_OBJECT(w), "Traceset_Selector");
+  if(!s){
+    g_printf("There is no viewer yet\n");      
+    return;
+  }
+  get_filter_selection(s, "Configure trace and tracefile filter", "Select traces and tracefiles");
+}
+
+void
+on_trace_facility_activate              (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+  g_printf("Trace facility selector: %s\n");  
+}
 
 void
 on_load_module_activate                (GtkMenuItem     *menuitem,
@@ -866,6 +1026,152 @@ on_MNotebook_switch_page               (GtkNotebook     *notebook,
   mw->current_tab = tab;
 }
 
+void checkbox_changed(GtkTreeView *treeview,
+                     GtkTreePath *arg1,
+                     GtkTreeViewColumn *arg2,
+                     gpointer user_data)
+{
+  GtkTreeStore * store = (GtkTreeStore *)gtk_tree_view_get_model (treeview);
+  GtkTreeIter iter;
+  gboolean value;
+
+  if (gtk_tree_model_get_iter ((GtkTreeModel *)store, &iter, arg1)){
+    gtk_tree_model_get ((GtkTreeModel *)store, &iter, CHECKBOX_COLUMN, &value, -1);
+    value = value? FALSE : TRUE;
+    gtk_tree_store_set (GTK_TREE_STORE (store), &iter, CHECKBOX_COLUMN, value, -1);    
+  }  
+  
+}
+
+void update_filter(LttvTracesetSelector *s,  GtkTreeStore *store )
+{
+  GtkTreeIter iter, child_iter;
+  int i, j;
+  LttvTraceSelector     * trace;
+  LttvTracefileSelector * tracefile;
+  gboolean value, value1;
+
+  if(gtk_tree_model_get_iter_first((GtkTreeModel*)store, &iter)){
+    i = 0;
+    do{
+      trace = lttv_traceset_selector_get(s, i);
+      gtk_tree_model_get ((GtkTreeModel*)store, &iter, CHECKBOX_COLUMN, &value,-1);
+      if(value){
+       j = 0;
+       if(gtk_tree_model_iter_children ((GtkTreeModel*)store, &child_iter, &iter)){
+         do{
+           tracefile = lttv_trace_selector_get(trace, j);
+           gtk_tree_model_get ((GtkTreeModel*)store, &child_iter, CHECKBOX_COLUMN, &value1,-1);
+           lttv_tracefile_selector_set_selected(tracefile,value1);
+           j++;
+         }while(gtk_tree_model_iter_next((GtkTreeModel*)store, &child_iter));
+       }
+      }
+      lttv_trace_selector_set_selected(trace,value);
+      i++;
+    }while(gtk_tree_model_iter_next((GtkTreeModel*)store, &iter));
+  }
+}
+
+void get_filter_selection(LttvTracesetSelector *s,char *title, char * column_title)
+{
+  GtkWidget         * dialogue;
+  GtkTreeStore      * store;
+  GtkWidget         * tree;
+  GtkWidget         * scroll_win;
+  GtkCellRenderer   * renderer;
+  GtkTreeViewColumn * column;
+  GtkTreeIter         iter, child_iter;
+  int i, j, id, nb_trace, nb_tracefile;
+  LttvTraceSelector     * trace;
+  LttvTracefileSelector * tracefile;
+  char * name;
+  gboolean checked;
+
+  dialogue = gtk_dialog_new_with_buttons(title,
+                                        NULL,
+                                        GTK_DIALOG_MODAL,
+                                        GTK_STOCK_OK,GTK_RESPONSE_ACCEPT,
+                                        GTK_STOCK_CANCEL,GTK_RESPONSE_REJECT,
+                                        NULL); 
+  gtk_window_set_default_size((GtkWindow*)dialogue, 300, 100);
+
+  store = gtk_tree_store_new (TOTAL_COLUMNS, G_TYPE_BOOLEAN, G_TYPE_STRING);
+  tree  = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
+  g_object_unref (G_OBJECT (store));
+  g_signal_connect (G_OBJECT (tree), "row-activated",
+                   G_CALLBACK (checkbox_changed),
+                   NULL);  
+
+
+  renderer = gtk_cell_renderer_toggle_new ();
+  gtk_cell_renderer_toggle_set_radio((GtkCellRendererToggle *)renderer, FALSE);
+
+  g_object_set (G_OBJECT (renderer),"activatable", TRUE, NULL);
+
+  column   = gtk_tree_view_column_new_with_attributes ("Checkbox",
+                                                      renderer,
+                                                      "active", CHECKBOX_COLUMN,
+                                                      NULL);
+  gtk_tree_view_column_set_alignment (column, 0.5);
+  gtk_tree_view_column_set_fixed_width (column, 20);
+  gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
+
+  renderer = gtk_cell_renderer_text_new ();
+  column   = gtk_tree_view_column_new_with_attributes (column_title,
+                                                      renderer,
+                                                      "text", NAME_COLUMN,
+                                                      NULL);
+  gtk_tree_view_column_set_alignment (column, 0.0);
+  gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
+  gtk_tree_view_set_headers_visible(GTK_TREE_VIEW (tree), FALSE);
+
+  scroll_win = gtk_scrolled_window_new (NULL, NULL);
+  gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll_win), 
+                                GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC);
+  gtk_container_add (GTK_CONTAINER (scroll_win), tree);
+
+  gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialogue)->vbox), scroll_win,TRUE, TRUE,0);
+
+  gtk_widget_show(scroll_win);
+  gtk_widget_show(tree);
+  
+  nb_trace = lttv_traceset_selector_number(s);
+  for(i=0;i<nb_trace;i++){
+    trace = lttv_traceset_selector_get(s, i);
+    name  = lttv_trace_selector_get_name(trace);    
+    gtk_tree_store_append (store, &iter, NULL);
+    checked = lttv_trace_selector_get_selected(trace);
+    gtk_tree_store_set (store, &iter, 
+                       CHECKBOX_COLUMN,checked,
+                       NAME_COLUMN,name,
+                       -1);
+    nb_tracefile = lttv_trace_selector_number(trace);
+    for(j=0;j<nb_tracefile;j++){
+      tracefile = lttv_trace_selector_get(trace, j);
+      name      = lttv_tracefile_selector_get_name(tracefile);    
+      gtk_tree_store_append (store, &child_iter, &iter);
+      checked = lttv_tracefile_selector_get_selected(tracefile);
+      gtk_tree_store_set (store, &child_iter, 
+                         CHECKBOX_COLUMN, checked,
+                         NAME_COLUMN,name,
+                         -1);
+    }
+  }
+
+  id = gtk_dialog_run(GTK_DIALOG(dialogue));
+  switch(id){
+    case GTK_RESPONSE_ACCEPT:
+    case GTK_RESPONSE_OK:
+      update_filter(s, store);
+    case GTK_RESPONSE_REJECT:
+    case GTK_RESPONSE_CANCEL:
+    default:
+      gtk_widget_destroy(dialogue);
+      break;
+  }
+}
+
 char * get_remove_trace(char ** all_trace_name, int nb_trace)
 {
   return get_selection(all_trace_name, nb_trace, 
@@ -1111,8 +1417,10 @@ void tab_destructor(Tab * tab_instance)
     for(i = 0 ; i < nb ; i++) {
       trace = lttv_traceset_get(tab_instance->traceset_info->traceset, i);
       ref_count = lttv_trace_get_ref_number(trace);
-      if(ref_count <= 1)
+      if(ref_count <= 1){
        ltt_trace_close(lttv_trace(trace));
+      }
+      lttv_trace_destroy(trace);
     }
   }  
   lttv_traceset_destroy(tab_instance->traceset_info->traceset); 
@@ -1149,11 +1457,10 @@ void * create_tab(MainWindow * parent, MainWindow* current_window,
         lttv_traceset_copy(mw_data->current_tab->traceset_info->traceset);
     }else{
       tmp_tab->traceset_info->traceset = lttv_traceset_new();    
+      /* Add the command line trace */
+      if(g_init_trace != NULL)
+       lttv_traceset_add(tmp_tab->traceset_info->traceset, g_init_trace);
     }
-
-    /* Add the command line trace */
-    if(g_init_trace != NULL && parent == NULL)
-      lttv_traceset_add(tmp_tab->traceset_info->traceset, g_init_trace);
   }
   //FIXME copy not implemented in lower level
   tmp_tab->traceset_info->traceset_context =
index 95a24cb9e72ce12fb6b9afed82ca0f30cd928084..6efc450f10422ce8cf994916d09270806e580224 100644 (file)
@@ -104,6 +104,14 @@ void
 on_remove_viewer_activate              (GtkMenuItem     *menuitem,
                                         gpointer         user_data);
 
+void
+on_trace_filter_activate              (GtkMenuItem     *menuitem,
+                                      gpointer         user_data);
+
+void
+on_trace_facility_activate              (GtkMenuItem     *menuitem,
+                                      gpointer         user_data);
+
 void
 on_load_module_activate                (GtkMenuItem     *menuitem,
                                         gpointer         user_data);
index 9c59a319347a4de9fb92df2c83c68e3072da41ee..454351ed90170da701131607aaa730db545b5296 100644 (file)
@@ -66,6 +66,7 @@ gtk_multi_vpaned_init (GtkMultiVPaned * multi_vpaned)
   multi_vpaned->first_pane    = NULL;
   multi_vpaned->last_pane     = NULL;
   multi_vpaned->focused_pane  = NULL;
+  multi_vpaned->iter          = NULL;
   multi_vpaned->num_children  = 0;
 
   multi_vpaned->vbox         = NULL;
@@ -80,6 +81,39 @@ GtkWidget* gtk_multi_vpaned_new ()
   return GTK_WIDGET (g_object_new (gtk_multi_vpaned_get_type (), NULL));
 }
 
+GtkWidget * gtk_multi_vpaned_get_widget(GtkMultiVPaned * multi_vpaned)
+{
+  if(multi_vpaned->focused_pane == NULL)return NULL;
+  return (GtkWidget*)multi_vpaned->focused_pane->child2;
+}
+
+GtkWidget * gtk_multi_vpaned_get_first_widget(GtkMultiVPaned * multi_vpaned)
+{
+  if(multi_vpaned->first_pane == NULL)return NULL;
+  multi_vpaned->iter = multi_vpaned->first_pane;
+  return multi_vpaned->first_pane->child2;
+}
+
+GtkWidget * gtk_multi_vpaned_get_next_widget(GtkMultiVPaned * multi_vpaned)
+{
+  if(multi_vpaned->iter != multi_vpaned->last_pane){
+    multi_vpaned->iter = (GtkPaned *)multi_vpaned->iter->child1;
+    return multi_vpaned->iter->child2;
+  }else {
+    return NULL;
+  }
+}
+
+void gtk_multi_vpaned_set_data(GtkMultiVPaned * multi_vpaned,char * key, gpointer value)
+{
+  g_object_set_data(G_OBJECT(multi_vpaned->focused_pane), key, value);    
+}
+
+gpointer gtk_multi_vpaned_get_data(GtkMultiVPaned * multi_vpaned,char * key)
+{
+  if(multi_vpaned->focused_pane == NULL)return NULL;
+  return g_object_get_data(G_OBJECT(multi_vpaned->focused_pane), key);
+}
 
 void gtk_multi_vpaned_set_focus (GtkWidget * widget, gpointer user_data)
 {
index 91944afe5f8a4c743aa70957827e7a157ced42ea..a749a721fbcd4809e516dc0017336bd14e68c77b 100644 (file)
@@ -37,7 +37,7 @@ create_MWindow (void)
   GtkWidget *FileMenuTitle_menu;
   GtkWidget *FileMenuNewTitle;
   GtkWidget *FileMenuNewTitle_menu;
-  GtkWidget *EmptyTraceset;
+  //  GtkWidget *EmptyTraceset;
   GtkWidget *CloneTraceset;
   GtkWidget *FileMenuNewSep;
   GtkWidget *Tab;
@@ -71,6 +71,9 @@ create_MWindow (void)
   GtkWidget *MoveViewerDown;
   GtkWidget *RemoveViewer;
   GtkWidget *ToolMenuSeparator;
+  GtkWidget *Filter;
+  //  GtkWidget *Facility;
+  GtkWidget *ToolMenuSeparator1;
   //  GtkWidget *insert_viewer_test;
   GtkWidget *PluginMenuTitle;
   GtkWidget *PluginMenuTitle_menu;
@@ -145,11 +148,12 @@ create_MWindow (void)
   FileMenuNewTitle_menu = gtk_menu_new ();
   gtk_menu_item_set_submenu (GTK_MENU_ITEM (FileMenuNewTitle), FileMenuNewTitle_menu);
 
-  EmptyTraceset = gtk_menu_item_new_with_mnemonic ("Empty trace set");
-  gtk_widget_show (EmptyTraceset);
-  gtk_container_add (GTK_CONTAINER (FileMenuNewTitle_menu), EmptyTraceset);
+  //  EmptyTraceset = gtk_menu_item_new_with_mnemonic ("Empty trace set");
+  //  gtk_widget_show (EmptyTraceset);
+  //  gtk_container_add (GTK_CONTAINER (FileMenuNewTitle_menu), EmptyTraceset);
 
-  CloneTraceset = gtk_menu_item_new_with_mnemonic ("Clone trace set");
+  //  CloneTraceset = gtk_menu_item_new_with_mnemonic ("Clone trace set");
+  CloneTraceset = gtk_menu_item_new_with_mnemonic ("New window");
   gtk_widget_show (CloneTraceset);
   gtk_container_add (GTK_CONTAINER (FileMenuNewTitle_menu), CloneTraceset);
 
@@ -283,6 +287,19 @@ create_MWindow (void)
   gtk_container_add (GTK_CONTAINER (ToolMenuTitle_menu), ToolMenuSeparator);
   gtk_widget_set_sensitive (ToolMenuSeparator, FALSE);
 
+  Filter = gtk_menu_item_new_with_mnemonic ("Trace Filter Selector");
+  gtk_widget_show (Filter);
+  gtk_container_add (GTK_CONTAINER (ToolMenuTitle_menu), Filter);
+
+  //  Facility = gtk_menu_item_new_with_mnemonic ("Facility Selector");
+  //  gtk_widget_show (Facility);
+  //  gtk_container_add (GTK_CONTAINER (ToolMenuTitle_menu), Facility);
+
+  ToolMenuSeparator1 = gtk_menu_item_new ();
+  gtk_widget_show (ToolMenuSeparator1);
+  gtk_container_add (GTK_CONTAINER (ToolMenuTitle_menu), ToolMenuSeparator1);
+  gtk_widget_set_sensitive (ToolMenuSeparator1, FALSE);
+
   //  insert_viewer_test = gtk_menu_item_new_with_mnemonic ("Insert viewer test");
   //  gtk_widget_show (insert_viewer_test);
   //  gtk_container_add (GTK_CONTAINER (ToolMenuTitle_menu), insert_viewer_test);
@@ -364,7 +381,8 @@ create_MWindow (void)
                                 GTK_TOOLBAR_CHILD_BUTTON,
                                 NULL,
                                 "",
-                                "New window with empty trace set", NULL,
+                                "New window", NULL,
+                               //"New window with empty trace set", NULL,
                                 tmp_toolbar_icon, NULL, NULL);
   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (MToolbar1)->children)->data))->label), TRUE);
   gtk_widget_show (tlbEmptyTraceset);
@@ -542,9 +560,9 @@ create_MWindow (void)
   g_signal_connect ((gpointer) MWindow, "destroy",
                     G_CALLBACK (on_MWindow_destroy),
                     NULL);
-  g_signal_connect ((gpointer) EmptyTraceset, "activate",
-                    G_CALLBACK (on_empty_traceset_activate),
-                    NULL);
+  //  g_signal_connect ((gpointer) EmptyTraceset, "activate",
+  //                    G_CALLBACK (on_empty_traceset_activate),
+  //                    NULL);
   g_signal_connect ((gpointer) CloneTraceset, "activate",
                     G_CALLBACK (on_clone_traceset_activate),
                     NULL);
@@ -619,6 +637,12 @@ create_MWindow (void)
   g_signal_connect ((gpointer) RemoveViewer, "activate",
                     G_CALLBACK (on_remove_viewer_activate),
                     NULL);
+  g_signal_connect ((gpointer) Filter, "activate",
+                    G_CALLBACK (on_trace_filter_activate),
+                    NULL);
+  //  g_signal_connect ((gpointer) Facility, "activate",
+  //                    G_CALLBACK (on_trace_facility_activate),
+  //                    NULL);
   //  g_signal_connect ((gpointer) insert_viewer_test, "activate",
   //                    G_CALLBACK (on_insert_viewer_test_activate),
   //                    NULL);
@@ -709,7 +733,7 @@ create_MWindow (void)
   GLADE_HOOKUP_OBJECT (MWindow, FileMenuTitle_menu, "FileMenuTitle_menu");
   GLADE_HOOKUP_OBJECT (MWindow, FileMenuNewTitle, "FileMenuNewTitle");
   GLADE_HOOKUP_OBJECT (MWindow, FileMenuNewTitle_menu, "FileMenuNewTitle_menu");
-  GLADE_HOOKUP_OBJECT (MWindow, EmptyTraceset, "EmptyTraceset");
+  //  GLADE_HOOKUP_OBJECT (MWindow, EmptyTraceset, "EmptyTraceset");
   GLADE_HOOKUP_OBJECT (MWindow, CloneTraceset, "CloneTraceset");
   GLADE_HOOKUP_OBJECT (MWindow, FileMenuNewSep, "FileMenuNewSep");
   GLADE_HOOKUP_OBJECT (MWindow, Tab, "Tab");
@@ -743,6 +767,9 @@ create_MWindow (void)
   GLADE_HOOKUP_OBJECT (MWindow, MoveViewerDown, "MoveViewerDown");
   GLADE_HOOKUP_OBJECT (MWindow, RemoveViewer, "RemoveViewer");
   GLADE_HOOKUP_OBJECT (MWindow, ToolMenuSeparator, "ToolMenuSeparator");
+  GLADE_HOOKUP_OBJECT (MWindow, Filter, "Filter");
+  //  GLADE_HOOKUP_OBJECT (MWindow, Facility, "Facility");
+  GLADE_HOOKUP_OBJECT (MWindow, ToolMenuSeparator1, "ToolMenuSeparator1");
   //  GLADE_HOOKUP_OBJECT (MWindow, insert_viewer_test, "insert_viewer_test");
   GLADE_HOOKUP_OBJECT (MWindow, PluginMenuTitle, "PluginMenuTitle");
   GLADE_HOOKUP_OBJECT (MWindow, PluginMenuTitle_menu, "PluginMenuTitle_menu");
diff --git a/ltt/branches/poly/lttv/modules/gui/mainWin/src/lttvfilter.c b/ltt/branches/poly/lttv/modules/gui/mainWin/src/lttvfilter.c
new file mode 100644 (file)
index 0000000..2422156
--- /dev/null
@@ -0,0 +1,165 @@
+
+#include <lttv/lttvfilter.h>
+#include <stdio.h>
+
+struct _LttvTracesetSelector {
+  char      * traceset_name;
+  GPtrArray *traces;
+};
+
+
+struct _LttvTraceSelector {
+  char      * trace_name;
+  GPtrArray * tracefiles;
+  gboolean    selected;
+};
+
+struct _LttvTracefileSelector {
+  char      * tracefile_name;
+  gboolean    selected;
+};
+
+
+LttvTracesetSelector *lttv_traceset_selector_new(char * name) 
+{
+  LttvTracesetSelector *s;
+
+  s = g_new(LttvTracesetSelector, 1);
+  if(name)
+    s->traceset_name = g_strdup(name);
+  else
+    s->traceset_name = NULL;    
+  s->traces = g_ptr_array_new();
+  return s;
+}
+
+LttvTraceSelector *lttv_trace_selector_new(LttTrace *t) 
+{
+  LttvTraceSelector * trace;
+
+  trace = g_new(LttvTraceSelector, 1);
+  trace->trace_name = g_strdup(ltt_trace_name(t));
+  trace->tracefiles = g_ptr_array_new();
+  trace->selected = TRUE;
+  return trace;
+}
+
+LttvTracefileSelector *lttv_tracefile_selector_new(LttTracefile *t) 
+{
+  LttvTracefileSelector * tracefile;
+
+  tracefile = g_new(LttvTracefileSelector, 1);
+  tracefile->tracefile_name = g_strdup(ltt_tracefile_name(t));
+  tracefile->selected = TRUE;
+  return tracefile;
+}
+
+
+void lttv_traceset_selector_destroy(LttvTracesetSelector *s) 
+{
+  int i;
+  LttvTraceSelector * t;
+
+  for(i=0;i<s->traces->len;i++){
+    t = (LttvTraceSelector*)s->traces->pdata[i];
+    lttv_trace_selector_destroy(t);
+  }
+  g_ptr_array_free(s->traces, TRUE);
+  if(s->traceset_name) g_free(s->traceset_name);
+  g_free(s);
+}
+
+void lttv_trace_selector_destroy(LttvTraceSelector *s) 
+{
+  int i;
+  LttvTracefileSelector * t;
+
+  for(i=0;i<s->tracefiles->len;i++){
+    t = (LttvTracefileSelector*)s->tracefiles->pdata[i];
+    lttv_tracefile_selector_destroy(t);
+  }
+  if(s->trace_name) g_free(s->trace_name);
+  g_free(s);
+}
+
+void lttv_tracefile_selector_destroy(LttvTracefileSelector *t) 
+{
+  if(t->tracefile_name) g_free(t->tracefile_name);
+  g_free(t);
+}
+
+void lttv_traceset_selector_add(LttvTracesetSelector *s, LttvTraceSelector *t) 
+{
+  g_ptr_array_add(s->traces, t);
+}
+
+void lttv_trace_selector_add(LttvTraceSelector *s, LttvTracefileSelector *t) 
+{
+  g_ptr_array_add(s->tracefiles, t);
+}
+
+
+unsigned lttv_traceset_selector_number(LttvTracesetSelector *s) 
+{
+  return s->traces->len;
+}
+
+unsigned lttv_trace_selector_number(LttvTraceSelector *s) 
+{
+  return s->tracefiles->len;
+}
+
+LttvTraceSelector *lttv_traceset_selector_get(LttvTracesetSelector *s, unsigned i) 
+{
+  g_assert(s->traces->len > i);
+  return ((LttvTraceSelector *)s->traces->pdata[i]);
+}
+
+LttvTracefileSelector *lttv_trace_selector_get(LttvTraceSelector *s, unsigned i) 
+{
+  g_assert(s->tracefiles->len > i);
+  return ((LttvTracefileSelector *)s->tracefiles->pdata[i]);
+}
+
+void lttv_traceset_selector_remove(LttvTracesetSelector *s, unsigned i) 
+{
+  g_assert(s->traces->len > i);
+  g_ptr_array_remove_index(s->traces, i);
+}
+
+void lttv_trace_selector_remove(LttvTraceSelector *s, unsigned i) 
+{
+  g_assert(s->tracefiles->len > i);
+  g_ptr_array_remove_index(s->tracefiles, i);
+}
+
+
+void lttv_trace_selector_set_selected(LttvTraceSelector *s, gboolean g)
+{
+  s->selected = g;
+}
+
+void lttv_tracefile_selector_set_selected(LttvTracefileSelector *s, gboolean g)
+{
+  s->selected = g;
+}
+
+gboolean lttv_trace_selector_get_selected(LttvTraceSelector *s)
+{
+  return s->selected;
+}
+
+gboolean lttv_tracefile_selector_get_selected(LttvTracefileSelector *s)
+{
+  return s->selected;
+}
+
+char * lttv_trace_selector_get_name(LttvTraceSelector *s)
+{
+  return s->trace_name;
+}
+
+char * lttv_tracefile_selector_get_name(LttvTracefileSelector *s)
+{
+  return s->tracefile_name;
+}
index ba123f415cc97ca988d0380aac1b0af4082a1e0b..06f413cabb7e12d605a46dc789c55fe37eab7cc1 100644 (file)
@@ -302,7 +302,7 @@ void send_test_process(ProcessList *Process_List, Drawing_t *Drawing)
  * @return The widget created.
  */
 GtkWidget *
-hGuiControlFlow(MainWindow *pmParentWindow)
+hGuiControlFlow(MainWindow *pmParentWindow, LttvTracesetSelector * s, char * key)
 {
        g_critical("hGuiControlFlow");
        ControlFlowData *Control_Flow_Data = GuiControlFlow() ;
index 5f7672ab81870179f2b1f810994ccbb03cf6da9f..0d9baa1c5acf4a8d2b405c16cd411940d18d31dc 100644 (file)
@@ -14,7 +14,7 @@
 
 void send_test_data(ProcessList *Process_List, Drawing_t *Drawing);
 
-GtkWidget *hGuiControlFlow(MainWindow *pmParentWindow);
+GtkWidget *hGuiControlFlow(MainWindow *pmParentWindow, LttvTracesetSelector * s, char * key);
 
 int Event_Selected_Hook(void *hook_data, void *call_data);
 
index 66f10d9b32165482871b4599a33f444b96ee0a02..94fc4a2d35c5b7d79488852616bdf234f460f241 100644 (file)
@@ -129,9 +129,9 @@ typedef struct _EventViewerData {
 } EventViewerData ;
 
 //! Event Viewer's constructor hook
-GtkWidget *h_gui_events(MainWindow *parent_window);
+GtkWidget *h_gui_events(MainWindow *parent_window, LttvTracesetSelector * s, char* key);
 //! Event Viewer's constructor
-EventViewerData *gui_events(MainWindow *parent_window);
+EventViewerData *gui_events(MainWindow *parent_window, LttvTracesetSelector *s, char *key);
 //! Event Viewer's destructor
 void gui_events_destructor(EventViewerData *event_viewer_data);
 void gui_events_free(EventViewerData *event_viewer_data);
@@ -235,9 +235,9 @@ enum
  * @return The widget created.
  */
 GtkWidget *
-h_gui_events(MainWindow * parent_window)
+h_gui_events(MainWindow * parent_window, LttvTracesetSelector * s, char* key)
 {
-  EventViewerData* event_viewer_data = gui_events(parent_window) ;
+  EventViewerData* event_viewer_data = gui_events(parent_window, s, key) ;
 
   if(event_viewer_data)
     return event_viewer_data->hbox_v;
@@ -252,7 +252,7 @@ h_gui_events(MainWindow * parent_window)
  * @return The Event viewer data created.
  */
 EventViewerData *
-gui_events(MainWindow *parent_window)
+gui_events(MainWindow *parent_window, LttvTracesetSelector * s,char* key )
 {
   LttTime start, end;
   GtkTreeViewColumn *column;
@@ -456,6 +456,11 @@ gui_events(MainWindow *parent_window)
   //  tree_v_set_cursor(event_viewer_data);
 
 
+  g_object_set_data(
+                   G_OBJECT(event_viewer_data->hbox_v),
+                   key,
+                   s);
+  
   g_object_set_data_full(
                        G_OBJECT(event_viewer_data->hbox_v),
                        "event_viewer_data",
index e23227f27f34fc2cb50af308d3387079d7d901f5..230cd842502790afa8d14ef1e6075461f9b495a4 100644 (file)
@@ -33,9 +33,9 @@ static GSList *g_statistic_viewer_data_list = NULL ;
 typedef struct _StatisticViewerData StatisticViewerData;
 
 //! Statistic Viewer's constructor hook
-GtkWidget *h_gui_statistic(MainWindow *parent_window);
+GtkWidget *h_gui_statistic(MainWindow *parent_window, LttvTracesetSelector * s, char* key);
 //! Statistic Viewer's constructor
-StatisticViewerData *gui_statistic(MainWindow *parent_window);
+StatisticViewerData *gui_statistic(MainWindow *parent_window,LttvTracesetSelector * s, char* key);
 //! Statistic Viewer's destructor
 void gui_statistic_destructor(StatisticViewerData *statistic_viewer_data);
 void gui_statistic_free(StatisticViewerData *statistic_viewer_data);
@@ -164,9 +164,9 @@ gui_statistic_destructor(StatisticViewerData *statistic_viewer_data)
  * @return The widget created.
  */
 GtkWidget *
-h_gui_statistic(MainWindow * parent_window)
+h_gui_statistic(MainWindow * parent_window, LttvTracesetSelector * s, char* key)
 {
-  StatisticViewerData* statistic_viewer_data = gui_statistic(parent_window) ;
+  StatisticViewerData* statistic_viewer_data = gui_statistic(parent_window, s, key) ;
 
   if(statistic_viewer_data)
     return statistic_viewer_data->hpaned_v;
@@ -181,7 +181,7 @@ h_gui_statistic(MainWindow * parent_window)
  * @return The Statistic viewer data created.
  */
 StatisticViewerData *
-gui_statistic(MainWindow *parent_window)
+gui_statistic(MainWindow *parent_window, LttvTracesetSelector * s, char* key)
 {
   GtkCellRenderer *renderer;
   GtkTreeViewColumn *column;
@@ -251,6 +251,11 @@ gui_statistic(MainWindow *parent_window)
   gtk_widget_show(statistic_viewer_data->text_v);
   gtk_widget_show(statistic_viewer_data->hpaned_v);
 
+  g_object_set_data(
+                   G_OBJECT(statistic_viewer_data->hpaned_v),
+                   key,
+                   s);
+
   g_object_set_data_full(
                        G_OBJECT(statistic_viewer_data->hpaned_v),
                        "statistic_viewer_data",
index 508afb16cbc875d95b7ddaa7d56374e49fca13d4..ce96b99a1e16d5fcc6ca3dbde5b99901276c32d0 100644 (file)
@@ -33,6 +33,11 @@ LttvTraceset *lttv_traceset_new()
   return s;
 }
 
+char * lttv_traceset_name(LttvTraceset * s)
+{
+  return s->filename;
+}
+
 LttvTrace *lttv_trace_new(LttTrace *t) 
 {
   LttvTrace *new_trace;
This page took 0.03916 seconds and 4 git commands to generate.