Revert "Revert "mixer: do not set back the value from emix once the drag is finished""

This reverts commit fba185798c.

There is not even a description why you reverted it. This is a bugfix
that fixed a bug. So talk to me what the issue is, but please stop
reverting commits silently.
devs/bu5hm4n/mixer-fix
Marcel Hollerbach 6 years ago
parent 2e043e825d
commit 9745890a37
  1. 11
      src/modules/mixer/e_mod_main.c
  2. 13
      src/modules/mixer/emixer.c

@ -480,16 +480,6 @@ _slider_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
if (emix_config_save_get()) e_config_save_queue();
}
static void
_slider_drag_stop_cb(void *data EINA_UNUSED, Evas_Object *obj,
void *event EINA_UNUSED)
{
EINA_SAFETY_ON_NULL_RETURN(mixer_context->sink_default);
Emix_Sink *s = (Emix_Sink *)mixer_context->sink_default;
int val = s->volume.volumes[0];
elm_slider_value_set(obj, val);
}
static void
_sink_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
@ -554,7 +544,6 @@ _popup_new(Instance *inst)
evas_object_show(slider);
elm_slider_min_max_set(slider, 0.0, emix_max_volume_get());
evas_object_smart_callback_add(slider, "changed", _slider_changed_cb, NULL);
evas_object_smart_callback_add(slider, "slider,drag,stop", _slider_drag_stop_cb, NULL);
elm_slider_value_set(slider, volume);
elm_box_pack_end(bx, slider);
evas_object_show(slider);

@ -48,17 +48,6 @@ _cb_sink_volume_change(void *data,
elm_slider_value_set(obj, vol);
}
static void
_cb_sink_volume_drag_stop(void *data,
Evas_Object *obj,
void *event EINA_UNUSED)
{
Evas_Object *bxv = data;
Emix_Sink *sink = evas_object_data_get(bxv, "sink");
int vol = sink->volume.volumes[0];
elm_slider_value_set(obj, vol);
}
static void
_cb_sink_mute_change(void *data,
Evas_Object *obj,
@ -134,8 +123,6 @@ _emix_sink_add(Emix_Sink *sink)
elm_box_pack_end(bx, sl);
evas_object_show(sl);
evas_object_smart_callback_add(sl, "changed", _cb_sink_volume_change, bxv);
evas_object_smart_callback_add(sl, "slider,drag,stop",
_cb_sink_volume_drag_stop, bxv);
ck = elm_check_add(win);
evas_object_data_set(bxv, "mute", ck);

Loading…
Cancel
Save