X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2FguiControlFlow%2FCFV.c;h=9cea4bc913481d46d86c60a9018e8035eabe802a;hb=1ab818de1d890bf716413090d943858bfef8d3d3;hp=9855da64bebbcc5fbe2a0609908ab0aa8fb1a8f0;hpb=f0d936c08dae39e9a913357a49885b4937aca847;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.c b/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.c index 9855da64..9cea4bc9 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.c @@ -7,15 +7,15 @@ #include "Drawing.h" #include "Process_List.h" -#include "../icons/hGuiControlFlowInsert.xpm" +extern GSList *gControl_Flow_Data_List; /***************************************************************************** * Control Flow Viewer class implementation * *****************************************************************************/ -typedef struct _ControlFlowData { +struct _ControlFlowData { GtkWidget *Drawing_Area_V; GtkWidget *Scrolled_Window_VC; @@ -23,14 +23,14 @@ typedef struct _ControlFlowData { ProcessList *Process_List; Drawing_t *Drawing; - GtkWidget *HBox_V; + //GtkWidget *HBox_V; GtkWidget *Inside_HBox_V; GtkAdjustment *VAdjust_C ; /* Trace information */ - TraceSet *Trace_Set; - TraceStatistics *Trace_Statistics; + //TraceSet *Trace_Set; + //TraceStatistics *Trace_Statistics; /* Shown events information */ guint First_Event, Last_Event; @@ -43,11 +43,7 @@ typedef struct _ControlFlowData { gboolean Selected_Event ; guint Number_Of_Process; -} ControlFlowData ; - - -/** Array containing instanced objects. Used when module is unloaded */ -static GSList *sControl_Flow_Data_List = NULL ; +} ; /** @@ -79,7 +75,7 @@ GuiControlFlow(void) /* Create the Process list */ - //Control_Flow_Data->Process_List = ProcessList(); + //Control_Flow_Data->Process_List = ProcessList_contruct(); //Process_List_Widget = // ProcessList_getWidget(Control_Flow_Data->Process_List); @@ -102,7 +98,6 @@ GuiControlFlow(void) 0.0, /* Page inc. */ 0.0)); /* page size */ - Control_Flow_Data->Scrolled_Window_VC = gtk_scrolled_window_new (NULL, Control_Flow_Data->VAdjust_C); @@ -137,17 +132,18 @@ GuiControlFlow(void) //Control_Flow_Data->Trace_Statistics = get_trace_statistics(Trace); - gtk_widget_show(Control_Flow_Data->Drawing_Area_V); - gtk_widget_show(Process_List_Widget); + //gtk_widget_show(Control_Flow_Data->Drawing_Area_V); + //gtk_widget_show(Process_List_Widget); gtk_widget_show(Control_Flow_Data->Inside_HBox_V); gtk_widget_show(Control_Flow_Data->Scrolled_Window_VC); - + g_object_set_data_full( - G_OBJECT(Control_Flow_Data->HBox_V), + G_OBJECT(Control_Flow_Data->Scrolled_Window_VC), "Control_Flow_Data", Control_Flow_Data, - GuiControlFlow_Destructor); + (GDestroyNotify)GuiControlFlow_Destructor); + g_slist_append(gControl_Flow_Data_List,Control_Flow_Data); return Control_Flow_Data; @@ -159,14 +155,18 @@ GuiControlFlow_Destructor(ControlFlowData *Control_Flow_Data) guint index; /* May already been done by GTK window closing */ - if(GTK_IS_WIDGET(Control_Flow_Data->HBox_V)) - gtk_widget_destroy(Control_Flow_Data->HBox_V); + if(GTK_IS_WIDGET(Control_Flow_Data->Scrolled_Window_VC)) + gtk_widget_destroy(Control_Flow_Data->Scrolled_Window_VC); - ProcessList_destroy(Control_Flow_Data->Process_List); + //ProcessList_destroy(Control_Flow_Data->Process_List); - g_slist_remove(sControl_Flow_Data_List,Control_Flow_Data); + g_slist_remove(gControl_Flow_Data_List,Control_Flow_Data); } //FIXME : call hGuiEvents_Destructor for corresponding data upon widget destroy +GtkWidget *GuiControlFlow_get_Widget(ControlFlowData *Control_Flow_Data) +{ + return Control_Flow_Data->Scrolled_Window_VC ; +}