Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src


Modified Files:
        entropy_core.c 


Log Message:
* Allow adding on new applications to a mime type

===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/entropy_core.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- entropy_core.c      19 Mar 2006 00:35:26 -0000      1.60
+++ entropy_core.c      19 Mar 2006 04:28:42 -0000      1.61
@@ -375,6 +375,34 @@
        
 }
 
+void entropy_core_mime_application_add(char* mime_type, char* name, char* 
executable, char* args)
+{
+       Entropy_Config_Mime_Binding* binding;
+       Entropy_Config_Mime_Binding_Action* action;
+       
+       Evas_List* l;
+
+
+       for (l = core_core->config->Config_Mimes->mime_bindings; l; ) {
+               binding = l->data;
+
+               if (!strcmp(binding->mime_type, mime_type)) {
+                       /*Create a new action, based on this mime_type*/
+                       action = 
calloc(1,sizeof(Entropy_Config_Mime_Binding_Action));
+
+                       action->app_description = strdup(name);
+                       action->executable = strdup(executable);
+                       action->args = strdup(args);
+
+                       binding->actions = evas_list_append(binding->actions, 
action);
+               }
+               
+               l = l->next;
+       }
+
+
+}
+
 void entropy_core_config_load() 
 {
        int count, new_count;
@@ -494,7 +522,7 @@
 
        Entropy_Config_Mime_Binding* binding;
        Entropy_Config_Mime_Binding_Action* action;
-       Evas_List* l, *l2;
+       Evas_List* l;
 
        for (l = core_core->config->Config_Mimes->mime_bindings; l; ) {
                binding = l->data;




-------------------------------------------------------
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

Reply via email to