X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2FguiEvents.c;h=a5677aa5ff33989bb818c8bcd67c4f2c068f86f8;hb=5f16133f507054edf95e61cefdc3fd04552b0925;hp=39341b7fe05f6ac2716b96c76e0dfba9a1991045;hpb=f1d416441c33c1eb429ddbb8f8a3401c3932fa7c;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/guiEvents.c b/ltt/branches/poly/lttv/modules/guiEvents.c index 39341b7f..a5677aa5 100644 --- a/ltt/branches/poly/lttv/modules/guiEvents.c +++ b/ltt/branches/poly/lttv/modules/guiEvents.c @@ -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));