LttvTracesetSelector * construct_traceset_selector(LttvTraceset * traceset);
+void redraw_viewer(MainWindow * mw_data, TimeWindow * time_window, unsigned nb_events);
+
+
enum {
CHECKBOX_COLUMN,
NAME_COLUMN,
MainWindow * mw_data;
GtkWidget * viewer;
LttvTracesetSelector * s;
+ unsigned * size;
+ TimeInterval * time_interval;
+ TimeWindow time_window;
mw_data = get_window_data_struct(widget);
if(!mw_data->current_tab) return;
gtk_multi_vpaned_widget_add(multi_vpaned, viewer);
// Added by MD
// g_object_unref(G_OBJECT(viewer));
+
+ size = (unsigned*)g_object_get_data(G_OBJECT(viewer), MAX_NUMBER_EVENT);
+ if(size == NULL) *size = G_MAXULONG;
+
+ time_window = mw_data->current_tab->time_window;
+ time_interval = (TimeInterval*)g_object_get_data(G_OBJECT(viewer), TRACESET_TIME_SPAN);
+ if(time_interval){
+ time_window.start_time = time_interval->startTime;
+ time_window.time_width = ltt_time_sub(time_interval->endTime,time_interval->startTime);
+ }
+
+ redraw_viewer(mw_data,&time_window, *size);
+ set_current_time(mw_data,&(mw_data->current_tab->current_time));
}
}
}
+void redraw_viewer(MainWindow * mw_data, TimeWindow * time_window, unsigned nb_events)
+{
+ //update time window of each viewer, let viewer insert hooks needed by process_traceset
+ set_time_window(mw_data, time_window);
+
+ process_traceset_api(mw_data, time_window->start_time,
+ ltt_time_add(time_window->start_time,time_window->time_width),
+ nb_events);
+
+ //call hooks to show each viewer and let them remove hooks
+ show_viewer(mw_data);
+}
+
void add_trace_into_traceset_selector(GtkMultiVPaned * paned, LttTrace * t)
{
int j, nb_tracefile, nb_control, nb_per_cpu;
gtk_widget_destroy((GtkWidget*)file_selector);
//update current tab
- // set_current_time(mw_data, &(mw_data->current_tab->current_time));
+ redraw_viewer(mw_data, &(mw_data->current_tab->time_window), G_MAXULONG);
+ set_current_time(mw_data,&(mw_data->current_tab->current_time));
break;
case GTK_RESPONSE_REJECT:
case GTK_RESPONSE_CANCEL:
LTTV_TRACESET_CONTEXT(mw_data->current_tab->
traceset_info->traceset_context),traceset);
//update current tab
- // set_current_time(mw_data, &(mw_data->current_tab->current_time));
+ redraw_viewer(mw_data, &(mw_data->current_tab->time_window), G_MAXULONG);
+ set_current_time(mw_data,&(mw_data->current_tab->current_time));
}
break;
}
}
time_window.start_time = time_s;
}
- set_time_window(mw_data, &time_window);
+ redraw_viewer(mw_data, &time_window, G_MAXULONG);
+ set_current_time(mw_data,&(mw_data->current_tab->current_time));
gtk_multi_vpaned_set_adjust(mw_data->current_tab->multi_vpaned, FALSE);
}