Code

change CMD_LYRICS_EDIT to CMD_EDIT
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Wed, 21 Dec 2011 18:55:10 +0000 (19:55 +0100)
committerJonathan Neuschäfer <j.neuschaefer@gmx.net>
Thu, 22 Dec 2011 12:01:29 +0000 (13:01 +0100)
This allows other screens to implement edit funtionality

src/command.c
src/command.h
src/screen_help.c
src/screen_lyrics.c

index 5df533568c611688dc5b80fc87f778377c6f9db0..e6f2f1d3aae0034b0419efcb9168872c362ed63e 100644 (file)
@@ -241,8 +241,10 @@ static command_definition_t cmds[] = {
          N_("Interrupt action") },
        { {'u', 0, 0 }, 0, CMD_LYRICS_UPDATE, "lyrics-update",
          N_("Update Lyrics") },
-       { {'e', 0, 0 }, 0, CMD_LYRICS_EDIT, "lyrics-edit",
-         N_("Edit Lyrics") },
+       /* this command may move out of #ifdef ENABLE_LYRICS_SCREEN
+          at some point */
+       { {'e', 0, 0 }, 0, CMD_EDIT, "edit",
+         N_("Edit the current item") },
 #endif
 
 #ifdef ENABLE_OUTPUTS_SCREEN
index a05ea5518659a00a00043ad0e44097e5b20d5f67..3a7d61d9d6322c2d13eea2bb84dc17eb959bf5c8 100644 (file)
@@ -96,7 +96,7 @@ typedef enum {
        CMD_SCREEN_LYRICS,
        CMD_SCREEN_OUTPUTS,
        CMD_LYRICS_UPDATE,
-       CMD_LYRICS_EDIT,
+       CMD_EDIT,
        CMD_INTERRUPT,
        CMD_GO_ROOT_DIRECTORY,
        CMD_GO_PARENT_DIRECTORY,
index e3b2f3d699f20fdf90c8c2fd22433253d7391b77..aad266bf820b4646a5a0fced6a98745960cda45e 100644 (file)
@@ -162,7 +162,7 @@ static const struct help_text_row help_text[] = {
           from the server */
        { 0, CMD_INTERRUPT, N_("Interrupt retrieval") },
        { 0, CMD_LYRICS_UPDATE, N_("Download lyrics for currently playing song") },
-       { 0, CMD_LYRICS_EDIT, N_("Add or edit lyrics") },
+       { 0, CMD_EDIT, N_("Add or edit lyrics") },
        { 0, CMD_SAVE_PLAYLIST, N_("Save lyrics") },
        { 0, CMD_DELETE, N_("Delete saved lyrics") },
 #endif
index ee76e28b45134563715e378f7d9655a500a88d5c..ef230c83a749d0ead633ed5daa19b17444205afb 100644 (file)
@@ -448,7 +448,7 @@ lyrics_cmd(struct mpdclient *c, command_t cmd)
                        screen_text_repaint(&text);
                }
                return true;
-       case CMD_LYRICS_EDIT:
+       case CMD_EDIT:
                lyrics_edit();
                return true;
        case CMD_SELECT: