diff options
author | Kalle Wallin <kaw@linux.se> | 2004-11-15 11:23:11 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2004-11-15 11:23:11 +0000 |
commit | e3c905a56bcc1fed3848485201a4a434aa9fc162 (patch) | |
tree | aed87e32dc8c39473fa86b3d11d2048a06ac055f /src/screen.c | |
parent | 41d25e22f8b3fabc954d5b58db6d1d36706aa418 (diff) | |
download | mpd-e3c905a56bcc1fed3848485201a4a434aa9fc162.tar.gz mpd-e3c905a56bcc1fed3848485201a4a434aa9fc162.tar.xz mpd-e3c905a56bcc1fed3848485201a4a434aa9fc162.zip |
Added a search screen
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2668 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c index e390720b8..be4865f04 100644 --- a/src/screen.c +++ b/src/screen.c @@ -47,11 +47,14 @@ #define SCREEN_HELP_ID 100 #define SCREEN_KEYDEF_ID 101 #define SCREEN_CLOCK_ID 102 +#define SCREEN_SEARCH_ID 103 + /* screens */ extern screen_functions_t *get_screen_playlist(void); extern screen_functions_t *get_screen_browse(void); extern screen_functions_t *get_screen_help(void); +extern screen_functions_t *get_screen_search(void); extern screen_functions_t *get_screen_keydef(void); extern screen_functions_t *get_screen_clock(void); @@ -69,6 +72,9 @@ static screen_mode_info_t screens[] = { { SCREEN_PLAYLIST_ID, "playlist", get_screen_playlist }, { SCREEN_BROWSE_ID, "browse", get_screen_browse }, { SCREEN_HELP_ID, "help", get_screen_help }, +#ifdef ENABLE_SEARCH_SCREEN + { SCREEN_SEARCH_ID, "search", get_screen_search }, +#endif #ifdef ENABLE_KEYDEF_SCREEN { SCREEN_KEYDEF_ID, "keydef", get_screen_keydef }, #endif @@ -169,7 +175,13 @@ paint_top_window(char *header, mpdclient_t *c, int clear) colors_use(w, COLOR_TITLE_BOLD); waddstr(w, get_key_names(CMD_SCREEN_FILE, FALSE)); colors_use(w, COLOR_TITLE); - waddstr(w, _(":Browse")); + waddstr(w, _(":Browse ")); +#ifdef ENABLE_SEARCH_SCREEN + colors_use(w, COLOR_TITLE_BOLD); + waddstr(w, get_key_names(CMD_SCREEN_SEARCH, FALSE)); + colors_use(w, COLOR_TITLE); + waddstr(w, _(":Search ")); +#endif } if( c->status->volume==MPD_STATUS_NO_VOLUME ) { @@ -873,6 +885,9 @@ screen_cmd(mpdclient_t *c, command_t cmd) case CMD_SCREEN_HELP: switch_screen_mode(SCREEN_HELP_ID, c); break; + case CMD_SCREEN_SEARCH: + switch_screen_mode(SCREEN_SEARCH_ID, c); + break; case CMD_SCREEN_KEYDEF: switch_screen_mode(SCREEN_KEYDEF_ID, c); break; |