Revert "spinner: call changed callback on value set."

This reverts commit 082ea96673.

As per mail from Andrii, and he's right:

From: Andrii Kroitor <an.kroitor@samsung.com>
To: Enlightenment developer list <enlightenment-devel@lists.sourceforge.net>
Subject: [E-devel] elementary callbacks hell
Date: Fri, 23 Dec 2016 18:03:58 +0200

Recently existing callbacks behavior was broken once again. This time by
https://git.enlightenment.org/core/efl.git/commit/?id=082ea9667343b7016d86143a625881a8c4aa30a4
Before that commit "changed" callback was triggered only on user
changes, after - on user changes and changes from code.
I understand that in some cases this flow is needed. But previously you
could simply trigger your callback after setting value to spinner from
code to get desired missing behavior.
On the other side - now you can't distinguish value changes made by code
from value changes made by user without dirty and painful to support
hacks. If you don't want your callback to be
triggered by elm_spinner_value_set you need to add some flag meaning
"change from code", raise it before every call of value_set, check it
inside callback, remove it after the call.
And if you want to call it from spinner "changed" callback..? Good luck
here. This is possible, but requires additional wrappers around
spinner_add and spinner_value_set and replacement with custom signals.

So this change added bigger problems than solved.
This commit is contained in:
Carsten Haitzler 2016-12-24 09:47:58 +09:00
parent bf1687e224
commit 44a70ab98c
1 changed files with 0 additions and 1 deletions

View File

@ -1540,7 +1540,6 @@ _elm_spinner_efl_ui_spin_value_set(Eo *obj, Elm_Spinner_Data *sd, double val)
_val_set(obj);
_label_write(obj);
efl_event_callback_legacy_call(obj, ELM_SPINNER_EVENT_CHANGED, NULL);
}
EOLIAN static double