Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src/plugins


Modified Files:
        ewl_list_viewer.c structure_viewer.c 


Log Message:
* DND enable for list view

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/ewl_list_viewer.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_list_viewer.c   31 Dec 2005 04:02:08 -0000      1.4
+++ ewl_list_viewer.c   1 Jan 2006 02:03:34 -0000       1.5
@@ -392,6 +392,7 @@
        instance->layout_parent = layout;
        
         viewer->list = ewl_tree_new(5);
+       ewl_tree_mode_set(EWL_TREE(viewer->list), EWL_TREE_MODE_MULTI);
 
        headers[0] = "Icon";
        headers[1] = "Filename";
@@ -451,11 +452,16 @@
        
        if ( (gui_object = ecore_hash_get(view->gui_hash, list_item)) ) {
                //FIXME
-               //ewl_list_icon_remove(EWL_ICONBOX(view->list), 
EWL_ICONBOX_ICON(gui_object->icon));
+               ewl_tree_row_destroy(view->list, EWL_ROW(gui_object->icon));
        }
 }
 
 
+Ecore_List* entropy_list_data_get(void) {
+       return NULL;    
+}
+
+
 gui_file* ewl_icon_local_viewer_add_icon(entropy_gui_component_instance* comp, 
entropy_generic_file* list_item, int do_mime) {
                entropy_icon_viewer* view = comp->data;
                Ewl_Widget* text[6];
@@ -511,6 +517,7 @@
                        text[5] = NULL;
 
                        icon = ewl_tree_row_add(EWL_TREE(view->list), NULL, 
text);
+                       ewl_widget_draggable_set(icon, 1,entropy_list_data_get);
 
                        ewl_object_fill_policy_set(EWL_OBJECT(icon), 
EWL_FLAG_FILL_VSHRINK | EWL_FLAG_FILL_VFILL | EWL_FLAG_FILL_HFILL);
                        
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/structure_viewer.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- structure_viewer.c  30 Dec 2005 08:46:37 -0000      1.24
+++ structure_viewer.c  1 Jan 2006 02:03:34 -0000       1.25
@@ -166,7 +166,6 @@
        if (widget) {
                printf("Drop widget: '%s'\n", widget->inheritance);
                if (ewl_widget_type_is(widget, "icon")) {
-                       char* folder;
                        Ewl_Iconbox* iconbox = 
EWL_ICONBOX_ICON(widget)->icon_box_parent;
                        Ecore_List* sel_list = 
ewl_iconbox_get_selection(iconbox);
                        Ewl_Iconbox_Icon* icon;
@@ -190,6 +189,24 @@
                        }
 
                        //printf("Copy to folder '%s/%s'\n", event->file->path, 
event->file->filename);
+               } else if (ewl_widget_type_is(widget, "row")) {
+                       entropy_generic_file* file = 
entropy_core_object_file_association_get(widget);
+                       entropy_plugin* plugin = 
+                               
entropy_plugins_type_get_first(ENTROPY_PLUGIN_BACKEND_FILE 
,ENTROPY_PLUGIN_SUB_TYPE_ALL);
+                       void (*copy_func)(entropy_generic_file* source, char* 
dest_uri, entropy_gui_component_instance* requester);
+                       copy_func = dlsym(plugin->dl_ref, 
"entropy_filesystem_file_copy");
+                       char* folder;
+                       
+                       if (file) {
+                               printf("Detected row drop.. 
(%s/%s)\n",file->path, file->filename);
+                               folder = 
entropy_core_generic_file_uri_create(event->file, 0);
+
+                               (*copy_func)(file, folder, event->instance);
+
+                               free(folder);
+                               
+                       }
+
                }
        }
 }




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