Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_list.c ewl_list.h 


Log Message:
- that wasn't suppost to go in there

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_list.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_list.c  2 Aug 2006 00:40:48 -0000       1.4
+++ ewl_list.c  2 Aug 2006 00:44:32 -0000       1.5
@@ -3,13 +3,6 @@
 #include "ewl_macros.h"
 #include "ewl_private.h"
 
-static void ewl_list_cb_highlight_configure(Ewl_Widget *w, 
-                                               void *ev, void *data);
-static void ewl_list_cb_highlighted_destroy(Ewl_Widget *w, 
-                                               void *ev, void *data);
-static void ewl_list_cb_highlight_destroy(Ewl_Widget *w, 
-                                               void *ev, void *data);
-
 /**
  * @return Returns a new Ewl_Widget on success or NULL on failure
  * @brief Creates and initializes a new Ewl_List widget
@@ -213,38 +206,12 @@
        DCHECK_PARAM_PTR("list", list);
        DCHECK_TYPE("list", list, EWL_LIST_TYPE);
 
-       if (list->selected.widget == w)
+       if (list->selected == w)
                DRETURN(DLEVEL_STABLE);
 
-       if (list->selected.highlight)
-               ewl_widget_destroy(list->selected.highlight);
-
-       list->selected.widget = w;
-
-       if (w)
-       {
-               Ewl_Widget *f;
-               int width, height;
-
-               f = ewl_floater_new();
-               ewl_widget_internal_set(f, TRUE);
-               ewl_widget_appearance_set(f, "highlight");
-               ewl_floater_follow_set(EWL_FLOATER(f), w);
-               ewl_object_current_size_get(EWL_OBJECT(w), &width, &height);
-               ewl_object_size_request(EWL_OBJECT(f), width, height);
-
-               ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, 
-                                       ewl_list_cb_highlight_configure, f);
-               ewl_callback_prepend(w, EWL_CALLBACK_DESTROY,
-                                       ewl_list_cb_highlighted_destroy, f);
-               ewl_callback_prepend(f, EWL_CALLBACK_DESTROY,
-                                       ewl_list_cb_highlight_destroy, w);
-               ewl_container_child_append(EWL_CONTAINER(list), f);
-               ewl_widget_show(f);
-
-               list->selected.highlight = f;
-       }
-
+       /* XXX probably need to do some theme thing here to highlight as
+        * selected */
+       list->selected = w;
 
        ewl_callback_call(EWL_WIDGET(list), EWL_CALLBACK_VALUE_CHANGED);
 
@@ -263,7 +230,7 @@
        DCHECK_PARAM_PTR_RET("list", list, NULL);
        DCHECK_TYPE_RET("list", list, EWL_LIST_TYPE, NULL);
 
-       DRETURN_PTR(list->selected.widget, DLEVEL_STABLE);
+       DRETURN_PTR(list->selected, DLEVEL_STABLE);
 }
 
 /**
@@ -305,11 +272,10 @@
        DCHECK_PARAM_PTR_RET("list", list, -1);
        DCHECK_TYPE_RET("list", list, EWL_LIST_TYPE, -1);
 
-       if (!list->selected.widget)
+       if (!list->selected)
                DRETURN_INT(-1, DLEVEL_STABLE);
 
-       idx = ewl_container_child_index_get(EWL_CONTAINER(list),
-                                               list->selected.widget);
+       idx = ewl_container_child_index_get(EWL_CONTAINER(list), 
list->selected);
 
        DRETURN_INT(idx, DLEVEL_STABLE);
 }
@@ -374,10 +340,6 @@
        DCHECK_TYPE("c", c, EWL_CONTAINER_TYPE);
        DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
 
-       /* the highlight floaters are internal */
-       if (ewl_widget_internal_is(w))
-               DRETURN(DLEVEL_STABLE);
-
        ewl_callback_append(w, EWL_CALLBACK_CLICKED, 
                                ewl_list_cb_item_clicked, c);
 
@@ -404,7 +366,7 @@
        DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
 
        list = EWL_LIST(c);
-       if (list->selected.widget == w)
+       if (list->selected == w)
                ewl_list_selected_widget_set(list, NULL);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -429,7 +391,7 @@
        DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
 
        list = EWL_LIST(c);
-       if (list->selected.widget == w)
+       if (list->selected == w)
                ewl_list_selected_widget_set(list, NULL);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -456,62 +418,6 @@
 
        list = data;
        ewl_list_selected_widget_set(list, w);
-
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-static void
-ewl_list_cb_highlight_configure(Ewl_Widget *w, void *ev, void *data)
-{
-       Ewl_Object *f;
-       int width, height;
-
-       DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR("w", w);
-       DCHECK_PARAM_PTR("data", data);
-       DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
-       DCHECK_TYPE("data", data, EWL_FLOATER_TYPE);
-
-       f = data;
-       ewl_object_current_size_get(EWL_OBJECT(w), &width, &height);
-       ewl_object_size_request(f, width, height);
-
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-static void
-ewl_list_cb_highlighted_destroy(Ewl_Widget *w, void *ev, void *data)
-{
-       Ewl_Widget *f;
-
-       DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR("w", w);
-       DCHECK_PARAM_PTR("data", data);
-       DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
-       DCHECK_TYPE("data", data, EWL_FLOATER_TYPE);
-
-       f = data;
-       ewl_widget_destroy(f);
-
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-static void
-ewl_list_cb_highlight_destroy(Ewl_Widget *w, void *ev, void *data)
-{
-       Ewl_Widget *o;
-
-       DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR("w", w);
-       DCHECK_PARAM_PTR("data", data);
-       DCHECK_TYPE("w", w, EWL_FLOATER_TYPE);
-       DCHECK_TYPE("data", data, EWL_WIDGET_TYPE);
-
-       o = data;
-       ewl_callback_del(o, EWL_CALLBACK_CONFIGURE,
-                               ewl_list_cb_highlight_configure);
-       ewl_callback_del(o, EWL_CALLBACK_DESTROY,
-                               ewl_list_cb_highlighted_destroy);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_list.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_list.h  2 Aug 2006 00:40:48 -0000       1.4
+++ ewl_list.h  2 Aug 2006 00:44:32 -0000       1.5
@@ -36,11 +36,7 @@
        Ewl_View *view;         /**< The view for the list */
        void *data;             /**< The data for the list */
 
-       struct {
-               Ewl_Widget *widget; /**< The selected widget */
-               Ewl_Widget *highlight; /**< The highlight widget */
-       } selected;             /**< Selected widget info */
-
+       Ewl_Widget *selected;   /**< The selected widget */
        unsigned char dirty:1;  /**< Has the model changed? */
 };
 



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to