From: Max Kellermann Date: Tue, 18 Nov 2008 23:06:12 +0000 (+0100) Subject: screen_song: check CMD_VIEW only if song screen is enabled X-Git-Tag: v0.12_beta1~34 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ddc7120ac09d8760edf31026bd225785583525a7;p=ncmpc.git screen_song: check CMD_VIEW only if song screen is enabled --- diff --git a/src/command.c b/src/command.c index 9dae30b..1071673 100644 --- a/src/command.c +++ b/src/command.c @@ -142,8 +142,10 @@ static command_definition_t cmds[] = { { { '"', 0, 0 }, 0, CMD_GO_PARENT_DIRECTORY, "go-parent-directory", N_("Go to parent directory") }, +#ifdef ENABLE_SONG_SCREEN { { 'i', 0, 0 }, 0, CMD_VIEW, "view", N_("View the song") }, +#endif { { 'G', 0, 0 }, 0, CMD_LOCATE, "locate", N_("Locate song in browser") }, diff --git a/src/screen_browser.c b/src/screen_browser.c index d0a591e..f8493c3 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -529,6 +529,7 @@ browser_cmd(struct screen_browser *browser, return true; #endif +#ifdef ENABLE_SONG_SCREEN case CMD_VIEW: entry = browser_get_selected(browser); if (entry == NULL || entry->entity == NULL || @@ -537,6 +538,7 @@ browser_cmd(struct screen_browser *browser, screen_song_switch(c, entry->entity->info.song); return true; +#endif case CMD_LOCATE: entry = browser_get_selected(browser); diff --git a/src/screen_play.c b/src/screen_play.c index 13b5e74..6cc7277 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -554,6 +554,7 @@ play_cmd(mpdclient_t *c, command_t cmd) return handle_mouse_event(c); #endif +#ifdef ENABLE_SONG_SCREEN case CMD_VIEW: if (lw->selected < playlist_length(&c->playlist)) { screen_song_switch(c, playlist_get(&c->playlist, lw->selected)); @@ -561,6 +562,7 @@ play_cmd(mpdclient_t *c, command_t cmd) } break; +#endif case CMD_LOCATE: if (lw->selected < playlist_length(&c->playlist)) {