Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_spinner.c ewl_widget.c
Log Message:
- the spinner should not cause a value_changed callback when we set the
value ourselves.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_spinner.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_spinner.c 3 Oct 2005 06:43:07 -0000 1.5
+++ ewl_spinner.c 9 Oct 2005 18:21:46 -0000 1.6
@@ -3,7 +3,7 @@
#include "ewl_macros.h"
#include "ewl_private.h"
-static void ewl_spinner_calc_value(Ewl_Spinner *s, double val);
+static void ewl_spinner_calc_value(Ewl_Spinner *s, double val, unsigned int
call);
static int ewl_spinner_timer(void *data);
/**
@@ -121,7 +121,7 @@
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("s", s);
- ewl_spinner_calc_value(s, value);
+ ewl_spinner_calc_value(s, value, FALSE);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -153,7 +153,7 @@
DCHECK_PARAM_PTR("s", s);
s->digits = digits;
- ewl_spinner_calc_value(s, s->value);
+ ewl_spinner_calc_value(s, s->value, FALSE);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -185,7 +185,7 @@
DCHECK_PARAM_PTR("s", s);
s->min_val = val;
- ewl_spinner_calc_value(s, s->value);
+ ewl_spinner_calc_value(s, s->value, FALSE);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -217,7 +217,7 @@
DCHECK_PARAM_PTR("s", s);
s->max_val = val;
- ewl_spinner_calc_value(s, s->value);
+ ewl_spinner_calc_value(s, s->value, FALSE);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -321,7 +321,7 @@
s = EWL_SPINNER(w);
- ewl_spinner_calc_value(s, s->value);
+ ewl_spinner_calc_value(s, s->value, FALSE);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -458,7 +458,7 @@
if (str && strlen(str)) {
val = atof(str);
- ewl_spinner_calc_value(s, (double) (val));
+ ewl_spinner_calc_value(s, (double) (val), TRUE);
} else if (str)
FREE(str);
@@ -478,13 +478,13 @@
s = EWL_SPINNER(w->parent);
wheel = (Ewl_Event_Mouse_Wheel *)ev_data;
- ewl_spinner_calc_value(s, s->value - (wheel->z * s->step));
+ ewl_spinner_calc_value(s, s->value - (wheel->z * s->step), TRUE);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
static void
-ewl_spinner_calc_value(Ewl_Spinner * s, double value)
+ewl_spinner_calc_value(Ewl_Spinner * s, double value, unsigned int call)
{
char format[64];
char str[64];
@@ -507,7 +507,7 @@
ewl_text_text_set(EWL_TEXT(s->entry), str);
- if (oval != s->value) {
+ if ((call == TRUE) && (oval != s->value)) {
oval = s->value;
ewl_callback_call_with_event_data(EWL_WIDGET(s),
EWL_CALLBACK_VALUE_CHANGED, &oval);
@@ -529,7 +529,7 @@
ewl_spinner_deselect_cb(w, NULL, NULL);
- ewl_spinner_calc_value(s, s->value + s->step);
+ ewl_spinner_calc_value(s, s->value + s->step, TRUE);
if (ev_data) {
s->direction = 1;
@@ -572,7 +572,7 @@
ewl_spinner_deselect_cb(w, NULL, NULL);
- ewl_spinner_calc_value(s, s->value - s->step);
+ ewl_spinner_calc_value(s, s->value - s->step, TRUE);
if (ev_data) {
s->direction = -1;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_widget.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ewl_widget.c 3 Oct 2005 06:43:07 -0000 1.19
+++ ewl_widget.c 9 Oct 2005 18:21:46 -0000 1.20
@@ -1044,7 +1044,6 @@
color->g = g;
color->b = b;
color->a = a;
-
ewl_attach_color_set(w, color);
if (REALIZED(w))
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs