set_time_window updates horizontal scroll bar
authoryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 16 Jan 2004 15:15:28 +0000 (15:15 +0000)
committeryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 16 Jan 2004 15:15:28 +0000 (15:15 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@385 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/include/lttv/gtkmultivpaned.h
ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c
ltt/branches/poly/lttv/modules/gui/mainWin/src/gtkmultivpaned.c

index 7acaf19dedffd9a9cb16baa4b5e2f7c9d5a92e18..52e415754974e12e1d0e56f7580acc1ba5e20858 100644 (file)
@@ -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
 }
index ec71b69d678705a6d213c0eaab290e25d5ed5fac..4105bf1f7c4e0bb5d1c241f89409337886a9415c 100644 (file)
@@ -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);
index c864874c30780639fd21d5905ac39a50aca4fe58..43d9d5c3481bfc528741c254b3371b64615afa5f 100644 (file)
@@ -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;
This page took 0.025167 seconds and 4 git commands to generate.