rimmed pushed a commit to branch master.

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

commit d1c13c290c6eb148ca28eec7ce75de358cbf5fe9
Author: Vyacheslav Reutskiy <v.reuts...@samsung.com>
Date:   Tue Jan 26 11:34:24 2016 +0200

    sound_editor: delete old code for delete sound editor
    
    This logic is meant for delete the sound editor when it been in the
    modal window, and this code made safely editor close. Now Eflete
    have a 1 (one) static sound editor and this code no needs more.
    
    Change-Id: I2375c25f7ec7e48f703fc6d8eb22de0adc373d3f
---
 src/bin/ui/editors/sound_editor.c | 11 --------
 src/bin/ui/property_sound.c       | 55 ---------------------------------------
 2 files changed, 66 deletions(-)

diff --git a/src/bin/ui/editors/sound_editor.c 
b/src/bin/ui/editors/sound_editor.c
index 3c2c3de..4efe0e3 100644
--- a/src/bin/ui/editors/sound_editor.c
+++ b/src/bin/ui/editors/sound_editor.c
@@ -92,15 +92,6 @@ _grid_group_label_get(void *data,
 }
 
 static void
-_on_sound_editor_del(void * data __UNUSED__,
-                     Evas *e __UNUSED__,
-                     Evas_Object *obj __UNUSED__,
-                     void *event_info __UNUSED__)
-{
-   evas_object_smart_callback_call(ap.win, SIGNAL_SOUND_DEL, NULL);
-}
-
-static void
 _grid_del(void *data,
           Evas_Object *obj __UNUSED__)
 {
@@ -640,8 +631,6 @@ _sound_editor_main_markup_create(Sound_Editor *edit)
    evas_object_size_hint_weight_set(edit->markup, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
    evas_object_data_set(edit->markup, SND_EDIT_KEY, edit);
 
-   evas_object_event_callback_add(edit->markup, EVAS_CALLBACK_DEL, 
_on_sound_editor_del, edit);
-
    edit->btn_del = elm_button_add(edit->markup);
    evas_object_smart_callback_add(edit->btn_del, "clicked", 
_on_delete_clicked_cb, edit);
    elm_object_part_content_set(edit->markup, "swallow.btn.del", edit->btn_del);
diff --git a/src/bin/ui/property_sound.c b/src/bin/ui/property_sound.c
index 31e8c7f..9915e68 100644
--- a/src/bin/ui/property_sound.c
+++ b/src/bin/ui/property_sound.c
@@ -101,8 +101,6 @@ struct _Sound_Prop_Data
 };
 typedef struct _Sound_Prop_Data Sound_Prop_Data;
 
-static Elm_Gengrid_Item_Class *gic = NULL, *ggic = NULL;
-
 /* accroding to Edje_Edit.h */
 static const char *edje_sound_compression[] = { N_("RAW"),
                                                 N_("COMP"),
@@ -178,58 +176,6 @@ prop_sound_editor_compression_type_add(Evas_Object 
*parent, Sound_Prop_Data *pd)
    return item;
 }
 
-static void
-_on_grid_clicked(void *data, Evas_Object *obj, void *event_info);
-static void
-_on_sound_editor_del(void * data, Evas_Object *obj, void *event_info);
-
-TODO("Check app logic: why sound editor is deleted on each project close?")
-static void
-_sound_editor_del(Sound_Prop_Data *edit)
-{
-   assert(edit != NULL);
-
-#ifdef HAVE_AUDIO
-   ecore_audio_shutdown();
-#endif
-   elm_gengrid_item_class_free(gic);
-   elm_gengrid_item_class_free(ggic);
-   evas_object_data_del(edit->markup, SND_EDIT_KEY);
-   eina_stringshare_del(edit->selected);
-   free(edit);
-
-   evas_object_smart_callback_del(ap.win, SIGNAL_SOUND_ADD, _on_grid_clicked);
-   evas_object_smart_callback_del(ap.win, SIGNAL_SOUND_DEL, 
_on_sound_editor_del);
-}
-
-static void
-_sound_editor_quit(Sound_Prop_Data *edit)
-{
-#ifdef HAVE_AUDIO
-   if (edit->player_data.playing)
-     _interrupt_playing(edit);
-   else if (edit->io.in)
-     {
-        eo_del(edit->io.in);
-        eo_del(edit->io.out);
-        eina_binbuf_free(edit->io.buf);
-     }
-#endif
-   _sound_editor_del(edit);
-}
-
-static void
-_on_sound_editor_del(void * data,
-                     Evas_Object *obj __UNUSED__,
-                     void *event_info __UNUSED__)
-{
-   Sound_Prop_Data *edit = (Sound_Prop_Data *)data;
-
-   assert(edit != NULL);
-
-   _sound_editor_quit(edit);
-}
-
 #ifdef HAVE_AUDIO
 static int
 _snd_file_seek(void *data, Eo *eo_obj EINA_UNUSED, int offset, int whence)
@@ -1080,7 +1026,6 @@ ui_property_sound_add(Evas_Object *parent)
    _sound_info_create(parent, pd);
 
    evas_object_smart_callback_add(ap.win, SIGNAL_SOUND_ADD, _on_grid_clicked, 
pd);
-   evas_object_smart_callback_add(ap.win, SIGNAL_SOUND_DEL, 
_on_sound_editor_del, pd);
 
    return pd->box;
 }

-- 


Reply via email to