From: Jonathan Neuschäfer Date: Wed, 28 Dec 2011 22:18:51 +0000 (+0100) Subject: screen_keydef: support adding keys with CMD_ADD X-Git-Tag: release-0.20~13 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4cc91b55fe400479bee3b393af2e10a4a3e50d9a;p=ncmpc.git screen_keydef: support adding keys with CMD_ADD --- diff --git a/src/screen_help.c b/src/screen_help.c index aad266b..e0e705b 100644 --- a/src/screen_help.c +++ b/src/screen_help.c @@ -180,6 +180,7 @@ static const struct help_text_row help_text[] = { { 2, CMD_NONE, NULL }, { 0, CMD_PLAY, N_("Edit keydefs for selected command") }, { 0, CMD_DELETE, N_("Remove selected keydef") }, + { 0, CMD_ADD, N_("Add a keydef") }, { 0, CMD_GO_PARENT_DIRECTORY, N_("Go up a level") }, { 0, CMD_SAVE_PLAYLIST, N_("Apply and save changes") }, #endif diff --git a/src/screen_keydef.c b/src/screen_keydef.c index f31e6c5..0d7cb72 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -433,6 +433,10 @@ keydef_cmd(G_GNUC_UNUSED struct mpdclient *c, command_t cmd) delete_key(subcmd, subcmd_item_to_key_id(lw->selected)); return true; + case CMD_ADD: + if (subcmd != -1) + add_key(subcmd); + return true; case CMD_SAVE_PLAYLIST: apply_keys(); save_keys();