Code

screen_help: added the artist screen hotkey
[ncmpc.git] / src / screen_help.c
index 423e85f59932cb843a67b6ab3ce23c7becc1881f..8804c950bd22735da8b7be9a28af74797c3cb085 100644 (file)
@@ -22,7 +22,6 @@
 #include "command.h"
 #include "screen.h"
 #include "screen_utils.h"
-#include "gcc.h"
 
 #include <stdlib.h>
 #include <string.h>
@@ -49,6 +48,9 @@ static help_text_row_t help_text[] = {
        { 0, CMD_SCREEN_HELP, NULL },
        { 0, CMD_SCREEN_PLAY, NULL },
        { 0, CMD_SCREEN_FILE, NULL },
+#ifdef ENABLE_ARTIST_SCREEN
+       { 0, CMD_SCREEN_ARTIST, NULL },
+#endif
 #ifdef ENABLE_SEARCH_SCREEN
        { 0, CMD_SCREEN_SEARCH, NULL },
 #endif
@@ -82,6 +84,7 @@ static help_text_row_t help_text[] = {
        { 0, CMD_LIST_RFIND_NEXT, NULL },
        { 0, CMD_TOGGLE_FIND_WRAP, NULL },
        { 0, CMD_LOCATE, NULL },
+       { 0, CMD_VIEW, NULL },
        { 0, CMD_NONE, NULL },
        { 0, CMD_QUIT, NULL },
 
@@ -142,7 +145,7 @@ static help_text_row_t help_text[] = {
 static list_window_t *lw;
 
 static const char *
-list_callback(unsigned idx, int *highlight, mpd_unused void *data)
+list_callback(unsigned idx, bool *highlight, G_GNUC_UNUSED void *data)
 {
        static char buf[512];
 
@@ -150,7 +153,7 @@ list_callback(unsigned idx, int *highlight, mpd_unused void *data)
                return NULL;
 
        if (help_text[idx].highlight)
-               *highlight = 1;
+               *highlight = true;
 
        if (help_text[idx].command == CMD_NONE) {
                if (help_text[idx].text)
@@ -183,7 +186,7 @@ static void
 help_init(WINDOW *w, int cols, int rows)
 {
   lw = list_window_init(w, cols, rows);
-  lw->flags = LW_HIDE_CURSOR;
+       lw->hide_cursor = true;
 }
 
 static void
@@ -201,7 +204,7 @@ help_exit(void)
 
 
 static const char *
-help_title(mpd_unused char *str, mpd_unused size_t size)
+help_title(G_GNUC_UNUSED char *str, G_GNUC_UNUSED size_t size)
 {
        return _("Help");
 }
@@ -213,7 +216,7 @@ help_paint(void)
 }
 
 static bool
-help_cmd(mpd_unused mpdclient_t *c, command_t cmd)
+help_cmd(G_GNUC_UNUSED mpdclient_t *c, command_t cmd)
 {
        if (list_window_scroll_cmd(lw, help_text_rows, cmd)) {
                list_window_paint(lw, list_callback, NULL);