actions: make ActionType enum class
This commit is contained in:
@@ -69,7 +69,7 @@ namespace {//
|
|||||||
|
|
||||||
enum class Find { Forward, Backward };
|
enum class Find { Forward, Backward };
|
||||||
|
|
||||||
std::map<ActionType, Actions::BaseAction *> AvailableActions;
|
std::map<Actions::Type, Actions::BaseAction *> AvailableActions;
|
||||||
|
|
||||||
void populateActions();
|
void populateActions();
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ bool isMPDMusicDirSet()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseAction *get(ActionType at)
|
BaseAction *get(Actions::Type at)
|
||||||
{
|
{
|
||||||
if (AvailableActions.empty())
|
if (AvailableActions.empty())
|
||||||
populateActions();
|
populateActions();
|
||||||
@@ -2566,8 +2566,8 @@ void seek()
|
|||||||
int old_timeout = wFooter->getTimeout();
|
int old_timeout = wFooter->getTimeout();
|
||||||
wFooter->setTimeout(500);
|
wFooter->setTimeout(500);
|
||||||
|
|
||||||
auto seekForward = Actions::get(aSeekForward);
|
auto seekForward = Actions::get(Actions::Type::SeekForward);
|
||||||
auto seekBackward = Actions::get(aSeekBackward);
|
auto seekBackward = Actions::get(Actions::Type::SeekBackward);
|
||||||
|
|
||||||
SeekingInProgress = true;
|
SeekingInProgress = true;
|
||||||
while (true)
|
while (true)
|
||||||
|
|||||||
308
src/actions.h
308
src/actions.h
File diff suppressed because it is too large
Load Diff
246
src/bindings.cpp
246
src/bindings.cpp
@@ -337,258 +337,258 @@ void BindingsConfiguration::generateDefaults()
|
|||||||
{
|
{
|
||||||
Key k = Key::noOp;
|
Key k = Key::noOp;
|
||||||
if (notBound(k = stringToKey("mouse")))
|
if (notBound(k = stringToKey("mouse")))
|
||||||
bind(k, aMouseEvent);
|
bind(k, Actions::Type::MouseEvent);
|
||||||
if (notBound(k = stringToKey("up")))
|
if (notBound(k = stringToKey("up")))
|
||||||
bind(k, aScrollUp);
|
bind(k, Actions::Type::ScrollUp);
|
||||||
if (notBound(k = stringToKey("down")))
|
if (notBound(k = stringToKey("down")))
|
||||||
bind(k, aScrollDown);
|
bind(k, Actions::Type::ScrollDown);
|
||||||
if (notBound(k = stringToKey("[")))
|
if (notBound(k = stringToKey("[")))
|
||||||
bind(k, aScrollUpAlbum);
|
bind(k, Actions::Type::ScrollUpAlbum);
|
||||||
if (notBound(k = stringToKey("]")))
|
if (notBound(k = stringToKey("]")))
|
||||||
bind(k, aScrollDownAlbum);
|
bind(k, Actions::Type::ScrollDownAlbum);
|
||||||
if (notBound(k = stringToKey("{")))
|
if (notBound(k = stringToKey("{")))
|
||||||
bind(k, aScrollUpArtist);
|
bind(k, Actions::Type::ScrollUpArtist);
|
||||||
if (notBound(k = stringToKey("}")))
|
if (notBound(k = stringToKey("}")))
|
||||||
bind(k, aScrollDownArtist);
|
bind(k, Actions::Type::ScrollDownArtist);
|
||||||
if (notBound(k = stringToKey("page_up")))
|
if (notBound(k = stringToKey("page_up")))
|
||||||
bind(k, aPageUp);
|
bind(k, Actions::Type::PageUp);
|
||||||
if (notBound(k = stringToKey("page_down")))
|
if (notBound(k = stringToKey("page_down")))
|
||||||
bind(k, aPageDown);
|
bind(k, Actions::Type::PageDown);
|
||||||
if (notBound(k = stringToKey("home")))
|
if (notBound(k = stringToKey("home")))
|
||||||
bind(k, aMoveHome);
|
bind(k, Actions::Type::MoveHome);
|
||||||
if (notBound(k = stringToKey("end")))
|
if (notBound(k = stringToKey("end")))
|
||||||
bind(k, aMoveEnd);
|
bind(k, Actions::Type::MoveEnd);
|
||||||
if (notBound(k = stringToKey("space")))
|
if (notBound(k = stringToKey("space")))
|
||||||
bind(k, aPressSpace);
|
bind(k, Actions::Type::PressSpace);
|
||||||
if (notBound(k = stringToKey("enter")))
|
if (notBound(k = stringToKey("enter")))
|
||||||
bind(k, aPressEnter);
|
bind(k, Actions::Type::PressEnter);
|
||||||
if (notBound(k = stringToKey("delete")))
|
if (notBound(k = stringToKey("delete")))
|
||||||
{
|
{
|
||||||
bind(k, aDeletePlaylistItems);
|
bind(k, Actions::Type::DeletePlaylistItems);
|
||||||
bind(k, aDeleteStoredPlaylist);
|
bind(k, Actions::Type::DeleteStoredPlaylist);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("right")))
|
if (notBound(k = stringToKey("right")))
|
||||||
{
|
{
|
||||||
bind(k, aNextColumn);
|
bind(k, Actions::Type::NextColumn);
|
||||||
bind(k, aSlaveScreen);
|
bind(k, Actions::Type::SlaveScreen);
|
||||||
bind(k, aVolumeUp);
|
bind(k, Actions::Type::VolumeUp);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("+")))
|
if (notBound(k = stringToKey("+")))
|
||||||
bind(k, aVolumeUp);
|
bind(k, Actions::Type::VolumeUp);
|
||||||
if (notBound(k = stringToKey("left")))
|
if (notBound(k = stringToKey("left")))
|
||||||
{
|
{
|
||||||
bind(k, aPreviousColumn);
|
bind(k, Actions::Type::PreviousColumn);
|
||||||
bind(k, aMasterScreen);
|
bind(k, Actions::Type::MasterScreen);
|
||||||
bind(k, aVolumeDown);
|
bind(k, Actions::Type::VolumeDown);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("-")))
|
if (notBound(k = stringToKey("-")))
|
||||||
bind(k, aVolumeDown);
|
bind(k, Actions::Type::VolumeDown);
|
||||||
if (notBound(k = stringToKey(":")))
|
if (notBound(k = stringToKey(":")))
|
||||||
bind(k, aExecuteCommand);
|
bind(k, Actions::Type::ExecuteCommand);
|
||||||
if (notBound(k = stringToKey("tab")))
|
if (notBound(k = stringToKey("tab")))
|
||||||
bind(k, aNextScreen);
|
bind(k, Actions::Type::NextScreen);
|
||||||
if (notBound(k = stringToKey("shift_tab")))
|
if (notBound(k = stringToKey("shift_tab")))
|
||||||
bind(k, aPreviousScreen);
|
bind(k, Actions::Type::PreviousScreen);
|
||||||
if (notBound(k = stringToKey("f1")))
|
if (notBound(k = stringToKey("f1")))
|
||||||
bind(k, aShowHelp);
|
bind(k, Actions::Type::ShowHelp);
|
||||||
if (notBound(k = stringToKey("1")))
|
if (notBound(k = stringToKey("1")))
|
||||||
bind(k, aShowPlaylist);
|
bind(k, Actions::Type::ShowPlaylist);
|
||||||
if (notBound(k = stringToKey("2")))
|
if (notBound(k = stringToKey("2")))
|
||||||
{
|
{
|
||||||
bind(k, aShowBrowser);
|
bind(k, Actions::Type::ShowBrowser);
|
||||||
bind(k, aChangeBrowseMode);
|
bind(k, Actions::Type::ChangeBrowseMode);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("3")))
|
if (notBound(k = stringToKey("3")))
|
||||||
{
|
{
|
||||||
bind(k, aShowSearchEngine);
|
bind(k, Actions::Type::ShowSearchEngine);
|
||||||
bind(k, aResetSearchEngine);
|
bind(k, Actions::Type::ResetSearchEngine);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("4")))
|
if (notBound(k = stringToKey("4")))
|
||||||
{
|
{
|
||||||
bind(k, aShowMediaLibrary);
|
bind(k, Actions::Type::ShowMediaLibrary);
|
||||||
bind(k, aToggleMediaLibraryColumnsMode);
|
bind(k, Actions::Type::ToggleMediaLibraryColumnsMode);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("5")))
|
if (notBound(k = stringToKey("5")))
|
||||||
bind(k, aShowPlaylistEditor);
|
bind(k, Actions::Type::ShowPlaylistEditor);
|
||||||
if (notBound(k = stringToKey("6")))
|
if (notBound(k = stringToKey("6")))
|
||||||
bind(k, aShowTagEditor);
|
bind(k, Actions::Type::ShowTagEditor);
|
||||||
if (notBound(k = stringToKey("7")))
|
if (notBound(k = stringToKey("7")))
|
||||||
bind(k, aShowOutputs);
|
bind(k, Actions::Type::ShowOutputs);
|
||||||
if (notBound(k = stringToKey("8")))
|
if (notBound(k = stringToKey("8")))
|
||||||
bind(k, aShowVisualizer);
|
bind(k, Actions::Type::ShowVisualizer);
|
||||||
if (notBound(k = stringToKey("=")))
|
if (notBound(k = stringToKey("=")))
|
||||||
bind(k, aShowClock);
|
bind(k, Actions::Type::ShowClock);
|
||||||
if (notBound(k = stringToKey("@")))
|
if (notBound(k = stringToKey("@")))
|
||||||
bind(k, aShowServerInfo);
|
bind(k, Actions::Type::ShowServerInfo);
|
||||||
if (notBound(k = stringToKey("s")))
|
if (notBound(k = stringToKey("s")))
|
||||||
bind(k, aStop);
|
bind(k, Actions::Type::Stop);
|
||||||
if (notBound(k = stringToKey("p")))
|
if (notBound(k = stringToKey("p")))
|
||||||
bind(k, aPause);
|
bind(k, Actions::Type::Pause);
|
||||||
if (notBound(k = stringToKey(">")))
|
if (notBound(k = stringToKey(">")))
|
||||||
bind(k, aNext);
|
bind(k, Actions::Type::Next);
|
||||||
if (notBound(k = stringToKey("<")))
|
if (notBound(k = stringToKey("<")))
|
||||||
bind(k, aPrevious);
|
bind(k, Actions::Type::Previous);
|
||||||
if (notBound(k = stringToKey("ctrl_h")))
|
if (notBound(k = stringToKey("ctrl_h")))
|
||||||
{
|
{
|
||||||
bind(k, aJumpToParentDirectory);
|
bind(k, Actions::Type::JumpToParentDirectory);
|
||||||
bind(k, aReplaySong);
|
bind(k, Actions::Type::ReplaySong);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("backspace")))
|
if (notBound(k = stringToKey("backspace")))
|
||||||
{
|
{
|
||||||
bind(k, aJumpToParentDirectory);
|
bind(k, Actions::Type::JumpToParentDirectory);
|
||||||
bind(k, aReplaySong);
|
bind(k, Actions::Type::ReplaySong);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("backspace_2")))
|
if (notBound(k = stringToKey("backspace_2")))
|
||||||
{
|
{
|
||||||
bind(k, aJumpToParentDirectory);
|
bind(k, Actions::Type::JumpToParentDirectory);
|
||||||
bind(k, aReplaySong);
|
bind(k, Actions::Type::ReplaySong);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("f")))
|
if (notBound(k = stringToKey("f")))
|
||||||
bind(k, aSeekForward);
|
bind(k, Actions::Type::SeekForward);
|
||||||
if (notBound(k = stringToKey("b")))
|
if (notBound(k = stringToKey("b")))
|
||||||
bind(k, aSeekBackward);
|
bind(k, Actions::Type::SeekBackward);
|
||||||
if (notBound(k = stringToKey("r")))
|
if (notBound(k = stringToKey("r")))
|
||||||
bind(k, aToggleRepeat);
|
bind(k, Actions::Type::ToggleRepeat);
|
||||||
if (notBound(k = stringToKey("z")))
|
if (notBound(k = stringToKey("z")))
|
||||||
bind(k, aToggleRandom);
|
bind(k, Actions::Type::ToggleRandom);
|
||||||
if (notBound(k = stringToKey("y")))
|
if (notBound(k = stringToKey("y")))
|
||||||
{
|
{
|
||||||
bind(k, aSaveTagChanges);
|
bind(k, Actions::Type::SaveTagChanges);
|
||||||
bind(k, aStartSearching);
|
bind(k, Actions::Type::StartSearching);
|
||||||
bind(k, aToggleSingle);
|
bind(k, Actions::Type::ToggleSingle);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("R")))
|
if (notBound(k = stringToKey("R")))
|
||||||
bind(k, aToggleConsume);
|
bind(k, Actions::Type::ToggleConsume);
|
||||||
if (notBound(k = stringToKey("Y")))
|
if (notBound(k = stringToKey("Y")))
|
||||||
bind(k, aToggleReplayGainMode);
|
bind(k, Actions::Type::ToggleReplayGainMode);
|
||||||
if (notBound(k = stringToKey("t")))
|
if (notBound(k = stringToKey("t")))
|
||||||
bind(k, aToggleSpaceMode);
|
bind(k, Actions::Type::ToggleSpaceMode);
|
||||||
if (notBound(k = stringToKey("T")))
|
if (notBound(k = stringToKey("T")))
|
||||||
bind(k, aToggleAddMode);
|
bind(k, Actions::Type::ToggleAddMode);
|
||||||
if (notBound(k = stringToKey("|")))
|
if (notBound(k = stringToKey("|")))
|
||||||
bind(k, aToggleMouse);
|
bind(k, Actions::Type::ToggleMouse);
|
||||||
if (notBound(k = stringToKey("#")))
|
if (notBound(k = stringToKey("#")))
|
||||||
bind(k, aToggleBitrateVisibility);
|
bind(k, Actions::Type::ToggleBitrateVisibility);
|
||||||
if (notBound(k = stringToKey("Z")))
|
if (notBound(k = stringToKey("Z")))
|
||||||
bind(k, aShuffle);
|
bind(k, Actions::Type::Shuffle);
|
||||||
if (notBound(k = stringToKey("x")))
|
if (notBound(k = stringToKey("x")))
|
||||||
bind(k, aToggleCrossfade);
|
bind(k, Actions::Type::ToggleCrossfade);
|
||||||
if (notBound(k = stringToKey("X")))
|
if (notBound(k = stringToKey("X")))
|
||||||
bind(k, aSetCrossfade);
|
bind(k, Actions::Type::SetCrossfade);
|
||||||
if (notBound(k = stringToKey("u")))
|
if (notBound(k = stringToKey("u")))
|
||||||
bind(k, aUpdateDatabase);
|
bind(k, Actions::Type::UpdateDatabase);
|
||||||
if (notBound(k = stringToKey("ctrl_v")))
|
if (notBound(k = stringToKey("ctrl_v")))
|
||||||
bind(k, aSortPlaylist);
|
bind(k, Actions::Type::SortPlaylist);
|
||||||
if (notBound(k = stringToKey("ctrl_r")))
|
if (notBound(k = stringToKey("ctrl_r")))
|
||||||
bind(k, aReversePlaylist);
|
bind(k, Actions::Type::ReversePlaylist);
|
||||||
if (notBound(k = stringToKey("ctrl_f")))
|
if (notBound(k = stringToKey("ctrl_f")))
|
||||||
bind(k, aApplyFilter);
|
bind(k, Actions::Type::ApplyFilter);
|
||||||
if (notBound(k = stringToKey("/")))
|
if (notBound(k = stringToKey("/")))
|
||||||
{
|
{
|
||||||
bind(k, aFind);
|
bind(k, Actions::Type::Find);
|
||||||
bind(k, aFindItemForward);
|
bind(k, Actions::Type::FindItemForward);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("?")))
|
if (notBound(k = stringToKey("?")))
|
||||||
{
|
{
|
||||||
bind(k, aFind);
|
bind(k, Actions::Type::Find);
|
||||||
bind(k, aFindItemBackward);
|
bind(k, Actions::Type::FindItemBackward);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey(".")))
|
if (notBound(k = stringToKey(".")))
|
||||||
bind(k, aNextFoundItem);
|
bind(k, Actions::Type::NextFoundItem);
|
||||||
if (notBound(k = stringToKey(",")))
|
if (notBound(k = stringToKey(",")))
|
||||||
bind(k, aPreviousFoundItem);
|
bind(k, Actions::Type::PreviousFoundItem);
|
||||||
if (notBound(k = stringToKey("w")))
|
if (notBound(k = stringToKey("w")))
|
||||||
bind(k, aToggleFindMode);
|
bind(k, Actions::Type::ToggleFindMode);
|
||||||
if (notBound(k = stringToKey("e")))
|
if (notBound(k = stringToKey("e")))
|
||||||
{
|
{
|
||||||
bind(k, aEditSong);
|
bind(k, Actions::Type::EditSong);
|
||||||
bind(k, aEditLibraryTag);
|
bind(k, Actions::Type::EditLibraryTag);
|
||||||
bind(k, aEditLibraryAlbum);
|
bind(k, Actions::Type::EditLibraryAlbum);
|
||||||
bind(k, aEditDirectoryName);
|
bind(k, Actions::Type::EditDirectoryName);
|
||||||
bind(k, aEditPlaylistName);
|
bind(k, Actions::Type::EditPlaylistName);
|
||||||
bind(k, aEditLyrics);
|
bind(k, Actions::Type::EditLyrics);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("i")))
|
if (notBound(k = stringToKey("i")))
|
||||||
bind(k, aShowSongInfo);
|
bind(k, Actions::Type::ShowSongInfo);
|
||||||
if (notBound(k = stringToKey("I")))
|
if (notBound(k = stringToKey("I")))
|
||||||
bind(k, aShowArtistInfo);
|
bind(k, Actions::Type::ShowArtistInfo);
|
||||||
if (notBound(k = stringToKey("g")))
|
if (notBound(k = stringToKey("g")))
|
||||||
bind(k, aJumpToPositionInSong);
|
bind(k, Actions::Type::JumpToPositionInSong);
|
||||||
if (notBound(k = stringToKey("l")))
|
if (notBound(k = stringToKey("l")))
|
||||||
bind(k, aShowLyrics);
|
bind(k, Actions::Type::ShowLyrics);
|
||||||
if (notBound(k = stringToKey("v")))
|
if (notBound(k = stringToKey("v")))
|
||||||
bind(k, aReverseSelection);
|
bind(k, Actions::Type::ReverseSelection);
|
||||||
if (notBound(k = stringToKey("V")))
|
if (notBound(k = stringToKey("V")))
|
||||||
bind(k, aRemoveSelection);
|
bind(k, Actions::Type::RemoveSelection);
|
||||||
if (notBound(k = stringToKey("B")))
|
if (notBound(k = stringToKey("B")))
|
||||||
bind(k, aSelectAlbum);
|
bind(k, Actions::Type::SelectAlbum);
|
||||||
if (notBound(k = stringToKey("a")))
|
if (notBound(k = stringToKey("a")))
|
||||||
bind(k, aAddSelectedItems);
|
bind(k, Actions::Type::AddSelectedItems);
|
||||||
if (notBound(k = stringToKey("c")))
|
if (notBound(k = stringToKey("c")))
|
||||||
{
|
{
|
||||||
bind(k, aClearPlaylist);
|
bind(k, Actions::Type::ClearPlaylist);
|
||||||
bind(k, aClearMainPlaylist);
|
bind(k, Actions::Type::ClearMainPlaylist);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("C")))
|
if (notBound(k = stringToKey("C")))
|
||||||
{
|
{
|
||||||
bind(k, aCropPlaylist);
|
bind(k, Actions::Type::CropPlaylist);
|
||||||
bind(k, aCropMainPlaylist);
|
bind(k, Actions::Type::CropMainPlaylist);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("m")))
|
if (notBound(k = stringToKey("m")))
|
||||||
{
|
{
|
||||||
bind(k, aMoveSortOrderUp);
|
bind(k, Actions::Type::MoveSortOrderUp);
|
||||||
bind(k, aMoveSelectedItemsUp);
|
bind(k, Actions::Type::MoveSelectedItemsUp);
|
||||||
bind(k, aToggleMediaLibrarySortMode);
|
bind(k, Actions::Type::ToggleMediaLibrarySortMode);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("n")))
|
if (notBound(k = stringToKey("n")))
|
||||||
{
|
{
|
||||||
bind(k, aMoveSortOrderDown);
|
bind(k, Actions::Type::MoveSortOrderDown);
|
||||||
bind(k, aMoveSelectedItemsDown);
|
bind(k, Actions::Type::MoveSelectedItemsDown);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("M")))
|
if (notBound(k = stringToKey("M")))
|
||||||
bind(k, aMoveSelectedItemsTo);
|
bind(k, Actions::Type::MoveSelectedItemsTo);
|
||||||
if (notBound(k = stringToKey("A")))
|
if (notBound(k = stringToKey("A")))
|
||||||
bind(k, aAdd);
|
bind(k, Actions::Type::Add);
|
||||||
if (notBound(k = stringToKey("S")))
|
if (notBound(k = stringToKey("S")))
|
||||||
bind(k, aSavePlaylist);
|
bind(k, Actions::Type::SavePlaylist);
|
||||||
if (notBound(k = stringToKey("o")))
|
if (notBound(k = stringToKey("o")))
|
||||||
bind(k, aJumpToPlayingSong);
|
bind(k, Actions::Type::JumpToPlayingSong);
|
||||||
if (notBound(k = stringToKey("G")))
|
if (notBound(k = stringToKey("G")))
|
||||||
{
|
{
|
||||||
bind(k, aJumpToBrowser);
|
bind(k, Actions::Type::JumpToBrowser);
|
||||||
bind(k, aJumpToPlaylistEditor);
|
bind(k, Actions::Type::JumpToPlaylistEditor);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("~")))
|
if (notBound(k = stringToKey("~")))
|
||||||
bind(k, aJumpToMediaLibrary);
|
bind(k, Actions::Type::JumpToMediaLibrary);
|
||||||
if (notBound(k = stringToKey("E")))
|
if (notBound(k = stringToKey("E")))
|
||||||
bind(k, aJumpToTagEditor);
|
bind(k, Actions::Type::JumpToTagEditor);
|
||||||
if (notBound(k = stringToKey("U")))
|
if (notBound(k = stringToKey("U")))
|
||||||
bind(k, aTogglePlayingSongCentering);
|
bind(k, Actions::Type::TogglePlayingSongCentering);
|
||||||
if (notBound(k = stringToKey("P")))
|
if (notBound(k = stringToKey("P")))
|
||||||
bind(k, aToggleDisplayMode);
|
bind(k, Actions::Type::ToggleDisplayMode);
|
||||||
if (notBound(k = stringToKey("\\")))
|
if (notBound(k = stringToKey("\\")))
|
||||||
bind(k, aToggleInterface);
|
bind(k, Actions::Type::ToggleInterface);
|
||||||
if (notBound(k = stringToKey("!")))
|
if (notBound(k = stringToKey("!")))
|
||||||
bind(k, aToggleSeparatorsBetweenAlbums);
|
bind(k, Actions::Type::ToggleSeparatorsBetweenAlbums);
|
||||||
if (notBound(k = stringToKey("L")))
|
if (notBound(k = stringToKey("L")))
|
||||||
bind(k, aToggleLyricsFetcher);
|
bind(k, Actions::Type::ToggleLyricsFetcher);
|
||||||
if (notBound(k = stringToKey("F")))
|
if (notBound(k = stringToKey("F")))
|
||||||
bind(k, aToggleFetchingLyricsInBackground);
|
bind(k, Actions::Type::ToggleFetchingLyricsInBackground);
|
||||||
if (notBound(k = stringToKey("ctrl_l")))
|
if (notBound(k = stringToKey("ctrl_l")))
|
||||||
bind(k, aToggleScreenLock);
|
bind(k, Actions::Type::ToggleScreenLock);
|
||||||
if (notBound(k = stringToKey("`")))
|
if (notBound(k = stringToKey("`")))
|
||||||
{
|
{
|
||||||
bind(k, aToggleBrowserSortMode);
|
bind(k, Actions::Type::ToggleBrowserSortMode);
|
||||||
bind(k, aToggleLibraryTagType);
|
bind(k, Actions::Type::ToggleLibraryTagType);
|
||||||
bind(k, aRefetchLyrics);
|
bind(k, Actions::Type::RefetchLyrics);
|
||||||
bind(k, aRefetchArtistInfo);
|
bind(k, Actions::Type::RefetchArtistInfo);
|
||||||
bind(k, aAddRandomItems);
|
bind(k, Actions::Type::AddRandomItems);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("ctrl_p")))
|
if (notBound(k = stringToKey("ctrl_p")))
|
||||||
bind(k, aSetSelectedItemsPriority);
|
bind(k, Actions::Type::SetSelectedItemsPriority);
|
||||||
if (notBound(k = stringToKey("q")))
|
if (notBound(k = stringToKey("q")))
|
||||||
bind(k, aQuit);
|
bind(k, Actions::Type::Quit);
|
||||||
|
|
||||||
if (notBound(k = stringToKey("-")))
|
if (notBound(k = stringToKey("-")))
|
||||||
bind(k, aVolumeDown);
|
bind(k, Actions::Type::VolumeDown);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ struct Binding
|
|||||||
{
|
{
|
||||||
typedef std::vector<Actions::BaseAction *> ActionChain;
|
typedef std::vector<Actions::BaseAction *> ActionChain;
|
||||||
|
|
||||||
Binding(ActionType at) : m_is_single(true), m_action(Actions::get(at)) { }
|
Binding(Actions::Type at) : m_is_single(true), m_action(Actions::get(at)) { }
|
||||||
Binding(const ActionChain &actions) {
|
Binding(const ActionChain &actions) {
|
||||||
assert(actions.size() > 0);
|
assert(actions.size() > 0);
|
||||||
if (actions.size() == 1) {
|
if (actions.size() == 1) {
|
||||||
|
|||||||
290
src/help.cpp
290
src/help.cpp
@@ -123,7 +123,7 @@ std::wstring Help::title()
|
|||||||
return L"Help";
|
return L"Help";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Help::DisplayKeys(const ActionType at)
|
std::string Help::DisplayKeys(const Actions::Type at)
|
||||||
{
|
{
|
||||||
bool print_backspace = true;
|
bool print_backspace = true;
|
||||||
std::string result;
|
std::string result;
|
||||||
@@ -148,7 +148,7 @@ void Help::Section(const char *type_, const char *title_)
|
|||||||
w << title_ << NC::fmtBoldEnd << "\n\n";
|
w << title_ << NC::fmtBoldEnd << "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
void Help::KeyDesc(const ActionType at, const char *desc)
|
void Help::KeyDesc(const Actions::Type at, const char *desc)
|
||||||
{
|
{
|
||||||
w << " " << DisplayKeys(at) << " : " << desc << '\n';
|
w << " " << DisplayKeys(at) << " : " << desc << '\n';
|
||||||
}
|
}
|
||||||
@@ -168,212 +168,212 @@ void Help::MouseColumn(const char *column)
|
|||||||
void Help::GetKeybindings()
|
void Help::GetKeybindings()
|
||||||
{
|
{
|
||||||
KeysSection("Movement");
|
KeysSection("Movement");
|
||||||
KeyDesc(aScrollUp, "Move cursor up");
|
KeyDesc(Actions::Type::ScrollUp, "Move cursor up");
|
||||||
KeyDesc(aScrollDown, "Move cursor down");
|
KeyDesc(Actions::Type::ScrollDown, "Move cursor down");
|
||||||
KeyDesc(aScrollUpAlbum, "Move cursor up one album");
|
KeyDesc(Actions::Type::ScrollUpAlbum, "Move cursor up one album");
|
||||||
KeyDesc(aScrollDownAlbum, "Move cursor down one album");
|
KeyDesc(Actions::Type::ScrollDownAlbum, "Move cursor down one album");
|
||||||
KeyDesc(aScrollUpArtist, "Move cursor up one artist");
|
KeyDesc(Actions::Type::ScrollUpArtist, "Move cursor up one artist");
|
||||||
KeyDesc(aScrollDownArtist, "Move cursor down one artist");
|
KeyDesc(Actions::Type::ScrollDownArtist, "Move cursor down one artist");
|
||||||
KeyDesc(aPageUp, "Page up");
|
KeyDesc(Actions::Type::PageUp, "Page up");
|
||||||
KeyDesc(aPageDown, "Page down");
|
KeyDesc(Actions::Type::PageDown, "Page down");
|
||||||
KeyDesc(aMoveHome, "Home");
|
KeyDesc(Actions::Type::MoveHome, "Home");
|
||||||
KeyDesc(aMoveEnd, "End");
|
KeyDesc(Actions::Type::MoveEnd, "End");
|
||||||
w << '\n';
|
w << '\n';
|
||||||
if (Config.screen_switcher_previous)
|
if (Config.screen_switcher_previous)
|
||||||
{
|
{
|
||||||
KeyDesc(aNextScreen, "Switch between current and last screen");
|
KeyDesc(Actions::Type::NextScreen, "Switch between current and last screen");
|
||||||
KeyDesc(aPreviousScreen, "Switch between current and last screen");
|
KeyDesc(Actions::Type::PreviousScreen, "Switch between current and last screen");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KeyDesc(aNextScreen, "Switch to next screen in sequence");
|
KeyDesc(Actions::Type::NextScreen, "Switch to next screen in sequence");
|
||||||
KeyDesc(aPreviousScreen, "Switch to previous screen in sequence");
|
KeyDesc(Actions::Type::PreviousScreen, "Switch to previous screen in sequence");
|
||||||
}
|
}
|
||||||
KeyDesc(aShowHelp, "Show help");
|
KeyDesc(Actions::Type::ShowHelp, "Show help");
|
||||||
KeyDesc(aShowPlaylist, "Show playlist");
|
KeyDesc(Actions::Type::ShowPlaylist, "Show playlist");
|
||||||
KeyDesc(aShowBrowser, "Show browser");
|
KeyDesc(Actions::Type::ShowBrowser, "Show browser");
|
||||||
KeyDesc(aShowSearchEngine, "Show search engine");
|
KeyDesc(Actions::Type::ShowSearchEngine, "Show search engine");
|
||||||
KeyDesc(aShowMediaLibrary, "Show media library");
|
KeyDesc(Actions::Type::ShowMediaLibrary, "Show media library");
|
||||||
KeyDesc(aShowPlaylistEditor, "Show playlist editor");
|
KeyDesc(Actions::Type::ShowPlaylistEditor, "Show playlist editor");
|
||||||
# ifdef HAVE_TAGLIB_H
|
# ifdef HAVE_TAGLIB_H
|
||||||
KeyDesc(aShowTagEditor, "Show tag editor");
|
KeyDesc(Actions::Type::ShowTagEditor, "Show tag editor");
|
||||||
# endif // HAVE_TAGLIB_H
|
# endif // HAVE_TAGLIB_H
|
||||||
# ifdef ENABLE_OUTPUTS
|
# ifdef ENABLE_OUTPUTS
|
||||||
KeyDesc(aShowOutputs, "Show outputs");
|
KeyDesc(Actions::Type::ShowOutputs, "Show outputs");
|
||||||
# endif // ENABLE_OUTPUTS
|
# endif // ENABLE_OUTPUTS
|
||||||
# ifdef ENABLE_VISUALIZER
|
# ifdef ENABLE_VISUALIZER
|
||||||
KeyDesc(aShowVisualizer, "Show music visualizer");
|
KeyDesc(Actions::Type::ShowVisualizer, "Show music visualizer");
|
||||||
# endif // ENABLE_VISUALIZER
|
# endif // ENABLE_VISUALIZER
|
||||||
# ifdef ENABLE_CLOCK
|
# ifdef ENABLE_CLOCK
|
||||||
KeyDesc(aShowClock, "Show clock");
|
KeyDesc(Actions::Type::ShowClock, "Show clock");
|
||||||
# endif // ENABLE_CLOCK
|
# endif // ENABLE_CLOCK
|
||||||
w << '\n';
|
w << '\n';
|
||||||
KeyDesc(aShowServerInfo, "Show server info");
|
KeyDesc(Actions::Type::ShowServerInfo, "Show server info");
|
||||||
|
|
||||||
KeysSection("Global");
|
KeysSection("Global");
|
||||||
KeyDesc(aStop, "Stop");
|
KeyDesc(Actions::Type::Stop, "Stop");
|
||||||
KeyDesc(aPause, "Pause");
|
KeyDesc(Actions::Type::Pause, "Pause");
|
||||||
KeyDesc(aNext, "Next track");
|
KeyDesc(Actions::Type::Next, "Next track");
|
||||||
KeyDesc(aPrevious, "Previous track");
|
KeyDesc(Actions::Type::Previous, "Previous track");
|
||||||
KeyDesc(aReplaySong, "Replay playing song");
|
KeyDesc(Actions::Type::ReplaySong, "Replay playing song");
|
||||||
KeyDesc(aSeekForward, "Seek forward in playing song");
|
KeyDesc(Actions::Type::SeekForward, "Seek forward in playing song");
|
||||||
KeyDesc(aSeekBackward, "Seek backward in playing song");
|
KeyDesc(Actions::Type::SeekBackward, "Seek backward in playing song");
|
||||||
KeyDesc(aVolumeDown, "Decrease volume by 2%");
|
KeyDesc(Actions::Type::VolumeDown, "Decrease volume by 2%");
|
||||||
KeyDesc(aVolumeUp, "Increase volume by 2%");
|
KeyDesc(Actions::Type::VolumeUp, "Increase volume by 2%");
|
||||||
w << '\n';
|
w << '\n';
|
||||||
KeyDesc(aToggleSpaceMode, "Toggle space mode (select/add)");
|
KeyDesc(Actions::Type::ToggleSpaceMode, "Toggle space mode (select/add)");
|
||||||
KeyDesc(aToggleAddMode, "Toggle add mode (add or remove/always add)");
|
KeyDesc(Actions::Type::ToggleAddMode, "Toggle add mode (add or remove/always add)");
|
||||||
KeyDesc(aToggleMouse, "Toggle mouse support");
|
KeyDesc(Actions::Type::ToggleMouse, "Toggle mouse support");
|
||||||
KeyDesc(aReverseSelection, "Reverse selection");
|
KeyDesc(Actions::Type::ReverseSelection, "Reverse selection");
|
||||||
KeyDesc(aRemoveSelection, "Remove selection");
|
KeyDesc(Actions::Type::RemoveSelection, "Remove selection");
|
||||||
KeyDesc(aSelectAlbum, "Select songs of album around the cursor");
|
KeyDesc(Actions::Type::SelectAlbum, "Select songs of album around the cursor");
|
||||||
KeyDesc(aAddSelectedItems, "Add selected items to playlist");
|
KeyDesc(Actions::Type::AddSelectedItems, "Add selected items to playlist");
|
||||||
KeyDesc(aAddRandomItems, "Add random items to playlist");
|
KeyDesc(Actions::Type::AddRandomItems, "Add random items to playlist");
|
||||||
w << '\n';
|
w << '\n';
|
||||||
KeyDesc(aToggleRepeat, "Toggle repeat mode");
|
KeyDesc(Actions::Type::ToggleRepeat, "Toggle repeat mode");
|
||||||
KeyDesc(aToggleRandom, "Toggle random mode");
|
KeyDesc(Actions::Type::ToggleRandom, "Toggle random mode");
|
||||||
KeyDesc(aToggleSingle, "Toggle single mode");
|
KeyDesc(Actions::Type::ToggleSingle, "Toggle single mode");
|
||||||
KeyDesc(aToggleConsume, "Toggle consume mode");
|
KeyDesc(Actions::Type::ToggleConsume, "Toggle consume mode");
|
||||||
KeyDesc(aToggleReplayGainMode, "Toggle replay gain mode");
|
KeyDesc(Actions::Type::ToggleReplayGainMode, "Toggle replay gain mode");
|
||||||
KeyDesc(aToggleBitrateVisibility, "Toggle bitrate visibility");
|
KeyDesc(Actions::Type::ToggleBitrateVisibility, "Toggle bitrate visibility");
|
||||||
KeyDesc(aShuffle, "Shuffle playlist");
|
KeyDesc(Actions::Type::Shuffle, "Shuffle playlist");
|
||||||
KeyDesc(aToggleCrossfade, "Toggle crossfade mode");
|
KeyDesc(Actions::Type::ToggleCrossfade, "Toggle crossfade mode");
|
||||||
KeyDesc(aSetCrossfade, "Set crossfade");
|
KeyDesc(Actions::Type::SetCrossfade, "Set crossfade");
|
||||||
KeyDesc(aUpdateDatabase, "Start music database update");
|
KeyDesc(Actions::Type::UpdateDatabase, "Start music database update");
|
||||||
w << '\n';
|
w << '\n';
|
||||||
KeyDesc(aExecuteCommand, "Execute command");
|
KeyDesc(Actions::Type::ExecuteCommand, "Execute command");
|
||||||
KeyDesc(aApplyFilter, "Apply filter");
|
KeyDesc(Actions::Type::ApplyFilter, "Apply filter");
|
||||||
KeyDesc(aFindItemForward, "Find item forward");
|
KeyDesc(Actions::Type::FindItemForward, "Find item forward");
|
||||||
KeyDesc(aFindItemBackward, "Find item backward");
|
KeyDesc(Actions::Type::FindItemBackward, "Find item backward");
|
||||||
KeyDesc(aPreviousFoundItem, "Jump to previous found item");
|
KeyDesc(Actions::Type::PreviousFoundItem, "Jump to previous found item");
|
||||||
KeyDesc(aNextFoundItem, "Jump to next found item");
|
KeyDesc(Actions::Type::NextFoundItem, "Jump to next found item");
|
||||||
KeyDesc(aToggleFindMode, "Toggle find mode (normal/wrapped)");
|
KeyDesc(Actions::Type::ToggleFindMode, "Toggle find mode (normal/wrapped)");
|
||||||
KeyDesc(aJumpToBrowser, "Locate song in browser");
|
KeyDesc(Actions::Type::JumpToBrowser, "Locate song in browser");
|
||||||
KeyDesc(aJumpToMediaLibrary, "Locate song in media library");
|
KeyDesc(Actions::Type::JumpToMediaLibrary, "Locate song in media library");
|
||||||
KeyDesc(aToggleScreenLock, "Lock/unlock current screen");
|
KeyDesc(Actions::Type::ToggleScreenLock, "Lock/unlock current screen");
|
||||||
KeyDesc(aMasterScreen, "Switch to master screen (left one)");
|
KeyDesc(Actions::Type::MasterScreen, "Switch to master screen (left one)");
|
||||||
KeyDesc(aSlaveScreen, "Switch to slave screen (right one)");
|
KeyDesc(Actions::Type::SlaveScreen, "Switch to slave screen (right one)");
|
||||||
# ifdef HAVE_TAGLIB_H
|
# ifdef HAVE_TAGLIB_H
|
||||||
KeyDesc(aJumpToTagEditor, "Locate song in tag editor");
|
KeyDesc(Actions::Type::JumpToTagEditor, "Locate song in tag editor");
|
||||||
# endif // HAVE_TAGLIB_H
|
# endif // HAVE_TAGLIB_H
|
||||||
KeyDesc(aToggleDisplayMode, "Toggle display mode");
|
KeyDesc(Actions::Type::ToggleDisplayMode, "Toggle display mode");
|
||||||
KeyDesc(aToggleInterface, "Toggle user interface");
|
KeyDesc(Actions::Type::ToggleInterface, "Toggle user interface");
|
||||||
KeyDesc(aToggleSeparatorsBetweenAlbums, "Toggle displaying separators between albums");
|
KeyDesc(Actions::Type::ToggleSeparatorsBetweenAlbums, "Toggle displaying separators between albums");
|
||||||
KeyDesc(aJumpToPositionInSong, "Jump to given position in playing song (formats: mm:ss, x%)");
|
KeyDesc(Actions::Type::JumpToPositionInSong, "Jump to given position in playing song (formats: mm:ss, x%)");
|
||||||
KeyDesc(aShowSongInfo, "Show song info");
|
KeyDesc(Actions::Type::ShowSongInfo, "Show song info");
|
||||||
# ifdef HAVE_CURL_CURL_H
|
# ifdef HAVE_CURL_CURL_H
|
||||||
KeyDesc(aShowArtistInfo, "Show artist info");
|
KeyDesc(Actions::Type::ShowArtistInfo, "Show artist info");
|
||||||
KeyDesc(aToggleLyricsFetcher, "Toggle lyrics fetcher");
|
KeyDesc(Actions::Type::ToggleLyricsFetcher, "Toggle lyrics fetcher");
|
||||||
KeyDesc(aToggleFetchingLyricsInBackground, "Toggle fetching lyrics for playing songs in background");
|
KeyDesc(Actions::Type::ToggleFetchingLyricsInBackground, "Toggle fetching lyrics for playing songs in background");
|
||||||
# endif // HAVE_CURL_CURL_H
|
# endif // HAVE_CURL_CURL_H
|
||||||
KeyDesc(aShowLyrics, "Show/hide song lyrics");
|
KeyDesc(Actions::Type::ShowLyrics, "Show/hide song lyrics");
|
||||||
w << '\n';
|
w << '\n';
|
||||||
KeyDesc(aQuit, "Quit");
|
KeyDesc(Actions::Type::Quit, "Quit");
|
||||||
|
|
||||||
KeysSection("Playlist");
|
KeysSection("Playlist");
|
||||||
KeyDesc(aPressEnter, "Play selected item");
|
KeyDesc(Actions::Type::PressEnter, "Play selected item");
|
||||||
KeyDesc(aDeletePlaylistItems, "Delete selected item(s) from playlist");
|
KeyDesc(Actions::Type::DeletePlaylistItems, "Delete selected item(s) from playlist");
|
||||||
KeyDesc(aClearMainPlaylist, "Clear playlist");
|
KeyDesc(Actions::Type::ClearMainPlaylist, "Clear playlist");
|
||||||
KeyDesc(aCropMainPlaylist, "Clear playlist except selected item(s)");
|
KeyDesc(Actions::Type::CropMainPlaylist, "Clear playlist except selected item(s)");
|
||||||
KeyDesc(aSetSelectedItemsPriority, "Set priority of selected items");
|
KeyDesc(Actions::Type::SetSelectedItemsPriority, "Set priority of selected items");
|
||||||
KeyDesc(aMoveSelectedItemsUp, "Move selected item(s) up");
|
KeyDesc(Actions::Type::MoveSelectedItemsUp, "Move selected item(s) up");
|
||||||
KeyDesc(aMoveSelectedItemsDown, "Move selected item(s) down");
|
KeyDesc(Actions::Type::MoveSelectedItemsDown, "Move selected item(s) down");
|
||||||
KeyDesc(aMoveSelectedItemsTo, "Move selected item(s) to cursor position");
|
KeyDesc(Actions::Type::MoveSelectedItemsTo, "Move selected item(s) to cursor position");
|
||||||
KeyDesc(aAdd, "Add item to playlist");
|
KeyDesc(Actions::Type::Add, "Add item to playlist");
|
||||||
# ifdef HAVE_TAGLIB_H
|
# ifdef HAVE_TAGLIB_H
|
||||||
KeyDesc(aEditSong, "Edit song");
|
KeyDesc(Actions::Type::EditSong, "Edit song");
|
||||||
# endif // HAVE_TAGLIB_H
|
# endif // HAVE_TAGLIB_H
|
||||||
KeyDesc(aSavePlaylist, "Save playlist");
|
KeyDesc(Actions::Type::SavePlaylist, "Save playlist");
|
||||||
KeyDesc(aSortPlaylist, "Sort playlist");
|
KeyDesc(Actions::Type::SortPlaylist, "Sort playlist");
|
||||||
KeyDesc(aReversePlaylist, "Reverse playlist");
|
KeyDesc(Actions::Type::ReversePlaylist, "Reverse playlist");
|
||||||
KeyDesc(aFilterPlaylistOnPriorities, "Filter playlist on priorities");
|
KeyDesc(Actions::Type::FilterPlaylistOnPriorities, "Filter playlist on priorities");
|
||||||
KeyDesc(aJumpToPlayingSong, "Jump to playing song");
|
KeyDesc(Actions::Type::JumpToPlayingSong, "Jump to playing song");
|
||||||
KeyDesc(aTogglePlayingSongCentering, "Toggle playing song centering");
|
KeyDesc(Actions::Type::TogglePlayingSongCentering, "Toggle playing song centering");
|
||||||
|
|
||||||
KeysSection("Browser");
|
KeysSection("Browser");
|
||||||
KeyDesc(aPressEnter, "Enter directory/Add item to playlist and play it");
|
KeyDesc(Actions::Type::PressEnter, "Enter directory/Add item to playlist and play it");
|
||||||
KeyDesc(aPressSpace, "Add item to playlist/select it");
|
KeyDesc(Actions::Type::PressSpace, "Add item to playlist/select it");
|
||||||
# ifdef HAVE_TAGLIB_H
|
# ifdef HAVE_TAGLIB_H
|
||||||
KeyDesc(aEditSong, "Edit song");
|
KeyDesc(Actions::Type::EditSong, "Edit song");
|
||||||
# endif // HAVE_TAGLIB_H
|
# endif // HAVE_TAGLIB_H
|
||||||
KeyDesc(aEditDirectoryName, "Edit directory name");
|
KeyDesc(Actions::Type::EditDirectoryName, "Edit directory name");
|
||||||
KeyDesc(aEditPlaylistName, "Edit playlist name");
|
KeyDesc(Actions::Type::EditPlaylistName, "Edit playlist name");
|
||||||
KeyDesc(aChangeBrowseMode, "Browse MPD database/local filesystem");
|
KeyDesc(Actions::Type::ChangeBrowseMode, "Browse MPD database/local filesystem");
|
||||||
KeyDesc(aToggleBrowserSortMode, "Toggle sort mode");
|
KeyDesc(Actions::Type::ToggleBrowserSortMode, "Toggle sort mode");
|
||||||
KeyDesc(aJumpToPlayingSong, "Locate playing song");
|
KeyDesc(Actions::Type::JumpToPlayingSong, "Locate playing song");
|
||||||
KeyDesc(aJumpToParentDirectory, "Jump to parent directory");
|
KeyDesc(Actions::Type::JumpToParentDirectory, "Jump to parent directory");
|
||||||
KeyDesc(aDeleteBrowserItems, "Delete selected items from disk");
|
KeyDesc(Actions::Type::DeleteBrowserItems, "Delete selected items from disk");
|
||||||
KeyDesc(aJumpToPlaylistEditor, "Jump to playlist editor (playlists only)");
|
KeyDesc(Actions::Type::JumpToPlaylistEditor, "Jump to playlist editor (playlists only)");
|
||||||
|
|
||||||
KeysSection("Search engine");
|
KeysSection("Search engine");
|
||||||
KeyDesc(aPressEnter, "Add item to playlist and play it/change option");
|
KeyDesc(Actions::Type::PressEnter, "Add item to playlist and play it/change option");
|
||||||
KeyDesc(aPressSpace, "Add item to playlist");
|
KeyDesc(Actions::Type::PressSpace, "Add item to playlist");
|
||||||
# ifdef HAVE_TAGLIB_H
|
# ifdef HAVE_TAGLIB_H
|
||||||
KeyDesc(aEditSong, "Edit song");
|
KeyDesc(Actions::Type::EditSong, "Edit song");
|
||||||
# endif // HAVE_TAGLIB_H
|
# endif // HAVE_TAGLIB_H
|
||||||
KeyDesc(aStartSearching, "Start searching");
|
KeyDesc(Actions::Type::StartSearching, "Start searching");
|
||||||
KeyDesc(aResetSearchEngine, "Reset search constraints and clear results");
|
KeyDesc(Actions::Type::ResetSearchEngine, "Reset search constraints and clear results");
|
||||||
|
|
||||||
KeysSection("Media library");
|
KeysSection("Media library");
|
||||||
KeyDesc(aToggleMediaLibraryColumnsMode, "Switch between two/three columns mode");
|
KeyDesc(Actions::Type::ToggleMediaLibraryColumnsMode, "Switch between two/three columns mode");
|
||||||
KeyDesc(aPreviousColumn, "Previous column");
|
KeyDesc(Actions::Type::PreviousColumn, "Previous column");
|
||||||
KeyDesc(aNextColumn, "Next column");
|
KeyDesc(Actions::Type::NextColumn, "Next column");
|
||||||
KeyDesc(aPressEnter, "Add item to playlist and play it");
|
KeyDesc(Actions::Type::PressEnter, "Add item to playlist and play it");
|
||||||
KeyDesc(aPressSpace, "Add item to playlist");
|
KeyDesc(Actions::Type::PressSpace, "Add item to playlist");
|
||||||
# ifdef HAVE_TAGLIB_H
|
# ifdef HAVE_TAGLIB_H
|
||||||
KeyDesc(aEditSong, "Edit song");
|
KeyDesc(Actions::Type::EditSong, "Edit song");
|
||||||
# endif // HAVE_TAGLIB_H
|
# endif // HAVE_TAGLIB_H
|
||||||
KeyDesc(aEditLibraryTag, "Edit tag (left column)/album (middle/right column)");
|
KeyDesc(Actions::Type::EditLibraryTag, "Edit tag (left column)/album (middle/right column)");
|
||||||
KeyDesc(aToggleLibraryTagType, "Toggle type of tag used in left column");
|
KeyDesc(Actions::Type::ToggleLibraryTagType, "Toggle type of tag used in left column");
|
||||||
KeyDesc(aToggleMediaLibrarySortMode, "Toggle sort mode");
|
KeyDesc(Actions::Type::ToggleMediaLibrarySortMode, "Toggle sort mode");
|
||||||
|
|
||||||
KeysSection("Playlist editor");
|
KeysSection("Playlist editor");
|
||||||
KeyDesc(aPreviousColumn, "Previous column");
|
KeyDesc(Actions::Type::PreviousColumn, "Previous column");
|
||||||
KeyDesc(aNextColumn, "Next column");
|
KeyDesc(Actions::Type::NextColumn, "Next column");
|
||||||
KeyDesc(aPressEnter, "Add item to playlist and play it");
|
KeyDesc(Actions::Type::PressEnter, "Add item to playlist and play it");
|
||||||
KeyDesc(aPressSpace, "Add item to playlist/select it");
|
KeyDesc(Actions::Type::PressSpace, "Add item to playlist/select it");
|
||||||
# ifdef HAVE_TAGLIB_H
|
# ifdef HAVE_TAGLIB_H
|
||||||
KeyDesc(aEditSong, "Edit song");
|
KeyDesc(Actions::Type::EditSong, "Edit song");
|
||||||
# endif // HAVE_TAGLIB_H
|
# endif // HAVE_TAGLIB_H
|
||||||
KeyDesc(aEditPlaylistName, "Edit playlist name");
|
KeyDesc(Actions::Type::EditPlaylistName, "Edit playlist name");
|
||||||
KeyDesc(aMoveSelectedItemsUp, "Move selected item(s) up");
|
KeyDesc(Actions::Type::MoveSelectedItemsUp, "Move selected item(s) up");
|
||||||
KeyDesc(aMoveSelectedItemsDown, "Move selected item(s) down");
|
KeyDesc(Actions::Type::MoveSelectedItemsDown, "Move selected item(s) down");
|
||||||
KeyDesc(aDeleteStoredPlaylist, "Delete selected playlists (left column)");
|
KeyDesc(Actions::Type::DeleteStoredPlaylist, "Delete selected playlists (left column)");
|
||||||
KeyDesc(aDeletePlaylistItems, "Delete selected item(s) from playlist (right column)");
|
KeyDesc(Actions::Type::DeletePlaylistItems, "Delete selected item(s) from playlist (right column)");
|
||||||
KeyDesc(aClearPlaylist, "Clear playlist");
|
KeyDesc(Actions::Type::ClearPlaylist, "Clear playlist");
|
||||||
KeyDesc(aCropPlaylist, "Clear playlist except selected items");
|
KeyDesc(Actions::Type::CropPlaylist, "Clear playlist except selected items");
|
||||||
|
|
||||||
KeysSection("Lyrics");
|
KeysSection("Lyrics");
|
||||||
KeyDesc(aPressSpace, "Toggle reloading lyrics upon song change");
|
KeyDesc(Actions::Type::PressSpace, "Toggle reloading lyrics upon song change");
|
||||||
KeyDesc(aEditLyrics, "Open lyrics in external editor");
|
KeyDesc(Actions::Type::EditLyrics, "Open lyrics in external editor");
|
||||||
KeyDesc(aRefetchLyrics, "Refetch lyrics");
|
KeyDesc(Actions::Type::RefetchLyrics, "Refetch lyrics");
|
||||||
|
|
||||||
KeysSection("Artist info");
|
KeysSection("Artist info");
|
||||||
KeyDesc(aRefetchArtistInfo, "Refetch artist info");
|
KeyDesc(Actions::Type::RefetchArtistInfo, "Refetch artist info");
|
||||||
|
|
||||||
# ifdef HAVE_TAGLIB_H
|
# ifdef HAVE_TAGLIB_H
|
||||||
KeysSection("Tiny tag editor");
|
KeysSection("Tiny tag editor");
|
||||||
KeyDesc(aPressEnter, "Edit tag");
|
KeyDesc(Actions::Type::PressEnter, "Edit tag");
|
||||||
KeyDesc(aSaveTagChanges, "Save");
|
KeyDesc(Actions::Type::SaveTagChanges, "Save");
|
||||||
|
|
||||||
KeysSection("Tag editor");
|
KeysSection("Tag editor");
|
||||||
KeyDesc(aPressEnter, "Edit tag/filename of selected item (left column)");
|
KeyDesc(Actions::Type::PressEnter, "Edit tag/filename of selected item (left column)");
|
||||||
KeyDesc(aPressEnter, "Perform operation on all/selected items (middle column)");
|
KeyDesc(Actions::Type::PressEnter, "Perform operation on all/selected items (middle column)");
|
||||||
KeyDesc(aPressSpace, "Switch to albums/directories view (left column)");
|
KeyDesc(Actions::Type::PressSpace, "Switch to albums/directories view (left column)");
|
||||||
KeyDesc(aPressSpace, "Select item (right column)");
|
KeyDesc(Actions::Type::PressSpace, "Select item (right column)");
|
||||||
KeyDesc(aPreviousColumn, "Previous column");
|
KeyDesc(Actions::Type::PreviousColumn, "Previous column");
|
||||||
KeyDesc(aNextColumn, "Next column");
|
KeyDesc(Actions::Type::NextColumn, "Next column");
|
||||||
KeyDesc(aJumpToParentDirectory, "Jump to parent directory (left column, directories view)");
|
KeyDesc(Actions::Type::JumpToParentDirectory, "Jump to parent directory (left column, directories view)");
|
||||||
# endif // HAVE_TAGLIB_H
|
# endif // HAVE_TAGLIB_H
|
||||||
|
|
||||||
# ifdef ENABLE_OUTPUTS
|
# ifdef ENABLE_OUTPUTS
|
||||||
KeysSection("Outputs");
|
KeysSection("Outputs");
|
||||||
KeyDesc(aPressEnter, "Toggle output");
|
KeyDesc(Actions::Type::PressEnter, "Toggle output");
|
||||||
# endif // ENABLE_OUTPUTS
|
# endif // ENABLE_OUTPUTS
|
||||||
|
|
||||||
# if defined(ENABLE_VISUALIZER) && defined(HAVE_FFTW3_H)
|
# if defined(ENABLE_VISUALIZER) && defined(HAVE_FFTW3_H)
|
||||||
KeysSection("Music visualizer");
|
KeysSection("Music visualizer");
|
||||||
KeyDesc(aPressSpace, "Toggle visualization type");
|
KeyDesc(Actions::Type::PressSpace, "Toggle visualization type");
|
||||||
# endif // ENABLE_VISUALIZER && HAVE_FFTW3_H
|
# endif // ENABLE_VISUALIZER && HAVE_FFTW3_H
|
||||||
|
|
||||||
MouseSection("Global");
|
MouseSection("Global");
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ private:
|
|||||||
void KeysSection(const char *title_) { Section("Keys", title_); }
|
void KeysSection(const char *title_) { Section("Keys", title_); }
|
||||||
void MouseSection(const char *title_) { Section("Mouse", title_); }
|
void MouseSection(const char *title_) { Section("Mouse", title_); }
|
||||||
void Section(const char *type_, const char *title_);
|
void Section(const char *type_, const char *title_);
|
||||||
void KeyDesc(const ActionType at, const char *desc);
|
void KeyDesc(const Actions::Type at, const char *desc);
|
||||||
void MouseDesc(std::string action, const char *desc, bool indent = false);
|
void MouseDesc(std::string action, const char *desc, bool indent = false);
|
||||||
void MouseColumn(const char *column);
|
void MouseColumn(const char *column);
|
||||||
|
|
||||||
std::string DisplayKeys(const ActionType at);
|
std::string DisplayKeys(const Actions::Type at);
|
||||||
void GetKeybindings();
|
void GetKeybindings();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace Actions {//
|
|||||||
struct PushCharacters : public BaseAction
|
struct PushCharacters : public BaseAction
|
||||||
{
|
{
|
||||||
PushCharacters(NC::Window **w, std::vector<int> &&queue)
|
PushCharacters(NC::Window **w, std::vector<int> &&queue)
|
||||||
: BaseAction(aMacroUtility, ""), m_window(w), m_queue(queue) { }
|
: BaseAction(Type::MacroUtility, ""), m_window(w), m_queue(queue) { }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void run();
|
virtual void run();
|
||||||
@@ -43,7 +43,7 @@ private:
|
|||||||
struct RequireRunnable : public BaseAction
|
struct RequireRunnable : public BaseAction
|
||||||
{
|
{
|
||||||
RequireRunnable(BaseAction *action)
|
RequireRunnable(BaseAction *action)
|
||||||
: BaseAction(aMacroUtility, ""), m_action(action) { assert(action); }
|
: BaseAction(Type::MacroUtility, ""), m_action(action) { assert(action); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool canBeRun() const;
|
virtual bool canBeRun() const;
|
||||||
@@ -56,7 +56,7 @@ private:
|
|||||||
struct RequireScreen : public BaseAction
|
struct RequireScreen : public BaseAction
|
||||||
{
|
{
|
||||||
RequireScreen(ScreenType screen_type)
|
RequireScreen(ScreenType screen_type)
|
||||||
: BaseAction(aMacroUtility, ""), m_screen_type(screen_type) { }
|
: BaseAction(Type::MacroUtility, ""), m_screen_type(screen_type) { }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool canBeRun() const;
|
virtual bool canBeRun() const;
|
||||||
@@ -69,7 +69,7 @@ private:
|
|||||||
struct RunExternalCommand : public BaseAction
|
struct RunExternalCommand : public BaseAction
|
||||||
{
|
{
|
||||||
RunExternalCommand(std::string command)
|
RunExternalCommand(std::string command)
|
||||||
: BaseAction(aMacroUtility, ""), m_command(command) { }
|
: BaseAction(Type::MacroUtility, ""), m_command(command) { }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void run();
|
virtual void run();
|
||||||
|
|||||||
Reference in New Issue
Block a user