Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src/plugins


Modified Files:
        layout_ewl_simple.c structure_viewer.c 


Log Message:
Avoid code duplication - make the structure viewers descend folders in the same 
way the icon viewer does

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/layout_ewl_simple.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- layout_ewl_simple.c 27 Oct 2005 10:23:59 -0000      1.10
+++ layout_ewl_simple.c 28 Oct 2005 23:08:58 -0000      1.11
@@ -319,6 +319,9 @@
 
                entropy_generic_file* file = entropy_core_parse_uri(uri);
 
+               /*Mark this file as a 'folder' - more of a bootstrap.  Should 
we really do this? FIXME*/
+               strcpy(file->mime_type, "file/folder");
+
                //printf("***** Adding structure viewer\n");
 
                /*Main drive viewer*/
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/structure_viewer.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- structure_viewer.c  28 Oct 2005 22:33:36 -0000      1.5
+++ structure_viewer.c  28 Oct 2005 23:08:58 -0000      1.6
@@ -119,20 +119,17 @@
        event_file_core* event = (event_file_core*)user_data;
        entropy_file_structure_viewer* viewer = 
(entropy_file_structure_viewer*)event->instance->data;
        entropy_gui_event* gui_event;
-       entropy_file_request* request = 
entropy_malloc(sizeof(entropy_file_request));
        
 
        //printf("Clicked on %s%s\n", event->file->path, event->file->filename);
 
        /*-----------*/
        /*Send an event to the core*/
-       request->file = event->file;
-       request->drill_down = 0;
        
        gui_event = entropy_malloc(sizeof(entropy_gui_event));
-       gui_event->event_type = 
entropy_core_gui_event_get(ENTROPY_GUI_EVENT_FOLDER_CHANGE_CONTENTS);
-       gui_event->data = request;
-       entropy_core_layout_notify_event(event->instance, gui_event, 
ENTROPY_EVENT_LOCAL); 
+       gui_event->event_type = 
entropy_core_gui_event_get(ENTROPY_GUI_EVENT_ACTION_FILE);
+       gui_event->data = event->file;
+       entropy_core_layout_notify_event(event->instance, gui_event, 
ENTROPY_EVENT_GLOBAL); 
 
        if (viewer->last_selected_label) {
                
ewl_text_cursor_position_set(EWL_TEXT(viewer->last_selected_label), 0);




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to