Enlightenment CVS committal
Author : ningerso
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_widget.c
Log Message:
Modified realize to not automatically trigger a show. This breaks from the
convention that GTK+ established, but provides a more predictable API.
Updated associated unit tests to correspond to the updated methods.
Fixed a bug in reveal associated with the realize phase.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_widget.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -3 -r1.153 -r1.154
--- ewl_widget.c 20 Nov 2007 02:30:09 -0000 1.153
+++ ewl_widget.c 9 Dec 2007 01:09:06 -0000 1.154
@@ -217,7 +217,11 @@
if (w->parent && !REALIZED(w->parent))
ewl_widget_realize(w->parent);
- else if (w->parent || ewl_object_toplevel_get(EWL_OBJECT(w))) {
+ /*
+ * The parent should be realized at this point, and we can handle
+ * realizing ourselves.
+ */
+ if (w->parent || ewl_object_toplevel_get(EWL_OBJECT(w))) {
ewl_object_queued_add(EWL_OBJECT(w),
EWL_FLAG_QUEUED_PROCESS_REVEAL);
ewl_callback_call(w, EWL_CALLBACK_REALIZE);
ewl_object_queued_remove(EWL_OBJECT(w),
@@ -228,8 +232,6 @@
ewl_widget_obscure(w);
}
- ewl_widget_show(w);
-
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -284,7 +286,13 @@
DCHECK_PARAM_PTR(w);
DCHECK_TYPE(w, EWL_WIDGET_TYPE);
- if (REVEALED(w))
+ /*
+ * Already revealed widgets can be skipped, as can unrealized widgets,
+ * unless the are already queued for reveal, ie. in the realize process.
+ */
+ if (REVEALED(w) || (!REALIZED(w) && !ewl_object_queued_has(
+ EWL_OBJECT(w),
+ EWL_FLAG_QUEUED_SCHEDULED_REVEAL)))
DRETURN(DLEVEL_STABLE);
ewl_object_visible_add(EWL_OBJECT(w), EWL_FLAG_VISIBLE_REVEALED);
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs