Plugins Menu functions completed
[lttv.git] / ltt / branches / poly / lttv / modules / gui / mainWin / src / init_module.c
index d72ac56cacc464ef8250c1fcfb380ee54ab314ed..a2d74a317d1f7bf1c2941c28c941beaa3d769334 100644 (file)
@@ -16,6 +16,7 @@
 #include <lttv/module.h>
 #include <lttv/processTrace.h>
 #include <lttv/state.h>
+#include <lttv/stats.h>
 #include <lttv/menu.h>
 #include <lttv/toolbar.h>
 
@@ -27,7 +28,7 @@
 /* global variable */
 systemView * gSysView;
 
-LttvTracesetState * gTracesetContext = NULL;
+LttvTracesetStats * gTracesetContext = NULL;
 static LttvTraceset * traceset;
 
 /** Array containing instanced objects. */
@@ -64,11 +65,6 @@ void lttv_trace_option(void *hook_data)
  * This function initializes the GUI.
  */
 
-typedef struct _WindowCreationData {
-       int argc;
-       char ** argv;
-} WindowCreationData;
-
 static gboolean Window_Creation_Hook(void *hook_data, void *call_data)
 {
   int i;
@@ -85,12 +81,14 @@ static gboolean Window_Creation_Hook(void *hook_data, void *call_data)
   GtkWidget *window1;
   mainWindow * mw = g_new(mainWindow, 1);
   gSysView = g_new(systemView, 1);
-  WindowCreationData *Window_Creation_Data = (WindowCreationData*)call_data;
+  WindowCreationData *Window_Creation_Data = (WindowCreationData*)hook_data;
+
+  mw->winCreationData = Window_Creation_Data;
 
   /* Add the object's information to the module's array */
   Main_Window_List = g_slist_append(Main_Window_List, mw);
 
-  g_critical("GUI init()");
+  g_critical("GUI Window_Creation_Hook()");
 #ifdef ENABLE_NLS
   bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
@@ -118,7 +116,7 @@ static gboolean Window_Creation_Hook(void *hook_data, void *call_data)
   mw->CurrentTab = NULL;
   mw->Attributes = LTTV_IATTRIBUTE(g_object_new(LTTV_ATTRIBUTE_TYPE, NULL));
   if(!gTracesetContext){
-    gTracesetContext = g_object_new(LTTV_TRACESET_STATE_TYPE, NULL);
+    gTracesetContext = g_object_new(LTTV_TRACESET_STATS_TYPE, NULL);
     //FIXME: lttv_context_fini should be called some where.
     lttv_context_init(LTTV_TRACESET_CONTEXT(gTracesetContext), traceset);
   }
@@ -195,6 +193,8 @@ G_MODULE_EXPORT void init(LttvModule *self, int argc, char *argv[]) {
   
   LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
   
+  g_critical("GUI init()");
+  
   lttv_option_add("trace", 't', 
       "add a trace to the trace set to analyse", 
       "pathname of the directory containing the trace", 
This page took 0.034812 seconds and 4 git commands to generate.