add config option to disable text scrolling in header window
This commit is contained in:
@@ -147,6 +147,8 @@
|
|||||||
#
|
#
|
||||||
#statusbar_visibility = "yes"
|
#statusbar_visibility = "yes"
|
||||||
#
|
#
|
||||||
|
#header_text_scrolling = "yes"
|
||||||
|
#
|
||||||
#fancy_scrolling = "yes"
|
#fancy_scrolling = "yes"
|
||||||
#
|
#
|
||||||
#cyclic_scrolling = "no"
|
#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
|
.B colors_enabled = yes/no
|
||||||
No need to describe it, huh?
|
No need to describe it, huh?
|
||||||
.TP
|
.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
|
.B fancy_scrolling = yes/no
|
||||||
If enabled, content of other columns will be updated immediately while scrolling, otherwise only after you stop scrolling.
|
If enabled, content of other columns will be updated immediately while scrolling, otherwise only after you stop scrolling.
|
||||||
.TP
|
.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;
|
static std::basic_string<my_char_t> result;
|
||||||
result.clear();
|
result.clear();
|
||||||
std::basic_string<my_char_t> s = TO_WSTRING(str);
|
std::basic_string<my_char_t> s = TO_WSTRING(str);
|
||||||
|
if (!Config.header_text_scrolling)
|
||||||
|
return (result = s);
|
||||||
size_t len;
|
size_t len;
|
||||||
# ifdef _UTF8
|
# ifdef _UTF8
|
||||||
len = Window::Length(s);
|
len = Window::Length(s);
|
||||||
|
|||||||
@@ -263,6 +263,7 @@ void DefaultConfiguration(ncmpcpp_config &conf)
|
|||||||
conf.columns_in_browser = false;
|
conf.columns_in_browser = false;
|
||||||
conf.columns_in_search_engine = false;
|
conf.columns_in_search_engine = false;
|
||||||
conf.header_visibility = true;
|
conf.header_visibility = true;
|
||||||
|
conf.header_text_scrolling = true;
|
||||||
conf.statusbar_visibility = true;
|
conf.statusbar_visibility = true;
|
||||||
conf.autocenter_mode = false;
|
conf.autocenter_mode = false;
|
||||||
conf.wrapped_search = true;
|
conf.wrapped_search = true;
|
||||||
@@ -616,6 +617,10 @@ void ReadConfiguration(ncmpcpp_config &conf)
|
|||||||
{
|
{
|
||||||
conf.header_visibility = v == "yes";
|
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)
|
else if (cl.find("statusbar_visibility") != string::npos)
|
||||||
{
|
{
|
||||||
conf.statusbar_visibility = v == "yes";
|
conf.statusbar_visibility = v == "yes";
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ struct ncmpcpp_config
|
|||||||
bool columns_in_search_engine;
|
bool columns_in_search_engine;
|
||||||
bool set_window_title;
|
bool set_window_title;
|
||||||
bool header_visibility;
|
bool header_visibility;
|
||||||
|
bool header_text_scrolling;
|
||||||
bool statusbar_visibility;
|
bool statusbar_visibility;
|
||||||
bool autocenter_mode;
|
bool autocenter_mode;
|
||||||
bool wrapped_search;
|
bool wrapped_search;
|
||||||
|
|||||||
Reference in New Issue
Block a user