minor alignment change
[lttv.git] / ltt / branches / poly / lttv / modules / guiEvents.c
index 39341b7fe05f6ac2716b96c76e0dfba9a1991045..a5677aa5ff33989bb818c8bcd67c4f2c068f86f8 100644 (file)
@@ -162,13 +162,24 @@ static void get_events(EventViewerData* Event_Viewer_Data, LttTime start,
                       LttTime end, unsigned maxNumEvents, unsigned * realNumEvent);
 static gboolean parse_event(void *hook_data, void *call_data);
 
+static LttvModule *Main_Win_Module;
+
 /**
  * plugin's init function
  *
  * This function initializes the Event Viewer functionnality through the
  * gtkTraceSet API.
  */
-G_MODULE_EXPORT void init() {
+G_MODULE_EXPORT void init(LttvModule *self, int argc, char *argv[]) {
+
+       Main_Win_Module = lttv_module_require(self, "mainwin", argc, argv);
+       
+       if(Main_Win_Module == NULL)
+       {
+         g_critical("Can't load Control Flow Viewer : missing mainwin\n");
+         return;
+       }
+       
 
   g_critical("GUI Event Viewer init()");
   
@@ -281,13 +292,14 @@ GuiEvents(mainWindow *pmParentWindow)
   Event_Viewer_Data->Selected_Event = 0;
 
   /* Create a model for storing the data list */
-  Event_Viewer_Data->Store_M = gtk_list_store_new (N_COLUMNS,       /* Total number of columns */
-                                                  G_TYPE_INT,      /* CPUID                  */
-                                                  G_TYPE_STRING,   /* Event                   */
-                                                  G_TYPE_UINT64,      /* Time                    */
-                                                  G_TYPE_INT,      /* PID                     */
-                                                  G_TYPE_INT,      /* Entry length            */
-                                                  G_TYPE_STRING);  /* Event's description     */
+  Event_Viewer_Data->Store_M = gtk_list_store_new (
+               N_COLUMNS,      /* Total number of columns */
+               G_TYPE_INT,     /* CPUID                  */
+               G_TYPE_STRING,  /* Event                   */
+               G_TYPE_UINT64,  /* Time                    */
+               G_TYPE_INT,     /* PID                     */
+               G_TYPE_INT,     /* Entry length            */
+               G_TYPE_STRING); /* Event's description     */
        
   /* Create the viewer widget for the columned list */
   Event_Viewer_Data->Tree_V = gtk_tree_view_new_with_model (GTK_TREE_MODEL (Event_Viewer_Data->Store_M));
This page took 0.023314 seconds and 4 git commands to generate.