Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_box.c ewl_box.h ewl_config.c ewl_config.h ewl_container.c 
        ewl_events.c ewl_fileselector.c ewl_misc.c ewl_widget.c 


Log Message:
Add debugging option to watch signals sent to edjes.
Put back the mouse in callback on widgets that was accidentally removed.
Progress on fixing the issues with the theme test.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_box.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_box.c   2 Dec 2005 06:19:04 -0000       1.16
+++ ewl_box.c   17 Dec 2005 21:55:55 -0000      1.17
@@ -774,6 +774,8 @@
                ewl_object_preferred_inner_h_set(EWL_OBJECT(c), height + ch);
        }
 
+       /* printf("Box %p children visible %d after show\n", c, 
++EWL_BOX(c)->shows); */
+
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
@@ -837,6 +839,8 @@
                ewl_container_largest_prefer(c, EWL_ORIENTATION_HORIZONTAL);
        }
 
+       /* printf("Box %p children visible %d after hide\n", c, 
--EWL_BOX(c)->shows); */
+
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_box.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ewl_box.h   9 Oct 2005 05:18:39 -0000       1.6
+++ ewl_box.h   17 Dec 2005 21:55:55 -0000      1.7
@@ -42,6 +42,7 @@
        int             spacing; /**< Space between each widget in the box */
 
        unsigned int    homogeneous; /**< Flag indicating space assignemnt */
+       /* int shows; */
 };
 
 Ewl_Widget     *ewl_box_new(void);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_config.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ewl_config.c        23 Oct 2005 17:30:56 -0000      1.7
+++ ewl_config.c        17 Dec 2005 21:55:55 -0000      1.8
@@ -13,7 +13,8 @@
        EWL_CONFIG_THEME_NAME,
        EWL_CONFIG_THEME_CACHE,
        EWL_CONFIG_THEME_COLOR_CLASSES_OVERRIDE,
-       EWL_CONFIG_THEME_PRINT_KEYS
+       EWL_CONFIG_THEME_PRINT_KEYS,
+       EWL_CONFIG_THEME_PRINT_SIGNALS,
 };
 
 extern Ecore_List *ewl_embed_list;
@@ -213,6 +214,7 @@
        nc.theme.name = ewl_config_str_get("/ewl/theme/name");
        nc.theme.cache = ewl_config_int_get("/ewl/theme/cache");
        nc.theme.print_keys = ewl_config_int_get("/ewl/theme/print_keys");
+       nc.theme.print_signals = ewl_config_int_get("/ewl/theme/print_signals");
        nc.theme.cclass_override = 
                        ewl_config_int_get("/ewl/theme/color_classes/override");
 
@@ -362,6 +364,7 @@
        ewl_config.theme.name = nc.theme.name;
        ewl_config.theme.cache = nc.theme.cache;
        ewl_config.theme.print_keys = nc.theme.print_keys;
+       ewl_config.theme.print_signals = nc.theme.print_signals;
        ewl_config.theme.cclass_override = nc.theme.cclass_override;
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -381,6 +384,7 @@
        ecore_config_int_default("/ewl/theme/cache", 0);
        ecore_config_int_default("/ewl/theme/color_classes/override", 0);
        ecore_config_int_default("/ewl/theme/print_keys", 0);
+       ecore_config_int_default("/ewl/theme/print_signals", 0);
 
        /* need to set each of these keys into the system section */
        {
@@ -396,6 +400,7 @@
                    "/ewl/theme/cache",
                    "/ewl/theme/color_classes/override",
                    "/ewl/theme/print_keys",
+                   "/ewl/theme/print_signals",
                    NULL
                };
 
@@ -421,6 +426,8 @@
                    ewl_config_listener, EWL_CONFIG_THEME_CACHE, NULL);
                ecore_config_listen("ewl_theme_print_keys", 
"/ewl/theme/print_keys",
                    ewl_config_listener, EWL_CONFIG_THEME_PRINT_KEYS, NULL);
+               ecore_config_listen("ewl_theme_print_signals", 
"/ewl/theme/print_signals",
+                   ewl_config_listener, EWL_CONFIG_THEME_PRINT_SIGNALS, NULL);
                ecore_config_listen("ewl_theme_cclases_override", 
"/ewl/theme/color_classes/override",
                    ewl_config_listener, 
EWL_CONFIG_THEME_COLOR_CLASSES_OVERRIDE, NULL);
        }
@@ -474,6 +481,9 @@
                case EWL_CONFIG_THEME_PRINT_KEYS:
                        ewl_config.theme.print_keys = ewl_config_int_get(key);
                        break;
+               case EWL_CONFIG_THEME_PRINT_SIGNALS:
+                       ewl_config.theme.print_signals = 
ewl_config_int_get(key);
+                       break;
        }
 
        DRETURN_INT(0, DLEVEL_STABLE);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_config.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_config.h        22 Nov 2005 17:28:15 -0000      1.4
+++ ewl_config.h        17 Dec 2005 21:55:55 -0000      1.5
@@ -28,6 +28,7 @@
                int             cache;
                int             cclass_override;
                int             print_keys;
+               int             print_signals;
        } theme;
 };
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_container.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ewl_container.c     16 Nov 2005 04:54:12 -0000      1.19
+++ ewl_container.c     17 Dec 2005 21:55:55 -0000      1.20
@@ -317,7 +317,7 @@
         * Remove the child from the parent and set the childs parent to NULL
         */
        ecore_list_remove(pc->children);
-       if (VISIBLE(child))
+       if (VISIBLE(child) && REALIZED(child))
                ewl_container_child_hide_call(pc, child);
        ewl_container_child_remove_call(pc, child);
 
@@ -866,8 +866,9 @@
        DCHECK_TYPE("c", c, "container");
        DCHECK_TYPE("w", w, "widget");
 
-       if (c->child_remove && VISIBLE(w))
+       if (c->child_remove)
                c->child_remove(c, w);
+       ewl_widget_configure(EWL_WIDGET(c));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -887,9 +888,8 @@
        DCHECK_TYPE("c", c, "container");
        DCHECK_TYPE("w", w, "widget");
 
-       if (c->child_show && VISIBLE(w) && REALIZED(w)) {
+       if (c->child_show)
                c->child_show(c, w);
-       }
 
        /*
         * Only show it if there are visible children.
@@ -917,7 +917,7 @@
        DCHECK_TYPE("c", c, "container");
        DCHECK_TYPE("w", w, "widget");
 
-       if (c->child_hide && !VISIBLE(w) && REALIZED(w))
+       if (c->child_hide)
                c->child_hide(c, w);
 
        if (c->clip_box) {
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_events.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- ewl_events.c        29 Nov 2005 02:11:50 -0000      1.13
+++ ewl_events.c        17 Dec 2005 21:55:55 -0000      1.14
@@ -214,12 +214,12 @@
        /*
         * Save coords and queue a configure event if the window is moved.
         */
-       if (ev->x && (ev->x != window->x)) {
+       if ((ev->x != window->x)) {
                window->x = ev->x;
                ewl_widget_configure(EWL_WIDGET(window));
        }
 
-       if (ev->y && (ev->y != window->y)) {
+       if ((ev->y != window->y)) {
                window->y = ev->y;
                ewl_widget_configure(EWL_WIDGET(window));
        }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_fileselector.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- ewl_fileselector.c  6 Dec 2005 00:16:57 -0000       1.34
+++ ewl_fileselector.c  17 Dec 2005 21:55:55 -0000      1.35
@@ -340,9 +340,6 @@
        if (path[l] == '/')
                l--;
 
-       if (l < 0)
-               DRETURN_PTR(strdup("/"), DLEVEL_STABLE);
-
        while ((l >= 0) && (path[l] != '/'))
                l--;
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_misc.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- ewl_misc.c  6 Dec 2005 03:46:53 -0000       1.32
+++ ewl_misc.c  17 Dec 2005 21:55:55 -0000      1.33
@@ -18,6 +18,7 @@
 static unsigned int use_engine = EWL_ENGINE_ALL;
 static unsigned int phase_status = 0;
 static unsigned int print_theme_keys = 0;
+static unsigned int print_theme_signals = 0;
 static unsigned int print_gc_reap = 0;
 static unsigned int debug_level = 0;
 
@@ -213,6 +214,9 @@
        if (print_theme_keys)
                ewl_config.theme.print_keys = print_theme_keys;
 
+       if (print_theme_signals)
+               ewl_config.theme.print_signals = print_theme_signals;
+
        if (debug_level) {
                ewl_config.debug.enable = 1;
                ewl_config.debug.level = debug_level;
@@ -511,6 +515,10 @@
                        print_theme_keys = 1;
                        matched++;
                }
+               else if (!strcmp(argv[i], "--ewl-print-theme-signals")) {
+                       print_theme_signals = 1;
+                       matched++;
+               }
                else if (!strcmp(argv[i], "--ewl-print-gc-reap")) {
                        print_gc_reap = 1;
                        matched++;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_widget.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- ewl_widget.c        15 Dec 2005 01:59:54 -0000      1.50
+++ ewl_widget.c        17 Dec 2005 21:55:55 -0000      1.51
@@ -96,6 +96,8 @@
                                NULL);
        ewl_callback_append(w, EWL_CALLBACK_FOCUS_OUT, ewl_widget_focus_out_cb,
                                NULL);
+       ewl_callback_append(w, EWL_CALLBACK_MOUSE_IN, ewl_widget_mouse_in_cb,
+                               NULL);
        ewl_callback_append(w, EWL_CALLBACK_MOUSE_OUT, ewl_widget_mouse_out_cb,
                                NULL);
        ewl_callback_append(w, EWL_CALLBACK_MOUSE_DOWN,
@@ -347,6 +349,9 @@
        DCHECK_PARAM_PTR("w", w);
        DCHECK_TYPE("w", w, "widget");
 
+       if (ewl_object_queued_has(EWL_OBJECT(w), EWL_FLAG_QUEUED_RSCHEDULED))
+               ewl_realize_cancel_request(w);
+
        /*
         * Already hidden? Then no work to be done.
         */
@@ -663,8 +668,11 @@
         */
        w->bit_state = ecore_string_instance(state);
 
-       if (w->theme_object)
+       if (w->theme_object) {
+               if (ewl_config.theme.print_signals)
+                       printf("Emitting: %s\n", state);
                edje_object_signal_emit(w->theme_object, state, "EWL");
+       }
 
        ewl_callback_call(w, EWL_CALLBACK_STATE_CHANGED);
 
@@ -1737,9 +1745,6 @@
        DCHECK_PARAM_PTR("w", w);
        DCHECK_TYPE("w", w, "widget");
 
-       if (ewl_object_queued_has(EWL_OBJECT(w), EWL_FLAG_QUEUED_RSCHEDULED))
-               ewl_realize_cancel_request(w);
-
        ewl_widget_obscure(w);
 
        /*
@@ -1750,7 +1755,8 @@
                ewl_container_child_hide_call(pc, w);
 
        emb = ewl_embed_widget_find(w);
-       ewl_embed_info_widgets_cleanup(emb, w);
+       if (emb)
+               ewl_embed_info_widgets_cleanup(emb, w);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
@@ -2082,15 +2088,20 @@
 ewl_widget_unrealize_cb(Ewl_Widget * w, void *ev_data __UNUSED__,
                        void *user_data __UNUSED__)
 {
+       Ewl_Container *pc;
+
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
        DCHECK_TYPE("w", w, "widget");
 
-        /*
-         * We can just use an obscure since it's a very similar operation.
-         * Keep this event for widgets that keep extra visual data around.
-         */
-        ewl_widget_obscure(w);
+       ewl_widget_obscure(w);
+
+       /*
+        * Notify parent of hidden state.
+        */
+       pc = EWL_CONTAINER(w->parent);
+       if (pc)
+               ewl_container_child_hide_call(pc, w);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }




-------------------------------------------------------
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to