From: compudj Date: Wed, 16 Jun 2004 19:33:05 +0000 (+0000) Subject: window duplication and tab dup now working X-Git-Tag: v0.12.20~2893 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=20fde85fa4660fbc6ec44101c8d7e9fe2aca94fa;p=lttv.git window duplication and tab dup now working git-svn-id: http://ltt.polymtl.ca/svn@596 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c index f403e77a..baea60a9 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c @@ -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); diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c index a47e0fd4..f7035ea3 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c @@ -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) { diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h index a4956331..cbc2ced2 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h @@ -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.