From 0fc64e11d52a1c0022d3c8d45afc17819db4db15 Mon Sep 17 00:00:00 2001 From: compudj Date: Mon, 5 Sep 2005 15:24:29 +0000 Subject: [PATCH] fix filter : add a list to module unloading will work git-svn-id: http://ltt.polymtl.ca/svn@1130 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/modules/gui/filter/filter.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ltt/branches/poly/lttv/modules/gui/filter/filter.c b/ltt/branches/poly/lttv/modules/gui/filter/filter.c index 4d95380e..c21239e5 100644 --- a/ltt/branches/poly/lttv/modules/gui/filter/filter.c +++ b/ltt/branches/poly/lttv/modules/gui/filter/filter.c @@ -35,6 +35,9 @@ #include "hGuiFilterInsert.xpm" + +GSList *g_filter_list = NULL ; + /*! \file lttv/modules/gui/filter/filter.c * \brief Graphic filter interface. * @@ -278,6 +281,9 @@ gui_filter(Tab *tab) fvd, (GDestroyNotify)gui_filter_destructor); + g_filter_list = g_slist_append( + g_filter_list, + fvd); return fvd; } @@ -409,7 +415,9 @@ gui_filter_destructor(FilterViewerData *fvd) // filter_viewer_data); // } lttvwindowtraces_background_notify_remove(fvd); - + + g_filter_list = g_slist_remove(g_filter_list, fvd); + g_free(fvd); } @@ -477,6 +485,8 @@ filter_destroy_walk(gpointer data, gpointer user_data) * everything that has been registered in the gtkTraceSet API. */ static void destroy() { + + g_slist_foreach(g_filter_list, filter_destroy_walk, NULL ); lttvwindow_unregister_constructor(h_guifilter); -- 2.34.1