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