Code

*: add "pure" attributes
[ncmpc.git] / src / command.c
index e3663339ee9837436bbfec350b4690024c32ba69..5621b165650b34fd2197b846755ee3c3967ef242 100644 (file)
@@ -56,6 +56,7 @@
 #define F6   KEY_F(6)
 #define F7   KEY_F(7)
 #define F8   KEY_F(8)
+#define F9   KEY_F(9)
 #define C(x) KEY_CTL(x)
 
 static command_definition_t cmds[] = {
@@ -103,7 +104,7 @@ static command_definition_t cmds[] = {
        { { '1', F1, 'h' }, 0, CMD_SCREEN_HELP, "screen-help",
          N_("Help screen") },
        { { '2', F2, 0 }, 0, CMD_SCREEN_PLAY, "screen-playlist",
-         N_("Playlist screen") },
+         N_("Queue screen") },
        { { '3', F3, 0 }, 0, CMD_SCREEN_FILE, "screen-browse",
          N_("Browse screen") },
 
@@ -130,15 +131,15 @@ static command_definition_t cmds[] = {
        { { '-', LEFT, 0 }, 0, CMD_VOLUME_DOWN, "volume-down",
          N_("Decrease volume") },
        { { ' ', 0, 0 }, 0, CMD_SELECT, "select",
-         N_("Select/deselect song in playlist") },
+         N_("Select/deselect song in queue") },
        { { '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") },
+         N_("Delete song from queue") },
        { { 'Z', 0, 0 }, 0, CMD_SHUFFLE, "shuffle",
-         N_("Shuffle playlist") },
+         N_("Shuffle queue") },
        { { 'c', 0, 0 }, 0, CMD_CLEAR, "clear",
-         N_("Clear playlist") },
+         N_("Clear queue") },
        { { 'r', 0, 0 }, 0, CMD_REPEAT, "repeat",
          N_("Toggle repeat mode") },
        { { 'z', 0, 0 }, 0, CMD_RANDOM, "random",
@@ -152,9 +153,9 @@ static command_definition_t cmds[] = {
        { { C('U'), 0, 0 }, 0, CMD_DB_UPDATE, "db-update",
          N_("Start a music database update") },
        { { 'S', 0, 0 }, 0, CMD_SAVE_PLAYLIST, "save",
-         N_("Save playlist") },
+         N_("Save queue") },
        { { 'a', 0, 0 }, 0, CMD_ADD, "add",
-         N_("Add url/file to playlist") },
+         N_("Add url/file to queue") },
 
        { { '!', 0, 0 }, 0, CMD_GO_ROOT_DIRECTORY, "go-root-directory",
          N_("Go to root directory") },
@@ -244,6 +245,10 @@ static command_definition_t cmds[] = {
          N_("Outputs screen") },
 #endif
 
+#ifdef ENABLE_CHAT_SCREEN
+       { {'9', F9, 0}, 0, CMD_SCREEN_CHAT, "screen-chat",
+         N_("Chat screen") },
+#endif
 
        { { -1, -1, -1 }, 0, CMD_NONE, NULL, NULL }
 };
@@ -409,7 +414,7 @@ get_key_command_name(command_t command)
 }
 
 command_t
-get_key_command_from_name(char *name)
+get_key_command_from_name(const char *name)
 {
        for (int i = 0; cmds[i].name; i++)
                if (strcmp(name, cmds[i].name) == 0)
@@ -419,7 +424,7 @@ get_key_command_from_name(char *name)
 }
 
 command_t
-find_key_command(int key, command_definition_t *c)
+find_key_command(int key, const command_definition_t *c)
 {
        assert(key != 0);
        assert(c != NULL);