make displaying volume level in statusbar optional
This commit is contained in:
@@ -314,6 +314,8 @@
|
||||
#
|
||||
#clock_display_seconds = "no"
|
||||
#
|
||||
#display_volume_level = "yes"
|
||||
#
|
||||
#display_bitrate = "no"
|
||||
#
|
||||
#display_remaining_time = "no"
|
||||
|
||||
@@ -240,6 +240,9 @@ If enabled, user will be asked if he really wants to clear the main playlist aft
|
||||
.B clock_display_seconds = yes/no
|
||||
If enabled, clock will display time in format hh:mm:ss, otherwise hh:mm.
|
||||
.TP
|
||||
.B display_volume_level = yes/no
|
||||
If enabled, volume level will be displayed in statusbar, otherwise not.
|
||||
.TP
|
||||
.B display_bitrate = yes/no
|
||||
If enabled, bitrate of currently playing song will be displayed in statusbar.
|
||||
.TP
|
||||
|
||||
@@ -357,6 +357,7 @@ void NcmpcppConfig::SetDefaults()
|
||||
display_screens_numbers_on_start = true;
|
||||
jump_to_now_playing_song_at_start = true;
|
||||
clock_display_seconds = false;
|
||||
display_volume_level = true;
|
||||
display_bitrate = false;
|
||||
display_remaining_time = false;
|
||||
ignore_leading_the = false;
|
||||
@@ -907,6 +908,10 @@ void NcmpcppConfig::Read()
|
||||
{
|
||||
clock_display_seconds = v == "yes";
|
||||
}
|
||||
else if (cl.find("display_volume_level") != std::string::npos)
|
||||
{
|
||||
display_volume_level = v == "yes";
|
||||
}
|
||||
else if (cl.find("display_bitrate") != std::string::npos)
|
||||
{
|
||||
display_bitrate = v == "yes";
|
||||
|
||||
@@ -210,6 +210,7 @@ struct NcmpcppConfig
|
||||
bool display_screens_numbers_on_start;
|
||||
bool jump_to_now_playing_song_at_start;
|
||||
bool clock_display_seconds;
|
||||
bool display_volume_level;
|
||||
bool display_bitrate;
|
||||
bool display_remaining_time;
|
||||
bool ignore_leading_the;
|
||||
|
||||
@@ -600,7 +600,7 @@ void NcmpcppStatusChanged(MPD::Connection *, MPD::StatusChanges changed, void *)
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
if (changed.Volume && (Config.header_visibility || Config.new_design))
|
||||
if (changed.Volume && Config.display_volume_level && (Config.header_visibility || Config.new_design))
|
||||
{
|
||||
VolumeState = Config.new_design ? " Vol: " : " Volume: ";
|
||||
int volume = Mpd.GetVolume();
|
||||
|
||||
Reference in New Issue
Block a user