add option media_library_disable_two_column_mode
This commit is contained in:
@@ -323,6 +323,8 @@
|
||||
#
|
||||
#media_library_display_date = "yes"
|
||||
#
|
||||
#media_library_disable_two_column_mode = "no"
|
||||
#
|
||||
#enable_window_title = "yes"
|
||||
#
|
||||
##
|
||||
|
||||
@@ -264,6 +264,9 @@ If enabled, tag editor will number tracks using format xx/yy (where xx is the cu
|
||||
.B media_library_display_date = yes/no
|
||||
If enabled, dates of albums in media library will be displayed and respected in searching, otherwise not.
|
||||
.TP
|
||||
.B media_library_disable_two_column_mode = yes/no
|
||||
If enabled, pressing the key for the media library twice won't switch it to two column mode.
|
||||
.TP
|
||||
.B enable_window_title = yes/no
|
||||
If enabled, ncmpcpp will override current window title with its own one.
|
||||
.TP
|
||||
|
||||
@@ -258,6 +258,7 @@ void Help::GetKeybindings()
|
||||
|
||||
|
||||
*w << "\n\n " << fmtBold << "Keys - Media library\n -----------------------------------------\n" << fmtBoldEnd;
|
||||
if (!Config.media_library_disable_two_column_mode)
|
||||
*w << DisplayKeys(Key.MediaLibrary) << "Switch between two/three columns\n";
|
||||
*w << DisplayKeys(&Key.VolumeDown[0], 1) << "Previous column\n";
|
||||
*w << DisplayKeys(&Key.VolumeUp[0], 1) << "Next column\n";
|
||||
|
||||
@@ -125,7 +125,7 @@ void MediaLibrary::Refresh()
|
||||
|
||||
void MediaLibrary::SwitchTo()
|
||||
{
|
||||
if (myScreen == this)
|
||||
if (myScreen == this && !Config.media_library_disable_two_column_mode)
|
||||
{
|
||||
hasTwoColumns = !hasTwoColumns;
|
||||
hasToBeResized = 1;
|
||||
|
||||
@@ -373,6 +373,7 @@ void DefaultConfiguration(ncmpcpp_config &conf)
|
||||
conf.browser_sort_by_mtime = false;
|
||||
conf.tag_editor_extended_numeration = false;
|
||||
conf.media_library_display_date = true;
|
||||
conf.media_library_disable_two_column_mode = false;
|
||||
conf.discard_colors_if_item_is_selected = true;
|
||||
conf.set_window_title = true;
|
||||
conf.mpd_port = 6600;
|
||||
@@ -953,6 +954,10 @@ void ReadConfiguration(ncmpcpp_config &conf)
|
||||
{
|
||||
conf.media_library_display_date = v == "yes";
|
||||
}
|
||||
else if (cl.find("media_library_disable_two_column_mode") != std::string::npos)
|
||||
{
|
||||
conf.media_library_disable_two_column_mode = v == "yes";
|
||||
}
|
||||
else if (cl.find("discard_colors_if_item_is_selected") != std::string::npos)
|
||||
{
|
||||
conf.discard_colors_if_item_is_selected = v == "yes";
|
||||
|
||||
@@ -220,6 +220,7 @@ struct ncmpcpp_config
|
||||
bool browser_sort_by_mtime;
|
||||
bool tag_editor_extended_numeration;
|
||||
bool media_library_display_date;
|
||||
bool media_library_disable_two_column_mode;
|
||||
bool discard_colors_if_item_is_selected;
|
||||
|
||||
int mpd_port;
|
||||
|
||||
Reference in New Issue
Block a user