discomfitor pushed a commit to branch master. http://git.enlightenment.org/apps/empc.git/commit/?id=d037fd11e52039d92d6830ef4ef3a3d1bd067104
commit d037fd11e52039d92d6830ef4ef3a3d1bd067104 Author: Mike Blumenkrantz <[email protected]> Date: Fri Jan 2 19:07:05 2015 -0500 add option for appending selection from filesystem popup --- src/bin/empc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/bin/empc.c b/src/bin/empc.c index a3db7f8..02ccab6 100644 --- a/src/bin/empc.c +++ b/src/bin/empc.c @@ -1267,6 +1267,21 @@ filesystem_button_add(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void } static void +filesystem_button_append(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +{ + Eina_Array *old = clipboard; + + clipboard = eina_array_new(10); + clipboard_copy(); + clipboard_paste(-1); + clipboard_clear(); + eina_array_free(clipboard); + clipboard = old; + if (ctxpopup) + elm_ctxpopup_dismiss(ctxpopup); +} + +static void filesystem_button_insert_after(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { Eina_Array *old = clipboard; @@ -1309,6 +1324,7 @@ filesystem_ctxpopup_show(Evas_Object *obj) Evas_Object *ctx; ctxpopup = ctx = ctxpopup_add(obj, "filesystem"); + elm_ctxpopup_item_append(ctx, "Append selection", NULL, filesystem_button_append, NULL); if ((empd_state == MPD_STATE_PLAY) || (empd_state == MPD_STATE_PAUSE)) { elm_ctxpopup_item_append(ctx, "Insert after current song", NULL, filesystem_button_insert_after, NULL); --
