remove tab-width dependent indentation
This commit is contained in:
@@ -62,14 +62,14 @@ struct Action
|
|||||||
wchar_t getChar() const { return Char; }
|
wchar_t getChar() const { return Char; }
|
||||||
CharType getType() const { return Type; }
|
CharType getType() const { return Type; }
|
||||||
|
|
||||||
# define INEQUALITY_OPERATOR(CMP) \
|
# define INEQUALITY_OPERATOR(CMP) \
|
||||||
bool operator CMP (const Key &k) const \
|
bool operator CMP (const Key &k) const \
|
||||||
{ \
|
{ \
|
||||||
if (Char CMP k.Char) \
|
if (Char CMP k.Char) \
|
||||||
return true; \
|
return true; \
|
||||||
if (Char != k.Char) \
|
if (Char != k.Char) \
|
||||||
return false; \
|
return false; \
|
||||||
return Type CMP k.Type; \
|
return Type CMP k.Type; \
|
||||||
}
|
}
|
||||||
INEQUALITY_OPERATOR(<);
|
INEQUALITY_OPERATOR(<);
|
||||||
INEQUALITY_OPERATOR(<=);
|
INEQUALITY_OPERATOR(<=);
|
||||||
|
|||||||
262
src/settings.cpp
262
src/settings.cpp
@@ -133,138 +133,138 @@ void CreateDir(const std::string &dir)
|
|||||||
|
|
||||||
void KeyConfiguration::GenerateBindings()
|
void KeyConfiguration::GenerateBindings()
|
||||||
{
|
{
|
||||||
Bind_(KEY_MOUSE, ctNCurses, aMouseEvent);
|
Bind_(KEY_MOUSE, ctNCurses, aMouseEvent);
|
||||||
Bind_(KEY_UP, ctNCurses, aScrollUp);
|
Bind_(KEY_UP, ctNCurses, aScrollUp);
|
||||||
Bind_(KEY_DOWN, ctNCurses, aScrollDown);
|
Bind_(KEY_DOWN, ctNCurses, aScrollDown);
|
||||||
Bind_('[', ctStandard, aScrollUpAlbum);
|
Bind_('[', ctStandard, aScrollUpAlbum);
|
||||||
Bind_(']', ctStandard, aScrollDownAlbum);
|
Bind_(']', ctStandard, aScrollDownAlbum);
|
||||||
Bind_('{', ctStandard, aScrollUpArtist);
|
Bind_('{', ctStandard, aScrollUpArtist);
|
||||||
Bind_('}', ctStandard, aScrollDownArtist);
|
Bind_('}', ctStandard, aScrollDownArtist);
|
||||||
Bind_(KEY_PPAGE, ctNCurses, aPageUp);
|
Bind_(KEY_PPAGE, ctNCurses, aPageUp);
|
||||||
Bind_(KEY_NPAGE, ctNCurses, aPageDown);
|
Bind_(KEY_NPAGE, ctNCurses, aPageDown);
|
||||||
Bind_(KEY_HOME, ctNCurses, aMoveHome);
|
Bind_(KEY_HOME, ctNCurses, aMoveHome);
|
||||||
Bind_(KEY_END, ctNCurses, aMoveEnd);
|
Bind_(KEY_END, ctNCurses, aMoveEnd);
|
||||||
Bind_(KEY_SPACE, ctStandard, aPressSpace);
|
Bind_(KEY_SPACE, ctStandard, aPressSpace);
|
||||||
Bind_(KEY_ENTER, ctStandard, aPressEnter);
|
Bind_(KEY_ENTER, ctStandard, aPressEnter);
|
||||||
Bind_(KEY_DC, ctNCurses, aDelete);
|
Bind_(KEY_DC, ctNCurses, aDelete);
|
||||||
Bind_(KEY_RIGHT, ctNCurses, aNextColumn);
|
Bind_(KEY_RIGHT, ctNCurses, aNextColumn);
|
||||||
Bind_(KEY_RIGHT, ctNCurses, aSlaveScreen);
|
Bind_(KEY_RIGHT, ctNCurses, aSlaveScreen);
|
||||||
Bind_(KEY_RIGHT, ctNCurses, aVolumeUp);
|
Bind_(KEY_RIGHT, ctNCurses, aVolumeUp);
|
||||||
Bind_(KEY_LEFT, ctNCurses, aPreviousColumn);
|
Bind_(KEY_LEFT, ctNCurses, aPreviousColumn);
|
||||||
Bind_(KEY_LEFT, ctNCurses, aMasterScreen);
|
Bind_(KEY_LEFT, ctNCurses, aMasterScreen);
|
||||||
Bind_(KEY_LEFT, ctNCurses, aVolumeDown);
|
Bind_(KEY_LEFT, ctNCurses, aVolumeDown);
|
||||||
Bind_(KEY_TAB, ctStandard, aNextScreen);
|
Bind_(KEY_TAB, ctStandard, aNextScreen);
|
||||||
Bind_(KEY_SHIFT_TAB, ctNCurses, aPreviousScreen);
|
Bind_(KEY_SHIFT_TAB, ctNCurses, aPreviousScreen);
|
||||||
Bind_('1', ctStandard, aShowHelp);
|
Bind_('1', ctStandard, aShowHelp);
|
||||||
Bind_('2', ctStandard, aShowPlaylist);
|
Bind_('2', ctStandard, aShowPlaylist);
|
||||||
Bind_('3', ctStandard, aShowBrowser);
|
Bind_('3', ctStandard, aShowBrowser);
|
||||||
Bind_('4', ctStandard, aShowSearchEngine);
|
Bind_('4', ctStandard, aShowSearchEngine);
|
||||||
Bind_('5', ctStandard, aShowMediaLibrary);
|
Bind_('5', ctStandard, aShowMediaLibrary);
|
||||||
Bind_('6', ctStandard, aShowPlaylistEditor);
|
Bind_('6', ctStandard, aShowPlaylistEditor);
|
||||||
Bind_('7', ctStandard, aShowTagEditor);
|
Bind_('7', ctStandard, aShowTagEditor);
|
||||||
Bind_('8', ctStandard, aShowOutputs);
|
Bind_('8', ctStandard, aShowOutputs);
|
||||||
Bind_('9', ctStandard, aShowVisualizer);
|
Bind_('9', ctStandard, aShowVisualizer);
|
||||||
Bind_('0', ctStandard, aShowClock);
|
Bind_('0', ctStandard, aShowClock);
|
||||||
Bind_('@', ctStandard, aShowServerInfo);
|
Bind_('@', ctStandard, aShowServerInfo);
|
||||||
Bind_('s', ctStandard, aStop);
|
Bind_('s', ctStandard, aStop);
|
||||||
Bind_('P', ctStandard, aPause);
|
Bind_('P', ctStandard, aPause);
|
||||||
Bind_('>', ctStandard, aNextSong);
|
Bind_('>', ctStandard, aNextSong);
|
||||||
Bind_('<', ctStandard, aPreviousSong);
|
Bind_('<', ctStandard, aPreviousSong);
|
||||||
Bind_(KEY_CTRL_H, ctStandard, aJumpToParentDir);
|
Bind_(KEY_CTRL_H, ctStandard, aJumpToParentDir);
|
||||||
Bind_(KEY_CTRL_H, ctStandard, aReplaySong);
|
Bind_(KEY_CTRL_H, ctStandard, aReplaySong);
|
||||||
Bind_(KEY_BACKSPACE, ctNCurses, aJumpToParentDir);
|
Bind_(KEY_BACKSPACE, ctNCurses, aJumpToParentDir);
|
||||||
Bind_(KEY_BACKSPACE, ctNCurses, aReplaySong);
|
Bind_(KEY_BACKSPACE, ctNCurses, aReplaySong);
|
||||||
Bind_(KEY_BACKSPACE_2, ctStandard, aJumpToParentDir);
|
Bind_(KEY_BACKSPACE_2, ctStandard, aJumpToParentDir);
|
||||||
Bind_(KEY_BACKSPACE_2, ctStandard, aReplaySong);
|
Bind_(KEY_BACKSPACE_2, ctStandard, aReplaySong);
|
||||||
Bind_('f', ctStandard, aSeekForward);
|
Bind_('f', ctStandard, aSeekForward);
|
||||||
Bind_('b', ctStandard, aSeekBackward);
|
Bind_('b', ctStandard, aSeekBackward);
|
||||||
Bind_('r', ctStandard, aToggleRepeat);
|
Bind_('r', ctStandard, aToggleRepeat);
|
||||||
Bind_('z', ctStandard, aToggleRandom);
|
Bind_('z', ctStandard, aToggleRandom);
|
||||||
Bind_('y', ctStandard, aSaveTagChanges);
|
Bind_('y', ctStandard, aSaveTagChanges);
|
||||||
Bind_('y', ctStandard, aStartSearching);
|
Bind_('y', ctStandard, aStartSearching);
|
||||||
Bind_('y', ctStandard, aToggleSingle);
|
Bind_('y', ctStandard, aToggleSingle);
|
||||||
Bind_('R', ctStandard, aToggleConsume);
|
Bind_('R', ctStandard, aToggleConsume);
|
||||||
Bind_('Y', ctStandard, aToggleReplayGainMode);
|
Bind_('Y', ctStandard, aToggleReplayGainMode);
|
||||||
Bind_('t', ctStandard, aToggleSpaceMode);
|
Bind_('t', ctStandard, aToggleSpaceMode);
|
||||||
Bind_('T', ctStandard, aToggleAddMode);
|
Bind_('T', ctStandard, aToggleAddMode);
|
||||||
Bind_('|', ctStandard, aToggleMouse);
|
Bind_('|', ctStandard, aToggleMouse);
|
||||||
Bind_('#', ctStandard, aToggleBitrateVisibility);
|
Bind_('#', ctStandard, aToggleBitrateVisibility);
|
||||||
Bind_('Z', ctStandard, aShuffle);
|
Bind_('Z', ctStandard, aShuffle);
|
||||||
Bind_('x', ctStandard, aToggleCrossfade);
|
Bind_('x', ctStandard, aToggleCrossfade);
|
||||||
Bind_('X', ctStandard, aSetCrossfade);
|
Bind_('X', ctStandard, aSetCrossfade);
|
||||||
Bind_('u', ctStandard, aUpdateDatabase);
|
Bind_('u', ctStandard, aUpdateDatabase);
|
||||||
Bind_(KEY_CTRL_V, ctStandard, aSortPlaylist);
|
Bind_(KEY_CTRL_V, ctStandard, aSortPlaylist);
|
||||||
Bind_(KEY_CTRL_R, ctStandard, aReversePlaylist);
|
Bind_(KEY_CTRL_R, ctStandard, aReversePlaylist);
|
||||||
Bind_(KEY_CTRL_F, ctStandard, aApplyFilter);
|
Bind_(KEY_CTRL_F, ctStandard, aApplyFilter);
|
||||||
Bind_(KEY_CTRL_G, ctStandard, aDisableFilter);
|
Bind_(KEY_CTRL_G, ctStandard, aDisableFilter);
|
||||||
Bind_('/', ctStandard, aFind);
|
Bind_('/', ctStandard, aFind);
|
||||||
Bind_('/', ctStandard, aFindItemForward);
|
Bind_('/', ctStandard, aFindItemForward);
|
||||||
Bind_('?', ctStandard, aFind);
|
Bind_('?', ctStandard, aFind);
|
||||||
Bind_('?', ctStandard, aFindItemBackward);
|
Bind_('?', ctStandard, aFindItemBackward);
|
||||||
Bind_('.', ctStandard, aNextFoundItem);
|
Bind_('.', ctStandard, aNextFoundItem);
|
||||||
Bind_(',', ctStandard, aPreviousFoundItem);
|
Bind_(',', ctStandard, aPreviousFoundItem);
|
||||||
Bind_('w', ctStandard, aToggleFindMode);
|
Bind_('w', ctStandard, aToggleFindMode);
|
||||||
Bind_('e', ctStandard, aEditSong);
|
Bind_('e', ctStandard, aEditSong);
|
||||||
Bind_('e', ctStandard, aEditLibraryTag);
|
Bind_('e', ctStandard, aEditLibraryTag);
|
||||||
Bind_('e', ctStandard, aEditLibraryAlbum);
|
Bind_('e', ctStandard, aEditLibraryAlbum);
|
||||||
Bind_('e', ctStandard, aEditDirectoryName);
|
Bind_('e', ctStandard, aEditDirectoryName);
|
||||||
Bind_('e', ctStandard, aEditPlaylistName);
|
Bind_('e', ctStandard, aEditPlaylistName);
|
||||||
Bind_('e', ctStandard, aEditLyrics);
|
Bind_('e', ctStandard, aEditLyrics);
|
||||||
Bind_('i', ctStandard, aShowSongInfo);
|
Bind_('i', ctStandard, aShowSongInfo);
|
||||||
Bind_('I', ctStandard, aShowArtistInfo);
|
Bind_('I', ctStandard, aShowArtistInfo);
|
||||||
Bind_('g', ctStandard, aJumpToPositionInSong);
|
Bind_('g', ctStandard, aJumpToPositionInSong);
|
||||||
Bind_('l', ctStandard, aShowLyrics);
|
Bind_('l', ctStandard, aShowLyrics);
|
||||||
Bind_('v', ctStandard, aReverseSelection);
|
Bind_('v', ctStandard, aReverseSelection);
|
||||||
Bind_('V', ctStandard, aDeselectItems);
|
Bind_('V', ctStandard, aDeselectItems);
|
||||||
Bind_('B', ctStandard, aSelectAlbum);
|
Bind_('B', ctStandard, aSelectAlbum);
|
||||||
Bind_('a', ctStandard, aAddSelectedItems);
|
Bind_('a', ctStandard, aAddSelectedItems);
|
||||||
Bind_('c', ctStandard, aClearPlaylist);
|
Bind_('c', ctStandard, aClearPlaylist);
|
||||||
Bind_('c', ctStandard, aClearMainPlaylist);
|
Bind_('c', ctStandard, aClearMainPlaylist);
|
||||||
Bind_('C', ctStandard, aCropPlaylist);
|
Bind_('C', ctStandard, aCropPlaylist);
|
||||||
Bind_('C', ctStandard, aCropMainPlaylist);
|
Bind_('C', ctStandard, aCropMainPlaylist);
|
||||||
Bind_('m', ctStandard, aMoveSortOrderUp);
|
Bind_('m', ctStandard, aMoveSortOrderUp);
|
||||||
Bind_('m', ctStandard, aMoveSelectedItemsUp);
|
Bind_('m', ctStandard, aMoveSelectedItemsUp);
|
||||||
Bind_('n', ctStandard, aMoveSortOrderDown);
|
Bind_('n', ctStandard, aMoveSortOrderDown);
|
||||||
Bind_('n', ctStandard, aMoveSelectedItemsDown);
|
Bind_('n', ctStandard, aMoveSelectedItemsDown);
|
||||||
Bind_('M', ctStandard, aMoveSelectedItemsTo);
|
Bind_('M', ctStandard, aMoveSelectedItemsTo);
|
||||||
Bind_('A', ctStandard, aAdd);
|
Bind_('A', ctStandard, aAdd);
|
||||||
Bind_('S', ctStandard, aSavePlaylist);
|
Bind_('S', ctStandard, aSavePlaylist);
|
||||||
Bind_('o', ctStandard, aJumpToPlayingSong);
|
Bind_('o', ctStandard, aJumpToPlayingSong);
|
||||||
Bind_('G', ctStandard, aJumpToBrowser);
|
Bind_('G', ctStandard, aJumpToBrowser);
|
||||||
Bind_('G', ctStandard, aJumpToPlaylistEditor);
|
Bind_('G', ctStandard, aJumpToPlaylistEditor);
|
||||||
Bind_('~', ctStandard, aJumpToMediaLibrary);
|
Bind_('~', ctStandard, aJumpToMediaLibrary);
|
||||||
Bind_('E', ctStandard, aJumpToTagEditor);
|
Bind_('E', ctStandard, aJumpToTagEditor);
|
||||||
Bind_('U', ctStandard, aToggleAutoCenter);
|
Bind_('U', ctStandard, aToggleAutoCenter);
|
||||||
Bind_('p', ctStandard, aToggleDisplayMode);
|
Bind_('p', ctStandard, aToggleDisplayMode);
|
||||||
Bind_('\\', ctStandard, aToggleInterface);
|
Bind_('\\', ctStandard, aToggleInterface);
|
||||||
Bind_('!', ctStandard, aToggleSeparatorsInPlaylist);
|
Bind_('!', ctStandard, aToggleSeparatorsInPlaylist);
|
||||||
Bind_('L', ctStandard, aToggleLyricsFetcher);
|
Bind_('L', ctStandard, aToggleLyricsFetcher);
|
||||||
Bind_('F', ctStandard, aToggleFetchingLyricsInBackground);
|
Bind_('F', ctStandard, aToggleFetchingLyricsInBackground);
|
||||||
Bind_(KEY_CTRL_L, ctStandard, aToggleScreenLock);
|
Bind_(KEY_CTRL_L, ctStandard, aToggleScreenLock);
|
||||||
Bind_('`', ctStandard, aToggleBrowserSortMode);
|
Bind_('`', ctStandard, aToggleBrowserSortMode);
|
||||||
Bind_('`', ctStandard, aToggleLibraryTagType);
|
Bind_('`', ctStandard, aToggleLibraryTagType);
|
||||||
Bind_('`', ctStandard, aRefetchLyrics);
|
Bind_('`', ctStandard, aRefetchLyrics);
|
||||||
Bind_('`', ctStandard, aRefetchArtistInfo);
|
Bind_('`', ctStandard, aRefetchArtistInfo);
|
||||||
Bind_('`', ctStandard, aAddRandomItems);
|
Bind_('`', ctStandard, aAddRandomItems);
|
||||||
Bind_(KEY_CTRL_P, ctStandard, aSetSelectedItemsPriority);
|
Bind_(KEY_CTRL_P, ctStandard, aSetSelectedItemsPriority);
|
||||||
Bind_('q', ctStandard, aQuit);
|
Bind_('q', ctStandard, aQuit);
|
||||||
|
|
||||||
Bind_('k', ctStandard, aScrollUp);
|
Bind_('k', ctStandard, aScrollUp);
|
||||||
Bind_('j', ctStandard, aScrollDown);
|
Bind_('j', ctStandard, aScrollDown);
|
||||||
Bind_('d', ctStandard, aDelete);
|
Bind_('d', ctStandard, aDelete);
|
||||||
Bind_('+', ctStandard, aVolumeUp);
|
Bind_('+', ctStandard, aVolumeUp);
|
||||||
Bind_('-', ctStandard, aVolumeDown);
|
Bind_('-', ctStandard, aVolumeDown);
|
||||||
Bind_(KEY_F1, ctNCurses, aShowHelp);
|
Bind_(KEY_F1, ctNCurses, aShowHelp);
|
||||||
Bind_(KEY_F2, ctNCurses, aShowPlaylist);
|
Bind_(KEY_F2, ctNCurses, aShowPlaylist);
|
||||||
Bind_(KEY_F3, ctNCurses, aShowBrowser);
|
Bind_(KEY_F3, ctNCurses, aShowBrowser);
|
||||||
Bind_(KEY_F4, ctNCurses, aShowSearchEngine);
|
Bind_(KEY_F4, ctNCurses, aShowSearchEngine);
|
||||||
Bind_(KEY_F5, ctNCurses, aShowMediaLibrary);
|
Bind_(KEY_F5, ctNCurses, aShowMediaLibrary);
|
||||||
Bind_(KEY_F6, ctNCurses, aShowPlaylistEditor);
|
Bind_(KEY_F6, ctNCurses, aShowPlaylistEditor);
|
||||||
Bind_(KEY_F7, ctNCurses, aShowTagEditor);
|
Bind_(KEY_F7, ctNCurses, aShowTagEditor);
|
||||||
Bind_(KEY_F8, ctNCurses, aShowOutputs);
|
Bind_(KEY_F8, ctNCurses, aShowOutputs);
|
||||||
Bind_(KEY_F9, ctNCurses, aShowVisualizer);
|
Bind_(KEY_F9, ctNCurses, aShowVisualizer);
|
||||||
Bind_(KEY_F10, ctNCurses, aShowClock);
|
Bind_(KEY_F10, ctNCurses, aShowClock);
|
||||||
Bind_('Q', ctStandard, aQuit);
|
Bind_('Q', ctStandard, aQuit);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Configuration::SetDefaults()
|
void Configuration::SetDefaults()
|
||||||
|
|||||||
Reference in New Issue
Block a user