diff options
author | Davide Andreoli <dave@gurumeditation.it> | 2008-11-12 01:14:18 +0000 |
---|---|---|
committer | Davide Andreoli <dave@gurumeditation.it> | 2008-11-12 01:14:18 +0000 |
commit | 1a5b14aa4871f9136d70825184860cdf6bc6b299 (patch) | |
tree | 62664e6dfb9f7585769bb9db2b576a07e53c61d4 /src/modules/gadman | |
parent | 022a2caf4474081addb9a56d440f93815c525c98 (diff) | |
download | enlightenment-1a5b14aa4871f9136d70825184860cdf6bc6b299.tar.gz |
* Now gadman place the gadget when E say so, and not only on startup.
SVN revision: 37594
Diffstat (limited to 'src/modules/gadman')
-rw-r--r-- | src/modules/gadman/e_mod_gadman.c | 34 | ||||
-rw-r--r-- | src/modules/gadman/e_mod_main.c | 2 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/modules/gadman/e_mod_gadman.c b/src/modules/gadman/e_mod_gadman.c index 9be5e116b5..4d12dee7a0 100644 --- a/src/modules/gadman/e_mod_gadman.c +++ b/src/modules/gadman/e_mod_gadman.c @@ -74,23 +74,6 @@ gadman_init(E_Module *m) /* Create 2 mover objects */ Man->mover = _create_mover(Man->gc); Man->mover_top = _create_mover(Man->gc_top); - - /* Start existing gadgets */ - for (l = Man->gc->cf->clients; l; l = l->next) - { - E_Config_Gadcon_Client *cf_gcc; - - if (!(cf_gcc = l->data)) continue; - gadman_gadget_place(cf_gcc, 0); - } - - for (l = Man->gc_top->cf->clients; l; l = l->next) - { - E_Config_Gadcon_Client *cf_gcc; - - if(!(cf_gcc = l->data)) continue; - gadman_gadget_place(cf_gcc, 1); - } } void @@ -127,6 +110,22 @@ gadman_shutdown(void) Man = NULL; } +void +gadman_populate_class(void *data, E_Gadcon *gc, const E_Gadcon_Client_Class *cc) +{ + Eina_List *l; + + for (l = gc->cf->clients; l; l = l->next) + { + E_Config_Gadcon_Client *cf_gcc; + + if (!(cf_gcc = l->data)) continue; + printf(" cf_gcc name %s\n", cf_gcc->name); + if (cf_gcc->name && cc->name && !strcmp(cf_gcc->name, cc->name)) + gadman_gadget_place(cf_gcc, (int)data); + } +} + E_Gadcon_Client * gadman_gadget_place(E_Config_Gadcon_Client *cf, int ontop) { @@ -494,6 +493,7 @@ _gadman_gadcon_new(const char* name, int ontop) e_gadcon_zone_set(gc, e_zone_current_get(Man->container)); e_gadcon_util_menu_attach_func_set(gc, _attach_menu, NULL); + e_gadcon_populate_callback_set(gc, gadman_populate_class, (void*)ontop); gc->id = 114 + ontop; // TODO what's this ??????? 114 is a random number gc->edje.o_parent = NULL; diff --git a/src/modules/gadman/e_mod_main.c b/src/modules/gadman/e_mod_main.c index 891d8b840b..6505bdf83e 100644 --- a/src/modules/gadman/e_mod_main.c +++ b/src/modules/gadman/e_mod_main.c @@ -29,7 +29,7 @@ e_modapi_init(E_Module *m) /* Set this module to be loaded after all other modules, or we don't see modules loaded after this */ - e_module_priority_set(m, -100); + e_module_priority_set(m, 100); gadman_init(m); |