* information. Happens when two viewers ask for it before servicing
* starts.
*/
- lttvwindowtraces_background_request_remove(trace, "state");
- lttvwindowtraces_background_request_queue(trace,
- "state");
+ if(!lttvwindowtraces_background_request_find(trace, "state"))
+ lttvwindowtraces_background_request_queue(trace, "state");
lttvwindowtraces_background_notify_queue(event_viewer_data,
trace,
ltt_time_infinite,
if(gtk_tree_model_get_iter(model,&iter,path)){
gtk_tree_model_get(model, &iter, POSITION_COLUMN, &pos, -1);
+ if(lttv_traceset_context_pos_pos_compare(pos,
+ event_viewer_data->currently_selected_position) != 0)
lttvwindow_report_current_position(tab, pos);
}else{
g_warning("Can not get iter\n");
}
+ gtk_tree_path_free(path);
}
}
LttvTracesetContextPosition *pos =
lttv_traceset_context_position_new(tsc);
- /* Remember the beginning position */
+ /* Remember the beginning position */
if(event_viewer_data->pos->len > 0) {
LttvTracesetContextPosition *first_pos =
- (LttvTracesetContextPosition*)g_ptr_array_index(event_viewer_data->pos,
- 0);
+ (LttvTracesetContextPosition*)g_ptr_array_index(
+ event_viewer_data->pos,
+ 0);
lttv_traceset_context_position_copy(pos, first_pos);
- g_assert(lttv_process_traceset_seek_position(tsc, pos) == 0);
+
+ if(relative_position >= 0) {
+ LttTime first_event_time =
+ lttv_traceset_context_position_get_time(
+ pos);
+ lttv_state_traceset_seek_time_closest((LttvTracesetState*)tsc,
+ first_event_time);
+ lttv_process_traceset_middle(tsc, ltt_time_infinite,
+ G_MAXUINT,
+ pos);
+
+ } else if(relative_position < 0) {
+ g_assert(lttv_process_traceset_seek_position(tsc, pos) == 0);
+ }
} else {
/* There is nothing in the list : simply seek to the time value. */
lttv_state_traceset_seek_time_closest((LttvTracesetState*)tsc,
time = lttv_traceset_context_position_get_time(
event_viewer_data->first_event);
+ //if(ltt_time_compare(time, tsc->time_span.end_time) > 0)
+ // time = tsc->time_span.end_time;
+
LttTime time_val = ltt_time_sub(time,
tsc->time_span.start_time);
event_viewer_data->previous_value = ltt_time_to_double(time_val);
/* Little trick : seek 0 events forward to get the first event
* that passes the filter. The trick is to have a match function that
* returns 2 : it makes the read stop and keep the last position */
- guint count;
- count = lttv_process_traceset_seek_n_forward(tsc, 0,
- event_viewer_data->main_win_filter);
+ // We don't care : this will be taken care of by the _middle.
+ //guint count;
+ //count = lttv_process_traceset_seek_n_forward(tsc, 0,
+ // event_viewer_data->main_win_filter);
#if 0
lttv_process_traceset_seek_time(tsc, *current_time);