From 8988dccf4c097d6f96e72ececda8646e974b0a58 Mon Sep 17 00:00:00 2001 From: yangxx Date: Fri, 16 Jan 2004 16:47:24 +0000 Subject: [PATCH] state update hooks added by the main window by default git-svn-id: http://ltt.polymtl.ca/svn@386 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c | 6 ++++++ ltt/branches/poly/lttv/modules/guiStatistic/guiStatistic.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c b/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c index 9e3ab410..c0532394 100644 --- a/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c @@ -323,6 +323,9 @@ void redraw_viewer(MainWindow * mw_data, TimeWindow * time_window) gdk_window_stick(win); gdk_window_unstick(win); + lttv_state_add_event_hooks( + (LttvTracesetState*)mw_data->current_tab->traceset_info->traceset_context); + //update time window of each viewer, let viewer insert hooks needed by process_traceset set_time_window(mw_data, time_window); @@ -332,6 +335,9 @@ void redraw_viewer(MainWindow * mw_data, TimeWindow * time_window) ltt_time_add(time_window->start_time,time_window->time_width), max_nb_events); + lttv_state_remove_event_hooks( + (LttvTracesetState*)mw_data->current_tab->traceset_info->traceset_context); + //call hooks to show each viewer and let them remove hooks show_viewer(mw_data); diff --git a/ltt/branches/poly/lttv/modules/guiStatistic/guiStatistic.c b/ltt/branches/poly/lttv/modules/guiStatistic/guiStatistic.c index cbc16f2c..e9b4b761 100644 --- a/ltt/branches/poly/lttv/modules/guiStatistic/guiStatistic.c +++ b/ltt/branches/poly/lttv/modules/guiStatistic/guiStatistic.c @@ -628,7 +628,7 @@ void statistic_add_context_hooks(StatisticViewerData * statistic_viewer_data, } //add state and stats hooks - state_add_event_hooks_api(statistic_viewer_data->mw); + // state_add_event_hooks_api(statistic_viewer_data->mw); //it is added in the main window stats_add_event_hooks_api(statistic_viewer_data->mw); } @@ -680,7 +680,7 @@ void statistic_remove_context_hooks(StatisticViewerData * statistic_viewer_data, } //remove state and stats hooks - state_remove_event_hooks_api(statistic_viewer_data->mw); + // state_remove_event_hooks_api(statistic_viewer_data->mw); //it is done in the main window stats_remove_event_hooks_api(statistic_viewer_data->mw); } -- 2.34.1