add config option to disable text scrolling in header window

This commit is contained in:
Andrzej Rybczak
2009-06-04 12:13:49 +02:00
parent 5cbc6dfb5b
commit 1e340211be
5 changed files with 13 additions and 0 deletions

View File

@@ -333,6 +333,8 @@ const std::basic_string<my_char_t> &Scroller(const string &str, size_t width, si
static std::basic_string<my_char_t> result;
result.clear();
std::basic_string<my_char_t> s = TO_WSTRING(str);
if (!Config.header_text_scrolling)
return (result = s);
size_t len;
# ifdef _UTF8
len = Window::Length(s);

View File

@@ -263,6 +263,7 @@ void DefaultConfiguration(ncmpcpp_config &conf)
conf.columns_in_browser = false;
conf.columns_in_search_engine = false;
conf.header_visibility = true;
conf.header_text_scrolling = true;
conf.statusbar_visibility = true;
conf.autocenter_mode = false;
conf.wrapped_search = true;
@@ -616,6 +617,10 @@ void ReadConfiguration(ncmpcpp_config &conf)
{
conf.header_visibility = v == "yes";
}
else if (cl.find("header_text_scrolling") != string::npos)
{
conf.header_text_scrolling = v == "yes";
}
else if (cl.find("statusbar_visibility") != string::npos)
{
conf.statusbar_visibility = v == "yes";

View File

@@ -154,6 +154,7 @@ struct ncmpcpp_config
bool columns_in_search_engine;
bool set_window_title;
bool header_visibility;
bool header_text_scrolling;
bool statusbar_visibility;
bool autocenter_mode;
bool wrapped_search;