raster pushed a commit to branch master.


commit e5edb6748b0d5e2afe8ca98c09c02aa1a82182b2
Author: Markus Törnqvist <mjt>
Date:   Sat Oct 10 17:01:01 2015 +0900

    Disable adding files that cannot be played
    Summary: Dropping a directory into Rage added everything before this patch, 
complaining about some files and definitely not playing them. This adds 
`emotion_object_extension_may_play_get()` checks.
    Test Plan:
    Drop a non-playable file and a directory containing non-playable files.
    The file(s) get(s) added (but cannot be played, obviously) before this 
patch and after this they're ignored.
    Reviewers: raster
    Projects: #rage
    Differential Revision: https://phab.enlightenment.org/D3162
 src/bin/dnd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bin/dnd.c b/src/bin/dnd.c
index cafcc09..c14643a 100644
--- a/src/bin/dnd.c
+++ b/src/bin/dnd.c
@@ -154,6 +154,8 @@ _cb_recurse(void *data, Eio_File *f EINA_UNUSED, const 
Eina_File_Direct_Info *in
    struct _recurse_data *d = data;
    if (info->type == EINA_FILE_DIR)
+   else if (!emotion_object_extension_may_play_get(info->path))
+      return;
    d->list = eina_list_sorted_insert(d->list, EINA_COMPARE_CB(_pathcmp), 
@@ -190,6 +192,7 @@ _cb_drop(void *data, Evas_Object *o EINA_UNUSED, 
Elm_Selection_Data *ev)
+        else if (!emotion_object_extension_may_play_get(esc)) continue;
         playlist = eina_list_sorted_insert(playlist, 
EINA_COMPARE_CB(_pathcmp), esc);


Reply via email to