actions: adjust names of a few actions to be more descriptive
This commit is contained in:
@@ -637,7 +637,7 @@ void ToggleInterface::Run()
|
||||
ResizeScreen();
|
||||
}
|
||||
|
||||
bool JumpToParentDir::canBeRun() const
|
||||
bool JumpToParentDirectory::canBeRun() const
|
||||
{
|
||||
return (myScreen == myBrowser)
|
||||
# ifdef HAVE_TAGLIB_H
|
||||
@@ -646,7 +646,7 @@ bool JumpToParentDir::canBeRun() const
|
||||
;
|
||||
}
|
||||
|
||||
void JumpToParentDir::Run()
|
||||
void JumpToParentDirectory::Run()
|
||||
{
|
||||
if (myScreen == myBrowser)
|
||||
{
|
||||
@@ -1199,10 +1199,10 @@ void ToggleFetchingLyricsInBackground::Run()
|
||||
# endif // HAVE_CURL_CURL_H
|
||||
}
|
||||
|
||||
void ToggleAutoCenter::Run()
|
||||
void TogglePlayingSongCentering::Run()
|
||||
{
|
||||
Config.autocenter_mode = !Config.autocenter_mode;
|
||||
ShowMessage("Auto center mode: %s", Config.autocenter_mode ? "On" : "Off");
|
||||
ShowMessage("Centering playing song: %s", Config.autocenter_mode ? "On" : "Off");
|
||||
if (Config.autocenter_mode && myPlaylist->isPlaying() && !myPlaylist->Items->isFiltered())
|
||||
myPlaylist->Items->highlight(myPlaylist->NowPlaying);
|
||||
}
|
||||
@@ -2494,7 +2494,7 @@ void populateActions()
|
||||
insertAction(new MoveHome());
|
||||
insertAction(new MoveEnd());
|
||||
insertAction(new ToggleInterface());
|
||||
insertAction(new JumpToParentDir());
|
||||
insertAction(new JumpToParentDirectory());
|
||||
insertAction(new PressEnter());
|
||||
insertAction(new PressSpace());
|
||||
insertAction(new PreviousColumn());
|
||||
@@ -2522,7 +2522,7 @@ void populateActions()
|
||||
insertAction(new ToggleSeparatorsBetweenAlbums());
|
||||
insertAction(new ToggleLyricsFetcher());
|
||||
insertAction(new ToggleFetchingLyricsInBackground());
|
||||
insertAction(new ToggleAutoCenter());
|
||||
insertAction(new TogglePlayingSongCentering());
|
||||
insertAction(new UpdateDatabase());
|
||||
insertAction(new JumpToPlayingSong());
|
||||
insertAction(new ToggleRepeat());
|
||||
|
||||
@@ -29,12 +29,12 @@ enum ActionType
|
||||
{
|
||||
aMacroUtility,
|
||||
aDummy, aMouseEvent, aScrollUp, aScrollDown, aScrollUpArtist, aScrollUpAlbum, aScrollDownArtist,
|
||||
aScrollDownAlbum, aPageUp, aPageDown, aMoveHome, aMoveEnd, aToggleInterface, aJumpToParentDir,
|
||||
aScrollDownAlbum, aPageUp, aPageDown, aMoveHome, aMoveEnd, aToggleInterface, aJumpToParentDirectory,
|
||||
aPressEnter, aPressSpace, aPreviousColumn, aNextColumn, aMasterScreen, aSlaveScreen, aVolumeUp,
|
||||
aVolumeDown, aDelete, aReplaySong, aPreviousSong, aNextSong, aPause, aStop, aSavePlaylist,
|
||||
aVolumeDown, aDelete, aReplaySong, aPrevious, aNext, aPause, aStop, aSavePlaylist,
|
||||
aMoveSortOrderUp, aMoveSortOrderDown, aMoveSelectedItemsUp, aMoveSelectedItemsDown,
|
||||
aMoveSelectedItemsTo, aAdd, aSeekForward, aSeekBackward, aToggleDisplayMode, aToggleSeparatorsBetweenAlbums,
|
||||
aToggleLyricsFetcher, aToggleFetchingLyricsInBackground, aToggleAutoCenter, aUpdateDatabase,
|
||||
aToggleLyricsFetcher, aToggleFetchingLyricsInBackground, aTogglePlayingSongCentering, aUpdateDatabase,
|
||||
aJumpToPlayingSong, aToggleRepeat, aShuffle, aToggleRandom, aStartSearching, aSaveTagChanges,
|
||||
aToggleSingle, aToggleConsume, aToggleCrossfade, aSetCrossfade, aEditSong, aEditLibraryTag,
|
||||
aEditLibraryAlbum, aEditDirectoryName, aEditPlaylistName, aEditLyrics, aJumpToBrowser,
|
||||
@@ -211,15 +211,15 @@ protected:
|
||||
|
||||
struct ToggleInterface : public Action
|
||||
{
|
||||
ToggleInterface() : Action(aToggleInterface, "toggle_inferface") { }
|
||||
ToggleInterface() : Action(aToggleInterface, "toggle_interface") { }
|
||||
|
||||
protected:
|
||||
virtual void Run();
|
||||
};
|
||||
|
||||
struct JumpToParentDir : public Action
|
||||
struct JumpToParentDirectory : public Action
|
||||
{
|
||||
JumpToParentDir() : Action(aJumpToParentDir, "jump_to_parent_dir") { }
|
||||
JumpToParentDirectory() : Action(aJumpToParentDirectory, "jump_to_parent_directory") { }
|
||||
|
||||
protected:
|
||||
virtual bool canBeRun() const;
|
||||
@@ -312,7 +312,7 @@ protected:
|
||||
|
||||
struct PreviousSong : public Action
|
||||
{
|
||||
PreviousSong() : Action(aPreviousSong, "previous") { }
|
||||
PreviousSong() : Action(aPrevious, "previous") { }
|
||||
|
||||
protected:
|
||||
virtual void Run();
|
||||
@@ -320,7 +320,7 @@ protected:
|
||||
|
||||
struct NextSong : public Action
|
||||
{
|
||||
NextSong() : Action(aNextSong, "next") { }
|
||||
NextSong() : Action(aNext, "next") { }
|
||||
|
||||
protected:
|
||||
virtual void Run();
|
||||
@@ -464,9 +464,10 @@ protected:
|
||||
virtual void Run();
|
||||
};
|
||||
|
||||
struct ToggleAutoCenter : public Action
|
||||
struct TogglePlayingSongCentering : public Action
|
||||
{
|
||||
ToggleAutoCenter() : Action(aToggleAutoCenter, "toggle_autocentering") { }
|
||||
TogglePlayingSongCentering()
|
||||
: Action(aTogglePlayingSongCentering, "toggle_playing_song_centering") { }
|
||||
|
||||
protected:
|
||||
virtual void Run();
|
||||
|
||||
@@ -289,12 +289,16 @@ void BindingsConfiguration::generateDefault()
|
||||
bind(k, aSlaveScreen);
|
||||
bind(k, aVolumeUp);
|
||||
}
|
||||
if (notBound(k = stringToKey("+")))
|
||||
bind(k, aVolumeUp);
|
||||
if (notBound(k = stringToKey("left")))
|
||||
{
|
||||
bind(k, aPreviousColumn);
|
||||
bind(k, aMasterScreen);
|
||||
bind(k, aVolumeDown);
|
||||
}
|
||||
if (notBound(k = stringToKey("-")))
|
||||
bind(k, aVolumeDown);
|
||||
if (notBound(k = stringToKey("tab")))
|
||||
bind(k, aNextScreen);
|
||||
if (notBound(k = stringToKey("shift_tab")))
|
||||
@@ -326,22 +330,22 @@ void BindingsConfiguration::generateDefault()
|
||||
if (notBound(k = stringToKey("p")))
|
||||
bind(k, aPause);
|
||||
if (notBound(k = stringToKey(">")))
|
||||
bind(k, aNextSong);
|
||||
bind(k, aNext);
|
||||
if (notBound(k = stringToKey("<")))
|
||||
bind(k, aPreviousSong);
|
||||
bind(k, aPrevious);
|
||||
if (notBound(k = stringToKey("ctrl_h")))
|
||||
{
|
||||
bind(k, aJumpToParentDir);
|
||||
bind(k, aJumpToParentDirectory);
|
||||
bind(k, aReplaySong);
|
||||
}
|
||||
if (notBound(k = stringToKey("backspace")))
|
||||
{
|
||||
bind(k, aJumpToParentDir);
|
||||
bind(k, aJumpToParentDirectory);
|
||||
bind(k, aReplaySong);
|
||||
}
|
||||
if (notBound(k = stringToKey("backspace_2")))
|
||||
{
|
||||
bind(k, aJumpToParentDir);
|
||||
bind(k, aJumpToParentDirectory);
|
||||
bind(k, aReplaySong);
|
||||
}
|
||||
if (notBound(k = stringToKey("f")))
|
||||
@@ -389,7 +393,7 @@ void BindingsConfiguration::generateDefault()
|
||||
bind(k, aFind);
|
||||
bind(k, aFindItemForward);
|
||||
}
|
||||
if (notBound(k = stringToKey("/")))
|
||||
if (notBound(k = stringToKey("?")))
|
||||
{
|
||||
bind(k, aFind);
|
||||
bind(k, aFindItemBackward);
|
||||
@@ -463,7 +467,7 @@ void BindingsConfiguration::generateDefault()
|
||||
if (notBound(k = stringToKey("E")))
|
||||
bind(k, aJumpToTagEditor);
|
||||
if (notBound(k = stringToKey("U")))
|
||||
bind(k, aToggleAutoCenter);
|
||||
bind(k, aTogglePlayingSongCentering);
|
||||
if (notBound(k = stringToKey("P")))
|
||||
bind(k, aToggleDisplayMode);
|
||||
if (notBound(k = stringToKey("\\")))
|
||||
@@ -489,17 +493,7 @@ void BindingsConfiguration::generateDefault()
|
||||
if (notBound(k = stringToKey("q")))
|
||||
bind(k, aQuit);
|
||||
|
||||
if (notBound(k = stringToKey("k")))
|
||||
bind(k, aScrollUp);
|
||||
if (notBound(k = stringToKey("j")))
|
||||
bind(k, aScrollDown);
|
||||
if (notBound(k = stringToKey("d")))
|
||||
bind(k, aDelete);
|
||||
if (notBound(k = stringToKey("+")))
|
||||
bind(k, aVolumeUp);
|
||||
|
||||
if (notBound(k = stringToKey("-")))
|
||||
bind(k, aVolumeDown);
|
||||
|
||||
if (notBound(k = stringToKey("Q")))
|
||||
bind(k, aQuit);
|
||||
}
|
||||
|
||||
14
src/help.cpp
14
src/help.cpp
@@ -225,8 +225,8 @@ void Help::GetKeybindings()
|
||||
KeysSection("Global");
|
||||
KeyDesc(aStop, "Stop");
|
||||
KeyDesc(aPause, "Pause");
|
||||
KeyDesc(aNextSong, "Next track");
|
||||
KeyDesc(aPreviousSong, "Previous track");
|
||||
KeyDesc(aNext, "Next track");
|
||||
KeyDesc(aPrevious, "Previous track");
|
||||
KeyDesc(aReplaySong, "Replay playing song");
|
||||
KeyDesc(aSeekForward, "Seek forward in playing song");
|
||||
KeyDesc(aSeekBackward, "Seek backward in playing song");
|
||||
@@ -256,8 +256,8 @@ void Help::GetKeybindings()
|
||||
KeyDesc(aApplyFilter, "Apply filter");
|
||||
KeyDesc(aFindItemForward, "Find item forward");
|
||||
KeyDesc(aFindItemBackward, "Find item backward");
|
||||
KeyDesc(aPreviousFoundItem, "Go to previous found item");
|
||||
KeyDesc(aNextFoundItem, "Go to next found item");
|
||||
KeyDesc(aPreviousFoundItem, "Jump to previous found item");
|
||||
KeyDesc(aNextFoundItem, "Jump to next found item");
|
||||
KeyDesc(aToggleFindMode, "Toggle find mode (normal/wrapped)");
|
||||
KeyDesc(aJumpToBrowser, "Locate song in browser");
|
||||
KeyDesc(aJumpToMediaLibrary, "Locate song in media library");
|
||||
@@ -298,7 +298,7 @@ void Help::GetKeybindings()
|
||||
KeyDesc(aSortPlaylist, "Sort playlist");
|
||||
KeyDesc(aReversePlaylist, "Reverse playlist");
|
||||
KeyDesc(aJumpToPlayingSong, "Jump to playing song");
|
||||
KeyDesc(aToggleAutoCenter, "Toggle auto center mode");
|
||||
KeyDesc(aTogglePlayingSongCentering, "Toggle playing song centering");
|
||||
|
||||
KeysSection("Browser");
|
||||
KeyDesc(aPressEnter, "Enter directory/Add item to playlist and play it");
|
||||
@@ -311,7 +311,7 @@ void Help::GetKeybindings()
|
||||
KeyDesc(aShowBrowser, "Browse MPD database/local filesystem");
|
||||
KeyDesc(aToggleBrowserSortMode, "Toggle sort mode");
|
||||
KeyDesc(aJumpToPlayingSong, "Locate playing song");
|
||||
KeyDesc(aJumpToParentDir, "Go to parent directory");
|
||||
KeyDesc(aJumpToParentDirectory, "Jump to parent directory");
|
||||
KeyDesc(aDelete, "Delete item");
|
||||
KeyDesc(aJumpToPlaylistEditor, "Jump to playlist editor (playlists only)");
|
||||
|
||||
@@ -371,7 +371,7 @@ void Help::GetKeybindings()
|
||||
KeyDesc(aPressSpace, "Select item (right column)");
|
||||
KeyDesc(aPreviousColumn, "Previous column");
|
||||
KeyDesc(aNextColumn, "Next column");
|
||||
KeyDesc(aJumpToParentDir, "Go to parent directory (left column, directories view)");
|
||||
KeyDesc(aJumpToParentDirectory, "Jump to parent directory (left column, directories view)");
|
||||
# endif // HAVE_TAGLIB_H
|
||||
|
||||
# ifdef ENABLE_OUTPUTS
|
||||
|
||||
@@ -165,7 +165,7 @@ std::string getEnclosedString(const std::string &s, char a, char b, size_t *pos)
|
||||
++i;
|
||||
while (i < s.length() && s[i] != b)
|
||||
{
|
||||
if (s[i] == '\\' && i+1 < s.length() && s[i+1] == b)
|
||||
if (s[i] == '\\' && i+1 < s.length() && (s[i+1] == '\\' || s[i+1] == b))
|
||||
result += s[++i];
|
||||
else
|
||||
result += s[i];
|
||||
|
||||
Reference in New Issue
Block a user