cleanup e_mod_main.c/h
This commit is contained in:
parent
e65b154cad
commit
e827df78f8
|
@ -5,39 +5,33 @@
|
|||
#include "e_mod_penguins.h"
|
||||
|
||||
|
||||
/* module private routines */
|
||||
// static void _population_load(Population *pop);
|
||||
// static void _theme_load(Population *pop);
|
||||
|
||||
|
||||
/* public module routines. all modules must have these */
|
||||
EAPI E_Module_Api e_modapi = {
|
||||
E_MODULE_API_VERSION,
|
||||
"Penguins"
|
||||
};
|
||||
EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Penguins" };
|
||||
|
||||
EAPI E_Module *penguins_mod = NULL;
|
||||
|
||||
|
||||
EAPI void *
|
||||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
Population *pop;
|
||||
char buf[4096];
|
||||
char buf[PATH_MAX];
|
||||
|
||||
/* Set up module's message catalogue */
|
||||
// Set up module's message catalogue
|
||||
snprintf(buf, sizeof(buf), "%s/locale", e_module_dir_get(m));
|
||||
bindtextdomain(PACKAGE, buf);
|
||||
bind_textdomain_codeset(PACKAGE, "UTF-8");
|
||||
|
||||
pop = population_init(m);
|
||||
|
||||
// Add an item in the config panel
|
||||
snprintf(buf, sizeof(buf), "%s/e-module-penguins.edj", e_module_dir_get(m));
|
||||
e_configure_registry_category_add("appearance", 10, D_("Look"), NULL, "preferences-look");
|
||||
e_configure_registry_item_add("appearance/penguins", 150, D_("Penguins"), NULL, buf, e_int_config_penguins_module);
|
||||
e_configure_registry_category_add("appearance", 10, D_("Look"),
|
||||
NULL, "preferences-look");
|
||||
e_configure_registry_item_add("appearance/penguins", 150, D_("Penguins"),
|
||||
NULL, buf, e_int_config_penguins_module);
|
||||
|
||||
penguins_mod = m;
|
||||
e_module_delayed_set(m, 1);
|
||||
return pop;
|
||||
|
||||
return population_init(m);
|
||||
}
|
||||
|
||||
EAPI int
|
||||
|
@ -48,14 +42,9 @@ e_modapi_shutdown(E_Module *m)
|
|||
e_configure_registry_item_del("appearance/penguins");
|
||||
e_configure_registry_category_del("appearance");
|
||||
|
||||
pop = m->data;
|
||||
if (pop)
|
||||
if (pop = m->data)
|
||||
{
|
||||
if (pop->config_dialog)
|
||||
{
|
||||
e_object_del(E_OBJECT(pop->config_dialog));
|
||||
pop->config_dialog = NULL;
|
||||
}
|
||||
E_FREE_FUNC(pop->config_dialog, e_object_del);
|
||||
population_shutdown(pop);
|
||||
}
|
||||
return 1;
|
||||
|
|
|
@ -11,26 +11,12 @@
|
|||
#endif
|
||||
|
||||
|
||||
// typedef struct _Config Config;
|
||||
//
|
||||
//
|
||||
// struct _Config
|
||||
// {
|
||||
// double zoom;
|
||||
// int penguins_count;
|
||||
// const char *theme;
|
||||
// int alpha;
|
||||
// };
|
||||
|
||||
|
||||
|
||||
extern E_Module *penguins_mod;
|
||||
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init(E_Module *m);
|
||||
EAPI int e_modapi_shutdown(E_Module *m);
|
||||
EAPI int e_modapi_save(E_Module *m);
|
||||
|
||||
extern E_Module *penguins_mod;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue