add config option to disable text scrolling in header window
This commit is contained in:
@@ -147,6 +147,8 @@
|
||||
#
|
||||
#statusbar_visibility = "yes"
|
||||
#
|
||||
#header_text_scrolling = "yes"
|
||||
#
|
||||
#fancy_scrolling = "yes"
|
||||
#
|
||||
#cyclic_scrolling = "no"
|
||||
|
||||
@@ -120,6 +120,9 @@ One of colors used in Song info, Tiny tag editor and Search engine.
|
||||
.B colors_enabled = yes/no
|
||||
No need to describe it, huh?
|
||||
.TP
|
||||
.B header_text_scrolling = yes/no
|
||||
If enabled, text in header window will scroll if its length is longer then actual screen width, otherwise it won't.
|
||||
.TP
|
||||
.B fancy_scrolling = yes/no
|
||||
If enabled, content of other columns will be updated immediately while scrolling, otherwise only after you stop scrolling.
|
||||
.TP
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user