Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_container.c ewl_container.h ewl_notebook.c ewl_notebook.h 
        ewl_paned.c ewl_paned.h ewl_text.c ewl_text.h ewl_tree.c 
        ewl_tree.h 


Log Message:
- the container remove notification will now include the index the widget
  was removed from.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_container.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- ewl_container.c     4 Feb 2006 04:19:38 -0000       1.30
+++ ewl_container.c     8 Feb 2006 04:52:52 -0000       1.31
@@ -343,6 +343,7 @@
 ewl_container_child_remove(Ewl_Container *pc, Ewl_Widget *child)
 {
        Ewl_Widget *temp;
+       int idx = 0;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("pc", pc);
@@ -371,6 +372,7 @@
         * Traverse the list to the child.
         */
        temp = ecore_list_goto(pc->children, child);
+       idx = ecore_list_index(pc->children);
 
        /*
         * If the child isn't found, then this isn't it's parent.
@@ -385,7 +387,7 @@
        ecore_list_remove(pc->children);
        if (VISIBLE(child) && REALIZED(child))
                ewl_container_child_hide_call(pc, child);
-       ewl_container_child_remove_call(pc, child);
+       ewl_container_child_remove_call(pc, child, idx);
 
        ewl_widget_configure(EWL_WIDGET(pc));
 
@@ -930,7 +932,7 @@
  * @brief Triggers the child_remove callback for the container @a c.
  */
 void
-ewl_container_child_remove_call(Ewl_Container *c, Ewl_Widget *w)
+ewl_container_child_remove_call(Ewl_Container *c, Ewl_Widget *w, int idx)
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("c", c);
@@ -945,7 +947,7 @@
                DRETURN(DLEVEL_STABLE);
 
        if (c->child_remove)
-               c->child_remove(c, w);
+               c->child_remove(c, w, idx);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_container.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- ewl_container.h     15 Jan 2006 23:45:53 -0000      1.13
+++ ewl_container.h     8 Feb 2006 04:52:52 -0000       1.14
@@ -36,7 +36,7 @@
  * callback is container specific and is triggered when an Ewl_Widget is
  * removed from the Ewl_Container.
  */
-typedef void    (*Ewl_Child_Remove) (Ewl_Container *c, Ewl_Widget *w);
+typedef void    (*Ewl_Child_Remove) (Ewl_Container *c, Ewl_Widget *w, int idx);
 
 /**
  * A typedef to shorten the definition of the child_resize callbacks. This
@@ -143,7 +143,8 @@
 void            ewl_container_sum_prefer(Ewl_Container *c, Ewl_Orientation o);
 
 void            ewl_container_child_add_call(Ewl_Container *c, Ewl_Widget *w);
-void            ewl_container_child_remove_call(Ewl_Container *c, Ewl_Widget 
*w);
+void            ewl_container_child_remove_call(Ewl_Container *c, Ewl_Widget 
*w,
+                                                               int idx);
 void            ewl_container_child_show_call(Ewl_Container *c, Ewl_Widget *w);
 void            ewl_container_child_hide_call(Ewl_Container *c, Ewl_Widget *w);
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_notebook.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- ewl_notebook.c      4 Feb 2006 05:58:48 -0000       1.11
+++ ewl_notebook.c      8 Feb 2006 04:52:52 -0000       1.12
@@ -482,7 +482,8 @@
 }
 
 void
-ewl_notebook_cb_child_remove(Ewl_Container *c, Ewl_Widget *w)
+ewl_notebook_cb_child_remove(Ewl_Container *c, Ewl_Widget *w, 
+                                       int rem_idx __UNUSED__)
 {
        Ewl_Widget *t;
        Ewl_Notebook *n;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_notebook.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ewl_notebook.h      4 Feb 2006 05:58:48 -0000       1.6
+++ ewl_notebook.h      8 Feb 2006 04:52:52 -0000       1.7
@@ -82,7 +82,7 @@
 void ewl_notebook_cb_child_show(Ewl_Container *c, Ewl_Widget *w);
 void ewl_notebook_cb_child_hide(Ewl_Container *c, Ewl_Widget *w);
 void ewl_notebook_cb_child_add(Ewl_Container *c, Ewl_Widget *w);
-void ewl_notebook_cb_child_remove(Ewl_Container *c, Ewl_Widget *w);
+void ewl_notebook_cb_child_remove(Ewl_Container *c, Ewl_Widget *w, int 
rem_idx);
 
 void ewl_notebook_cb_tab_clicked(Ewl_Widget *w, void *ev, void *data);
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_paned.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_paned.c 8 Feb 2006 04:18:43 -0000       1.18
+++ ewl_paned.c 8 Feb 2006 04:52:52 -0000       1.19
@@ -223,7 +223,7 @@
  * one of them. If that isnt' found and the last widget is internal
  * then remove that. */
 void
-ewl_paned_cb_child_remove(Ewl_Container *c, Ewl_Widget *w)
+ewl_paned_cb_child_remove(Ewl_Container *c, Ewl_Widget *w, int idx __UNUSED__)
 {
        Ewl_Widget *child, *prev = NULL, *last = NULL;
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_paned.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ewl_paned.h 8 Feb 2006 04:18:43 -0000       1.10
+++ ewl_paned.h 8 Feb 2006 04:52:52 -0000       1.11
@@ -52,7 +52,7 @@
  * Internal functions. Override at your risk.
  */
 void ewl_paned_cb_child_add(Ewl_Container *c, Ewl_Widget *w);
-void ewl_paned_cb_child_remove(Ewl_Container *c, Ewl_Widget *w);
+void ewl_paned_cb_child_remove(Ewl_Container *c, Ewl_Widget *w, int idx);
 void ewl_paned_cb_child_resize(Ewl_Container *c, Ewl_Widget *w, int size,
                                                        Ewl_Orientation o);
 void ewl_paned_cb_child_show(Ewl_Container *c, Ewl_Widget *w);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_text.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -3 -r1.87 -r1.88
--- ewl_text.c  3 Feb 2006 05:42:41 -0000       1.87
+++ ewl_text.c  8 Feb 2006 04:52:52 -0000       1.88
@@ -2756,7 +2756,7 @@
 }
 
 void
-ewl_text_cb_child_del(Ewl_Container *c, Ewl_Widget *w)
+ewl_text_cb_child_del(Ewl_Container *c, Ewl_Widget *w, int idx __UNUSED__)
 {
        char *appearance;
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_text.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- ewl_text.h  31 Jan 2006 16:37:09 -0000      1.29
+++ ewl_text.h  8 Feb 2006 04:52:52 -0000       1.30
@@ -265,7 +265,7 @@
 void ewl_text_cb_resize(Ewl_Widget *w, void *ev, void *data);
 
 void ewl_text_cb_child_add(Ewl_Container *c, Ewl_Widget *w);
-void ewl_text_cb_child_del(Ewl_Container *c, Ewl_Widget *w);
+void ewl_text_cb_child_del(Ewl_Container *c, Ewl_Widget *w, int idx);
 
 void ewl_text_trigger_cb_destroy(Ewl_Widget *w, void *ev, void *data);
 void ewl_text_trigger_cb_mouse_in(Ewl_Widget *w, void *ev, void *data);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_tree.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- ewl_tree.c  12 Jan 2006 18:21:19 -0000      1.26
+++ ewl_tree.c  8 Feb 2006 04:52:52 -0000       1.27
@@ -817,7 +817,7 @@
        ewl_container_add_notify_set(EWL_CONTAINER(node),
                                    ewl_tree_node_child_add_cb);
        ewl_container_remove_notify_set(EWL_CONTAINER(node),
-                                   ewl_tree_node_child_add_cb);
+                                   ewl_tree_node_child_del_cb);
 
        ewl_object_fill_policy_set(EWL_OBJECT(node), EWL_FLAG_FILL_HFILL |
                                                        EWL_FLAG_FILL_HSHRINK);
@@ -1061,6 +1061,18 @@
 }
 
 void
+ewl_tree_node_child_del_cb(Ewl_Container *c, Ewl_Widget *w, int idx __UNUSED__)
+{
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("c", c);
+       DCHECK_TYPE("c", c, EWL_CONTAINER_TYPE);
+
+       ewl_tree_node_child_add_cb(c, w);
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+void
 ewl_tree_node_child_show_cb(Ewl_Container *c, Ewl_Widget *w __UNUSED__)
 {
        Ewl_Tree_Node *node;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_tree.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- ewl_tree.h  12 Jan 2006 18:21:19 -0000      1.14
+++ ewl_tree.h  8 Feb 2006 04:52:52 -0000       1.15
@@ -125,6 +125,7 @@
 void ewl_tree_hscroll_cb(Ewl_Widget *w, void *ev_data, void *user_data);
 void ewl_tree_child_resize_cb(Ewl_Container *c);
 void ewl_tree_node_child_add_cb(Ewl_Container *c, Ewl_Widget *w);
+void ewl_tree_node_child_del_cb(Ewl_Container *c, Ewl_Widget *w, int idx);
 
 /**
  * @}




-------------------------------------------------------
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to