Enlightenment CVS committal

Author  : chaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src/plugins


Modified Files:
        layout_etk_simple.c 


Log Message:
* Allow layouts to register as an event consumer, so that we can move some 
common functionality (progress events, overwrite dialogs, etc), from the local 
plugins, to their parents - this saves duplication, and makes coding a child 
plugin a heckload easier.

===================================================================
RCS file: /cvs/e/e17/proto/entropy/src/plugins/layout_etk_simple.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- layout_etk_simple.c 2 Apr 2006 05:47:38 -0000       1.34
+++ layout_etk_simple.c 5 Apr 2006 04:38:29 -0000       1.35
@@ -320,6 +320,13 @@
 
 }
 
+
+void
+gui_event_callback (entropy_notify_event * eevent, void *requestor,
+                   void *el, entropy_gui_component_instance * comp)
+{
+}
+
 entropy_gui_component_instance *
 entropy_plugin_layout_create (entropy_core * core)
 {
@@ -362,13 +369,21 @@
   }
 
   /*Entropy related init */
-  layout = entropy_malloc (sizeof (entropy_gui_component_instance));   
/*Create a component instance */
+  layout = entropy_gui_component_instance_new(); /*Create a component instance 
*/
   gui = entropy_malloc (sizeof (entropy_layout_gui));
   layout->data = gui;
   layout->core = core;
 
   /*Register this layout container with the core, so our children can get 
events */
   entropy_core_layout_register (core, layout);
+
+
+  /*Register this instance (the layout itself), to receive events that can be 
safely handled
+   * by the layout (and reduce the clutter in the child plugins)
+   * i.e. PROGRESS events, Stat for properties, Overwrite yes/no/etc events, 
etc*/
+  entropy_core_component_event_register (layout,
+                                        entropy_core_gui_event_get
+                                        (ENTROPY_GUI_EVENT_FILE_PROGRESS));
 
 
   /*Etk related init */




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