Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/pager


Modified Files:
        e_mod_main.c e_mod_main.h 


Log Message:
Move module api check to module loader.

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/modules/pager/e_mod_main.c,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -3 -r1.133 -r1.134
--- e_mod_main.c        22 Sep 2005 22:57:17 -0000      1.133
+++ e_mod_main.c        23 Sep 2005 17:13:47 -0000      1.134
@@ -104,23 +104,17 @@
 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;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/modules/pager/e_mod_main.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- e_mod_main.h        20 Sep 2005 17:09:56 -0000      1.33
+++ e_mod_main.h        23 Sep 2005 17:13:47 -0000      1.34
@@ -144,6 +144,8 @@
    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);




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to