Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_attach.h ewl_enums.h ewl_notebook.c 


Log Message:
- change name of attachment so this can be re-used in other widgets

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_attach.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_attach.h        8 Oct 2006 02:44:48 -0000       1.12
+++ ewl_attach.h        11 Oct 2006 17:42:25 -0000      1.13
@@ -89,19 +89,19 @@
        ewl_attach_get(EWL_WIDGET(w), EWL_ATTACH_TYPE_NAME)
 
 /**
- * @def ewl_attach_notebook_data_set(w, data)
+ * @def ewl_attach_association_set(w, data)
  * Convenience method to attach data to a notebook item
  */
-#define ewl_attach_notebook_data_set(w, data) \
+#define ewl_attach_widget_association_set(w, data) \
        ewl_attach_other_set(EWL_WIDGET(w), \
-                       EWL_ATTACH_TYPE_NOTEBOOK_DATA, data)
+                       EWL_ATTACH_TYPE_WIDGET_ASSOCIATION, data)
 
 /**
- * @def ewl_attach_notebook_data_get(w)
+ * @def ewl_attach_association_get(w)
  * Convenience method to get the data attached to a notebook item
  */
-#define ewl_attach_notebook_data_get(w) \
-       ewl_attach_get(EWL_WIDGET(w), EWL_ATTACH_TYPE_NOTEBOOK_DATA)
+#define ewl_attach_widget_association_get(w) \
+       ewl_attach_get(EWL_WIDGET(w), EWL_ATTACH_TYPE_WIDGET_ASSOCIATION)
 
 void ewl_attach_text_set(Ewl_Widget *w, Ewl_Attach_Type t, const char *data);
 void ewl_attach_widget_set(Ewl_Widget *w, Ewl_Attach_Type t, Ewl_Widget *data);
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_enums.h,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- ewl_enums.h 10 Oct 2006 22:06:56 -0000      1.58
+++ ewl_enums.h 11 Oct 2006 17:42:25 -0000      1.59
@@ -330,7 +330,8 @@
  * @enum Ewl_State_Type
  * The state type
  */
-enum Ewl_State_Type {
+enum Ewl_State_Type 
+{
        EWL_STATE_TRANSIENT,
        EWL_STATE_PERSISTENT
 };
@@ -452,7 +453,7 @@
        EWL_ATTACH_TYPE_COLOR,
        EWL_ATTACH_TYPE_NAME,
        EWL_ATTACH_TYPE_MOUSE_CURSOR,
-       EWL_ATTACH_TYPE_NOTEBOOK_DATA
+       EWL_ATTACH_TYPE_WIDGET_ASSOCIATION
 };
 
 /**
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_notebook.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_notebook.c      26 May 2006 18:17:19 -0000      1.16
+++ ewl_notebook.c      11 Oct 2006 17:42:25 -0000      1.17
@@ -258,7 +258,7 @@
        {
                Ewl_Widget *w;
 
-               t = ewl_attach_notebook_data_get(n->cur_page);
+               t = ewl_attach_widget_association_get(n->cur_page);
                if (t) ewl_widget_state_set(t, "default", EWL_STATE_PERSISTENT);
 
                /* make sure we set n->cur_page null first or the hide
@@ -271,7 +271,7 @@
        n->cur_page = page;
        ewl_widget_show(n->cur_page);
 
-       t = ewl_attach_notebook_data_get(n->cur_page);
+       t = ewl_attach_widget_association_get(n->cur_page);
        if (t) ewl_widget_state_set(t, "selected", EWL_STATE_PERSISTENT);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -371,15 +371,15 @@
                ewl_widget_show(tab);
        }
 
-       t = ewl_attach_notebook_data_get(page);
+       t = ewl_attach_widget_association_get(page);
        if (!t)
        {
                int idx = 0;
 
                t = ewl_hbox_new();
                ewl_widget_appearance_set(t, "tab");
-               ewl_attach_notebook_data_set(page, t);
-               ewl_attach_notebook_data_set(t, page);
+               ewl_attach_widget_association_set(page, t);
+               ewl_attach_widget_association_set(t, page);
                ewl_widget_show(t);
 
                ewl_callback_append(t, EWL_CALLBACK_CLICKED,
@@ -415,7 +415,7 @@
        DCHECK_TYPE_RET("n", n, EWL_NOTEBOOK_TYPE, NULL);
        DCHECK_TYPE_RET("page", page, EWL_WIDGET_TYPE, NULL);
 
-       t = ewl_attach_notebook_data_get(page);
+       t = ewl_attach_widget_association_get(page);
        if (!t)
        {
                DWARNING("We have a notebook page with no tab, bad, very 
bad.\n");
@@ -541,7 +541,7 @@
        n = EWL_NOTEBOOK(EWL_WIDGET(c)->parent);
 
        /* we still have a tab, delete it */
-       t = ewl_attach_notebook_data_get(w);
+       t = ewl_attach_widget_association_get(w);
        if (t) 
        {
                idx = ewl_container_child_index_get(
@@ -565,7 +565,7 @@
 
                if (new_tab)
                {
-                       page = ewl_attach_notebook_data_get(new_tab);
+                       page = ewl_attach_widget_association_get(new_tab);
                        if (page)
                                ewl_notebook_visible_page_set(
                                                EWL_NOTEBOOK(n), page);
@@ -595,7 +595,7 @@
        DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
 
        n = data;
-       page = ewl_attach_notebook_data_get(w);
+       page = ewl_attach_widget_association_get(w);
        ewl_notebook_visible_page_set(n, page);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to