From 2061e03dd5e8aa09fbed5b08ae702fe2eb33be06 Mon Sep 17 00:00:00 2001 From: yangxx Date: Wed, 15 Oct 2003 20:11:08 +0000 Subject: [PATCH] git-svn-id: http://ltt.polymtl.ca/svn@309 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/include/lttv/mainWindow.h | 29 +-- .../poly/lttv/modules/gui/API/gtkTraceSet.c | 31 +-- .../lttv/modules/gui/mainWin/src/callbacks.c | 220 ++++++++++++------ .../lttv/modules/gui/mainWin/src/callbacks.h | 3 +- .../modules/gui/mainWin/src/init_module.c | 44 +--- .../lttv/modules/gui/mainWin/src/interface.c | 16 +- .../lttv/modules/guiStatistic/guiStatistic.c | 2 +- ltt/branches/poly/lttv/processTrace.c | 2 +- 8 files changed, 182 insertions(+), 165 deletions(-) diff --git a/ltt/branches/poly/include/lttv/mainWindow.h b/ltt/branches/poly/include/lttv/mainWindow.h index 0a43bfa5..dc0254f1 100644 --- a/ltt/branches/poly/include/lttv/mainWindow.h +++ b/ltt/branches/poly/include/lttv/mainWindow.h @@ -42,7 +42,6 @@ typedef struct _TracesetInfo { struct _mainWindow{ GtkWidget* MWindow; /* Main Window */ -// systemView * SystemView; /* System view displayed in this window*/ /* Status bar information */ // guint MainSBarContextID; /* Context ID of main status bar */ @@ -57,8 +56,6 @@ struct _mainWindow{ GtkWidget* HelpContents;/* Window to display help contents */ GtkWidget* AboutBox; /* Window about information */ - //LttvTracesetContext * traceset_context; - //LttvTraceset * traceset; /* trace set associated with the window */ // lttv_trace_filter * filter; /* trace filter associated with the window */ /* Traceset related information */ @@ -70,27 +67,16 @@ struct _mainWindow{ tab * CurrentTab; WindowCreationData * winCreationData; -}; + GHashTable * hash_menu_item; + GHashTable * hash_toolbar_item; +}; -//struct _systemView{ -// gpointer EventDB; -// gpointer SystemInfo; -// gpointer Options; -// mainWindow * Window; -// struct _systemView * Next; -//}; struct _tab{ GtkWidget * label; GtkCustom * custom; - - - // Will have to read directly at the main window level, as we want - // to be able to modify a traceset on the fly. - //LttTime traceStartTime; - //LttTime traceEndTime; - + // startTime is the left of the visible area. Corresponds to the scrollbar // value. // Time_Width is a zoom dependant value (corresponding to page size) @@ -102,8 +88,15 @@ struct _tab{ LttvIAttribute * Attributes; struct _tab * Next; + mainWindow * mw; }; +/** + * Remove menu and toolbar item when a module unloaded + */ +void main_window_remove_menu_item(lttv_constructor view_constructor); +void main_window_remove_toolbar_item(lttv_constructor view_constructor); + #endif /* _MAIN_WINDOW_ */ diff --git a/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c b/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c index de756675..65d87b07 100644 --- a/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c +++ b/ltt/branches/poly/lttv/modules/gui/API/gtkTraceSet.c @@ -26,27 +26,6 @@ * Internal function parts */ -/** - * Function to remove toolbar from the GUI - * @param view_constructor constructor of the viewer. - */ - -void RemoveToolbar(lttv_constructor view_constructor) -{ - g_printf("Toolbar for the viewer will be removed\n"); -} - -/** - * Function to remove menu entry from the GUI - * @param view_constructor constructor of the viewer. - */ - -void RemoveMenu(lttv_constructor view_constructor) -{ - g_printf("Menu entry for the viewer will be removed\n"); -} - - /** * Function to set/update traceset for the viewers * @param main_win main window @@ -136,8 +115,9 @@ void ToolbarItemUnreg(lttv_constructor view_constructor) "viewers/toolbar", LTTV_POINTER, &value)); toolbar = (LttvToolbars*)*(value.v_pointer); - if(lttv_toolbars_remove(toolbar, view_constructor)) - RemoveToolbar(view_constructor); + main_window_remove_toolbar_item(view_constructor); + + lttv_toolbars_remove(toolbar, view_constructor); } @@ -185,8 +165,9 @@ void MenuItemUnreg(lttv_constructor view_constructor) "viewers/menu", LTTV_POINTER, &value)); menu = (LttvMenus*)*(value.v_pointer); - if(lttv_menus_remove(menu, view_constructor)) - RemoveMenu(view_constructor); + main_window_remove_menu_item(view_constructor); + + lttv_menus_remove(menu, view_constructor); } diff --git a/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c b/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c index 44f5e61c..119da096 100644 --- a/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c @@ -32,7 +32,6 @@ mainWindow * get_window_data_struct(GtkWidget * widget); char * get_unload_module(char ** loaded_module_name, int nb_module); void * create_tab(GtkWidget* parent, GtkNotebook * notebook, char * label); -/* test part */ void insertView(GtkWidget* widget, view_constructor constructor); enum @@ -41,16 +40,6 @@ enum N_COLUMNS }; -void -on_textview1_grab_focus (GtkTextView *text_view, - gpointer user_data) -{ - GtkWidget * widget; - GtkCustom * custom = (GtkCustom*)user_data; - widget = gtk_widget_get_parent((GtkWidget*)text_view); - widget = gtk_widget_get_parent(widget); - gtk_custom_set_focus((GtkWidget*)custom, (gpointer)widget); -} void insertViewTest(GtkMenuItem *menuitem, gpointer user_data) @@ -60,43 +49,6 @@ insertViewTest(GtkMenuItem *menuitem, gpointer user_data) // selected_hook(&val); } -void -on_insert_viewer_test_activate (GtkMenuItem *menuitem, - gpointer user_data) -{ - GtkWidget *scrolledwindow1, *textview1, *label; - static int count = 0; - char str[64]; - GtkCustom * custom; - GtkTextBuffer* buf; - - mainWindow * mwData; - mwData = get_window_data_struct((GtkWidget*)menuitem); - if(!mwData->CurrentTab) return; - custom = mwData->CurrentTab->custom; - - sprintf(str,"label : %d",++count); - scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_show (scrolledwindow1); - label = gtk_label_new(str); - gtk_widget_show(label); - - gtk_custom_widget_add(custom, scrolledwindow1); - gtk_widget_set_size_request ((GtkWidget*)scrolledwindow1, 800, 100); - - textview1 = gtk_text_view_new (); - gtk_widget_show (textview1); - gtk_container_add (GTK_CONTAINER (scrolledwindow1), textview1); - buf = gtk_text_view_get_buffer((GtkTextView*)textview1); - sprintf(str,"text view : %d",count); - gtk_text_buffer_set_text(buf,str, -1); - - g_signal_connect ((gpointer) textview1, "grab_focus", - G_CALLBACK (on_textview1_grab_focus), custom); -} - -/* end of test part */ - /* internal functions */ void insertView(GtkWidget* widget, view_constructor constructor) @@ -183,12 +135,12 @@ void createNewWindow(GtkWidget* widget, gpointer user_data, gboolean clone) { mainWindow * parent = get_window_data_struct(widget); - constructMainWin(parent, NULL); - if(clone){ g_printf("Clone : use the same traceset\n"); + constructMainWin(parent, NULL, FALSE); }else{ g_printf("Empty : traceset is set to NULL\n"); + constructMainWin(NULL, parent->winCreationData, FALSE); } } @@ -312,7 +264,8 @@ void on_close_activate (GtkMenuItem *menuitem, gpointer user_data) { - g_printf("Close\n"); + mainWindow * mwData = get_window_data_struct((GtkWidget*)menuitem); + mainWindow_Destructor(mwData); } @@ -320,7 +273,30 @@ void on_close_tab_activate (GtkMenuItem *menuitem, gpointer user_data) { - g_printf("Close tab\n"); + int count = 0; + GtkWidget * notebook; + tab * tmp; + mainWindow * mwData = get_window_data_struct((GtkWidget*)menuitem); + notebook = lookup_widget((GtkWidget*)menuitem, "MNotebook"); + if(notebook == NULL){ + g_printf("Notebook does not exist\n"); + return; + } + + if(mwData->Tab == mwData->CurrentTab){ + // tmp = mwData->CurrentTab; + // mwData->Tab = mwData->CurrentTab->Next; + g_printf("The default TAB can not be deleted\n"); + return; + }else{ + tmp = mwData->Tab; + while(tmp != mwData->CurrentTab){ + tmp = tmp->Next; + count++; + } + } + + gtk_notebook_remove_page((GtkNotebook*)notebook, count); } @@ -360,8 +336,7 @@ void on_quit_activate (GtkMenuItem *menuitem, gpointer user_data) { - mainWindow * mwData = get_window_data_struct((GtkWidget*)menuitem); - mainWindow_Destructor(mwData); + gtk_main_quit (); } @@ -801,6 +776,16 @@ char * get_unload_module(char ** loaded_module_name, int nb_module) return unload_module_name; } +void destroy_hash_key(gpointer key) +{ + g_free(key); +} + +void destroy_hash_data(gpointer data) +{ +} + + void insertMenuToolbarItem(mainWindow * mw) { int i; @@ -829,6 +814,8 @@ void insertMenuToolbarItem(mainWindow * mw) g_signal_connect ((gpointer) insert_view, "activate", G_CALLBACK (insertViewTest), constructor); + g_hash_table_insert(mw->hash_menu_item, g_strdup(menuItem->menuText), + insert_view); } } @@ -853,24 +840,23 @@ void insertMenuToolbarItem(mainWindow * mw) gtk_widget_show (insert_view); gtk_container_set_border_width (GTK_CONTAINER (insert_view), 1); g_signal_connect ((gpointer) insert_view, "clicked",G_CALLBACK (insertViewTest),constructor); + g_hash_table_insert(mw->hash_toolbar_item, g_strdup(toolbarItem->tooltip), + insert_view); } } } -void constructMainWin(mainWindow * parent, WindowCreationData * win_creation_data) +void constructMainWin(mainWindow * parent, WindowCreationData * win_creation_data, + gboolean first_window) { g_critical("constructMainWin()"); - // systemView * sv = NULL; /* System view */ - //systemView * newSv; /* New system view displayed in the new window */ GtkWidget * newWindow; /* New generated main window */ mainWindow * newMWindow;/* New main window structure */ GtkNotebook * notebook; LttvIAttribute *attributes = LTTV_IATTRIBUTE(g_object_new(LTTV_ATTRIBUTE_TYPE, NULL)); LttvAttributeValue value; - - // if(parent) sv = parent->SystemView; - + newMWindow = g_new(mainWindow, 1); // Add the object's information to the module's array @@ -880,18 +866,6 @@ void constructMainWin(mainWindow * parent, WindowCreationData * win_creation_dat newWindow = create_MWindow(); gtk_widget_show (newWindow); - //newSv = g_new(systemView, 1); - // if(sv){ - // while(sv->Next) sv = sv->Next; - // sv->Next = newSv; - // } - - //newSv->EventDB = NULL; - //newSv->SystemInfo = NULL; - //newSv->Options = NULL; - //newSv->Next = NULL; - //newSv->Window = newMWindow; - newMWindow->Attributes = attributes; newMWindow->Traceset_Info = g_new(TracesetInfo,1); @@ -936,7 +910,6 @@ void constructMainWin(mainWindow * parent, WindowCreationData * win_creation_dat newMWindow->MWindow = newWindow; newMWindow->Tab = NULL; newMWindow->CurrentTab = NULL; - //newMWindow->SystemView = newSv; newMWindow->Attributes = LTTV_IATTRIBUTE(g_object_new(LTTV_ATTRIBUTE_TYPE, NULL)); if(parent){ newMWindow->Traceset_Info->traceset = @@ -954,7 +927,7 @@ void constructMainWin(mainWindow * parent, WindowCreationData * win_creation_dat newMWindow->Traceset_Info->traceset = lttv_traceset_new(); /* Add the command line trace */ - if(gInit_Trace != NULL) + if(gInit_Trace != NULL && first_window) lttv_traceset_add(newMWindow->Traceset_Info->traceset, gInit_Trace); /* NOTE : the context must be recreated if we change the traceset, * ie : adding/removing traces */ @@ -967,9 +940,13 @@ void constructMainWin(mainWindow * parent, WindowCreationData * win_creation_dat newMWindow->winCreationData = win_creation_data; } + newMWindow->hash_menu_item = g_hash_table_new_full (g_str_hash, g_str_equal, + destroy_hash_key, destroy_hash_data); + newMWindow->hash_toolbar_item = g_hash_table_new_full (g_str_hash, g_str_equal, + destroy_hash_key, destroy_hash_data); + insertMenuToolbarItem(newMWindow); - //g_object_set_data(G_OBJECT(newWindow), "systemView", (gpointer)newSv); g_object_set_data(G_OBJECT(newWindow), "mainWindow", (gpointer)newMWindow); //create a default tab @@ -994,7 +971,18 @@ void constructMainWin(mainWindow * parent, WindowCreationData * win_creation_dat void Tab_Destructor(tab *Tab) { if(Tab->Attributes) - g_object_unref(Tab->Attributes); + g_object_unref(Tab->Attributes); + + if(Tab->mw->Tab == Tab){ + Tab->mw->Tab = Tab->Next; + }else{ + tab * tmp1, *tmp = Tab->mw->Tab; + while(tmp != Tab){ + tmp1 = tmp; + tmp = tmp->Next; + } + tmp1->Next = Tab->Next; + } g_free(Tab); } @@ -1046,6 +1034,7 @@ void * create_tab(GtkWidget* parent, GtkNotebook * notebook, char * label) tmpTab->custom->mw = mwData; gtk_widget_show((GtkWidget*)tmpTab->custom); tmpTab->Next = NULL; + tmpTab->mw = mwData; tmpTab->label = gtk_label_new (label); gtk_widget_show (tmpTab->label); @@ -1060,3 +1049,82 @@ void * create_tab(GtkWidget* parent, GtkNotebook * notebook, char * label) list = gtk_container_get_children(GTK_CONTAINER(notebook)); gtk_notebook_set_current_page(notebook,g_list_length(list)-1); } + +void remove_menu_item(gpointer main_win, gpointer user_data) +{ + mainWindow * mw = (mainWindow *) main_win; + lttv_menu_closure *menuItem = (lttv_menu_closure *)user_data; + GtkWidget * ToolMenuTitle_menu, *insert_view; + + ToolMenuTitle_menu = lookup_widget(mw->MWindow,"ToolMenuTitle_menu"); + insert_view = (GtkWidget*)g_hash_table_lookup(mw->hash_menu_item, + menuItem->menuText); + if(insert_view){ + g_hash_table_remove(mw->hash_menu_item, menuItem->menuText); + gtk_container_remove (GTK_CONTAINER (ToolMenuTitle_menu), insert_view); + } +} + +void remove_toolbar_item(gpointer main_win, gpointer user_data) +{ + mainWindow * mw = (mainWindow *) main_win; + lttv_toolbar_closure *toolbarItem = (lttv_toolbar_closure *)user_data; + GtkWidget * ToolMenuTitle_menu, *insert_view; + + + ToolMenuTitle_menu = lookup_widget(mw->MWindow,"MToolbar2"); + insert_view = (GtkWidget*)g_hash_table_lookup(mw->hash_toolbar_item, + toolbarItem->tooltip); + if(insert_view){ + g_hash_table_remove(mw->hash_toolbar_item, toolbarItem->tooltip); + gtk_container_remove (GTK_CONTAINER (ToolMenuTitle_menu), insert_view); + } +} + +/** + * Remove menu and toolbar item when a module unloaded + */ +void main_window_remove_menu_item(lttv_constructor constructor) +{ + int i; + LttvMenus * menu; + lttv_menu_closure *menuItem; + LttvAttributeValue value; + LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes()); + + g_assert(lttv_iattribute_find_by_path(attributes, + "viewers/menu", LTTV_POINTER, &value)); + menu = (LttvMenus*)*(value.v_pointer); + + if(menu){ + for(i=0;ilen;i++){ + menuItem = &g_array_index(menu, lttv_menu_closure, i); + if(menuItem->con != constructor) continue; + g_slist_foreach(Main_Window_List, remove_menu_item, menuItem); + break; + } + } + +} + +void main_window_remove_toolbar_item(lttv_constructor constructor) +{ + int i; + LttvToolbars * toolbar; + lttv_toolbar_closure *toolbarItem; + LttvAttributeValue value; + LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes()); + + g_assert(lttv_iattribute_find_by_path(attributes, + "viewers/toolbar", LTTV_POINTER, &value)); + toolbar = (LttvToolbars*)*(value.v_pointer); + + if(toolbar){ + for(i=0;ilen;i++){ + toolbarItem = &g_array_index(toolbar, lttv_toolbar_closure, i); + if(toolbarItem->con != constructor) continue; + g_slist_foreach(Main_Window_List, remove_toolbar_item, toolbarItem); + break; + } + } +} diff --git a/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.h b/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.h index d85d0abe..719485e4 100644 --- a/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.h +++ b/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.h @@ -6,7 +6,8 @@ void createNewWindow(GtkWidget* widget, gpointer user_data, gboolean clone); void insertMenuToolbarItem(mainWindow * mw); -void constructMainWin(mainWindow * parent, WindowCreationData *win_creation_data); +void constructMainWin(mainWindow * parent, WindowCreationData *win_creation_data, + gboolean first_window); void mainWindow_free(mainWindow * mw); void mainWindow_Destructor(mainWindow * mw); diff --git a/ltt/branches/poly/lttv/modules/gui/mainWin/src/init_module.c b/ltt/branches/poly/lttv/modules/gui/mainWin/src/init_module.c index f8635a2d..ed724a42 100644 --- a/ltt/branches/poly/lttv/modules/gui/mainWin/src/init_module.c +++ b/ltt/branches/poly/lttv/modules/gui/mainWin/src/init_module.c @@ -77,7 +77,7 @@ static gboolean Window_Creation_Hook(void *hook_data, void *call_data) add_pixmap_directory ("pixmaps"); add_pixmap_directory ("modules/gui/mainWin/pixmaps"); - constructMainWin(NULL, Window_Creation_Data); + constructMainWin(NULL, Window_Creation_Data, TRUE); gtk_main (); @@ -112,43 +112,13 @@ G_MODULE_EXPORT void init(LttvModule *self, int argc, char *argv[]) { } -//void -//free_system_view(systemView * SystemView) -//{ -// if(!SystemView)return; -// //free_EventDB(SystemView->EventDB); -// //free_SystemInfo(SystemView->SystemInfo); -// //free_Options(SystemView->Options); -// if(SystemView->Next) -// free_system_view(SystemView->Next); -// g_free(SystemView); -//} - -//MD : The tab is now only referenced by the notebook. The destroy will -//happend when notebook destroyed. -//void free_tab(tab * Tab) -//{ -// if(!Tab) return; -// if(Tab->custom->vbox) -// gtk_widget_destroy(Tab->custom->vbox); -// if(Tab->Attributes) -// g_object_unref(Tab->Attributes); - -// if(Tab->Next) free_tab(Tab->Next); -// g_free(Tab); -// Tab = NULL; -//} - void mainWindow_free(mainWindow * mw) { guint i, nb; if(mw){ - //should free memory allocated dynamically first -// free_system_view(mw->SystemView); -// - //free_tab(mw->Tab); + g_critical("begin remove"); lttv_hooks_destroy(mw->Traceset_Info->before_traceset); lttv_hooks_destroy(mw->Traceset_Info->after_traceset); @@ -160,16 +130,17 @@ g_critical("begin remove"); lttv_hooks_destroy(mw->Traceset_Info->after_event); g_critical("end remove"); - if(mw->Traceset_Info->path != NULL) g_free(mw->Traceset_Info->path); - if(mw->Traceset_Info->TracesetContext != NULL) + if(mw->Traceset_Info->TracesetContext != NULL){ lttv_context_fini(LTTV_TRACESET_CONTEXT(mw->Traceset_Info->TracesetContext)); + g_object_unref(mw->Traceset_Info->TracesetContext); + } if(mw->Traceset_Info->traceset != NULL) { nb = lttv_traceset_number(mw->Traceset_Info->traceset); for(i = 0 ; i < nb ; i++) { ltt_trace_close( - lttv_traceset_get(mw->Traceset_Info->traceset, i)); + lttv_trace(lttv_traceset_get(mw->Traceset_Info->traceset, i))); } } @@ -181,6 +152,9 @@ g_critical("end remove"); mw->Traceset_Info = NULL; Main_Window_List = g_slist_remove(Main_Window_List, mw); + + g_hash_table_destroy(mw->hash_menu_item); + g_hash_table_destroy(mw->hash_toolbar_item); g_free(mw); mw = NULL; diff --git a/ltt/branches/poly/lttv/modules/gui/mainWin/src/interface.c b/ltt/branches/poly/lttv/modules/gui/mainWin/src/interface.c index 87e7c269..af6eb8c5 100644 --- a/ltt/branches/poly/lttv/modules/gui/mainWin/src/interface.c +++ b/ltt/branches/poly/lttv/modules/gui/mainWin/src/interface.c @@ -71,7 +71,7 @@ create_MWindow (void) GtkWidget *MoveViewerDown; GtkWidget *RemoveViewer; GtkWidget *ToolMenuSeparator; - GtkWidget *insert_viewer_test; + // GtkWidget *insert_viewer_test; GtkWidget *PluginMenuTitle; GtkWidget *PluginMenuTitle_menu; GtkWidget *LoadModule; @@ -283,9 +283,9 @@ create_MWindow (void) gtk_container_add (GTK_CONTAINER (ToolMenuTitle_menu), ToolMenuSeparator); gtk_widget_set_sensitive (ToolMenuSeparator, FALSE); - insert_viewer_test = gtk_menu_item_new_with_mnemonic ("Insert viewer test"); - gtk_widget_show (insert_viewer_test); - gtk_container_add (GTK_CONTAINER (ToolMenuTitle_menu), insert_viewer_test); + // insert_viewer_test = gtk_menu_item_new_with_mnemonic ("Insert viewer test"); + // gtk_widget_show (insert_viewer_test); + // gtk_container_add (GTK_CONTAINER (ToolMenuTitle_menu), insert_viewer_test); PluginMenuTitle = gtk_menu_item_new_with_mnemonic ("Plugins"); gtk_widget_show (PluginMenuTitle); @@ -611,9 +611,9 @@ create_MWindow (void) g_signal_connect ((gpointer) RemoveViewer, "activate", G_CALLBACK (on_remove_viewer_activate), NULL); - g_signal_connect ((gpointer) insert_viewer_test, "activate", - G_CALLBACK (on_insert_viewer_test_activate), - NULL); + // g_signal_connect ((gpointer) insert_viewer_test, "activate", + // G_CALLBACK (on_insert_viewer_test_activate), + // NULL); g_signal_connect ((gpointer) LoadModule, "activate", G_CALLBACK (on_load_module_activate), NULL); @@ -727,7 +727,7 @@ create_MWindow (void) GLADE_HOOKUP_OBJECT (MWindow, MoveViewerDown, "MoveViewerDown"); GLADE_HOOKUP_OBJECT (MWindow, RemoveViewer, "RemoveViewer"); GLADE_HOOKUP_OBJECT (MWindow, ToolMenuSeparator, "ToolMenuSeparator"); - GLADE_HOOKUP_OBJECT (MWindow, insert_viewer_test, "insert_viewer_test"); + // GLADE_HOOKUP_OBJECT (MWindow, insert_viewer_test, "insert_viewer_test"); GLADE_HOOKUP_OBJECT (MWindow, PluginMenuTitle, "PluginMenuTitle"); GLADE_HOOKUP_OBJECT (MWindow, PluginMenuTitle_menu, "PluginMenuTitle_menu"); GLADE_HOOKUP_OBJECT (MWindow, LoadModule, "LoadModule"); diff --git a/ltt/branches/poly/lttv/modules/guiStatistic/guiStatistic.c b/ltt/branches/poly/lttv/modules/guiStatistic/guiStatistic.c index ad3bbe3c..23d53a5c 100644 --- a/ltt/branches/poly/lttv/modules/guiStatistic/guiStatistic.c +++ b/ltt/branches/poly/lttv/modules/guiStatistic/guiStatistic.c @@ -156,7 +156,7 @@ GuiStatistic_Destructor(StatisticViewerData *Statistic_Viewer_Data) gtk_widget_destroy(Statistic_Viewer_Data->HPaned_V); Statistic_Viewer_Data = NULL; } - GuiStatistic_free(Statistic_Viewer_Data); + //GuiStatistic_free(Statistic_Viewer_Data); } diff --git a/ltt/branches/poly/lttv/processTrace.c b/ltt/branches/poly/lttv/processTrace.c index cb933556..9eaa5e55 100644 --- a/ltt/branches/poly/lttv/processTrace.c +++ b/ltt/branches/poly/lttv/processTrace.c @@ -168,7 +168,7 @@ void fini(LttvTracesetContext *self) lttv_hooks_destroy(self->before); lttv_hooks_destroy(self->after); //FIXME : segfault - // g_object_unref(self->a); + g_object_unref(self->a); nb_trace = lttv_traceset_number(ts); -- 2.34.1