X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Flttvwindow%2Flttvwindow%2Flttvwindow.c;h=a0971163bcaa0c772e322b30226ca8e505643c83;hb=db8bc91756aba1610e896aa1e9eee184843f3970;hp=a37077e3d71ef417fc57fcbf0e5a617178aaa487;hpb=e800cf849a08893a7325441a9614f018a00b129a;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c index a37077e3..a0971163 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c @@ -76,6 +76,27 @@ void set_time_window(Tab *tab, const TimeWindow *time_window) } +/* set_current_time + * + * It updates the current time of the tab, then calls the updatetimewindow + * hooks of each viewer. + * + * This is called whenever the current time value changes. + */ + +void set_current_time(Tab *tab, const LttTime *current_time) +{ + LttvAttributeValue value; + LttvHooks * tmp; + + tab->current_time = *current_time; + + g_assert(lttv_iattribute_find_by_path(tab->attributes, + "hooks/updatecurrenttime", LTTV_POINTER, &value)); + tmp = (LttvHooks*)*(value.v_pointer); + if(tmp != NULL) lttv_hooks_call(tmp, &tab->current_time); +} + void add_toolbar_constructor(MainWindow *mw, LttvToolbarClosure *toolbar_c) { LttvIAttribute *attributes = mw->attributes; @@ -743,13 +764,6 @@ void lttvwindow_report_current_time(Tab *tab, LttvHooks * tmp; current_time_change_manager(tab, time); - - g_assert(lttv_iattribute_find_by_path(tab->attributes, - "hooks/updatecurrenttime", LTTV_POINTER, &value)); - tmp = (LttvHooks*)*(value.v_pointer); - - if(tmp == NULL)return; - lttv_hooks_call(tmp, &tab->current_time); } /**