Enlightenment CVS committal Author : lordchaos Project : e17 Module : proto
Dir : e17/proto/entropy/src Modified Files: entropy_config.c entropy_core.c Log Message: * Multi-mime-actions part 2: Actions are now hooked up (try right click a file->open with..->()). Note that this temporarily breaks the mime dialogs =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/entropy_config.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- entropy_config.c 16 Mar 2006 12:22:01 -0000 1.9 +++ entropy_config.c 18 Mar 2006 08:04:10 -0000 1.10 @@ -121,6 +121,13 @@ snprintf(_Entropy_Config->config_dir_and_file_eet, strlen(_Entropy_Config->config_dir) + 16, "%s/%s", _Entropy_Config->config_dir, "eetentropy.cfg"); + //Does the config dir exist? + if (stat(_Entropy_Config->config_dir, &config_dir_stat)) { + //Make the dir.. + mkdir(_Entropy_Config->config_dir, 0777); + } + + /*Build the EDDs*/ _entropy_config_mime_binding_action_edd = eet_data_descriptor_new("entropy_config_mime_binding_action", sizeof(Entropy_Config_Mime_Binding_Action), @@ -290,12 +297,6 @@ entropy_config_mimes_print(_Entropy_Config->Config_Mimes); - //Does the config dir exist? - if (stat(_Entropy_Config->config_dir, &config_dir_stat)) { - //Make the dir.. - mkdir(_Entropy_Config->config_dir, 0777); - } - //Init ecore_config ecore_config_init("entropy_config"); ecore_config_file_load(_Entropy_Config->config_dir_and_file); =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/entropy_core.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -3 -r1.58 -r1.59 --- entropy_core.c 14 Mar 2006 22:23:47 -0000 1.58 +++ entropy_core.c 18 Mar 2006 08:04:10 -0000 1.59 @@ -18,6 +18,7 @@ #include "md5.h" #include "entropy_gui.h" #include <Epsilon.h> +#include <Evas.h> #define ENTROPY_CORE 1 @@ -460,8 +461,27 @@ } -entropy_mime_action* entropy_core_mime_hint_get(char* mime_type) { - return ecore_hash_get(core_core->mime_action_hint, mime_type); +Entropy_Config_Mime_Binding_Action* entropy_core_mime_hint_get(char* mime_type, int key) { + + Entropy_Config_Mime_Binding* binding; + Entropy_Config_Mime_Binding_Action* action; + Evas_List* l, *l2; + + for (l = core_core->config->Config_Mimes->mime_bindings; l; ) { + binding = l->data; + + if (!strcmp(mime_type , binding->mime_type)) { + /*Return nth element*/ + action = evas_list_nth(binding->actions, key); + + printf("Action exe: %s, Action args: %s\n", action->executable, action->args); + return action; + } + + l = l->next; + } + + return NULL; } @@ -1051,6 +1071,7 @@ } else if (!strcmp(event->event_type,ENTROPY_GUI_EVENT_ACTION_FILE)) { entropy_notify_event* ev = entropy_notify_event_new(); ev->event_type = ENTROPY_NOTIFY_FILE_ACTION; + ev->key = event->key; //printf ("Requested an action execute\n"); ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs