rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=dff9ccf83dc357498443574e660f8e3e09486e1d

commit dff9ccf83dc357498443574e660f8e3e09486e1d
Author: Vyacheslav Reutskiy <v.reuts...@samsung.com>
Date:   Tue Feb 2 11:21:10 2016 +0200

    property_sound: do not play the sound on select
    
    Play sound on select it's a bad practice, because Eflete don't
    know about valume, and very loud sound can cause inconvenience
    for user.
    
    Change-Id: I1cc154a62f4dd51a15f5057bc4bb69fda8487669
---
 src/bin/ui/property_sound.c | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/src/bin/ui/property_sound.c b/src/bin/ui/property_sound.c
index c1f6676..e7680ae 100644
--- a/src/bin/ui/property_sound.c
+++ b/src/bin/ui/property_sound.c
@@ -70,7 +70,6 @@ struct _Sound_Prop_Data
 
    struct {
       Ecore_Timer *timer;
-      Evas_Object *check;
       Evas_Object *rewind;
       Evas_Object *play;
       Evas_Object *pause;
@@ -530,7 +529,7 @@ _player_units_free(char *str)
 static void
 _sound_player_create(Evas_Object *parent, Sound_Prop_Data *edit)
 {
-   Evas_Object *icon, *item;
+   Evas_Object *icon;
 
    assert(parent != NULL);
    assert(edit != NULL);
@@ -559,11 +558,6 @@ _sound_player_create(Evas_Object *parent, Sound_Prop_Data 
*edit)
    elm_object_part_content_set(edit->sound_player, "eflete.swallow.teg",
                                edit->snd_data.teg);
 
-   INFO_ADD(parent, item, _("Play on select:"), "item");
-   CHECK_ADD(item, edit->player_data.check);
-   elm_object_part_content_set(item, "swallow.second", 
edit->player_data.check);
-   elm_object_part_content_set(edit->sound_player, "eflete.swallow.check", 
item);
-
    edit->player_data.rewind = elm_slider_add(edit->sound_player);
    elm_slider_unit_format_set(edit->player_data.rewind, "%2.0f");
    elm_slider_units_format_function_set(edit->player_data.rewind, 
_player_units_format,
@@ -644,9 +638,6 @@ _grid_sample_selected(void *data,
    External_Resource *sample;
 
    double len = 0.0;
-#ifdef HAVE_AUDIO
-   Eina_Bool auto_play = elm_check_state_get(edit->player_data.check);
-#endif
    edit->snd = snd;
 
 #ifdef HAVE_AUDIO
@@ -668,13 +659,6 @@ _grid_sample_selected(void *data,
                       
edje_edit_sound_compression_rate_get(ap.project->global_object, snd->name),
                       
edje_edit_sound_compression_type_get(ap.project->global_object, snd->name));
 
-#ifdef HAVE_AUDIO
-   if ((edit->player_data.switched) || (auto_play))
-     {
-        edit->player_data.switched = false;
-        _sample_play(edit);
-     }
-#endif
 }
 
 static void
@@ -699,13 +683,6 @@ _grid_tone_selected(void *data,
    elm_slider_value_set(edit->player_data.rewind, 0.0);
 
    _tone_info_update(edit, tone->name, tone->freq);
-#ifdef HAVE_AUDIO
-   if ((edit->player_data.switched) || 
(elm_check_state_get(edit->player_data.check)))
-     {
-        edit->player_data.switched = false;
-        _tone_play(edit);
-     }
-#endif
 }
 
 static void

-- 


Reply via email to