summaryrefslogtreecommitdiff
path: root/src/ui_act.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2010-01-18 15:41:07 +0100
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2010-01-18 15:41:07 +0100
commit7df92f7654662d95959c4f1e43610be2f2d67fd1 (patch)
tree7cd0ad65f45ed914d52700b82406884deac665e7 /src/ui_act.c
parent83e056f390c4804f9d283c7083a76dfa957ee054 (diff)
downloadpianobar-windows-7df92f7654662d95959c4f1e43610be2f2d67fd1.tar.gz
pianobar-windows-7df92f7654662d95959c4f1e43610be2f2d67fd1.tar.bz2
pianobar-windows-7df92f7654662d95959c4f1e43610be2f2d67fd1.zip
Shortcut refactoring
Diffstat (limited to 'src/ui_act.c')
-rw-r--r--src/ui_act.c33
1 files changed, 27 insertions, 6 deletions
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;
}
}