From: compudj Date: Sat, 27 Sep 2003 23:08:01 +0000 (+0000) Subject: require on guiEvents module X-Git-Tag: v0.12.20~3221 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ae4e77e0a98448e785288290c9d786d65e8e039b;p=lttv.git require on guiEvents module git-svn-id: http://ltt.polymtl.ca/svn@268 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/module.c b/ltt/branches/poly/lttv/modules/guiControlFlow/module.c index 2d2ef062..058c5b1c 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/module.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/module.c @@ -27,7 +27,7 @@ // #include "../icons/hGuiControlFlowInsert.xpm" -LttvModule *Main_Win_Module; +static LttvModule *Main_Win_Module; /** Array containing instanced objects. Used when module is unloaded */ diff --git a/ltt/branches/poly/lttv/modules/guiEvents.c b/ltt/branches/poly/lttv/modules/guiEvents.c index 39341b7f..ae3cec66 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()");