change keybinding for changing browse mode

I shouldn't do that, but the old one will be much better for
choosing whether songs in browser have to be sorted by names
or modification date. Besides, binding this to browser key
makes browser behaviour more "compatible" with media library.
This commit is contained in:
Andrzej Rybczak
2009-10-10 22:28:10 +02:00
parent 3867b131ef
commit b48133a743
3 changed files with 6 additions and 7 deletions

View File

@@ -72,7 +72,12 @@ void Browser::Resize()
void Browser::SwitchTo() void Browser::SwitchTo()
{ {
if (myScreen == this) if (myScreen == this)
{
# ifndef WIN32
myBrowser->ChangeBrowseMode();
# endif // !WIN32
return; return;
}
if (!isInitialized) if (!isInitialized)
Init(); Init();

View File

@@ -229,7 +229,7 @@ void Help::GetKeybindings()
*w << DisplayKeys(Key.EditTags) << "Rename playlist/directory\n"; *w << DisplayKeys(Key.EditTags) << "Rename playlist/directory\n";
# endif // HAVE_TAGLIB_H # endif // HAVE_TAGLIB_H
if (Mpd.GetHostname()[0] == '/') // are we connected to unix socket? if (Mpd.GetHostname()[0] == '/') // are we connected to unix socket?
*w << DisplayKeys(Key.SwitchTagTypeList)<< "Browse MPD database/local filesystem\n"; *w << DisplayKeys(Key.Browser) << "Browse MPD database/local filesystem\n";
*w << DisplayKeys(Key.GoToNowPlaying) << "Locate currently playing song\n"; *w << DisplayKeys(Key.GoToNowPlaying) << "Locate currently playing song\n";
*w << DisplayKeys(Key.GoToParentDir) << "Go to parent directory\n"; *w << DisplayKeys(Key.GoToParentDir) << "Go to parent directory\n";
*w << DisplayKeys(Key.Delete) << "Delete playlist/file/directory\n"; *w << DisplayKeys(Key.Delete) << "Delete playlist/file/directory\n";

View File

@@ -1808,12 +1808,6 @@ int main(int argc, char *argv[])
if (number && Mpd.AddRandomSongs(number)) if (number && Mpd.AddRandomSongs(number))
ShowMessage("%zu random song%s added to playlist!", number, number == 1 ? "" : "s"); ShowMessage("%zu random song%s added to playlist!", number, number == 1 ? "" : "s");
} }
# ifndef WIN32
else if (myScreen == myBrowser)
{
myBrowser->ChangeBrowseMode();
}
# endif // !WIN32
else if (myScreen->ActiveWindow() == myLibrary->Artists else if (myScreen->ActiveWindow() == myLibrary->Artists
|| (myLibrary->Columns() == 2 && myScreen->ActiveWindow() == myLibrary->Albums)) || (myLibrary->Columns() == 2 && myScreen->ActiveWindow() == myLibrary->Albums))
{ {