From bca085a1630564856dc74dfe33815622c5a43e9f Mon Sep 17 00:00:00 2001 From: yangxx Date: Fri, 16 Jan 2004 15:15:28 +0000 Subject: [PATCH] set_time_window updates horizontal scroll bar git-svn-id: http://ltt.polymtl.ca/svn@385 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/include/lttv/gtkmultivpaned.h | 1 + ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c | 3 +++ .../poly/lttv/modules/gui/mainWin/src/gtkmultivpaned.c | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/ltt/branches/poly/include/lttv/gtkmultivpaned.h b/ltt/branches/poly/include/lttv/gtkmultivpaned.h index 7acaf19d..52e41575 100644 --- a/ltt/branches/poly/include/lttv/gtkmultivpaned.h +++ b/ltt/branches/poly/include/lttv/gtkmultivpaned.h @@ -64,6 +64,7 @@ gpointer gtk_multi_vpaned_get_data(GtkMultiVPaned * multi_vpaned, char * key); GtkWidget * gtk_multi_vpaned_get_widget(GtkMultiVPaned * multi_vpaned); GtkWidget * gtk_multi_vpaned_get_first_widget(GtkMultiVPaned * multi_vpaned); GtkWidget * gtk_multi_vpaned_get_next_widget(GtkMultiVPaned * multi_vpaned); +void gtk_multi_vpaned_set_scroll_value(GtkMultiVPaned * multi_vpaned, double value); #ifdef __cplusplus } diff --git a/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c b/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c index ec71b69d..4105bf1f 100644 --- a/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c +++ b/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c @@ -230,6 +230,9 @@ void set_time_window(MainWindow *main_win, TimeWindow *time_window) LttvAttributeValue value; LttvHooks * tmp; main_win->current_tab->time_window = *time_window; + gtk_multi_vpaned_set_scroll_value(main_win->current_tab->multi_vpaned, + ltt_time_to_double(time_window->start_time) + * NANOSECONDS_PER_SECOND ); g_assert(lttv_iattribute_find_by_path(main_win->current_tab->attributes, "hooks/updatetimewindow", LTTV_POINTER, &value)); tmp = (LttvHooks*)*(value.v_pointer); diff --git a/ltt/branches/poly/lttv/modules/gui/mainWin/src/gtkmultivpaned.c b/ltt/branches/poly/lttv/modules/gui/mainWin/src/gtkmultivpaned.c index c864874c..43d9d5c3 100644 --- a/ltt/branches/poly/lttv/modules/gui/mainWin/src/gtkmultivpaned.c +++ b/ltt/branches/poly/lttv/modules/gui/mainWin/src/gtkmultivpaned.c @@ -366,6 +366,12 @@ void gtk_multi_vpaned_widget_move_down(GtkMultiVPaned * multi_vpaned) g_object_unref(G_OBJECT(multi_vpaned->focused_pane)); } +void gtk_multi_vpaned_set_scroll_value(GtkMultiVPaned * multi_vpaned, double value) +{ + gtk_adjustment_set_value(multi_vpaned->hadjust, value); + g_signal_stop_emission_by_name(G_OBJECT(multi_vpaned->hscrollbar), "value-changed"); +} + void gtk_multi_vpaned_scroll_value_changed(GtkRange *range, gpointer multi_vpaned_arg) { TimeWindow time_window; -- 2.34.1