update
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sat, 3 Jun 2006 13:53:25 +0000 (13:53 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sat, 3 Jun 2006 13:53:25 +0000 (13:53 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1881 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c

index 7daa30e13ba8de3b6cac67bc0c5be74d74c4d1ef..e7822f7b80137a63fc25e90210df10161049058c 100644 (file)
@@ -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);
 
This page took 0.026345 seconds and 4 git commands to generate.