window duplication and tab dup now working
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 16 Jun 2004 19:33:05 +0000 (19:33 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 16 Jun 2004 19:33:05 +0000 (19:33 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@596 04897980-b3bd-0310-b5e0-8ef037075253

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

index f403e77a364e28c44bcdaf1fd27d086b5ec93b4a..baea60a9ee018ccf00078ccdce971bdea12510e7 100644 (file)
@@ -2506,8 +2506,7 @@ void * create_tab(MainWindow * parent, MainWindow* current_window,
   if(parent){
     if(parent->current_tab){
       tmp_tab->traceset_info->traceset = 
-                      lttv_traceset_new();
-        //FIXME lttv_traceset_copy(parent->current_tab->traceset_info->traceset);
+        lttv_traceset_copy(parent->current_tab->traceset_info->traceset);
     }else{
       tmp_tab->traceset_info->traceset = lttv_traceset_new();
     }
@@ -2515,8 +2514,7 @@ void * create_tab(MainWindow * parent, MainWindow* current_window,
   }else{  /* Initial window */
     if(mw_data->current_tab){
       tmp_tab->traceset_info->traceset = 
-                      lttv_traceset_new();
-        //FIXME lttv_traceset_copy(mw_data->current_tab->traceset_info->traceset);
+        lttv_traceset_copy(mw_data->current_tab->traceset_info->traceset);
     }else{
       tmp_tab->traceset_info->traceset = lttv_traceset_new();    
       /* Add the command line trace */
@@ -2525,7 +2523,15 @@ void * create_tab(MainWindow * parent, MainWindow* current_window,
       }
     }
   }
-  
+
+//FIXME : this is g_debug level
+  lttv_attribute_write_xml(
+      lttv_traceset_attribute(tmp_tab->traceset_info->traceset),
+      stdout,
+      0, 4);
+  fflush(stdout);
+
+
   //FIXME copy not implemented in lower level
   tmp_tab->traceset_info->traceset_context =
     g_object_new(LTTV_TRACESET_STATS_TYPE, NULL);
index a47e0fd40679b753b714eccf7a45841209a4c2d6..f7035ea35566f9599b8520ac2465af82205a796f 100644 (file)
@@ -749,12 +749,9 @@ void lttvwindow_report_focus(Tab *tab, GtkWidget *top_widget)
  */
 
 void lttvwindow_events_request(Tab *tab,
-                               const EventsRequest  *events_request)
+                               EventsRequest  *events_request)
 {
-  EventsRequest *alloc = g_new(EventsRequest,1);
-  *alloc = *events_request;
-
-  tab->events_requests = g_slist_append(tab->events_requests, alloc);
+  tab->events_requests = g_slist_append(tab->events_requests, events_request);
   
   if(!tab->events_request_pending)
   {
index a4956331e235030b63efe94c0d0530119255d90a..cbc2ced23293e49de3f2346e8619f300b0f5e19c 100644 (file)
@@ -606,13 +606,16 @@ typedef struct _EventsRequest {
  *
  * end_time, end_position and num_events can all be defined. The first one
  * to occur will be used as end criterion.
+ *
+ * The events_request memory will be managed by the main window once its
+ * pointer is passed by this function.
  * 
  * @param tab the tab the viewer belongs to.
  * @param events_requested Details about the event request.
  */
 
 void lttvwindow_events_request(Tab                  *tab,
-                               const EventsRequest  *events_request);
+                               EventsRequest  *events_request);
 
 /**
  * Function to remove data requests related to a viewer.
This page took 0.032122 seconds and 4 git commands to generate.