X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fscreen_search.c;h=81ca8e4840c3fe7e9a71e753575146b152c78fad;hb=a023de1cdf0ebcd19b1236c4132175402fc7d4b6;hp=781dd0c24b1d7f5b075d367e9c5126ae03285512;hpb=447adfd0291eaeccef5661431f6d62811fa23c57;p=ncmpc.git diff --git a/src/screen_search.c b/src/screen_search.c index 781dd0c..81ca8e4 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -1,25 +1,25 @@ /* ncmpc (Ncurses MPD Client) - * (c) 2004-2009 The Music Player Daemon Project + * (c) 2004-2010 The Music Player Daemon Project * Project homepage: http://musicpd.org - + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ + */ #include "screen_search.h" #include "screen_interface.h" -#include "screen_message.h" +#include "screen_status.h" #include "screen.h" #include "i18n.h" #include "options.h" @@ -36,6 +36,7 @@ enum { SEARCH_URI = MPD_TAG_COUNT + 100, + SEARCH_ARTIST_TITLE }; static const struct { @@ -72,8 +73,6 @@ search_get_tag_id(const char *name) return -1; } -#define SEARCH_ARTIST_TITLE 999 - typedef struct { enum mpd_tag_type table; const char *label; @@ -83,7 +82,7 @@ static search_type_t mode[] = { { MPD_TAG_TITLE, N_("Title") }, { MPD_TAG_ARTIST, N_("Artist") }, { MPD_TAG_ALBUM, N_("Album") }, - { SEARCH_URI, N_("file") }, + { SEARCH_URI, N_("Filename") }, { SEARCH_ARTIST_TITLE, N_("Artist + Title") }, { 0, NULL } }; @@ -383,7 +382,7 @@ screen_search_open(G_GNUC_UNUSED struct mpdclient *c) // search_new(screen, c); // else screen_status_printf(_("Press %s for a new search"), - get_key_names(CMD_SCREEN_SEARCH,0)); + get_key_names(CMD_SCREEN_SEARCH, false)); search_check_mode(); } @@ -417,7 +416,7 @@ screen_search_get_title(char *str, size_t size) _(mode[options.search_mode].label)); else g_snprintf(str, size, _("Search: Press %s for a new search [%s]"), - get_key_names(CMD_SCREEN_SEARCH,0), + get_key_names(CMD_SCREEN_SEARCH, false), _(mode[options.search_mode].label)); return str; @@ -426,7 +425,7 @@ screen_search_get_title(char *str, size_t size) static void screen_search_update(struct mpdclient *c) { - if (browser.filelist != NULL && c->events & MPD_IDLE_PLAYLIST) { + if (browser.filelist != NULL && c->events & MPD_IDLE_QUEUE) { screen_browser_sync_highlights(browser.filelist, &c->playlist); search_repaint(); }