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