filter working: for selecting trace/tracefile
[lttv.git] / ltt / branches / poly / lttv / modules / gui / API / gtkTraceSet.c
index b079fb5a39e998c800b0724c0f7624196b862476..ec71b69d678705a6d213c0eaab290e25d5ed5fac 100644 (file)
@@ -361,7 +361,7 @@ void reg_update_traceset(LttvHook hook, gpointer hook_data,
 {
   LttvAttributeValue value;
   LttvHooks * tmp;
-  g_assert(lttv_iattribute_find_by_path(main_win->attributes,
+  g_assert(lttv_iattribute_find_by_path(main_win->current_tab->attributes,
                       "hooks/updatetraceset", LTTV_POINTER, &value));
   tmp = (LttvHooks*)*(value.v_pointer);
   if(tmp == NULL){    
@@ -386,7 +386,7 @@ void unreg_update_traceset(LttvHook hook, gpointer hook_data,
 {
   LttvAttributeValue value;
   LttvHooks * tmp;
-  g_assert(lttv_iattribute_find_by_path(main_win->attributes,
+  g_assert(lttv_iattribute_find_by_path(main_win->current_tab->attributes,
                       "hooks/updatetraceset", LTTV_POINTER, &value));
   tmp = (LttvHooks*)*(value.v_pointer);
   if(tmp == NULL) return;
@@ -394,6 +394,23 @@ void unreg_update_traceset(LttvHook hook, gpointer hook_data,
 }
 
 
+/**
+ * Function to redraw each viewer belonging to the current tab 
+ * @param main_win the main window the viewer belongs to.
+ */
+
+void update_traceset(MainWindow * main_win)
+{
+  LttvAttributeValue value;
+  LttvHooks * tmp;
+  g_assert(lttv_iattribute_find_by_path(main_win->current_tab->attributes,
+                      "hooks/updatetraceset", LTTV_POINTER, &value));
+  tmp = (LttvHooks*)*(value.v_pointer);
+  if(tmp == NULL) return;
+  lttv_hooks_call(tmp, NULL);
+}
+
+
 /**
  * Function to register a hook function for a viewer to set/update its 
  * filter.
@@ -756,3 +773,9 @@ LttvTracesetStats* get_traceset_stats_api(MainWindow *main_win)
 {
   return main_win->current_tab->traceset_info->traceset_context;
 }
+
+
+LttvTracesetContext* get_traceset_context(MainWindow *main_win)
+{
+  return (LttvTracesetContext*)main_win->current_tab->traceset_info->traceset_context;
+}
This page took 0.024529 seconds and 4 git commands to generate.