state update hooks are added by the main window
[lttv.git] / ltt / branches / poly / lttv / modules / gui / mainWin / src / callbacks.c
index 000efdf017fe4b87acb3129e9fb99d1e3fe1bdd1..6abfd51cb6863ee9ea7f0f64fd8293696e4f270f 100644 (file)
@@ -544,6 +544,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 +558,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 +1126,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 +1145,7 @@ on_MWindow_configure                   (GtkWidget         *widget,
   }
 
   mw_data->window_width = (int)width;
+       */
   return FALSE;
 }
 
@@ -1714,6 +1720,9 @@ void * create_tab(MainWindow * parent, MainWindow* current_window,
            "Tab_Info",
           tmp_tab,
           (GDestroyNotify)tab_destructor);
+
+  lttv_state_add_event_hooks(
+       (LttvTracesetState*)tmp_tab->traceset_info->traceset_context);
   
   gtk_notebook_append_page(notebook, (GtkWidget*)tmp_tab->multi_vpaned, tmp_tab->label);  
   list = gtk_container_get_children(GTK_CONTAINER(notebook));
This page took 0.023527 seconds and 4 git commands to generate.