Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src


Modified Files:
        entropy_core.c plugin_helper.c 


Log Message:
* Check in DND code I've been holding back on until ewld_dnd is in

===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/entropy_core.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- entropy_core.c      20 Dec 2005 06:12:26 -0000      1.31
+++ entropy_core.c      22 Dec 2005 04:34:40 -0000      1.32
@@ -151,7 +151,8 @@
        /*Initialize the mime hint hash*/
        core->mime_action_hint = ecore_hash_new(ecore_str_hash, 
ecore_str_compare);
 
-
+       /*Initialize the object assoc. hash*/
+       core->object_associate_hash = ecore_hash_new(ecore_direct_hash, 
ecore_direct_compare);
 
        //printf ("Initialising the file cache..\n");
        core->file_interest_list = ecore_hash_new(ecore_str_hash, 
ecore_str_compare);
@@ -819,7 +820,7 @@
 
                
                /*FIXME We should get the caller's current file plugin from the 
caller - i.e. the gui instance*/
-               plugin = 
entropy_plugins_type_get_first(instance->core->plugin_list, 
ENTROPY_PLUGIN_BACKEND_FILE ,ENTROPY_PLUGIN_SUB_TYPE_ALL);
+               plugin = 
entropy_plugins_type_get_first(ENTROPY_PLUGIN_BACKEND_FILE 
,ENTROPY_PLUGIN_SUB_TYPE_ALL);
               
 
                /*Make our new event for notification*/
@@ -942,7 +943,7 @@
                //printf ("Requested a stat on a file...md5 %s, pointer %p, 
path '%s', filename '%s'\n", ((entropy_generic_file*)event->data)->md5, 
((entropy_generic_file*)event->data), 
((entropy_generic_file*)event->data)->path, 
((entropy_generic_file*)event->data)->filename );
 
                /*FIXME We should get the caller's current file plugin from the 
caller - i.e. the gui instance*/
-               plugin = 
entropy_plugins_type_get_first(instance->core->plugin_list, 
ENTROPY_PLUGIN_BACKEND_FILE ,ENTROPY_PLUGIN_SUB_TYPE_ALL);
+               plugin = 
entropy_plugins_type_get_first(ENTROPY_PLUGIN_BACKEND_FILE 
,ENTROPY_PLUGIN_SUB_TYPE_ALL);
 
                /*Make our new event for notification*/
                ev = entropy_notify_request_register(instance->core->notify, 
instance, ENTROPY_NOTIFY_FILE_STAT_EXECUTED, 
@@ -1267,6 +1268,20 @@
        return uri;
 }
 
+/* Associate an object with an entropy_generic_file - e.g. an ewl_widget with 
a file - 
+ * Mostly used for transparent DND between objects */
+void entropy_core_object_file_associate(void* object, entropy_generic_file* 
file) {
+       if (object) ecore_hash_set(core_core->object_associate_hash, object, 
file);
+}
+
+void entropy_core_object_file_disassociate(void* object) {
+       if (object) ecore_hash_remove(core_core->object_associate_hash, object);
+}
+
+entropy_generic_file* entropy_core_object_file_association_get(void* object) {
+       return ecore_hash_get(core_core->object_associate_hash, object);
+}
+
 
 void* entropy_malloc(size_t size) {
        requests++;
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/plugin_helper.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- plugin_helper.c     20 Oct 2005 08:45:54 -0000      1.1
+++ plugin_helper.c     22 Dec 2005 04:34:41 -0000      1.2
@@ -46,9 +46,11 @@
        
 }
 
-entropy_plugin* entropy_plugins_type_get_first(Ecore_List* plugins, int type, 
int subtype) {
+entropy_plugin* entropy_plugins_type_get_first(int type, int subtype) {
         entropy_plugin* list_item;
 
+       Ecore_List* plugins = entropy_core_get_core()->plugin_list;
+
         ecore_list_goto_first(plugins);
         while ( (list_item = ecore_list_next(plugins)) ) {
                /*printf("Scanning '%s' for first\n", list_item->filename);*/
@@ -61,8 +63,10 @@
 
 }
 
-Ecore_List* entropy_plugins_type_get(Ecore_List* plugins, int type) {
+Ecore_List* entropy_plugins_type_get(int type) {
        entropy_plugin* list_item;
+
+       Ecore_List* plugins = entropy_core_get_core()->plugin_list;
        
        if (plugin_list) {
                ecore_list_destroy(plugin_list);




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to