diff --git a/src/command.c b/src/command.c
index 3210f39d9bb242e2a8a314831caac37ed802cb83..733bf6a314567d26a04b78a4c84e26848b1f5640 100644 (file)
--- a/src/command.c
+++ b/src/command.c
#include "config.h"
#include "ncmpc.h"
#include "command.h"
+#include "mpdclient.h"
+#include "screen.h"
#undef DEBUG_KEYS
#define DK(x)
#endif
-extern void sigstop(void);
-extern void screen_resize(void);
-
#define BS KEY_BACKSPACE
#define DEL KEY_DC
#define UP KEY_UP
N_("Decrease volume") },
{ { ' ', 0, 0 }, 0, CMD_SELECT, "select",
N_("Select/deselect song in playlist") },
+ { { 't', 0, 0 }, 0, CMD_SELECT_ALL, "select_all",
+ N_("Select all listed items") },
{ { DEL, 'd', 0 }, 0, CMD_DELETE, "delete",
N_("Delete song from playlist") },
{ { 'Z', 0, 0 }, 0, CMD_SHUFFLE, "shuffle",
return cmds;
}
-char *
+const char *
key2str(int key)
{
static char buf[32];
}
}
-int
+static int
set_key_flags(command_definition_t *cp, command_t command, int flags)
{
int i;
return 1;
}
-char *
+const char *
get_key_names(command_t command, int all)
{
int i;
return NULL;
}
-char *
+const char *
get_key_description(command_t command)
{
int i;
return NULL;
}
-char *
+const char *
get_key_command_name(command_t command)
{
int i;
}
-command_t
+command_t
find_key_command(int key, command_definition_t *cmds)
{
- int i;
+ int i;
+
+ i=0;
+ while (key && cmds && cmds[i].name) {
+ if (cmds[i].keys[0] == key ||
+ cmds[i].keys[1] == key ||
+ cmds[i].keys[2] == key)
+ return cmds[i].command;
+ i++;
+ }
- i=0;
- while( key && cmds && cmds[i].name )
- {
- if( cmds[i].keys[0] == key ||
- cmds[i].keys[1] == key ||
- cmds[i].keys[2] == key )
- return cmds[i].command;
- i++;
- }
- return CMD_NONE;
+ return CMD_NONE;
}
command_t