From 8a0f1bc9265fa54f95ac7a77e95379c17dee89f6 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Tue, 1 Dec 2009 08:01:20 +0000 Subject: [PATCH] Fix up some typos. Add some comments. SVN revision: 44079 --- src/modules/illume2/e_mod_main.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/modules/illume2/e_mod_main.c b/src/modules/illume2/e_mod_main.c index d301aa195..96d957ffa 100644 --- a/src/modules/illume2/e_mod_main.c +++ b/src/modules/illume2/e_mod_main.c @@ -9,7 +9,7 @@ static E_Kbd *kbd = NULL; /* this is needed to advertise a label for the module IN the code (not just * the .desktop file) but more specifically the api version it was compiled * for so E can skip modules that are compiled for an incorrect API version - * safely) */ + * safely */ EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume2" }; /* called first thing when E inits the module */ @@ -25,28 +25,40 @@ e_modapi_init(E_Module *m) /* init the layout system */ e_mod_layout_init(m); + /* create a new keyboard */ kbd = e_kbd_new(e_util_container_zone_number_get(0, 0), m->dir, m->dir, m->dir); + + /* show the keyboard if needed */ e_kbd_show(kbd); - return m; /* return NULL on failure, anything else on success. the pointer - * returned will be set as m->data for convenience tracking */ + /* return NULL on failure, anything else on success. the pointer + * returned will be set as m->data for convenience tracking */ + return m; } /* called on module shutdown - should clean up EVERYTHING or we leak */ EAPI int e_modapi_shutdown(E_Module *m) { + /* cleanup the keyboard */ e_object_del(E_OBJECT(kbd)); kbd = NULL; + /* run any layout shutdown code */ e_mod_layout_shutdown(); + + /* shutdown the kbd subsystem */ e_kbd_shutdown(); + + /* shutdown the config subsystem */ il_config_shutdown(); - return 1; /* 1 for success, 0 for failure */ + + /* 1 for success, 0 for failure */ + return 1; } -/* called by E when it thinks this module shoudl go save any config it has */ +/* called by E when it thinks this module should go save any config it has */ EAPI int e_modapi_save(E_Module *m) {