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);
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);
"Tab_Info",
tmp_tab,
(GDestroyNotify)tab_destructor);
+
+ lttv_state_add_event_hooks(
+ (LttvTracesetState*)tmp_tab->traceset_info->traceset_context);
gtk_notebook_append_page(notebook, (GtkWidget*)tmp_tab->multi_vpaned, tmp_tab->label);
list = gtk_container_get_children(GTK_CONTAINER(notebook));
main_window_free(MainWindow * mw)
{
if(mw){
+ while(mw->tab){
+ lttv_state_remove_event_hooks(
+ (LttvTracesetState*)mw->tab->traceset_info->traceset_context);
+ mw->tab = mw->tab->next;
+ }
g_object_unref(mw->attributes);
g_main_window_list = g_slist_remove(g_main_window_list, mw);
LttvHooks *after_traceset = lttv_hooks_new();
lttv_hooks_add(after_traceset, after_data_request, &event_request);
lttv_hooks_add(event, draw_event_hook, &event_request);
- state_add_event_hooks_api(control_flow_data->Parent_Window);
+ //Modified by xiangxiu: state update hooks are added by the main window
+ //state_add_event_hooks_api(control_flow_data->Parent_Window);
lttv_hooks_add(after_event, draw_after_hook, &event_request);
lttv_process_traceset_seek_time(tsc, start);
//NULL, after_traceset, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, after_traceset, NULL, event, after_event);
- state_remove_event_hooks_api(control_flow_data->Parent_Window);
+ //Modified by xiangxiu: state update hooks are removed by the main window
+ //state_remove_event_hooks_api(control_flow_data->Parent_Window);
lttv_hooks_destroy(after_traceset);
lttv_hooks_destroy(event);
}
//add state and stats hooks
- state_add_event_hooks_api(statistic_viewer_data->mw); //it will be added in the main window
+ //state_add_event_hooks_api(statistic_viewer_data->mw); //it will be added in the main window
stats_add_event_hooks_api(statistic_viewer_data->mw);
}
}
//remove state and stats hooks
- state_remove_event_hooks_api(statistic_viewer_data->mw); //it will be done in the main window
+ //state_remove_event_hooks_api(statistic_viewer_data->mw); //it will be done in the main window
stats_remove_event_hooks_api(statistic_viewer_data->mw);
}