X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Flttvwindow%2Flttvwindow%2Finit_module.c;h=21a30eedaaa354dbef12304f8772a6255fc39638;hb=45653836d75635b5b841d0d03f1f0789348adc56;hp=a4e7d4272dfd9b9cc6a5db88d391f35a0f0e91c1;hpb=1ce324c60d5e864674b80514297c97e1a7e2919d;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 a4e7d427..21a30eed 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 @@ -50,12 +50,14 @@ LttvTraceInfo LTTV_TRACES, LTTV_COMPUTATION, + LTTV_VIEWER_CONSTRUCTORS, LTTV_REQUESTS_QUEUE, LTTV_REQUESTS_CURRENT, LTTV_NOTIFY_QUEUE, LTTV_NOTIFY_CURRENT, LTTV_COMPUTATION_TRACESET, LTTV_COMPUTATION_TRACESET_CONTEXT, + LTTV_COMPUTATION_SYNC_POSITION, LTTV_BEFORE_CHUNK_TRACESET, LTTV_BEFORE_CHUNK_TRACE, LTTV_BEFORE_CHUNK_TRACEFILE, @@ -144,6 +146,7 @@ static void init() { LTTV_TRACES = g_quark_from_string("traces"); LTTV_COMPUTATION = g_quark_from_string("computation"); + LTTV_VIEWER_CONSTRUCTORS = g_quark_from_string("viewer_constructors"); LTTV_REQUESTS_QUEUE = g_quark_from_string("requests_queue"); LTTV_REQUESTS_CURRENT = g_quark_from_string("requests_current"); LTTV_NOTIFY_QUEUE = g_quark_from_string("notify_queue"); @@ -151,6 +154,8 @@ static void init() { LTTV_COMPUTATION_TRACESET = g_quark_from_string("computation_traceset"); LTTV_COMPUTATION_TRACESET_CONTEXT = g_quark_from_string("computation_traceset_context"); + LTTV_COMPUTATION_SYNC_POSITION = + g_quark_from_string("computation_sync_position"); LTTV_BEFORE_CHUNK_TRACESET = g_quark_from_string("before_chunk_traceset"); LTTV_BEFORE_CHUNK_TRACE = g_quark_from_string("before_chunk_trace"); LTTV_BEFORE_CHUNK_TRACEFILE = g_quark_from_string("before_chunk_tracefile"); @@ -228,6 +233,10 @@ main_window_destructor(MainWindow * mw) gtk_widget_destroy(mw->mwindow); } +static void destroy_walk(gpointer data, gpointer user_data) +{ + main_window_destructor((MainWindow*)data); +} /** * plugin's destroy function @@ -241,23 +250,15 @@ static void destroy() { LttvTrace *trace; GSList *iter = NULL; - lttvwindowtraces_unregister_requests(g_quark_from_string("stats")); - lttvwindowtraces_unregister_requests(g_quark_from_string("state")); - lttvwindowtraces_unregister_computation_hooks(g_quark_from_string("stats")); - lttvwindowtraces_unregister_computation_hooks(g_quark_from_string("state")); - lttv_option_remove("trace"); lttv_hooks_remove_data(main_hooks, window_creation_hook, NULL); g_debug("GUI destroy()"); - if(g_main_window_list){ - for(iter=g_main_window_list;iter!=NULL;iter=g_slist_next(iter)) { - main_window_destructor((MainWindow*)iter->data); - } - g_slist_free(g_main_window_list); - } + g_slist_foreach(g_main_window_list, destroy_walk, NULL); + + g_slist_free(g_main_window_list); }