Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_button_stock.c ewl_button_stock.h ewl_container.c
ewl_misc.c ewl_tree.c ewl_tree.h
Log Message:
* Change the removal of the queued flag to the latest moment of realize phase.
* Check against a per-widget flag over global phase flag for triggering resize
callbacks.
* Put in an add notifier for the tree node container.
* Moved the stock button type struct out of the header.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_button_stock.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ewl_button_stock.c 16 Jun 2004 06:42:24 -0000 1.1
+++ ewl_button_stock.c 24 Jun 2004 02:17:08 -0000 1.2
@@ -1,6 +1,13 @@
#include <Ewl.h>
-#include "ewl_button_stock.h"
+static const Ewl_Stock_Item builtin_items [] =
+ {
+ { EWL_STOCK_OK, "ok" },
+ { EWL_STOCK_APPLY, "apply" },
+ { EWL_STOCK_CANCEL, "cancel" },
+ { EWL_STOCK_OPEN, "open" },
+ { EWL_STOCK_SAVE, "save" }
+ };
/* Return the label of the stock item if it exists */
/* Otherwise, return NULL */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_button_stock.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ewl_button_stock.h 16 Jun 2004 06:42:24 -0000 1.1
+++ ewl_button_stock.h 24 Jun 2004 02:17:08 -0000 1.2
@@ -33,15 +33,6 @@
char *label;
};
-static const Ewl_Stock_Item builtin_items [] =
- {
- { EWL_STOCK_OK, "ok" },
- { EWL_STOCK_APPLY, "apply" },
- { EWL_STOCK_CANCEL, "cancel" },
- { EWL_STOCK_OPEN, "open" },
- { EWL_STOCK_SAVE, "save" }
- };
-
/**
* The button_stck provides a simple wrapper for creating a button
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_container.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -3 -r1.69 -r1.70
--- ewl_container.c 17 Jun 2004 04:35:09 -0000 1.69
+++ ewl_container.c 24 Jun 2004 02:17:08 -0000 1.70
@@ -327,7 +327,8 @@
DCHECK_PARAM_PTR("w", w);
- if (!size || ewl_in_realize_phase() || !REALIZED(w))
+ if (!size || ewl_object_has_queued(EWL_OBJECT(w),
+ EWL_FLAG_QUEUED_RSCHEDULED) || !REALIZED(w))
DRETURN(DLEVEL_STABLE);
c = EWL_CONTAINER(w->parent);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_misc.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -3 -r1.71 -r1.72
--- ewl_misc.c 17 Jun 2004 04:36:05 -0000 1.71
+++ ewl_misc.c 24 Jun 2004 02:17:08 -0000 1.72
@@ -627,8 +627,6 @@
ecore_list_goto_first(realize_list);
while ((w = ecore_list_remove_first(realize_list))) {
if (VISIBLE(w) && !REALIZED(w)) {
- ewl_object_remove_queued(EWL_OBJECT(w),
- EWL_FLAG_QUEUED_RSCHEDULED);
ewl_widget_realize(EWL_WIDGET(w));
ecore_list_prepend(child_add_list, w);
}
@@ -644,6 +642,8 @@
*/
if (VISIBLE(w))
ewl_widget_show(w);
+ ewl_object_remove_queued(EWL_OBJECT(w),
+ EWL_FLAG_QUEUED_RSCHEDULED);
}
ewl_exit_realize_phase();
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_tree.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- ewl_tree.c 14 Jun 2004 05:55:19 -0000 1.41
+++ ewl_tree.c 24 Jun 2004 02:17:08 -0000 1.42
@@ -476,8 +476,10 @@
ewl_tree_node_child_hide_cb);
ewl_container_resize_notify(EWL_CONTAINER(node),
ewl_tree_node_resize_cb);
+ ewl_container_add_notify(EWL_CONTAINER(node),
+ ewl_tree_node_child_add_cb);
ewl_container_remove_notify(EWL_CONTAINER(node),
- ewl_tree_node_child_hide_cb);
+ ewl_tree_node_child_add_cb);
ewl_object_set_fill_policy(EWL_OBJECT(node), EWL_FLAG_FILL_HFILL |
EWL_FLAG_FILL_HSHRINK);
@@ -496,7 +498,6 @@
ewl_container_append_child(EWL_CONTAINER(node), node->handle);
ewl_callback_append(node->handle, EWL_CALLBACK_VALUE_CHANGED,
ewl_tree_node_toggle_cb, node);
- ewl_widget_show(node->handle);
node->expanded = EWL_TREE_NODE_COLLAPSED;
@@ -626,6 +627,19 @@
}
void
+ewl_tree_node_child_add_cb(Ewl_Container *c, Ewl_Widget *w)
+{
+ Ewl_Tree_Node *node = EWL_TREE_NODE(c);
+ if (ecore_list_nodes(c->children) > 2 ) {
+ if (HIDDEN(node->handle))
+ ewl_widget_show(node->handle);
+ }
+ else if (VISIBLE(node->handle)) {
+ ewl_widget_hide(node->handle);
+ }
+}
+
+void
ewl_tree_node_child_show_cb(Ewl_Container *c, Ewl_Widget *w)
{
Ewl_Tree_Node *node;
@@ -634,15 +648,12 @@
node = EWL_TREE_NODE(c);
- if (ecore_list_nodes(c->children) > 2 ) {
- if (HIDDEN(node->handle))
- ewl_widget_show(node->handle);
- }
-
if (node->expanded) {
ewl_container_prefer_sum(c, EWL_ORIENTATION_VERTICAL);
- ewl_object_set_preferred_h(EWL_OBJECT(c), PREFERRED_H(c) -
- ewl_object_get_preferred_h(EWL_OBJECT(node->handle)));
+ if (REALIZED(node->handle) && VISIBLE(node->handle))
+ ewl_object_set_preferred_h(EWL_OBJECT(c),
+ PREFERRED_H(c) -
+
ewl_object_get_preferred_h(EWL_OBJECT(node->handle)));
}
else {
ewl_object_set_preferred_h(EWL_OBJECT(c),
@@ -650,6 +661,10 @@
}
ewl_container_prefer_largest(c, EWL_ORIENTATION_HORIZONTAL);
+ if (REALIZED(node->handle) && VISIBLE(node->handle))
+ ewl_object_set_preferred_w(EWL_OBJECT(c), PREFERRED_W(c) +
+ ewl_object_get_preferred_w(EWL_OBJECT(node->handle)));
+
ewl_widget_configure(EWL_WIDGET(c)->parent);
DLEAVE_FUNCTION(DLEVEL_STABLE);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_tree.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- ewl_tree.h 14 Jun 2004 05:55:19 -0000 1.22
+++ ewl_tree.h 24 Jun 2004 02:17:08 -0000 1.23
@@ -106,6 +106,7 @@
void ewl_tree_configure_cb(Ewl_Widget *w, void *ev_data, void *user_data);
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);
/**
* @}
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs