summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-23 15:36:48 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-23 15:36:48 +0100
commit4304036e51bbb105c0a839171bac3329ef3a218c (patch)
treed6ef471206ea172be44551d527aab7ca39f435fd
parent245aca973ea9575b5714b505acf688598d5e5abb (diff)
mixer: set the value we set to emix not the value from the backend
-rw-r--r--src/modules/mixer/e_mod_main.c11
-rw-r--r--src/modules/mixer/emixer.c13
2 files changed, 24 insertions, 0 deletions
diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index b6ce38ba4..e00bfd971 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -482,6 +482,16 @@ _slider_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
482} 482}
483 483
484static void 484static void
485_slider_drag_stop_cb(void *data EINA_UNUSED, Evas_Object *obj,
486 void *event EINA_UNUSED)
487{
488 EINA_SAFETY_ON_NULL_RETURN(mixer_context->sink_default);
489 Emix_Sink *s = (Emix_Sink *)mixer_context->sink_default;
490 int val = s->volume.volumes[0];
491 elm_slider_value_set(obj, val);
492}
493
494static void
485_sink_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 495_sink_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
486{ 496{
487 Emix_Sink *s = data; 497 Emix_Sink *s = data;
@@ -545,6 +555,7 @@ _popup_new(Instance *inst)
545 evas_object_show(slider); 555 evas_object_show(slider);
546 elm_slider_min_max_set(slider, 0.0, emix_max_volume_get()); 556 elm_slider_min_max_set(slider, 0.0, emix_max_volume_get());
547 evas_object_smart_callback_add(slider, "changed", _slider_changed_cb, NULL); 557 evas_object_smart_callback_add(slider, "changed", _slider_changed_cb, NULL);
558 evas_object_smart_callback_add(slider, "slider,drag,stop", _slider_drag_stop_cb, NULL);
548 elm_slider_value_set(slider, volume); 559 elm_slider_value_set(slider, volume);
549 elm_box_pack_end(bx, slider); 560 elm_box_pack_end(bx, slider);
550 evas_object_show(slider); 561 evas_object_show(slider);
diff --git a/src/modules/mixer/emixer.c b/src/modules/mixer/emixer.c
index 1bcd96c1f..5cde88127 100644
--- a/src/modules/mixer/emixer.c
+++ b/src/modules/mixer/emixer.c
@@ -49,6 +49,17 @@ _cb_sink_volume_change(void *data,
49} 49}
50 50
51static void 51static void
52_cb_sink_volume_drag_stop(void *data,
53 Evas_Object *obj,
54 void *event EINA_UNUSED)
55{
56 Evas_Object *bxv = data;
57 Emix_Sink *sink = evas_object_data_get(bxv, "sink");
58 int vol = sink->volume.volumes[0];
59 elm_slider_value_set(obj, vol);
60}
61
62static void
52_cb_sink_mute_change(void *data, 63_cb_sink_mute_change(void *data,
53 Evas_Object *obj, 64 Evas_Object *obj,
54 void *event_info EINA_UNUSED) 65 void *event_info EINA_UNUSED)
@@ -123,6 +134,8 @@ _emix_sink_add(Emix_Sink *sink)
123 elm_box_pack_end(bx, sl); 134 elm_box_pack_end(bx, sl);
124 evas_object_show(sl); 135 evas_object_show(sl);
125 evas_object_smart_callback_add(sl, "changed", _cb_sink_volume_change, bxv); 136 evas_object_smart_callback_add(sl, "changed", _cb_sink_volume_change, bxv);
137 evas_object_smart_callback_add(sl, "slider,drag,stop",
138 _cb_sink_volume_drag_stop, bxv);
126 139
127 ck = elm_check_add(win); 140 ck = elm_check_add(win);
128 evas_object_data_set(bxv, "mute", ck); 141 evas_object_data_set(bxv, "mute", ck);