Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_object.c ewl_separator.c ewl_widget.c
Log Message:
A few minor changes in how basic objects work.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_object.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- ewl_object.c 20 Feb 2003 05:17:40 -0000 1.28
+++ ewl_object.c 1 Mar 2003 18:34:46 -0000 1.29
@@ -277,11 +277,11 @@
add = INSET_HORIZONTAL(o) + PADDING_HORIZONTAL(o);
- /*
if (PREFERRED_W(o) < MINIMUM_W(o))
temp = MINIMUM_W(o);
+ else if (PREFERRED_W(o) > MAXIMUM_W(o))
+ temp = MAXIMUM_W(o);
else
- */
temp = PREFERRED_W(o);
temp += add;
@@ -303,11 +303,11 @@
add = INSET_VERTICAL(o) + PADDING_VERTICAL(o);
- /*
if (PREFERRED_H(o) < MINIMUM_H(o))
temp = MINIMUM_H(o);
+ else if (PREFERRED_H(o) > MAXIMUM_H(o))
+ temp = MAXIMUM_H(o);
else
- */
temp = PREFERRED_H(o);
temp += add;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_separator.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_separator.c 14 Jan 2003 21:45:04 -0000 1.18
+++ ewl_separator.c 1 Mar 2003 18:34:46 -0000 1.19
@@ -1,8 +1,5 @@
#include <Ewl.h>
-void __ewl_separator_realize(Ewl_Widget * w, void *ev_data,
- void *user_data);
-
/**
* ewl_separator_new - allocate a new separator widget
* @o: the orientation of the newly allocated separator widget
@@ -40,14 +37,14 @@
w = EWL_WIDGET(s);
- ewl_widget_init(w, "separator");
+ if (o == EWL_ORIENTATION_HORIZONTAL)
+ ewl_widget_init(w, "hseparator");
+ else
+ ewl_widget_init(w, "vseparator");
ewl_object_set_alignment(EWL_OBJECT(s), EWL_ALIGNMENT_LEFT);
ewl_object_set_fill_policy(EWL_OBJECT(s), EWL_FILL_POLICY_FILL);
- ewl_callback_append(w, EWL_CALLBACK_REALIZE,
- __ewl_separator_realize, NULL);
-
s->orientation = o;
DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -57,6 +54,8 @@
* Setup the ewl object's maximum size based on the max size of the ebits
* object.
*/
+/* FIXME: This should be redundant, as this is done in the widget realize
+ * callback.
void __ewl_separator_realize(Ewl_Widget * w, void *ev_data, void *user_data)
{
DENTER_FUNCTION(DLEVEL_STABLE);
@@ -67,9 +66,9 @@
ebits_get_max_size(w->ebits_object, &ww, &hh);
- /* ewl_object_set_preferred_size(EWL_OBJECT(w), ww, hh); */
ewl_object_set_maximum_size(EWL_OBJECT(w), ww, hh);
}
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
+*/
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- ewl_widget.c 2 Feb 2003 21:03:24 -0000 1.45
+++ ewl_widget.c 1 Mar 2003 18:34:46 -0000 1.46
@@ -757,6 +757,9 @@
ebits_set_named_bit_state(w->ebits_object, "Base",
"disabled");
+ /*
+ * Propagate minimum sizes from the bit theme to the widget.
+ */
ebits_get_min_size(w->ebits_object, &i_l, &i_t);
if (MINIMUM_W(w) == EWL_OBJECT_MIN_SIZE)
@@ -764,6 +767,17 @@
if (MINIMUM_H(w) == EWL_OBJECT_MIN_SIZE)
ewl_object_set_minimum_h(EWL_OBJECT(w), i_t);
+
+ /*
+ * Propagate maximum sizes from the bit theme to the widget.
+ */
+ ebits_get_max_size(w->ebits_object, &i_l, &i_t);
+
+ if (MAXIMUM_W(w) == EWL_OBJECT_MAX_SIZE)
+ ewl_object_set_maximum_w(EWL_OBJECT(w), i_l);
+
+ if (MAXIMUM_H(w) == EWL_OBJECT_MAX_SIZE)
+ ewl_object_set_maximum_h(EWL_OBJECT(w), i_t);
}
DRETURN(DLEVEL_STABLE);
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs