add a few informational messages

This commit is contained in:
Andrzej Rybczak
2012-08-14 19:17:49 +02:00
parent 2096181eb1
commit b7999b499f
4 changed files with 11 additions and 10 deletions

View File

@@ -2058,15 +2058,16 @@ void ToggleFindMode::Run()
ShowMessage("Search mode: %s", Config.wrapped_search ? "Wrapped" : "Normal");
}
bool ToggleReplayGainMode::canBeRun() const
{
return Mpd.Version() >= 16;
}
void ToggleReplayGainMode::Run()
{
using Global::wFooter;
if (Mpd.Version() < 16)
{
ShowMessage("Replay gain mode control is supported in MPD >= 0.16.0");
return;
}
LockStatusbar();
Statusbar() << "Replay gain mode? [" << fmtBold << 'o' << fmtBoldEnd << "ff/" << fmtBold << 't' << fmtBoldEnd << "rack/" << fmtBold << 'a' << fmtBoldEnd << "lbum]";
wFooter->Refresh();

View File

@@ -645,7 +645,6 @@ struct ToggleFindMode : public Action
struct ToggleReplayGainMode : public Action
{
ToggleReplayGainMode() : Action(aToggleReplayGainMode, "toggle_replay_gain_mode") { }
virtual bool canBeRun() const;
virtual void Run();
};

View File

@@ -515,7 +515,10 @@ void Browser::ClearDirectory(const std::string &path) const
void Browser::ChangeBrowseMode()
{
if (Mpd.GetHostname()[0] != '/')
{
ShowMessage("For browsing local filesystem connection to MPD via UNIX Socket is required");
return;
}
itsBrowseLocally = !itsBrowseLocally;
ShowMessage("Browse mode: %s", itsBrowseLocally ? "Local filesystem" : "MPD database");

View File

@@ -227,7 +227,6 @@ void Help::GetKeybindings()
KeyDesc(aToggleRandom, "Toggle random mode");
KeyDesc(aToggleSingle, "Toggle single mode");
KeyDesc(aToggleConsume, "Toggle consume mode");
if (Mpd.Version() >= 16)
KeyDesc(aToggleReplayGainMode, "Toggle replay gain mode");
KeyDesc(aToggleBitrateVisibility, "Toggle bitrate visibility");
KeyDesc(aShuffle, "Shuffle playlist");
@@ -291,7 +290,6 @@ void Help::GetKeybindings()
# endif // HAVE_TAGLIB_H
KeyDesc(aEditDirectoryName, "Edit directory name");
KeyDesc(aEditPlaylistName, "Edit playlist name");
if (Mpd.GetHostname()[0] == '/') // are we connected to unix socket?
KeyDesc(aShowBrowser, "Browse MPD database/local filesystem");
KeyDesc(aToggleBrowserSortMode, "Toggle sort mode");
KeyDesc(aJumpToPlayingSong, "Locate playing song");