aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsebastid <sebastid>2005-09-23 17:13:47 +0000
committersebastid <sebastid@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2005-09-23 17:13:47 +0000
commit74f0aa00c799f462086d21ebaae5226ddeb32e26 (patch)
tree0f065c2fb86dc8fec32db01b13afc07906796ca7 /src
parentMake dialog windows transient, so that they are recognized as dialogs. (diff)
downloadenlightenment-74f0aa00c799f462086d21ebaae5226ddeb32e26.tar.gz
Move module api check to module loader.
SVN revision: 16873
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_module.c24
-rw-r--r--src/bin/e_module.h5
-rw-r--r--src/modules/battery/e_mod_main.c18
-rw-r--r--src/modules/battery/e_mod_main.h2
-rw-r--r--src/modules/clock/e_mod_main.c19
-rw-r--r--src/modules/clock/e_mod_main.h2
-rw-r--r--src/modules/cpufreq/e_mod_main.c18
-rw-r--r--src/modules/cpufreq/e_mod_main.h2
-rw-r--r--src/modules/dropshadow/e_mod_main.c17
-rw-r--r--src/modules/dropshadow/e_mod_main.h2
-rw-r--r--src/modules/ibar/e_mod_main.c18
-rw-r--r--src/modules/ibar/e_mod_main.h2
-rw-r--r--src/modules/ibox/e_mod_main.c18
-rw-r--r--src/modules/ibox/e_mod_main.h2
-rw-r--r--src/modules/pager/e_mod_main.c18
-rw-r--r--src/modules/pager/e_mod_main.h2
-rw-r--r--src/modules/randr/e_mod_main.c18
-rw-r--r--src/modules/randr/e_mod_main.h2
-rw-r--r--src/modules/start/e_mod_main.c18
-rw-r--r--src/modules/start/e_mod_main.h2
-rw-r--r--src/modules/temperature/e_mod_main.c18
-rw-r--r--src/modules/temperature/e_mod_main.h2
-rw-r--r--src/modules/test/e_mod_main.c47
-rw-r--r--src/modules/test/e_mod_main.h2
24 files changed, 122 insertions, 156 deletions
diff --git a/src/bin/e_module.c b/src/bin/e_module.c
index c5afa1067..36458d3ef 100644
--- a/src/bin/e_module.c
+++ b/src/bin/e_module.c
@@ -28,11 +28,6 @@ static void _e_module_control_menu_enabled(void *data, E_Menu *m, E_Menu_Item *m
/* local subsystem globals */
static Evas_List *_e_modules = NULL;
-static E_Module_Api _e_module_api =
-{
- E_MODULE_API_VERSION
-};
-
/* externally accessible functions */
int
e_module_init(void)
@@ -88,7 +83,6 @@ e_module_new(char *name)
if (!name) return NULL;
m = E_OBJECT_ALLOC(E_Module, E_MODULE_TYPE, _e_module_free);
- m->api = &_e_module_api;
if (name[0] != '/')
{
snprintf(buf, sizeof(buf), "%s/%s/module.so", name, MODULE_ARCH);
@@ -119,6 +113,7 @@ e_module_new(char *name)
free(m);
return NULL;
}
+ m->api = dlsym(m->handle, "e_module_api");
m->func.init = dlsym(m->handle, "e_modapi_init");
m->func.shutdown = dlsym(m->handle, "e_modapi_shutdown");
m->func.save = dlsym(m->handle, "e_modapi_save");
@@ -128,7 +123,8 @@ e_module_new(char *name)
(!m->func.shutdown) ||
(!m->func.save) ||
(!m->func.info) ||
- (!m->func.about)
+ (!m->func.about) ||
+ (!m->api)
)
{
e_error_dialog_show(_("Error loading Module"),
@@ -142,6 +138,20 @@ e_module_new(char *name)
free(m);
return NULL;
}
+ if (m->api->version < E_MODULE_API_VERSION)
+ {
+ char buf[4096];
+ snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: %s<br>"
+ "It requires a minimum module API version of: %i.<br>"
+ "The module API advertized by Enlightenment is: %i.<br>"),
+ _(m->api->name), E_MODULE_API_VERSION, m->api->version);
+
+ e_module_dialog_show(_("Enlightenment Clock Module"), buf);
+ dlclose(m->handle);
+ free(m);
+ return NULL;
+ }
+
_e_modules = evas_list_append(_e_modules, m);
m->name = strdup(name);
s = ecore_file_get_dir(modpath);
diff --git a/src/bin/e_module.h b/src/bin/e_module.h
index 1e3976d8f..c3abfcff5 100644
--- a/src/bin/e_module.h
+++ b/src/bin/e_module.h
@@ -17,7 +17,7 @@ typedef struct _E_Module_Api E_Module_Api;
struct _E_Module
{
E_Object e_obj_inherit;
-
+
E_Module_Api *api;
char *name;
@@ -49,7 +49,8 @@ struct _E_Module
struct _E_Module_Api
{
- int version;
+ int version;
+ const char *name;
};
EAPI int e_module_init(void);
diff --git a/src/modules/battery/e_mod_main.c b/src/modules/battery/e_mod_main.c
index 7e17adee7..c97bdd3f5 100644
--- a/src/modules/battery/e_mod_main.c
+++ b/src/modules/battery/e_mod_main.c
@@ -65,23 +65,17 @@ static E_Config_DD *conf_face_edd;
static int battery_count;
/* public module routines. all modules must have these */
+E_Module_Api e_module_api =
+{
+ E_MODULE_API_VERSION,
+ "Battery"
+};
+
void *
e_modapi_init(E_Module *m)
{
Battery *e;
- /* check module api version */
- if (m->api->version < E_MODULE_API_VERSION)
- {
- char buf[4096];
- snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: %s<br>"
- "It requires a minimum module API version of: %i.<br>"
- "The module API advertized by Enlightenment is: %i.<br>"),
- _("Battery"), E_MODULE_API_VERSION, m->api->version);
-
- e_module_dialog_show(_("Enlightenment Battery Module"), buf);
- return NULL;
- }
/* actually init battery */
e = _battery_new();
m->config_menu = e->config_menu;
diff --git a/src/modules/battery/e_mod_main.h b/src/modules/battery/e_mod_main.h
index 178a5ff4a..7197ab66a 100644
--- a/src/modules/battery/e_mod_main.h
+++ b/src/modules/battery/e_mod_main.h
@@ -86,6 +86,8 @@ struct _Status
char *time;
};
+extern E_Module_Api e_module_api;
+
EAPI void *e_modapi_init (E_Module *m);
EAPI int e_modapi_shutdown (E_Module *m);
EAPI int e_modapi_save (E_Module *m);
diff --git a/src/modules/clock/e_mod_main.c b/src/modules/clock/e_mod_main.c
index d8caf11a4..d67b756aa 100644
--- a/src/modules/clock/e_mod_main.c
+++ b/src/modules/clock/e_mod_main.c
@@ -38,24 +38,17 @@ const int
;
/* public module routines. all modules must have these */
+E_Module_Api e_module_api =
+{
+ E_MODULE_API_VERSION,
+ "Clock"
+};
+
void *
e_modapi_init(E_Module *module)
{
Clock *clock;
- /* check module api version */
- if (module->api->version < E_MODULE_API_VERSION)
- {
- char buf[4096];
- snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: %s<br>"
- "It requires a minimum module API version of: %i.<br>"
- "The module API advertized by Enlightenment is: %i.<br>"),
- _("Clock"), E_MODULE_API_VERSION, module->api->version);
-
- e_module_dialog_show(_("Enlightenment Clock Module"), buf);
- return NULL;
- }
-
/* actually init clock */
clock = _clock_new();
module->config_menu = clock->config_menu;
diff --git a/src/modules/clock/e_mod_main.h b/src/modules/clock/e_mod_main.h
index 7137aa867..3e7cd5953 100644
--- a/src/modules/clock/e_mod_main.h
+++ b/src/modules/clock/e_mod_main.h
@@ -43,6 +43,8 @@ struct _Clock_Face
E_Gadman_Client *gmc;
};
+extern E_Module_Api e_module_api;
+
EAPI void *e_modapi_init (E_Module *module);
EAPI int e_modapi_shutdown (E_Module *module);
EAPI int e_modapi_save (E_Module *module);
diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c
index 0f467e469..a886a99fb 100644
--- a/src/modules/cpufreq/e_mod_main.c
+++ b/src/modules/cpufreq/e_mod_main.c
@@ -57,23 +57,17 @@ static E_Config_DD *conf_face_edd;
static int cpufreq_count;
/* public module routines */
+E_Module_Api e_module_api =
+{
+ E_MODULE_API_VERSION,
+ "Cpufreq"
+};
+
void *
e_modapi_init(E_Module *module)
{
Cpufreq *freq;
- if (module->api->version < E_MODULE_API_VERSION)
- {
- char buf[4096];
- snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: %s<br>"
- "It requires a minimum module API version of: %i.<br>"
- "The module API advertized by Enlightenment is: %i.<br>"),
- _("Cpufreq"), E_MODULE_API_VERSION, module->api->version);
-
- e_module_dialog_show(_("Enlightenment Cpufreq Module"), buf);
- return NULL;
- }
-
freq = _cpufreq_new(module);
module->config_menu = freq->config_menu;
return freq;
diff --git a/src/modules/cpufreq/e_mod_main.h b/src/modules/cpufreq/e_mod_main.h
index 1184737a7..486688056 100644
--- a/src/modules/cpufreq/e_mod_main.h
+++ b/src/modules/cpufreq/e_mod_main.h
@@ -64,6 +64,8 @@ struct _Cpufreq_Face
E_Gadman_Client *gmc;
};
+extern E_Module_Api e_module_api;
+
EAPI void *e_modapi_init (E_Module *module);
EAPI int e_modapi_shutdown (E_Module *module);
EAPI int e_modapi_save (E_Module *module);
diff --git a/src/modules/dropshadow/e_mod_main.c b/src/modules/dropshadow/e_mod_main.c
index 91298a6f3..d0823abf0 100644
--- a/src/modules/dropshadow/e_mod_main.c
+++ b/src/modules/dropshadow/e_mod_main.c
@@ -90,22 +90,17 @@ static void _tilebuf_free_render_rects(Evas_List *rects);
#define TILE(tb, x, y) ((tb)->tiles.tiles[((y) * (tb)->tiles.w) + (x)])
/* public module routines. all modules must have these */
+E_Module_Api e_module_api =
+{
+ E_MODULE_API_VERSION,
+ "Dropshadow"
+};
+
void *
e_modapi_init(E_Module *m)
{
Dropshadow *ds;
- if (m->api->version < E_MODULE_API_VERSION)
- {
- char buf[4096];
- snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: %s<br>"
- "It requires a minimum module API version of: %i.<br>"
- "The module API advertized by Enlightenment is: %i.<br>"),
- _("Dropshadow"), E_MODULE_API_VERSION, m->api->version);
-
- e_module_dialog_show(_("Enlightenment Dropshadow Module"), buf);
- return NULL;
- }
ds = _ds_init(m);
m->config_menu = _ds_config_menu_new(ds);
#if 0
diff --git a/src/modules/dropshadow/e_mod_main.h b/src/modules/dropshadow/e_mod_main.h
index e0e05cc0e..cfec224e5 100644
--- a/src/modules/dropshadow/e_mod_main.h
+++ b/src/modules/dropshadow/e_mod_main.h
@@ -97,6 +97,8 @@ struct _Tilebuf_Tile
int redraw : 1;
};
+extern E_Module_Api e_module_api;
+
EAPI void *e_modapi_init (E_Module *m);
EAPI int e_modapi_shutdown (E_Module *m);
EAPI int e_modapi_save (E_Module *m);
diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index 9d5c02685..45caae375 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -110,23 +110,17 @@ static void _ibar_drag_cb_intercept_move(void *data, Evas_Object *o, Evas_Coo
static void _ibar_drag_cb_intercept_resize(void *data, Evas_Object *o, Evas_Coord w, Evas_Coord h);
/* public module routines. all modules must have these */
+E_Module_Api e_module_api =
+{
+ E_MODULE_API_VERSION,
+ "IBar"
+};
+
void *
e_modapi_init(E_Module *m)
{
IBar *ib;
- /* check module api version */
- if (m->api->version < E_MODULE_API_VERSION)
- {
- char buf[4096];
- snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: %s<br>"
- "It requires a minimum module API version of: %i.<br>"
- "The module API advertized by Enlightenment is: %i.<br>"),
- _("IBar"), E_MODULE_API_VERSION, m->api->version);
-
- e_module_dialog_show(_("Enlightenment IBar Module"), buf);
- return NULL;
- }
/* actually init ibar */
ib = _ibar_new();
m->config_menu = ib->config_menu;
diff --git a/src/modules/ibar/e_mod_main.h b/src/modules/ibar/e_mod_main.h
index 85db1a2d4..085159710 100644
--- a/src/modules/ibar/e_mod_main.h
+++ b/src/modules/ibar/e_mod_main.h
@@ -91,6 +91,8 @@ struct _IBar_Icon
unsigned char raise_on_hilight : 1;
};
+extern E_Module_Api e_module_api;
+
EAPI void *e_modapi_init (E_Module *m);
EAPI int e_modapi_shutdown (E_Module *m);
EAPI int e_modapi_save (E_Module *m);
diff --git a/src/modules/ibox/e_mod_main.c b/src/modules/ibox/e_mod_main.c
index 64f8c7697..285e1c0cf 100644
--- a/src/modules/ibox/e_mod_main.c
+++ b/src/modules/ibox/e_mod_main.c
@@ -92,23 +92,17 @@ static void _ibox_box_cb_menu_enabled(void *data, E_Menu *m, E_Menu_Item *mi)
static void _ibox_box_cb_menu_edit(void *data, E_Menu *m, E_Menu_Item *mi);
/* public module routines. all modules must have these */
+E_Module_Api e_module_api =
+{
+ E_MODULE_API_VERSION,
+ "IBox"
+};
+
void *
e_modapi_init(E_Module *m)
{
IBox *ib;
- /* check module api version */
- if (m->api->version < E_MODULE_API_VERSION)
- {
- char buf[4096];
- snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: %s<br>"
- "It requires a minimum module API version of: %i.<br>"
- "The module API advertized by Enlightenment is: %i.<br>"),
- _("IBox"), E_MODULE_API_VERSION, m->api->version);
-
- e_module_dialog_show(_("Enlightenment IBox Module"), buf);
- return NULL;
- }
/* actually init ibox */
ib = _ibox_new();
m->config_menu = ib->config_menu;
diff --git a/src/modules/ibox/e_mod_main.h b/src/modules/ibox/e_mod_main.h
index ebea0f9e8..130028f9f 100644
--- a/src/modules/ibox/e_mod_main.h
+++ b/src/modules/ibox/e_mod_main.h
@@ -84,6 +84,8 @@ struct _IBox_Icon
unsigned char raise_on_hilight : 1;
};
+extern E_Module_Api e_module_api;
+
EAPI void *e_modapi_init (E_Module *m);
EAPI int e_modapi_shutdown (E_Module *m);
EAPI int e_modapi_save (E_Module *m);
diff --git a/src/modules/pager/e_mod_main.c b/src/modules/pager/e_mod_main.c
index 72c522c09..95ac41e94 100644
--- a/src/modules/pager/e_mod_main.c
+++ b/src/modules/pager/e_mod_main.c
@@ -104,23 +104,17 @@ static E_Config_DD *_conf_edd;
static E_Config_DD *_conf_face_edd;
/* public module routines. all modules must have these */
+E_Module_Api e_module_api =
+{
+ E_MODULE_API_VERSION,
+ "Pager"
+};
+
void *
e_modapi_init(E_Module *module)
{
Pager *pager = NULL;
- /* check module api version */
- if (module->api->version < E_MODULE_API_VERSION)
- {
- char buf[4096];
- snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: %s<br>"
- "It requires a minimum module API version of: %i.<br>"
- "The module API advertized by Enlightenment is: %i.<br>"),
- _("Pager"), E_MODULE_API_VERSION, module->api->version);
-
- e_module_dialog_show(_("Enlightenment Pager Module"), buf);
- return NULL;
- }
/* actually init pager */
pager = _pager_new();
module->config_menu = pager->config_menu;
diff --git a/src/modules/pager/e_mod_main.h b/src/modules/pager/e_mod_main.h
index 9ac8ff7db..ee91b92cd 100644
--- a/src/modules/pager/e_mod_main.h
+++ b/src/modules/pager/e_mod_main.h
@@ -144,6 +144,8 @@ struct _Pager_Popup
Ecore_Timer *timer;
};
+extern E_Module_Api e_module_api;
+
EAPI void *e_modapi_init (E_Module *module);
EAPI int e_modapi_shutdown (E_Module *module);
EAPI int e_modapi_save (E_Module *module);
diff --git a/src/modules/randr/e_mod_main.c b/src/modules/randr/e_mod_main.c
index 44d523ab2..1c6ec0be6 100644
--- a/src/modules/randr/e_mod_main.c
+++ b/src/modules/randr/e_mod_main.c
@@ -27,23 +27,17 @@ static void _randr_save_res(Randr_Resolution *res);
static E_Config_DD *conf_edd;
static E_Config_DD *conf_manager_edd;
+E_Module_Api e_module_api =
+{
+ E_MODULE_API_VERSION,
+ "RandR"
+};
+
void *
e_modapi_init(E_Module *m)
{
Randr *e;
- if (m->api->version < E_MODULE_API_VERSION)
- {
- char buf[4096];
- snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: %s<br>"
- "It requires a minimum module API version of: %i.<br>"
- "The module API advertized by Enlightenment is: %i.<br>"),
- _("RandR"), E_MODULE_API_VERSION, m->api->version);
-
- e_module_dialog_show(_("Enlightenment Randr Module"), buf);
- return NULL;
- }
-
/* Create the button */
e = _randr_new();
m->config_menu = e->config_menu;
diff --git a/src/modules/randr/e_mod_main.h b/src/modules/randr/e_mod_main.h
index d0a7fd3d4..024709681 100644
--- a/src/modules/randr/e_mod_main.h
+++ b/src/modules/randr/e_mod_main.h
@@ -42,6 +42,8 @@ struct _Randr_Resolution
Ecore_X_Screen_Size prev, next;
};
+extern E_Module_Api e_module_api;
+
EAPI void *e_modapi_init (E_Module *m);
EAPI int e_modapi_shutdown (E_Module *m);
EAPI int e_modapi_save (E_Module *m);
diff --git a/src/modules/start/e_mod_main.c b/src/modules/start/e_mod_main.c
index 58960a622..883c11f78 100644
--- a/src/modules/start/e_mod_main.c
+++ b/src/modules/start/e_mod_main.c
@@ -22,23 +22,17 @@ static int button_count;
static E_Config_DD *conf_edd;
static E_Config_DD *conf_face_edd;
+E_Module_Api e_module_api =
+{
+ E_MODULE_API_VERSION,
+ "Start"
+};
+
void *
e_modapi_init(E_Module *m)
{
Start *e;
- if (m->api->version < E_MODULE_API_VERSION)
- {
- char buf[4096];
- snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: %s<br>"
- "It requires a minimum module API version of: %i.<br>"
- "The module API advertized by Enlightenment is: %i.<br>"),
- _("Start"), E_MODULE_API_VERSION, m->api->version);
-
- e_module_dialog_show(_("Enlightenment Start Module"), buf);
- return NULL;
- }
-
/* Create the button */
e = _start_new();
m->config_menu = e->config_menu;
diff --git a/src/modules/start/e_mod_main.h b/src/modules/start/e_mod_main.h
index 13eedd8dc..13a8e9077 100644
--- a/src/modules/start/e_mod_main.h
+++ b/src/modules/start/e_mod_main.h
@@ -38,6 +38,8 @@ struct _Start_Face
E_Gadman_Client *gmc;
};
+extern E_Module_Api e_module_api;
+
EAPI void *e_modapi_init (E_Module *m);
EAPI int e_modapi_shutdown (E_Module *m);
EAPI int e_modapi_save (E_Module *m);
diff --git a/src/modules/temperature/e_mod_main.c b/src/modules/temperature/e_mod_main.c
index 80f37e1b7..93ef9668f 100644
--- a/src/modules/temperature/e_mod_main.c
+++ b/src/modules/temperature/e_mod_main.c
@@ -38,23 +38,17 @@ static E_Config_DD *conf_face_edd;
static int temperature_count;
/* public module routines. all modules must have these */
+E_Module_Api e_module_api =
+{
+ E_MODULE_API_VERSION,
+ "Temperature"
+};
+
void *
e_modapi_init(E_Module *m)
{
Temperature *e;
- /* check module api version */
- if (m->api->version < E_MODULE_API_VERSION)
- {
- char buf[4096];
- snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: %s<br>"
- "It requires a minimum module API version of: %i.<br>"
- "The module API advertized by Enlightenment is: %i.<br>"),
- _("Temperature"), E_MODULE_API_VERSION, m->api->version);
-
- e_module_dialog_show(_("Enlightenment Temperature Module"), buf);
- return NULL;
- }
/* actually init temperature */
e = _temperature_new(m);
m->config_menu = e->config_menu;
diff --git a/src/modules/temperature/e_mod_main.h b/src/modules/temperature/e_mod_main.h
index 35b1c43f8..013821c87 100644
--- a/src/modules/temperature/e_mod_main.h
+++ b/src/modules/temperature/e_mod_main.h
@@ -57,6 +57,8 @@ struct _Temperature_Face
E_Gadman_Client *gmc;
};
+extern E_Module_Api e_module_api;
+
EAPI void *e_modapi_init (E_Module *m);
EAPI int e_modapi_shutdown (E_Module *m);
EAPI int e_modapi_save (E_Module *m);
diff --git a/src/modules/test/e_mod_main.c b/src/modules/test/e_mod_main.c
index 5a39aa1cd..d19d761a8 100644
--- a/src/modules/test/e_mod_main.c
+++ b/src/modules/test/e_mod_main.c
@@ -4,38 +4,31 @@
#include "e.h"
#include "e_mod_main.h"
+E_Module_Api e_module_api =
+{
+ E_MODULE_API_VERSION,
+ "Test"
+};
+
void *
e_modapi_init(E_Module *m)
{
- if (m->api->version < E_MODULE_API_VERSION)
- {
- char buf[4096];
+ E_Menu *mn;
+ E_Menu_Item *mi;
- snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: %s<br>"
- "It requires a minimum module API version of: %i.<br>"
- "The module API advertized by Enlightenment is: %i.<br>"),
- _("Test"), E_MODULE_API_VERSION, m->api->version);
+ mn = e_menu_new();
+ mi = e_menu_item_new(mn);
+ e_menu_item_label_set(mi, _("Module Config Menu Item 1"));
+ mi = e_menu_item_new(mn);
+ e_menu_item_label_set(mi, _("Module Config Menu Item 2"));
+ mi = e_menu_item_new(mn);
+ e_menu_item_label_set(mi, _("Module Config Menu Item 3"));
+ mi = e_menu_item_new(mn);
+ e_menu_item_separator_set(mi, 1);
+ mi = e_menu_item_new(mn);
+ e_menu_item_label_set(mi, _("Something Else"));
+ m->config_menu = mn;
- e_module_dialog_show(_("Enlightenment Test Module"), buf);
- return NULL;
- }
- {
- E_Menu *mn;
- E_Menu_Item *mi;
-
- mn = e_menu_new();
- mi = e_menu_item_new(mn);
- e_menu_item_label_set(mi, _("Module Config Menu Item 1"));
- mi = e_menu_item_new(mn);
- e_menu_item_label_set(mi, _("Module Config Menu Item 2"));
- mi = e_menu_item_new(mn);
- e_menu_item_label_set(mi, _("Module Config Menu Item 3"));
- mi = e_menu_item_new(mn);
- e_menu_item_separator_set(mi, 1);
- mi = e_menu_item_new(mn);
- e_menu_item_label_set(mi, _("Something Else"));
- m->config_menu = mn;
- }
return e_modapi_init; /* bogus pointer - just to say we worked */
}
diff --git a/src/modules/test/e_mod_main.h b/src/modules/test/e_mod_main.h
index 876471d4d..c93b7f78c 100644
--- a/src/modules/test/e_mod_main.h
+++ b/src/modules/test/e_mod_main.h
@@ -1,6 +1,8 @@
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H
+extern E_Module_Api e_module_api;
+
EAPI void *e_modapi_init (E_Module *m);
EAPI int e_modapi_shutdown (E_Module *m);
EAPI int e_modapi_save (E_Module *m);