From d112868cb9fcbc3bd9ffd347f075ea4ea6624481 Mon Sep 17 00:00:00 2001 From: compudj Date: Sat, 3 Jun 2006 13:53:25 +0000 Subject: [PATCH] update git-svn-id: http://ltt.polymtl.ca/svn@1881 04897980-b3bd-0310-b5e0-8ef037075253 --- .../gui/lttvwindow/lttvwindow/callbacks.c | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c index 7daa30e1..e7822f7b 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c @@ -3329,6 +3329,7 @@ void time_change_manager (Tab *tab, TimeInterval time_span = tsc->time_span; LttTime start_time = new_time_window.start_time; LttTime end_time = new_time_window.end_time; + LttTime time_width = new_time_window.time_width; g_assert(ltt_time_compare(start_time, end_time) < 0); @@ -3441,6 +3442,37 @@ void time_change_manager (Tab *tab, gtk_spin_button_set_value(GTK_SPIN_BUTTON(tab->MEntry4), (double)end_time.tv_nsec); + /* width seconds */ + gtk_spin_button_set_range(GTK_SPIN_BUTTON(tab->MEntry7), + (double)0, + (double)time_span.time_width.tv_sec); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(tab->MEntry7), + (double)time_width.tv_sec); + + /* width nanoseconds */ + if(time_width.tv_sec == time_span.time_width.tv_sec) { + if(time_width.tv_sec == 0) { + gtk_spin_button_set_range(GTK_SPIN_BUTTON(tab->MEntry8), + (double)1, + (double)time_span.time_width.tv_nsec); + } else { + gtk_spin_button_set_range(GTK_SPIN_BUTTON(tab->MEntry8), + (double)0, + (double)time_span.time_width.tv_nsec); + } + } + else if(time_width.tv_sec == 0) { + gtk_spin_button_set_range(GTK_SPIN_BUTTON(tab->MEntry8), + 1.0, + (double)time_span.time_width.tv_nsec); + } + else /* anywhere else */ + gtk_spin_button_set_range(GTK_SPIN_BUTTON(tab->MEntry8), + 0.0, + (double)NANOSECONDS_PER_SECOND-1); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(tab->MEntry8), + (double)time_width.tv_nsec); + /* call viewer hooks for new time window */ set_time_window(tab, &new_time_window); -- 2.34.1