From 7df92f7654662d95959c4f1e43610be2f2d67fd1 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 18 Jan 2010 15:41:07 +0100 Subject: Shortcut refactoring --- src/ui_act.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'src/ui_act.c') diff --git a/src/ui_act.c b/src/ui_act.c index 5510b2f..518dc80 100644 --- a/src/ui_act.c +++ b/src/ui_act.c @@ -67,15 +67,36 @@ static int BarTransformIfShared (PianoHandle_t *ph, PianoStation_t *station) { /* print current shortcut configuration */ void BarUiActHelp (BAR_KS_ARGS) { - BarKeyShortcut_t *curShortcut = settings->keys; + const char *idToDesc[] = { + NULL, + "love current song", + "ban current song", + "add music to current station", + "create new station", + "delete current station", + "explain why this song is played", + "add genre station", + "song history", + "print information about current song/station", + "add shared station", + "move song to different station", + "next song", + "pause/continue", + "quit", + "rename current station", + "change station", + "tired (ban song for 1 month)", + "upcoming songs", + "select quickmix stations", + NULL, + }; + size_t i; BarUiMsg (MSG_NONE, "\r"); - while (curShortcut != NULL) { - if (curShortcut->description != NULL) { - BarUiMsg (MSG_LIST, "%c %s\n", curShortcut->key, - curShortcut->description); + for (i = 0; i < BAR_KS_COUNT; i++) { + if (idToDesc[i] != NULL) { + BarUiMsg (MSG_LIST, "%c %s\n", settings->keys[i], idToDesc[i]); } - curShortcut = curShortcut->next; } } -- cgit v1.2.3