Enlightenment CVS committal

Author  : chaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src/plugins


Modified Files:
        etk_icon_viewer.c layout_etk_simple.c 


Log Message:
* New API for layout instances
* When changing local viewer, emit event to repopulate files

===================================================================
RCS file: /cvs/e/e17/proto/entropy/src/plugins/etk_icon_viewer.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- etk_icon_viewer.c   11 Apr 2006 05:20:38 -0000      1.6
+++ etk_icon_viewer.c   11 Apr 2006 10:51:29 -0000      1.7
@@ -174,7 +174,6 @@
   entropy_gui_component_instance *instance;    
   entropy_etk_iconbox_viewer *viewer;
   entropy_generic_file* file;
-  entropy_gui_event* gui_event;
   Etk_Iconbox_Icon* icon;
   Etk_Event_Mouse_Up_Down *event;
 
@@ -190,11 +189,7 @@
   printf("File is %p\n", file);
 
   if (file) {
-       gui_event = entropy_malloc (sizeof (entropy_gui_event));
-         gui_event->event_type =
-               entropy_core_gui_event_get (ENTROPY_GUI_EVENT_ACTION_FILE);
-         gui_event->data = file;
-         entropy_core_layout_notify_event (instance, gui_event, 
ENTROPY_EVENT_GLOBAL); 
+       entropy_event_action_file(file,instance);
   }
 }
 
===================================================================
RCS file: /cvs/e/e17/proto/entropy/src/plugins/layout_etk_simple.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- layout_etk_simple.c 9 Apr 2006 09:13:34 -0000       1.40
+++ layout_etk_simple.c 11 Apr 2006 10:51:29 -0000      1.41
@@ -243,6 +243,7 @@
        entropy_gui_component_instance* instance = data;
        entropy_layout_gui* gui = instance->data;
        Etk_Widget* widget;
+       entropy_generic_file* file;
        
        /*Get the local viewer they want..*/
        local = etk_object_data_get(ETK_OBJECT(obj), "VISUAL");
@@ -262,6 +263,13 @@
                if (local->gui_object) {
                        etk_box_pack_start(ETK_BOX(gui->localshell), 
local->gui_object, ETK_TRUE,ETK_TRUE,0);
                        local->active = 1;
+
+                       /*Update the visual current_folder*/
+                       if ( (file = 
((entropy_gui_component_instance_layout*)instance)->current_folder) ) {
+                               entropy_event_action_file(file, instance);
+                       } else {
+                               printf("No current folder!\n");
+                       }
                } else {
                        printf("Selected instance has no GUI_OBJECT\n");
                }
@@ -459,7 +467,7 @@
   }
 
   /*Entropy related init */
-  layout = entropy_gui_component_instance_new(); /*Create a component instance 
*/
+  layout = 
(entropy_gui_component_instance*)entropy_gui_component_instance_layout_new(); 
/*Create a component instance */
   gui = entropy_malloc (sizeof (entropy_layout_gui));
   layout->data = gui;
   layout->core = core;




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