back to version 385
[lttv.git] / ltt / branches / poly / lttv / modules / gui / mainWin / src / callbacks.c
index 000efdf017fe4b87acb3129e9fb99d1e3fe1bdd1..5440d6ecbfd2bad288adac29662dfc04388b9cbd 100644 (file)
@@ -323,6 +323,9 @@ void redraw_viewer(MainWindow * mw_data, TimeWindow * time_window)
   gdk_window_stick(win);
   gdk_window_unstick(win);
  
+  //lttv_state_add_event_hooks(
+  //           (LttvTracesetState*)mw_data->current_tab->traceset_info->traceset_context);
+
   //update time window of each viewer, let viewer insert hooks needed by process_traceset
   set_time_window(mw_data, time_window);
   
@@ -332,6 +335,9 @@ void redraw_viewer(MainWindow * mw_data, TimeWindow * time_window)
                       ltt_time_add(time_window->start_time,time_window->time_width),
                       max_nb_events);
 
+  //lttv_state_remove_event_hooks(
+  //        (LttvTracesetState*)mw_data->current_tab->traceset_info->traceset_context);
+
   //call hooks to show each viewer and let them remove hooks
   show_viewer(mw_data);  
 
@@ -544,6 +550,8 @@ void zoom(GtkWidget * widget, double size)
   LttTime    current_time, time_delta, time_s, time_e, time_t;
   MainWindow * mw_data = get_window_data_struct(widget);
 
+  if(size == 1) return;
+
   time_span = LTTV_TRACESET_CONTEXT(mw_data->current_tab->
                                    traceset_info->traceset_context)->Time_Span;
   time_window =  mw_data->current_tab->time_window;
@@ -556,7 +564,7 @@ void zoom(GtkWidget * widget, double size)
   }else{
     time_window.time_width = ltt_time_div(time_window.time_width, size);
     if(ltt_time_compare(time_window.time_width,time_delta) > 0)
-      time_window.time_width = time_delta;        
+      time_window.time_width = time_delta;
 
     time_t = ltt_time_div(time_window.time_width, 2);
     if(ltt_time_compare(current_time, time_t) < 0){
@@ -1124,8 +1132,11 @@ on_MWindow_configure                   (GtkWidget         *widget,
   double ratio;
   TimeInterval *time_span;
   LttTime time;
-
-  while(tab){
+       
+       // MD : removed time width modification upon resizing of the main window.
+       // The viewers will redraw themselves completely, without time interval
+       // modification.
+/*  while(tab){
     if(mw_data->window_width){
       time_span = LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context)->Time_Span ;
       time_win = tab->time_window;
@@ -1140,6 +1151,7 @@ on_MWindow_configure                   (GtkWidget         *widget,
   }
 
   mw_data->window_width = (int)width;
+       */
   return FALSE;
 }
 
This page took 0.024238 seconds and 4 git commands to generate.