git-svn-id: http://ltt.polymtl.ca/svn@473 04897980-b3bd-0310-b5e0-8ef037075253
authoryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 3 Feb 2004 19:43:46 +0000 (19:43 +0000)
committeryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 3 Feb 2004 19:43:46 +0000 (19:43 +0000)
ltt/branches/poly/lttv/main/processTrace.c
ltt/branches/poly/lttv/modules/gui/detailedevents/events.c
ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c
ltt/branches/poly/lttv/modules/gui/statistics/statistics.c

index bf81ffcf60635b7da00cbb950ecd4f2bec039431..9a2d457c8a79a447607097b975ec0de103541d7e 100644 (file)
@@ -80,6 +80,11 @@ static void lttv_traceset_context_compute_time_span(
   LttvTraceContext *tc;
   LttTrace * trace;
 
+  Time_Span->startTime.tv_sec = 0;
+  Time_Span->startTime.tv_nsec = 0;
+  Time_Span->endTime.tv_sec = 0;
+  Time_Span->endTime.tv_nsec = 0;
+  
   for(i=0; i<numTraces;i++){
     tc = self->traces[i];
     trace = tc->t;
index 7a9b0b8b5a72d418d040f86c46f28c21b9e98abf..82f83500b545466e46c0a058cd32cbf79a2df8d5 100644 (file)
@@ -805,6 +805,12 @@ gboolean show_event_detail(void * hook_data, void * call_data)
   EventViewerData *event_viewer_data = (EventViewerData*) hook_data;
   LttvTracesetContext * tsc = get_traceset_context(event_viewer_data->mw);
 
+  if(event_viewer_data->raw_trace_data_queue_tmp->length == 0 &&
+     event_viewer_data->raw_trace_data_queue->length == 0){
+    event_viewer_data->shown = FALSE;
+    return FALSE;
+  }
+
   if(event_viewer_data->shown == FALSE){
     event_viewer_data->shown = TRUE;
     update_raw_data_array(event_viewer_data, 
@@ -1442,6 +1448,8 @@ gboolean update_current_time(void * hook_data, void * call_data)
   int i, j;
   LttTime t;
 
+  if(!event_viewer_data->raw_trace_data_queue->head) return FALSE;
+
   if(event_viewer_data->current_time_updated ){
     event_viewer_data->current_time_updated = FALSE;
     return FALSE;
index cc6ec38bf791c73086d2eec62e7a6fee1762a8fb..76cd18c208d98ad53479cdf36365ca42349e893e 100644 (file)
@@ -529,7 +529,8 @@ void remove_trace(GtkWidget * widget, gpointer user_data)
            g_object_unref(mw_data->current_tab->traceset_info->traceset_context);
          }
          lttv_traceset_remove(traceset, i);
-         lttv_trace_destroy(trace_v);
+         if(!lttv_trace_get_ref_number(trace_v))
+            lttv_trace_destroy(trace_v);
          mw_data->current_tab->traceset_info->traceset_context =
            g_object_new(LTTV_TRACESET_STATS_TYPE, NULL);
          lttv_context_init(
@@ -537,8 +538,16 @@ void remove_trace(GtkWidget * widget, gpointer user_data)
                                      traceset_info->traceset_context),traceset);      
          //update current tab
          update_traceset(mw_data);
-         redraw_viewer(mw_data, &(mw_data->current_tab->time_window));
-         set_current_time(mw_data,&(mw_data->current_tab->current_time));
+         if(nb_trace > 1){
+           redraw_viewer(mw_data, &(mw_data->current_tab->time_window));
+           set_current_time(mw_data,&(mw_data->current_tab->current_time));
+         }else{
+           if(mw_data->current_tab){
+             while(mw_data->current_tab->multi_vpaned->num_children){
+               gtk_multi_vpaned_widget_delete(mw_data->current_tab->multi_vpaned);
+             }    
+           }       
+         }
        }
        break;
       }
index 04ca3a7d855f336a0f1fc759939d85f2cdf3b121..fefaa3076aa27b88f0983b9f1c0194031639d86a 100644 (file)
@@ -425,6 +425,10 @@ void show_traceset_stats(StatisticViewerData * statistic_viewer_data)
 
   if(tscs->stats == NULL) return;
 
+  ts = tscs->parent.parent.ts;
+  nb = lttv_traceset_number(ts);
+  if(nb == 0)return;
+
   gtk_tree_store_append (store, &iter, NULL);  
   gtk_tree_store_set (store, &iter,
           NAME_COLUMN, "Traceset statistics",
@@ -436,9 +440,6 @@ void show_traceset_stats(StatisticViewerData * statistic_viewer_data)
   show_tree(statistic_viewer_data, tscs->stats, &iter);
 
   //show stats for all traces
-  ts = tscs->parent.parent.ts;
-  nb = lttv_traceset_number(ts);
-  
   for(i = 0 ; i < nb ; i++) {
     tcs = (LttvTraceStats *)(LTTV_TRACESET_CONTEXT(tscs)->traces[i]);
     desc = ltt_trace_system_description(tcs->parent.parent.t);    
This page took 0.028379 seconds and 4 git commands to generate.