make displaying screens numbers at start optional

This commit is contained in:
Andrzej Rybczak
2008-12-16 16:22:11 +01:00
parent e4ce0d9c95
commit c6a57511fe
4 changed files with 11 additions and 4 deletions

View File

@@ -136,6 +136,8 @@
# #
#ncmpc_like_songs_adding = "no" (enabled - add/remove, disabled - always add) #ncmpc_like_songs_adding = "no" (enabled - add/remove, disabled - always add)
# #
#display_screens_numbers_on_start = "yes"
#
#enable_window_title = "yes" #enable_window_title = "yes"
# #
##### colors definitions ##### ##### colors definitions #####

View File

@@ -341,7 +341,7 @@ int main(int argc, char *argv[])
Song sought_pattern; Song sought_pattern;
bool main_exit = 0; bool main_exit = 0;
bool title_allowed = 1; bool title_allowed = !Config.display_screens_numbers_on_start;
string lyrics_title; string lyrics_title;
string info_title; string info_title;
@@ -449,11 +449,10 @@ int main(int argc, char *argv[])
} }
else else
{ {
string screens = "[.b]1:[/b]Help [.b]2:[/b]Playlist [.b]3:[/b]Browse [.b]4:[/b]Search [.b]5:[/b]Library [.b]6:[/b]Playlist editor"; *wHeader << XY(0, 0) << fmtBold << 1 << fmtBoldEnd << ":Help " << fmtBold << 2 << fmtBoldEnd << ":Playlist " << fmtBold << 3 << fmtBoldEnd << ":Browse " << fmtBold << 4 << fmtBoldEnd << ":Search " << fmtBold << 5 << fmtBoldEnd << ":Library " << fmtBold << 6 << fmtBoldEnd << ":Playlist editor";
# ifdef HAVE_TAGLIB_H # ifdef HAVE_TAGLIB_H
screens += " [.b]7:[/b]Tag editor"; *wHeader << " " << fmtBold << 7 << fmtBoldEnd << ":Tag editor";
# endif // HAVE_TAGLIB_H # endif // HAVE_TAGLIB_H
wHeader->WriteXY(0, 0, 1, "%s", screens.c_str());
} }
wHeader->SetColor(Config.volume_color); wHeader->SetColor(Config.volume_color);

View File

@@ -271,6 +271,7 @@ void DefaultConfiguration(ncmpcpp_config &conf)
conf.now_playing_lyrics = false; conf.now_playing_lyrics = false;
conf.local_browser = false; conf.local_browser = false;
conf.search_in_db = true; conf.search_in_db = true;
conf.display_screens_numbers_on_start = true;
conf.set_window_title = true; conf.set_window_title = true;
conf.mpd_port = 6600; conf.mpd_port = 6600;
conf.mpd_connection_timeout = 15; conf.mpd_connection_timeout = 15;
@@ -666,6 +667,10 @@ void ReadConfiguration(ncmpcpp_config &conf)
{ {
conf.search_in_db = v == "database"; conf.search_in_db = v == "database";
} }
else if (cl.find("display_screens_numbers_on_start") != string::npos)
{
conf.display_screens_numbers_on_start = v == "yes";
}
else if (cl.find("enable_window_title") != string::npos) else if (cl.find("enable_window_title") != string::npos)
{ {
conf.set_window_title = v == "yes"; conf.set_window_title = v == "yes";

View File

@@ -145,6 +145,7 @@ struct ncmpcpp_config
bool now_playing_lyrics; bool now_playing_lyrics;
bool local_browser; bool local_browser;
bool search_in_db; bool search_in_db;
bool display_screens_numbers_on_start;
int mpd_port; int mpd_port;
int mpd_connection_timeout; int mpd_connection_timeout;