discomfitor pushed a commit to branch master.

http://git.enlightenment.org/apps/empc.git/commit/?id=5d1baba0aa5b4b0d1681110ad49c2cd179573214

commit 5d1baba0aa5b4b0d1681110ad49c2cd179573214
Author: zmike <michael.blumenkra...@gmail.com>
Date:   Wed Sep 16 18:10:31 2015 -0400

    allow enter key to activate first selected item in player view
---
 README         | 1 +
 src/bin/empc.c | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/README b/README
index 228e4d3..39a5340 100644
--- a/README
+++ b/README
@@ -53,6 +53,7 @@ Controls:
 
                Ctrl+v -> paste image url/data to use as background
                Delete -> delete currently playing song from queue
+               Enter/Return -> activate (play) first selected item in playlist
 
        Playlist view:
                Left -> player view
diff --git a/src/bin/empc.c b/src/bin/empc.c
index 84792f1..c4daa48 100644
--- a/src/bin/empc.c
+++ b/src/bin/empc.c
@@ -3219,6 +3219,14 @@ key_down(void *data EINA_UNUSED, int t EINA_UNUSED, 
Ecore_Event_Key *ev)
      filesystem_entry_key_select(1, 1, 0, ev->modifiers & 
ECORE_EVENT_MODIFIER_SHIFT);
    else if (bgchooser && ((!strcmp(ev->key, "Return")) || (!strcmp(ev->key, 
"KP_Enter"))))
      elm_layout_signal_emit(layout, "empc,bg_chooser,stop", "empc");
+   else if ((!filesystem_state) && (!queue_list_state) && 
elm_genlist_selected_item_get(queue_list) &&
+            ((!strcmp(ev->key, "Return")) || (!strcmp(ev->key, "KP_Enter"))))
+     {
+        Empd_Empdd_Song *so;
+
+        so = 
elm_object_item_data_get(elm_genlist_selected_item_get(queue_list));
+        empd_empdd_play_id_call(empd_proxy, so->songid);
+     }
    else if ((!(ev->modifiers & ECORE_EVENT_MODIFIER_CTRL)) && (!(ev->modifiers 
& ECORE_EVENT_MODIFIER_ALT)) &&
             (!(ev->modifiers & ECORE_EVENT_MODIFIER_ALTGR)) && 
(!(ev->modifiers & ECORE_EVENT_MODIFIER_WIN)))
      return ECORE_CALLBACK_RENEW;

-- 


Reply via email to