X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2FAPI%2FgtkTraceSet.c;h=ec71b69d678705a6d213c0eaab290e25d5ed5fac;hb=a8c0f09de06b94e9420d286e1541c39092fff434;hp=b079fb5a39e998c800b0724c0f7624196b862476;hpb=202f6c8f25f240e60e41792e631f9be93cce9166;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c b/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c index b079fb5a..ec71b69d 100644 --- a/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c +++ b/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c @@ -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; +}