summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-11-06 17:26:17 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-11-06 17:27:06 -0500
commit912accae99b8c60640eeb1a5c64bf587f874b67d (patch)
treed1b6f7539df58c4618e3c5fc2567271691f8be1b /src
parent3a149bc52c9072d121fe694a288684ae49db07fc (diff)
add ctrl+Delete keybind on player view to delete current album
Diffstat (limited to 'src')
-rw-r--r--src/bin/empc.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/bin/empc.c b/src/bin/empc.c
index 9bcec4d..a9df3b8 100644
--- a/src/bin/empc.c
+++ b/src/bin/empc.c
@@ -3164,7 +3164,8 @@ key_down(void *data EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Key *ev)
3164 } 3164 }
3165 if ((!strcmp(ev->key, "q")) && (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL)) 3165 if ((!strcmp(ev->key, "q")) && (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL))
3166 ecore_main_loop_quit(); 3166 ecore_main_loop_quit();
3167 else if ((!ctxpopup) && (!queue_list_state) && (!filesystem_state) && (!strcmp(ev->key, "Delete"))) 3167 else if ((!(ev->modifiers & ECORE_EVENT_MODIFIER_CTRL)) && (!ctxpopup) &&
3168 (!queue_list_state) && (!filesystem_state) && (!strcmp(ev->key, "Delete")))
3168 { 3169 {
3169 if (empd_song_item) 3170 if (empd_song_item)
3170 { 3171 {
@@ -3236,7 +3237,24 @@ key_down(void *data EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Key *ev)
3236 if (login_visible) return ECORE_CALLBACK_RENEW; 3237 if (login_visible) return ECORE_CALLBACK_RENEW;
3237 while (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) 3238 while (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL)
3238 { 3239 {
3239 if ((!strcmp(ev->key, "Return")) || (!strcmp(ev->key, "KP_Enter"))) 3240 if ((!ctxpopup) && empd_song_item &&
3241 (!queue_list_state) && (!filesystem_state) && (!strcmp(ev->key, "Delete")))
3242 {
3243 Elm_Object_Item *it;
3244 Empd_Empdd_Song *so;
3245 Eina_List *l = NULL;
3246
3247 it = elm_genlist_item_parent_get(empd_song_item);
3248 so = elm_object_item_data_get(it);
3249 it = eina_hash_find(empd_current_queue, &so->songid);
3250 do
3251 {
3252 l = eina_list_append(l, it);
3253 it = elm_genlist_item_next_get(it);
3254 } while (elm_genlist_item_parent_get(it));
3255 queue_list_delete_list(l);
3256 }
3257 else if ((!strcmp(ev->key, "Return")) || (!strcmp(ev->key, "KP_Enter")))
3240 { 3258 {
3241 if (filesystem_state && evas_object_visible_get(filesystem_entry)) return ECORE_CALLBACK_RENEW; 3259 if (filesystem_state && evas_object_visible_get(filesystem_entry)) return ECORE_CALLBACK_RENEW;
3242 if (filesystem_state) 3260 if (filesystem_state)