X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Flttvwindow%2Flttvwindow%2Finit_module.c;h=c964481db12e80244a2c56523bc765c002ea72b5;hb=ec7a5af61127aa50a1839eee5be99ce53494c57b;hp=21a30eedaaa354dbef12304f8772a6255fc39638;hpb=d0724d16c130ef79c8402d7ea94c128771cbc519;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c index 21a30eed..c964481d 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -48,7 +49,8 @@ #include -LttvTraceInfo LTTV_TRACES, +__EXPORT LttvTraceInfo + LTTV_TRACES, LTTV_COMPUTATION, LTTV_VIEWER_CONSTRUCTORS, LTTV_REQUESTS_QUEUE, @@ -82,27 +84,18 @@ LttvHooks *main_hooks; /* Initial trace from command line */ -LttvTrace *g_init_trace = NULL; +static GSList *g_init_trace = NULL; static char *a_trace; +//static char g_init_trace[PATH_MAX] = ""; void lttv_trace_option(void *hook_data) { - LttTrace *trace; - gchar abs_path[PATH_MAX]; - - get_absolute_pathname(a_trace, abs_path); - g_init_trace = lttvwindowtraces_get_trace_by_name(abs_path); - if(g_init_trace == NULL) { - trace = ltt_trace_open(abs_path); - if(trace == NULL) { - g_warning("cannot open trace %s", abs_path); - } else { - g_init_trace = lttv_trace_new(trace); - lttvwindowtraces_add_trace(g_init_trace); - } - } + //LttTrace *trace; + + //get_absolute_pathname(a_trace, g_init_trace); + g_init_trace = g_slist_append(g_init_trace, a_trace); } /***************************************************************************** @@ -130,7 +123,8 @@ static gboolean window_creation_hook(void *hook_data, void *call_data) add_pixmap_directory ("pixmaps"); add_pixmap_directory ("../modules/gui/main/pixmaps"); - construct_main_window(NULL); + /* First window, use command line trace */ + create_main_window_with_trace_list(g_init_trace); gtk_main (); @@ -259,6 +253,8 @@ static void destroy() { g_slist_foreach(g_main_window_list, destroy_walk, NULL); g_slist_free(g_main_window_list); + + g_slist_free(g_init_trace); }