summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2012-10-06 18:02:31 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2012-10-06 18:02:31 +0200
commit6709219aacb151e893570003f1077ebf1856178e (patch)
tree8f0204496ff5c254a544d03dc3e42f1e31360760
parentca24c5be5b41f22c1f8a0c6a71b99b2491acd020 (diff)
actions: change naming convention to camelCase
-rw-r--r--src/actions.cpp346
-rw-r--r--src/actions.h330
-rw-r--r--src/bindings.cpp4
-rw-r--r--src/bindings.h6
-rw-r--r--src/cmdargs.cpp2
-rw-r--r--src/help.cpp2
-rw-r--r--src/macro_utilities.cpp4
-rw-r--r--src/macro_utilities.h8
-rw-r--r--src/ncmpcpp.cpp10
-rw-r--r--src/tag_editor.cpp4
10 files changed, 361 insertions, 355 deletions
diff --git a/src/actions.cpp b/src/actions.cpp
index c4bd5fee..d92bb733 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -81,7 +81,7 @@ void populateActions();
}
-void Action::ValidateScreenSize()
+void Action::validateScreenSize()
{
using Global::MainHeight;
@@ -93,7 +93,7 @@ void Action::ValidateScreenSize()
}
}
-void Action::InitializeScreens()
+void Action::initializeScreens()
{
myHelp = new Help;
myPlaylist = new Playlist;
@@ -130,7 +130,7 @@ void Action::InitializeScreens()
}
-void Action::SetResizeFlags()
+void Action::setResizeFlags()
{
myHelp->hasToBeResized = 1;
myPlaylist->hasToBeResized = 1;
@@ -166,7 +166,7 @@ void Action::SetResizeFlags()
# endif // ENABLE_CLOCK
}
-void Action::ResizeScreen(bool reload_main_window)
+void Action::resizeScreen(bool reload_main_window)
{
using Global::MainHeight;
using Global::wHeader;
@@ -192,14 +192,14 @@ void Action::ResizeScreen(bool reload_main_window)
MainHeight = LINES-(Config.new_design ? 7 : 4);
- ValidateScreenSize();
+ validateScreenSize();
if (!Config.header_visibility)
MainHeight += 2;
if (!Config.statusbar_visibility)
++MainHeight;
- SetResizeFlags();
+ setResizeFlags();
applyToVisibleWindows(&BaseScreen::resize);
@@ -223,7 +223,7 @@ void Action::ResizeScreen(bool reload_main_window)
refresh();
}
-void Action::SetWindowsDimensions()
+void Action::setWindowsDimensions()
{
using Global::MainStartY;
using Global::MainHeight;
@@ -244,7 +244,7 @@ void Action::SetWindowsDimensions()
FooterHeight = Config.statusbar_visibility ? 2 : 1;
}
-void Action::Seek()
+void Action::seek()
{
using Global::wHeader;
using Global::wFooter;
@@ -344,7 +344,7 @@ void Action::Seek()
Statusbar::unlock();
}
-void Action::FindItem(const FindDirection fd)
+void Action::findItem(const Find direction)
{
using Global::wFooter;
@@ -353,7 +353,7 @@ void Action::FindItem(const FindDirection fd)
assert(w->allowsSearching());
Statusbar::lock();
- Statusbar::put() << "Find " << (fd == fdForward ? "forward" : "backward") << ": ";
+ Statusbar::put() << "Find " << (direction == Find::Forward ? "forward" : "backward") << ": ";
std::string findme = wFooter->getString();
Statusbar::unlock();
@@ -370,7 +370,7 @@ void Action::FindItem(const FindDirection fd)
else
Statusbar::msg("Unable to find \"%s\"", findme.c_str());
- if (fd == fdForward)
+ if (direction == Find::Forward)
w->nextFound(Config.wrapped_search);
else
w->prevFound(Config.wrapped_search);
@@ -379,7 +379,7 @@ void Action::FindItem(const FindDirection fd)
myPlaylist->EnableHighlighting();
}
-void Action::ListsChangeFinisher()
+void Action::listsChangeFinisher()
{
if (myScreen == myLibrary
|| myScreen == myPlaylistEditor
@@ -410,7 +410,7 @@ void Action::ListsChangeFinisher()
}
}
-bool Action::ConnectToMPD()
+bool Action::connectToMPD()
{
if (!Mpd.Connect())
{
@@ -422,7 +422,7 @@ bool Action::ConnectToMPD()
return true;
}
-bool Action::AskYesNoQuestion(const std::string &question, void (*callback)())
+bool Action::askYesNoQuestion(const std::string &question, void (*callback)())
{
using Global::wFooter;
@@ -451,21 +451,21 @@ bool Action::isMPDMusicDirSet()
return true;
}
-Action *Action::Get(ActionType at)
+Action *Action::get(ActionType at)
{
if (Actions.empty())
populateActions();
return Actions[at];
}
-Action *Action::Get(const std::string &name)
+Action *Action::get(const std::string &name)
{
Action *result = 0;
if (Actions.empty())
populateActions();
for (auto it = Actions.begin(); it != Actions.end(); ++it)
{
- if (it->second->Name() == name)
+ if (it->second->name() == name)
{
result = it->second;
break;
@@ -479,12 +479,12 @@ bool MouseEvent::canBeRun() const
return Config.mouse_support;
}
-void MouseEvent::Run()
+void MouseEvent::run()
{
using Global::VolumeState;
- itsOldMouseEvent = itsMouseEvent;
- getmouse(&itsMouseEvent);
+ m_old_mouse_event = m_mouse_event;
+ getmouse(&m_mouse_event);
// workaround shitty ncurses behavior introduced in >=5.8, when we mysteriously get
// a few times after ncmpcpp startup 2^27 code instead of BUTTON{1,3}_RELEASED. since that
// 2^27 thing shows constantly instead of BUTTON2_PRESSED, it was redefined to be recognized
@@ -492,48 +492,48 @@ void MouseEvent::Run()
// after BUTTON{1,3} was pressed. so, here is the workaround: if last event was BUTTON{1,3}_PRESSED,
// we MUST get BUTTON{1,3}_RELEASED afterwards. if we get BUTTON2_PRESSED, erroneus behavior
// is about to occur and we need to prevent that.
- if (itsOldMouseEvent.bstate & (BUTTON1_PRESSED | BUTTON3_PRESSED) && itsMouseEvent.bstate & BUTTON2_PRESSED)
+ if (m_old_mouse_event.bstate & (BUTTON1_PRESSED | BUTTON3_PRESSED) && m_mouse_event.bstate & BUTTON2_PRESSED)
return;
- if (itsMouseEvent.bstate & BUTTON1_PRESSED
- && itsMouseEvent.y == LINES-(Config.statusbar_visibility ? 2 : 1)
+ if (m_mouse_event.bstate & BUTTON1_PRESSED
+ && m_mouse_event.y == LINES-(Config.statusbar_visibility ? 2 : 1)
) // progressbar
{
if (!Mpd.isPlaying())
return;
- Mpd.Seek(Mpd.GetTotalTime()*itsMouseEvent.x/double(COLS));
+ Mpd.Seek(Mpd.GetTotalTime()*m_mouse_event.x/double(COLS));
}
- else if (itsMouseEvent.bstate & BUTTON1_PRESSED
+ else if (m_mouse_event.bstate & BUTTON1_PRESSED
&& (Config.statusbar_visibility || Config.new_design)
&& Mpd.isPlaying()
- && itsMouseEvent.y == (Config.new_design ? 1 : LINES-1) && itsMouseEvent.x < 9
+ && m_mouse_event.y == (Config.new_design ? 1 : LINES-1) && m_mouse_event.x < 9
) // playing/paused
{
Mpd.Toggle();
}
- else if ((itsMouseEvent.bstate & BUTTON2_PRESSED || itsMouseEvent.bstate & BUTTON4_PRESSED)
+ else if ((m_mouse_event.bstate & BUTTON2_PRESSED || m_mouse_event.bstate & BUTTON4_PRESSED)
&& Config.header_visibility
- && itsMouseEvent.y == 0 && size_t(itsMouseEvent.x) > COLS-VolumeState.length()
+ && m_mouse_event.y == 0 && size_t(m_mouse_event.x) > COLS-VolumeState.length()
) // volume
{
- if (itsMouseEvent.bstate & BUTTON2_PRESSED)
+ if (m_mouse_event.bstate & BUTTON2_PRESSED)
Mpd.SetVolume(Mpd.GetVolume()-2);
else
Mpd.SetVolume(Mpd.GetVolume()+2);
}
- else if (itsMouseEvent.bstate & (BUTTON1_PRESSED | BUTTON2_PRESSED | BUTTON3_PRESSED | BUTTON4_PRESSED))
- myScreen->mouseButtonPressed(itsMouseEvent);
+ else if (m_mouse_event.bstate & (BUTTON1_PRESSED | BUTTON2_PRESSED | BUTTON3_PRESSED | BUTTON4_PRESSED))
+ myScreen->mouseButtonPressed(m_mouse_event);
}
-void ScrollUp::Run()
+void ScrollUp::run()
{
myScreen->scroll(NC::Scroll::Up);
- ListsChangeFinisher();
+ listsChangeFinisher();
}
-void ScrollDown::Run()
+void ScrollDown::run()
{
myScreen->scroll(NC::Scroll::Down);
- ListsChangeFinisher();
+ listsChangeFinisher();
}
bool ScrollUpArtist::canBeRun() const
@@ -541,7 +541,7 @@ bool ScrollUpArtist::canBeRun() const
return proxySongList(myScreen);
}
-void ScrollUpArtist::Run()
+void ScrollUpArtist::run()
{
auto pl = proxySongList(myScreen);
assert(pl);
@@ -564,7 +564,7 @@ bool ScrollUpAlbum::canBeRun() const
return proxySongList(myScreen);
}
-void ScrollUpAlbum::Run()
+void ScrollUpAlbum::run()
{
auto pl = proxySongList(myScreen);
assert(pl);
@@ -587,7 +587,7 @@ bool ScrollDownArtist::canBeRun() const
return proxySongList(myScreen);
}
-void ScrollDownArtist::Run()
+void ScrollDownArtist::run()
{
auto pl = proxySongList(myScreen);
assert(pl);
@@ -610,7 +610,7 @@ bool ScrollDownAlbum::canBeRun() const
return proxySongList(myScreen);
}
-void ScrollDownAlbum::Run()
+void ScrollDownAlbum::run()
{
auto pl = proxySongList(myScreen);
assert(pl);
@@ -628,38 +628,38 @@ void ScrollDownAlbum::Run()
}
}
-void PageUp::Run()
+void PageUp::run()
{
myScreen->scroll(NC::Scroll::PageUp);
- ListsChangeFinisher();
+ listsChangeFinisher();
}
-void PageDown::Run()
+void PageDown::run()
{
myScreen->scroll(NC::Scroll::PageDown);
- ListsChangeFinisher();
+ listsChangeFinisher();
}
-void MoveHome::Run()
+void MoveHome::run()
{
myScreen->scroll(NC::Scroll::Home);
- ListsChangeFinisher();
+ listsChangeFinisher();
}
-void MoveEnd::Run()
+void MoveEnd::run()
{
myScreen->scroll(NC::Scroll::End);
- ListsChangeFinisher();
+ listsChangeFinisher();
}
-void ToggleInterface::Run()
+void ToggleInterface::run()
{
Config.new_design = !Config.new_design;
Config.statusbar_visibility = Config.new_design ? 0 : OriginalStatusbarVisibility;
- SetWindowsDimensions();
+ setWindowsDimensions();
Progressbar::unlock();
Statusbar::unlock();
- ResizeScreen(false);
+ resizeScreen(false);
if (!Mpd.isPlaying())
Status::Changes::mixer();
Statusbar::msg("User interface: %s", Config.new_design ? "Alternative" : "Classic");
@@ -674,7 +674,7 @@ bool JumpToParentDirectory::canBeRun() const
;
}
-void JumpToParentDirectory::Run()
+void JumpToParentDirectory::run()
{
if (myScreen == myBrowser)
{
@@ -696,12 +696,12 @@ void JumpToParentDirectory::Run()
# endif // HAVE_TAGLIB_H
}
-void PressEnter::Run()
+void PressEnter::run()
{
myScreen->enterPressed();
}
-void PressSpace::Run()
+void PressSpace::run()
{
myScreen->spacePressed();
}
@@ -712,7 +712,7 @@ bool PreviousColumn::canBeRun() const
return hc && hc->previousColumnAvailable();
}
-void PreviousColumn::Run()
+void PreviousColumn::run()
{
hasColumns(myScreen)->previousColumn();
}
@@ -723,7 +723,7 @@ bool NextColumn::canBeRun() const
return hc && hc->nextColumnAvailable();
}
-void NextColumn::Run()
+void NextColumn::run()
{
hasColumns(myScreen)->nextColumn();
}
@@ -739,7 +739,7 @@ bool MasterScreen::canBeRun() const
&& myScreen->isMergable();
}
-void MasterScreen::Run()
+void MasterScreen::run()
{
using Global::myInactiveScreen;
using Global::myLockedScreen;
@@ -760,7 +760,7 @@ bool SlaveScreen::canBeRun() const
&& myScreen->isMergable();
}
-void SlaveScreen::Run()
+void SlaveScreen::run()
{
using Global::myInactiveScreen;
using Global::myLockedScreen;
@@ -770,12 +770,12 @@ void SlaveScreen::Run()
drawHeader();
}
-void VolumeUp::Run()
+void VolumeUp::run()
{
Mpd.SetVolume(Mpd.GetVolume()+1);
}
-void VolumeDown::Run()
+void VolumeDown::run()
{
Mpd.SetVolume(Mpd.GetVolume()-1);
}
@@ -786,7 +786,7 @@ bool DeletePlaylistItems::canBeRun() const
|| (myScreen->isActiveWindow(myPlaylistEditor->Content) && !myPlaylistEditor->Content.empty());
}
-void DeletePlaylistItems::Run()
+void DeletePlaylistItems::run()
{
if (myScreen == myPlaylist)
{
@@ -812,7 +812,7 @@ bool DeleteBrowserItems::canBeRun() const
&& isMPDMusicDirSet();
}
-void DeleteBrowserItems::Run()
+void DeleteBrowserItems::run()
{
std::string question;
if (hasSelected(myBrowser->main().begin(), myBrowser->main().end()))
@@ -827,7 +827,7 @@ void DeleteBrowserItems::Run()
question += ToString(wideShorten(ToWString(name), COLS-question.size()-10));
question += "\"?";
}
- bool yes = AskYesNoQuestion(question, Status::trace);
+ bool yes = askYesNoQuestion(question, Status::trace);
if (yes)
{
bool success = true;
@@ -867,7 +867,7 @@ bool DeleteStoredPlaylist::canBeRun() const
&& myPlaylistEditor->Playlists.empty();
}
-void DeleteStoredPlaylist::Run()
+void DeleteStoredPlaylist::run()
{
std::string question;
if (hasSelected(myPlaylistEditor->Playlists.begin(), myPlaylistEditor->Playlists.end()))
@@ -878,7 +878,7 @@ void DeleteStoredPlaylist::Run()
question += ToString(wideShorten(ToWString(myPlaylistEditor->Playlists.current().value()), COLS-question.size()-10));
question += "\"?";
}
- bool yes = AskYesNoQuestion(question, Status::trace);
+ bool yes = askYesNoQuestion(question, Status::trace);
if (yes)
{
auto list = getSelectedOrCurrent(myPlaylistEditor->Playlists.begin(), myPlaylistEditor->Playlists.end(), myPlaylistEditor->Playlists.currentI());
@@ -892,28 +892,28 @@ void DeleteStoredPlaylist::Run()
Statusbar::msg("Aborted");
}
-void ReplaySong::Run()
+void ReplaySong::run()
{
if (Mpd.isPlaying())
Mpd.Seek(0);
}
-void PreviousSong::Run()
+void PreviousSong::run()
{
Mpd.Prev();
}
-void NextSong::Run()
+void NextSong::run()
{
Mpd.Next();
}
-void Pause::Run()
+void Pause::run()
{
Mpd.Toggle();
}
-void SavePlaylist::Run()
+void SavePlaylist::run()
{
using Global::wFooter;
@@ -946,7 +946,7 @@ void SavePlaylist::Run()
}
else if (result == MPD_SERVER_ERROR_EXIST)
{
- bool yes = AskYesNoQuestion("Playlist \"" + playlist_name + "\" already exists, overwrite?", Status::trace);
+ bool yes = askYesNoQuestion("Playlist \"" + playlist_name + "\" already exists, overwrite?", Status::trace);
if (yes)
{
Mpd.DeletePlaylist(playlist_name);
@@ -966,12 +966,12 @@ void SavePlaylist::Run()
myBrowser->GetDirectory(myBrowser->CurrentDir());
}
-void Stop::Run()
+void Stop::run()
{
Mpd.Stop();
}
-void ExecuteCommand::Run()
+void ExecuteCommand::run()
{
using Global::wFooter;
Statusbar::lock();
@@ -997,7 +997,7 @@ bool MoveSortOrderUp::canBeRun() const
return myScreen == mySortPlaylistDialog;
}
-void MoveSortOrderUp::Run()
+void MoveSortOrderUp::run()
{
mySortPlaylistDialog->moveSortOrderUp();
}
@@ -1007,7 +1007,7 @@ bool MoveSortOrderDown::canBeRun() const
return myScreen == mySortPlaylistDialog;
}
-void MoveSortOrderDown::Run()
+void MoveSortOrderDown::run()
{
mySortPlaylistDialog->moveSortOrderDown();
}
@@ -1022,7 +1022,7 @@ bool MoveSelectedItemsUp::canBeRun() const
&& !myPlaylistEditor->isContentFiltered()));
}
-void MoveSelectedItemsUp::Run()
+void MoveSelectedItemsUp::run()
{
if (myScreen == myPlaylist)
{
@@ -1047,7 +1047,7 @@ bool MoveSelectedItemsDown::canBeRun() const
&& !myPlaylistEditor->isContentFiltered()));
}
-void MoveSelectedItemsDown::Run()
+void MoveSelectedItemsDown::run()
{
if (myScreen == myPlaylist)
{
@@ -1068,7 +1068,7 @@ bool MoveSelectedItemsTo::canBeRun() const
|| myScreen->isActiveWindow(myPlaylistEditor->Content);
}
-void MoveSelectedItemsTo::Run()
+void MoveSelectedItemsTo::run()
{
if (myScreen == myPlaylist)
moveSelectedItemsTo(myPlaylist->main(), std::bind(&MPD::Connection::Move, _1, _2, _3));
@@ -1087,7 +1087,7 @@ bool Add::canBeRun() const
|| !myPlaylistEditor->Playlists.empty();
}
-void Add::Run()
+void Add::run()
{
using Global::wFooter;
@@ -1122,9 +1122,9 @@ bool SeekForward::canBeRun() const
return Mpd.isPlaying() && Mpd.GetTotalTime() > 0;
}
-void SeekForward::Run()
+void SeekForward::run()
{
- Seek();
+ seek();
}
bool SeekBackward::canBeRun() const
@@ -1132,9 +1132,9 @@ bool SeekBackward::canBeRun() const
return Mpd.isPlaying() && Mpd.GetTotalTime() > 0;
}
-void SeekBackward::Run()
+void SeekBackward::run()
{
- Seek();
+ seek();
}
bool ToggleDisplayMode::canBeRun() const
@@ -1145,7 +1145,7 @@ bool ToggleDisplayMode::canBeRun() const
|| myScreen->isActiveWindow(myPlaylistEditor->Content);
}
-void ToggleDisplayMode::Run()
+void ToggleDisplayMode::run()
{
if (myScreen == myPlaylist)
{
@@ -1195,7 +1195,7 @@ bool ToggleSeparatorsBetweenAlbums::canBeRun() const
return true;
}
-void ToggleSeparatorsBetweenAlbums::Run()
+void ToggleSeparatorsBetweenAlbums::run()
{
Config.playlist_separate_albums = !Config.playlist_separate_albums;
Statusbar::msg("Separators between albums: %s", Config.playlist_separate_albums ? "On" : "Off");
@@ -1208,7 +1208,7 @@ bool ToggleLyricsFetcher::canBeRun() const
}
#endif // NOT HAVE_CURL_CURL_H
-void ToggleLyricsFetcher::Run()
+void ToggleLyricsFetcher::run()
{
# ifdef HAVE_CURL_CURL_H
myLyrics->ToggleFetcher();
@@ -1222,7 +1222,7 @@ bool ToggleFetchingLyricsInBackground::canBeRun() const
}
#endif // NOT HAVE_CURL_CURL_H
-void ToggleFetchingLyricsInBackground::Run()
+void ToggleFetchingLyricsInBackground::run()
{
# ifdef HAVE_CURL_CURL_H
Config.fetch_lyrics_in_background = !Config.fetch_lyrics_in_background;
@@ -1230,7 +1230,7 @@ void ToggleFetchingLyricsInBackground::Run()
# endif // HAVE_CURL_CURL_H
}
-void TogglePlayingSongCentering::Run()
+void TogglePlayingSongCentering::run()
{
Config.autocenter_mode = !Config.autocenter_mode;
Statusbar::msg("Centering playing song: %s", Config.autocenter_mode ? "On" : "Off");
@@ -1238,7 +1238,7 @@ void TogglePlayingSongCentering::Run()
myPlaylist->main().highlight(Mpd.GetCurrentSongPos());
}
-void UpdateDatabase::Run()
+void UpdateDatabase::run()
{
if (myScreen == myBrowser)
Mpd.UpdateDirectory(myBrowser->CurrentDir());
@@ -1258,7 +1258,7 @@ bool JumpToPlayingSong::canBeRun() const
&& Mpd.isPlaying();
}
-void JumpToPlayingSong::Run()
+void JumpToPlayingSong::run()
{
if (myScreen == myPlaylist)
myPlaylist->main().highlight(Mpd.GetCurrentSongPos());
@@ -1273,17 +1273,17 @@ void JumpToPlayingSong::Run()
}
}
-void ToggleRepeat::Run()
+void ToggleRepeat::run()
{
Mpd.SetRepeat(!Mpd.GetRepeat());
}
-void Shuffle::Run()
+void Shuffle::run()
{
Mpd.Shuffle();
}
-void ToggleRandom::Run()
+void ToggleRandom::run()
{
Mpd.SetRandom(!Mpd.GetRandom());
}
@@ -1293,7 +1293,7 @@ bool StartSearching::canBeRun() const
return myScreen == mySearcher && !mySearcher->main()[0].isInactive();
}
-void StartSearching::Run()
+void StartSearching::run()
{
mySearcher->main().highlight(SearchEngine::SearchButton);
mySearcher->main().setHighlighting(0);
@@ -1312,7 +1312,7 @@ bool SaveTagChanges::canBeRun() const
# endif // HAVE_TAGLIB_H
}
-void SaveTagChanges::Run()
+void SaveTagChanges::run()
{
# ifdef HAVE_TAGLIB_H
if (myScreen == myTinyTagEditor)
@@ -1328,22 +1328,22 @@ void SaveTagChanges::Run()
# endif // HAVE_TAGLIB_H
}
-void ToggleSingle::Run()
+void ToggleSingle::run()
{
Mpd.SetSingle(!Mpd.GetSingle());
}
-void ToggleConsume::Run()
+void ToggleConsume::run()
{
Mpd.SetConsume(!Mpd.GetConsume());
}
-void ToggleCrossfade::Run()
+void ToggleCrossfade::run()
{
Mpd.SetCrossfade(Mpd.GetCrossfade() ? 0 : Config.crossfade_time);
}
-void SetCrossfade::Run()
+void SetCrossfade::run()
{
using Global::wFooter;
@@ -1369,7 +1369,7 @@ bool EditSong::canBeRun() const
# endif // HAVE_TAGLIB_H
}
-void EditSong::Run()
+void EditSong::run()
{
# ifdef HAVE_TAGLIB_H
auto s = currentSong(myScreen);
@@ -1389,7 +1389,7 @@ bool EditLibraryTag::canBeRun() const
# endif // HAVE_TAGLIB_H
}
-void EditLibraryTag::Run()
+void EditLibraryTag::run()
{
# ifdef HAVE_TAGLIB_H
using Global::wFooter;
@@ -1445,7 +1445,7 @@ bool EditLibraryAlbum::canBeRun() const
# endif // HAVE_TAGLIB_H
}
-void EditLibraryAlbum::Run()
+void EditLibraryAlbum::run()
{
# ifdef HAVE_TAGLIB_H
using Global::wFooter;
@@ -1501,7 +1501,7 @@ bool EditDirectoryName::canBeRun() const
) && isMPDMusicDirSet();
}
-void EditDirectoryName::Run()
+void EditDirectoryName::run()
{
using Global::wFooter;
@@ -1575,7 +1575,7 @@ bool EditPlaylistName::canBeRun() const
&& myBrowser->main().current().value().type == MPD::itPlaylist);
}
-void EditPlaylistName::Run()
+void EditPlaylistName::run()
{
using Global::wFooter;
@@ -1605,7 +1605,7 @@ bool EditLyrics::canBeRun() const
return myScreen == myLyrics;
}
-void EditLyrics::Run()
+void EditLyrics::run()
{
myLyrics->Edit();
}
@@ -1615,7 +1615,7 @@ bool JumpToBrowser::canBeRun() const
return currentSong(myScreen);
}
-void JumpToBrowser::Run()
+void JumpToBrowser::run()
{
auto s = currentSong(myScreen);
myBrowser->LocateSong(*s);
@@ -1626,7 +1626,7 @@ bool JumpToMediaLibrary::canBeRun() const
return currentSong(myScreen);
}
-void JumpToMediaLibrary::Run()
+void JumpToMediaLibrary::run()
{
auto s = currentSong(myScreen);
myLibrary->LocateSong(*s);
@@ -1638,12 +1638,12 @@ bool JumpToPlaylistEditor::canBeRun() const
&& myBrowser->main().current().value().type == MPD::itPlaylist;
}
-void JumpToPlaylistEditor::Run()
+void JumpToPlaylistEditor::run()
{
myPlaylistEditor->Locate(myBrowser->main().current().value().name);
}
-void ToggleScreenLock::Run()
+void ToggleScreenLock::run()
{
using Global::wFooter;
using Global::myLockedScreen;
@@ -1651,7 +1651,7 @@ void ToggleScreenLock::Run()
if (myLockedScreen != 0)
{
BaseScreen::unlock();
- Action::SetResizeFlags();
+ Action::setResizeFlags();
myScreen->resize();
Statusbar::msg("Screen unlocked");
}
@@ -1691,7 +1691,7 @@ bool JumpToTagEditor::canBeRun() const
# endif // HAVE_TAGLIB_H
}
-void JumpToTagEditor::Run()
+void JumpToTagEditor::run()
{
# ifdef HAVE_TAGLIB_H
auto s = currentSong(myScreen);
@@ -1704,7 +1704,7 @@ bool JumpToPositionInSong::canBeRun() const
return Mpd.isPlaying() && Mpd.GetTotalTime() > 0;
}
-void JumpToPositionInSong::Run()
+void JumpToPositionInSong::run()
{
using Global::wFooter;
@@ -1751,7 +1751,7 @@ bool ReverseSelection::canBeRun() const
return w && w->allowsSelection();
}
-void ReverseSelection::Run()
+void ReverseSelection::run()
{
auto w = hasSongs(myScreen);
w->reverseSelection();
@@ -1763,7 +1763,7 @@ bool RemoveSelection::canBeRun() const
return proxySongList(myScreen);
}
-void RemoveSelection::Run()
+void RemoveSelection::run()
{
auto pl = proxySongList(myScreen);
for (size_t i = 0; i < pl.size(); ++i)
@@ -1777,7 +1777,7 @@ bool SelectAlbum::canBeRun() const
return w && w->allowsSelection() && w->proxySongList();
}
-void SelectAlbum::Run()
+void SelectAlbum::run()
{
auto pl = proxySongList(myScreen);
size_t pos = pl.choice();
@@ -1814,16 +1814,16 @@ bool AddSelectedItems::canBeRun() const
return myScreen != mySelectedItemsAdder;
}
-void AddSelectedItems::Run()
+void AddSelectedItems::run()
{
mySelectedItemsAdder->switchTo();
}
-void CropMainPlaylist::Run()
+void CropMainPlaylist::run()
{
bool yes = true;
if (Config.ask_before_clearing_main_playlist)
- yes = AskYesNoQuestion("Do you really want to crop main playlist?", Status::trace);
+ yes = askYesNoQuestion("Do you really want to crop main playlist?", Status::trace);
if (yes)
{
Statusbar::msg("Cropping playlist...");
@@ -1837,13 +1837,13 @@ bool CropPlaylist::canBeRun() const
return myScreen == myPlaylistEditor;
}
-void CropPlaylist::Run()
+void CropPlaylist::run()
{
assert(!myPlaylistEditor->Playlists.empty());
std::string playlist = myPlaylistEditor->Playlists.current().value();
bool yes = true;
if (Config.ask_before_clearing_main_playlist)
- yes = AskYesNoQuestion("Do you really want to crop playlist \"" + playlist + "\"?", Status::trace);
+ yes = askYesNoQuestion("Do you really want to crop playlist \"" + playlist + "\"?", Status::trace);
if (yes)
{
auto delete_fun = std::bind(&MPD::Connection::PlaylistDelete, _1, playlist, _2);
@@ -1853,11 +1853,11 @@ void CropPlaylist::Run()
}
}
-void ClearMainPlaylist::Run()
+void ClearMainPlaylist::run()
{
bool yes = true;
if (Config.ask_before_clearing_main_playlist)
- yes = AskYesNoQuestion("Do you really want to clear main playlist?", Status::trace);
+ yes = askYesNoQuestion("Do you really want to clear main playlist?", Status::trace);
if (yes)
{
auto delete_fun = std::bind(&MPD::Connection::Delete, _1, _2);
@@ -1873,13 +1873,13 @@ bool ClearPlaylist::canBeRun() const
return myScreen == myPlaylistEditor;
}
-void ClearPlaylist::Run()
+void ClearPlaylist::run()
{
assert(!myPlaylistEditor->Playlists.empty());
std::string playlist = myPlaylistEditor->Playlists.current().value();
bool yes = true;
if (Config.ask_before_clearing_main_playlist)
- yes = AskYesNoQuestion("Do you really want to clear playlist \"" + playlist + "\"?", Status::trace);
+ yes = askYesNoQuestion("Do you really want to clear playlist \"" + playlist + "\"?", Status::trace);
if (yes)
{
auto delete_fun = std::bind(&MPD::Connection::PlaylistDelete, _1, playlist, _2);
@@ -1895,7 +1895,7 @@ bool SortPlaylist::canBeRun() const
return myScreen == myPlaylist;
}
-void SortPlaylist::Run()
+void SortPlaylist::run()
{
mySortPlaylistDialog->switchTo();
}
@@ -1905,7 +1905,7 @@ bool ReversePlaylist::canBeRun() const
return myScreen == myPlaylist;
}
-void ReversePlaylist::Run()
+void ReversePlaylist::run()
{
myPlaylist->Reverse();
}
@@ -1916,7 +1916,7 @@ bool ApplyFilter::canBeRun() const
return w && w->allowsFiltering();
}
-void ApplyFilter::Run()
+void ApplyFilter::run()
{
using Global::wFooter;
@@ -1945,7 +1945,7 @@ void ApplyFilter::Run()
Playlist::ReloadTotalLength = true;
drawHeader();
}
- ListsChangeFinisher();
+ listsChangeFinisher();
}
bool Find::canBeRun() const
@@ -1958,7 +1958,7 @@ bool Find::canBeRun() const
;
}
-void Find::Run()
+void Find::run()
{
using Global::wFooter;
@@ -1980,10 +1980,10 @@ bool FindItemBackward::canBeRun() const
return w && w->allowsSearching();
}
-void FindItemForward::Run()
+void FindItemForward::run()
{
- FindItem(fdForward);
- ListsChangeFinisher();
+ findItem(Find::Forward);
+ listsChangeFinisher();
}
bool FindItemForward::canBeRun() const
@@ -1992,10 +1992,10 @@ bool FindItemForward::canBeRun() const
return w && w->allowsSearching();
}
-void FindItemBackward::Run()
+void FindItemBackward::run()
{
- FindItem(fdBackward);
- ListsChangeFinisher();
+ findItem(Find::Backward);
+ listsChangeFinisher();
}
bool NextFoundItem::canBeRun() const
@@ -2003,11 +2003,11 @@ bool NextFoundItem::canBeRun() const
return dynamic_cast<Searchable *>(myScreen);
}
-void NextFoundItem::Run()
+void NextFoundItem::run()
{
Searchable *w = dynamic_cast<Searchable *>(myScreen);
w->nextFound(Config.wrapped_search);
- ListsChangeFinisher();
+ listsChangeFinisher();
}
bool PreviousFoundItem::canBeRun() const
@@ -2015,20 +2015,20 @@ bool PreviousFoundItem::canBeRun() const
return dynamic_cast<Searchable *>(myScreen);
}
-void PreviousFoundItem::Run()
+void PreviousFoundItem::run()
{
Searchable *w = dynamic_cast<Searchable *>(myScreen);
w->prevFound(Config.wrapped_search);
- ListsChangeFinisher();
+ listsChangeFinisher();
}
-void ToggleFindMode::Run()
+void ToggleFindMode::run()
{
Config.wrapped_search = !Config.wrapped_search;
Statusbar::msg("Search mode: %s", Config.wrapped_search ? "Wrapped" : "Normal");
}
-void ToggleReplayGainMode::Run()
+void ToggleReplayGainMode::run()
{
using Global::wFooter;
@@ -2047,32 +2047,32 @@ void ToggleReplayGainMode::Run()
Statusbar::msg("Replay gain mode: %s", Mpd.GetReplayGainMode().c_str());
}
-void ToggleSpaceMode::Run()
+void ToggleSpaceMode::run()
{
Config.space_selects = !Config.space_selects;
Statusbar::msg("Space mode: %s item", Config.space_selects ? "Select" : "Add");
}
-void ToggleAddMode::Run()
+void ToggleAddMode::run()
{
Config.ncmpc_like_songs_adding = !Config.ncmpc_like_songs_adding;
Statusbar::msg("Add mode: %s", Config.ncmpc_like_songs_adding ? "Add item to playlist, remove if already added" : "Always add item to playlist");
}
-void ToggleMouse::Run()
+void ToggleMouse::run()
{
Config.mouse_support = !Config.mouse_support;
mousemask(Config.mouse_support ? ALL_MOUSE_EVENTS : 0, 0);
Statusbar::msg("Mouse support %s", Config.mouse_support ? "enabled" : "disabled");
}
-void ToggleBitrateVisibility::Run()
+void ToggleBitrateVisibility::run()
{
Config.display_bitrate = !Config.display_bitrate;
Statusbar::msg("Bitrate visibility %s", Config.display_bitrate ? "enabled" : "disabled");
}
-void AddRandomItems::Run()
+void AddRandomItems::run()
{
using Global::wFooter;
@@ -2111,7 +2111,7 @@ bool ToggleBrowserSortMode::canBeRun() const
return myScreen == myBrowser;
}
-void ToggleBrowserSortMode::Run()
+void ToggleBrowserSortMode::run()
{
switch (Config.browser_sort_mode)
{
@@ -2142,7 +2142,7 @@ bool ToggleLibraryTagType::canBeRun() const
|| (myLibrary->Columns() == 2 && myScreen->isActiveWindow(myLibrary->Albums));
}
-void ToggleLibraryTagType::Run()
+void ToggleLibraryTagType::run()
{
using Global::wFooter;
@@ -2190,7 +2190,7 @@ bool ToggleMediaLibrarySortMode::canBeRun() const
return myScreen == myLibrary;
}
-void ToggleMediaLibrarySortMode::Run()
+void ToggleMediaLibrarySortMode::run()
{
myLibrary->toggleSortMode();
}
@@ -2204,7 +2204,7 @@ bool RefetchLyrics::canBeRun() const
# endif // HAVE_CURL_CURL_H
}
-void RefetchLyrics::Run()
+void RefetchLyrics::run()
{
# ifdef HAVE_CURL_CURL_H
myLyrics->Refetch();
@@ -2220,7 +2220,7 @@ bool RefetchArtistInfo::canBeRun() const
# endif // HAVE_CURL_CURL_H
}
-void RefetchArtistInfo::Run()
+void RefetchArtistInfo::run()
{
# ifdef HAVE_CURL_CURL_H
myLastfm->Refetch();
@@ -2237,7 +2237,7 @@ bool SetSelectedItemsPriority::canBeRun() const
return myScreen == myPlaylist && !myPlaylist->main().empty();
}
-void SetSelectedItemsPriority::Run()
+void SetSelectedItemsPriority::run()
{
using Global::wFooter;
@@ -2261,7 +2261,7 @@ bool FilterPlaylistOnPriorities::canBeRun() const
return myScreen == myPlaylist;
}
-void FilterPlaylistOnPriorities::Run()
+void FilterPlaylistOnPriorities::run()
{
using Global::wFooter;
@@ -2279,7 +2279,7 @@ void FilterPlaylistOnPriorities::Run()
Statusbar::msg("Playlist filtered (songs with priority higher than %u)", prio);
}
-void ShowSongInfo::Run()
+void ShowSongInfo::run()
{
mySongInfo->switchTo();
}
@@ -2297,7 +2297,7 @@ bool ShowArtistInfo::canBeRun() const
# endif // NOT HAVE_CURL_CURL_H
}
-void ShowArtistInfo::Run()
+void ShowArtistInfo::run()
{
# ifdef HAVE_CURL_CURL_H
if (myScreen == myLastfm || myLastfm->isDownloading())
@@ -2325,17 +2325,17 @@ void ShowArtistInfo::Run()
# endif // HAVE_CURL_CURL_H
}
-void ShowLyrics::Run()
+void ShowLyrics::run()
{
myLyrics->switchTo();
}
-void Quit::Run()
+void Quit::run()
{
ExitMainLoop = true;
}
-void NextScreen::Run()
+void NextScreen::run()
{
if (Config.screen_switcher_previous)
{
@@ -2352,7 +2352,7 @@ void NextScreen::Run()
}
}
-void PreviousScreen::Run()
+void PreviousScreen::run()
{
if (Config.screen_switcher_previous)
{
@@ -2378,7 +2378,7 @@ bool ShowHelp::canBeRun() const
;
}
-void ShowHelp::Run()
+void ShowHelp::run()
{
myHelp->switchTo();
}
@@ -2392,7 +2392,7 @@ bool ShowPlaylist::canBeRun() const
;
}
-void ShowPlaylist::Run()
+void ShowPlaylist::run()
{
myPlaylist->switchTo();
}
@@ -2406,7 +2406,7 @@ bool ShowBrowser::canBeRun() const
;
}
-void ShowBrowser::Run()
+void ShowBrowser::run()
{
myBrowser->switchTo();
}
@@ -2416,7 +2416,7 @@ bool ChangeBrowseMode::canBeRun() const
return myScreen == myBrowser;
}
-void ChangeBrowseMode::Run()
+void ChangeBrowseMode::run()
{
myBrowser->ChangeBrowseMode();
}
@@ -2430,7 +2430,7 @@ bool ShowSearchEngine::canBeRun() const
;
}
-void ShowSearchEngine::Run()
+void ShowSearchEngine::run()
{
mySearcher->switchTo();
}
@@ -2440,7 +2440,7 @@ bool ResetSearchEngine::canBeRun() const
return myScreen == mySearcher;
}
-void ResetSearchEngine::Run()
+void ResetSearchEngine::run()
{
mySearcher->reset();
}
@@ -2454,7 +2454,7 @@ bool ShowMediaLibrary::canBeRun() const
;
}
-void ShowMediaLibrary::Run()
+void ShowMediaLibrary::run()
{
myLibrary->switchTo();
}
@@ -2464,7 +2464,7 @@ bool ToggleMediaLibraryColumnsMode::canBeRun() const
return myScreen == myLibrary;
}
-void ToggleMediaLibraryColumnsMode::Run()
+void ToggleMediaLibraryColumnsMode::run()
{
myLibrary->toggleColumnsMode();
myLibrary->refresh();
@@ -2479,7 +2479,7 @@ bool ShowPlaylistEditor::canBeRun() const
;
}
-void ShowPlaylistEditor::Run()
+void ShowPlaylistEditor::run()
{
myPlaylistEditor->switchTo();
}
@@ -2494,7 +2494,7 @@ bool ShowTagEditor::canBeRun() const
# endif // HAVE_TAGLIB_H
}
-void ShowTagEditor::Run()
+void ShowTagEditor::run()
{
# ifdef HAVE_TAGLIB_H
if (isMPDMusicDirSet())
@@ -2515,7 +2515,7 @@ bool ShowOutputs::canBeRun() const
# endif // ENABLE_OUTPUTS
}
-void ShowOutputs::Run()
+void ShowOutputs::run()
{
# ifdef ENABLE_OUTPUTS
myOutputs->switchTo();
@@ -2535,7 +2535,7 @@ bool ShowVisualizer::canBeRun() const
# endif // ENABLE_VISUALIZER
}
-void ShowVisualizer::Run()
+void ShowVisualizer::run()
{
# ifdef ENABLE_VISUALIZER
myVisualizer->switchTo();
@@ -2555,7 +2555,7 @@ bool ShowClock::canBeRun() const
# endif // ENABLE_CLOCK
}
-void ShowClock::Run()
+void ShowClock::run()
{
# ifdef ENABLE_CLOCK
myClock->switchTo();
@@ -2569,7 +2569,7 @@ bool ShowServerInfo::canBeRun() const
}
#endif // HAVE_TAGLIB_H
-void ShowServerInfo::Run()
+void ShowServerInfo::run()
{
myServerInfo->switchTo();
}
@@ -2578,7 +2578,7 @@ namespace {//
void insertAction(Action *a)
{
- Actions[a->Type()] = a;
+ Actions[a->type()] = a;
}
void populateActions()
diff --git a/src/actions.h b/src/actions.h
index be58f229..7816f162 100644
--- a/src/actions.h
+++ b/src/actions.h
@@ -28,62 +28,68 @@
enum ActionType
{
aMacroUtility,
- aDummy, aMouseEvent, aScrollUp, aScrollDown, aScrollUpArtist, aScrollUpAlbum, aScrollDownArtist,
- aScrollDownAlbum, aPageUp, aPageDown, aMoveHome, aMoveEnd, aToggleInterface, aJumpToParentDirectory,
- aPressEnter, aPressSpace, aPreviousColumn, aNextColumn, aMasterScreen, aSlaveScreen, aVolumeUp,
- aVolumeDown, aDeletePlaylistItems, aDeleteStoredPlaylist, aDeleteBrowserItems, aReplaySong, aPrevious, aNext, aPause, aStop, aExecuteCommand, aSavePlaylist,
- aMoveSortOrderUp, aMoveSortOrderDown, aMoveSelectedItemsUp, aMoveSelectedItemsDown,
- aMoveSelectedItemsTo, aAdd, aSeekForward, aSeekBackward, aToggleDisplayMode, aToggleSeparatorsBetweenAlbums,
- aToggleLyricsFetcher, aToggleFetchingLyricsInBackground, aTogglePlayingSongCentering, aUpdateDatabase,
- aJumpToPlayingSong, aToggleRepeat, aShuffle, aToggleRandom, aStartSearching, aSaveTagChanges,
- aToggleSingle, aToggleConsume, aToggleCrossfade, aSetCrossfade, aEditSong, aEditLibraryTag,
- aEditLibraryAlbum, aEditDirectoryName, aEditPlaylistName, aEditLyrics, aJumpToBrowser,
- aJumpToMediaLibrary, aJumpToPlaylistEditor, aToggleScreenLock, aJumpToTagEditor,
- aJumpToPositionInSong, aReverseSelection, aRemoveSelection, aSelectAlbum, aAddSelectedItems,
- aCropMainPlaylist, aCropPlaylist, aClearMainPlaylist, aClearPlaylist, aSortPlaylist, aReversePlaylist,
- aApplyFilter, aFind, aFindItemForward, aFindItemBackward, aNextFoundItem,
- aPreviousFoundItem, aToggleFindMode, aToggleReplayGainMode, aToggleSpaceMode, aToggleAddMode,
- aToggleMouse, aToggleBitrateVisibility, aAddRandomItems, aToggleBrowserSortMode, aToggleLibraryTagType, aToggleMediaLibrarySortMode,
- aRefetchLyrics, aRefetchArtistInfo, aSetSelectedItemsPriority, aFilterPlaylistOnPriorities,
- aShowSongInfo, aShowArtistInfo,
- aShowLyrics, aQuit, aNextScreen, aPreviousScreen, aShowHelp, aShowPlaylist, aShowBrowser, aChangeBrowseMode,
- aShowSearchEngine, aResetSearchEngine, aShowMediaLibrary, aToggleMediaLibraryColumnsMode, aShowPlaylistEditor, aShowTagEditor, aShowOutputs,
- aShowVisualizer, aShowClock, aShowServerInfo
+ aDummy, aMouseEvent, aScrollUp, aScrollDown, aScrollUpArtist, aScrollUpAlbum,
+ aScrollDownArtist, aScrollDownAlbum, aPageUp, aPageDown, aMoveHome, aMoveEnd,
+ aToggleInterface, aJumpToParentDirectory, aPressEnter, aPressSpace, aPreviousColumn,
+ aNextColumn, aMasterScreen, aSlaveScreen, aVolumeUp, aVolumeDown, aDeletePlaylistItems,
+ aDeleteStoredPlaylist, aDeleteBrowserItems, aReplaySong, aPrevious, aNext, aPause,
+ aStop, aExecuteCommand, aSavePlaylist, aMoveSortOrderUp, aMoveSortOrderDown,
+ aMoveSelectedItemsUp, aMoveSelectedItemsDown, aMoveSelectedItemsTo, aAdd,
+ aSeekForward, aSeekBackward, aToggleDisplayMode, aToggleSeparatorsBetweenAlbums,
+ aToggleLyricsFetcher, aToggleFetchingLyricsInBackground, aTogglePlayingSongCentering,
+ aUpdateDatabase, aJumpToPlayingSong, aToggleRepeat, aShuffle, aToggleRandom,
+ aStartSearching, aSaveTagChanges, aToggleSingle, aToggleConsume, aToggleCrossfade,
+ aSetCrossfade, aEditSong, aEditLibraryTag, aEditLibraryAlbum, aEditDirectoryName,
+ aEditPlaylistName, aEditLyrics, aJumpToBrowser, aJumpToMediaLibrary,
+ aJumpToPlaylistEditor, aToggleScreenLock, aJumpToTagEditor, aJumpToPositionInSong,
+ aReverseSelection, aRemoveSelection, aSelectAlbum, aAddSelectedItems,
+ aCropMainPlaylist, aCropPlaylist, aClearMainPlaylist, aClearPlaylist, aSortPlaylist,
+ aReversePlaylist, aApplyFilter, aFind, aFindItemForward, aFindItemBackward,
+ aNextFoundItem, aPreviousFoundItem, aToggleFindMode, aToggleReplayGainMode,
+ aToggleSpaceMode, aToggleAddMode, aToggleMouse, aToggleBitrateVisibility,
+ aAddRandomItems, aToggleBrowserSortMode, aToggleLibraryTagType,
+ aToggleMediaLibrarySortMode, aRefetchLyrics, aRefetchArtistInfo,
+ aSetSelectedItemsPriority, aFilterPlaylistOnPriorities, aShowSongInfo,
+ aShowArtistInfo, aShowLyrics, aQuit, aNextScreen, aPreviousScreen, aShowHelp,
+ aShowPlaylist, aShowBrowser, aChangeBrowseMode, aShowSearchEngine,
+ aResetSearchEngine, aShowMediaLibrary, aToggleMediaLibraryColumnsMode,
+ aShowPlaylistEditor, aShowTagEditor, aShowOutputs, aShowVisualizer,
+ aShowClock, aShowServerInfo
};
struct Action
{
- enum FindDirection { fdForward, fdBackward };
+ enum class Find { Forward, Backward };
- Action(ActionType type, const char *name) : itsType(type), itsName(name) { }
+ Action(ActionType type, const char *name) : m_type(type), m_name(name) { }
- const char *Name() const { return itsName; }
- ActionType Type() const { return itsType; }
+ const char *name() const { return m_name; }
+ ActionType type() const { return m_type; }
virtual bool canBeRun() const { return true; }
- bool Execute()
+ bool execute()
{
if (canBeRun())
{
- Run();
+ run();
return true;
}
return false;
}
- static void ValidateScreenSize();
- static void InitializeScreens();
- static void SetResizeFlags();
- static void ResizeScreen(bool reload_main_window);
- static void SetWindowsDimensions();
+ static void validateScreenSize();
+ static void initializeScreens();
+ static void setResizeFlags();
+ static void resizeScreen(bool reload_main_window);
+ static void setWindowsDimensions();
- static bool ConnectToMPD();
- static bool AskYesNoQuestion(const std::string &question, void (*callback)());
+ static bool connectToMPD();
+ static bool askYesNoQuestion(const std::string &question, void (*callback)());
static bool isMPDMusicDirSet();
- static Action *Get(ActionType at);
- static Action *Get(const std::string &name);
+ static Action *get(ActionType at);
+ static Action *get(const std::string &name);
static bool OriginalStatusbarVisibility;
static bool ExitMainLoop;
@@ -93,15 +99,15 @@ struct Action
static size_t FooterStartY;
protected:
- virtual void Run() = 0;
+ virtual void run() = 0;
- static void Seek();
- static void FindItem(const FindDirection);
- static void ListsChangeFinisher();
+ static void seek();
+ static void findItem(const Find direction);
+ static void listsChangeFinisher();
private:
- ActionType itsType;
- const char *itsName;
+ ActionType m_type;
+ const char *m_name;
};
struct Dummy : public Action
@@ -109,7 +115,7 @@ struct Dummy : public Action
Dummy() : Action(aDummy, "dummy") { }
protected:
- virtual void Run() { }
+ virtual void run() { }
};
struct MouseEvent : public Action
@@ -118,11 +124,11 @@ struct MouseEvent : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
private:
- MEVENT itsMouseEvent;
- MEVENT itsOldMouseEvent;
+ MEVENT m_mouse_event;
+ MEVENT m_old_mouse_event;
};
struct ScrollUp : public Action
@@ -130,7 +136,7 @@ struct ScrollUp : public Action
ScrollUp() : Action(aScrollUp, "scroll_up") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ScrollDown : public Action
@@ -138,7 +144,7 @@ struct ScrollDown : public Action
ScrollDown() : Action(aScrollDown, "scroll_down") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ScrollUpArtist : public Action
@@ -147,7 +153,7 @@ struct ScrollUpArtist : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ScrollUpAlbum : public Action
@@ -156,7 +162,7 @@ struct ScrollUpAlbum : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ScrollDownArtist : public Action
@@ -165,7 +171,7 @@ struct ScrollDownArtist : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ScrollDownAlbum : public Action
@@ -174,7 +180,7 @@ struct ScrollDownAlbum : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct PageUp : public Action
@@ -182,7 +188,7 @@ struct PageUp : public Action
PageUp() : Action(aPageUp, "page_up") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct PageDown : public Action
@@ -190,7 +196,7 @@ struct PageDown : public Action
PageDown() : Action(aPageDown, "page_down") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct MoveHome : public Action
@@ -198,7 +204,7 @@ struct MoveHome : public Action
MoveHome() : Action(aMoveHome, "move_home") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct MoveEnd : public Action
@@ -206,7 +212,7 @@ struct MoveEnd : public Action
MoveEnd() : Action(aMoveEnd, "move_end") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ToggleInterface : public Action
@@ -214,7 +220,7 @@ struct ToggleInterface : public Action
ToggleInterface() : Action(aToggleInterface, "toggle_interface") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct JumpToParentDirectory : public Action
@@ -223,7 +229,7 @@ struct JumpToParentDirectory : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct PressEnter : public Action
@@ -231,7 +237,7 @@ struct PressEnter : public Action
PressEnter() : Action(aPressEnter, "press_enter") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct PressSpace : public Action
@@ -239,7 +245,7 @@ struct PressSpace : public Action
PressSpace() : Action(aPressSpace, "press_space") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct PreviousColumn : public Action
@@ -248,7 +254,7 @@ struct PreviousColumn : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct NextColumn : public Action
@@ -257,7 +263,7 @@ struct NextColumn : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct MasterScreen : public Action
@@ -266,7 +272,7 @@ struct MasterScreen : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct SlaveScreen : public Action
@@ -275,7 +281,7 @@ struct SlaveScreen : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct VolumeUp : public Action
@@ -283,7 +289,7 @@ struct VolumeUp : public Action
VolumeUp() : Action(aVolumeUp, "volume_up") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct VolumeDown : public Action
@@ -291,7 +297,7 @@ struct VolumeDown : public Action
VolumeDown() : Action(aVolumeDown, "volume_down") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct DeletePlaylistItems : public Action
@@ -300,7 +306,7 @@ struct DeletePlaylistItems : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct DeleteStoredPlaylist : public Action
@@ -309,7 +315,7 @@ struct DeleteStoredPlaylist : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct DeleteBrowserItems : public Action
@@ -318,7 +324,7 @@ struct DeleteBrowserItems : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ReplaySong : public Action
@@ -326,7 +332,7 @@ struct ReplaySong : public Action
ReplaySong() : Action(aReplaySong, "replay_song") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct PreviousSong : public Action
@@ -334,7 +340,7 @@ struct PreviousSong : public Action
PreviousSong() : Action(aPrevious, "previous") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct NextSong : public Action
@@ -342,7 +348,7 @@ struct NextSong : public Action
NextSong() : Action(aNext, "next") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct Pause : public Action
@@ -350,7 +356,7 @@ struct Pause : public Action
Pause() : Action(aPause, "pause") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct Stop : public Action
@@ -358,7 +364,7 @@ struct Stop : public Action
Stop() : Action(aStop, "stop") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ExecuteCommand : public Action
@@ -366,7 +372,7 @@ struct ExecuteCommand : public Action
ExecuteCommand() : Action(aExecuteCommand, "execute_command") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct SavePlaylist : public Action
@@ -374,7 +380,7 @@ struct SavePlaylist : public Action
SavePlaylist() : Action(aSavePlaylist, "save_playlist") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct MoveSortOrderUp : public Action
@@ -383,7 +389,7 @@ struct MoveSortOrderUp : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct MoveSortOrderDown : public Action
@@ -392,7 +398,7 @@ struct MoveSortOrderDown : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct MoveSelectedItemsUp : public Action
@@ -401,7 +407,7 @@ struct MoveSelectedItemsUp : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct MoveSelectedItemsDown : public Action
@@ -410,7 +416,7 @@ struct MoveSelectedItemsDown : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct MoveSelectedItemsTo : public Action
@@ -419,7 +425,7 @@ struct MoveSelectedItemsTo : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct Add : public Action
@@ -428,7 +434,7 @@ struct Add : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct SeekForward : public Action
@@ -437,7 +443,7 @@ struct SeekForward : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct SeekBackward : public Action
@@ -446,7 +452,7 @@ struct SeekBackward : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ToggleDisplayMode : public Action
@@ -455,7 +461,7 @@ struct ToggleDisplayMode : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ToggleSeparatorsBetweenAlbums : public Action
@@ -465,7 +471,7 @@ struct ToggleSeparatorsBetweenAlbums : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ToggleLyricsFetcher : public Action
@@ -476,7 +482,7 @@ protected:
# ifndef HAVE_CURL_CURL_H
virtual bool canBeRun() const;
# endif // NOT HAVE_CURL_CURL_H
- virtual void Run();
+ virtual void run();
};
struct ToggleFetchingLyricsInBackground : public Action
@@ -488,7 +494,7 @@ protected:
# ifndef HAVE_CURL_CURL_H
virtual bool canBeRun() const;
# endif // NOT HAVE_CURL_CURL_H
- virtual void Run();
+ virtual void run();
};
struct TogglePlayingSongCentering : public Action
@@ -497,7 +503,7 @@ struct TogglePlayingSongCentering : public Action
: Action(aTogglePlayingSongCentering, "toggle_playing_song_centering") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct UpdateDatabase : public Action
@@ -505,7 +511,7 @@ struct UpdateDatabase : public Action
UpdateDatabase() : Action(aUpdateDatabase, "update_database") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct JumpToPlayingSong : public Action
@@ -514,7 +520,7 @@ struct JumpToPlayingSong : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ToggleRepeat : public Action
@@ -522,7 +528,7 @@ struct ToggleRepeat : public Action
ToggleRepeat() : Action(aToggleRepeat, "toggle_repeat") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct Shuffle : public Action
@@ -530,7 +536,7 @@ struct Shuffle : public Action
Shuffle() : Action(aShuffle, "shuffle") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ToggleRandom : public Action
@@ -538,7 +544,7 @@ struct ToggleRandom : public Action
ToggleRandom() : Action(aToggleRandom, "toggle_random") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct StartSearching : public Action
@@ -547,7 +553,7 @@ struct StartSearching : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct SaveTagChanges : public Action
@@ -556,7 +562,7 @@ struct SaveTagChanges : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ToggleSingle : public Action
@@ -564,7 +570,7 @@ struct ToggleSingle : public Action
ToggleSingle() : Action(aToggleSingle, "toggle_single") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ToggleConsume : public Action
@@ -572,7 +578,7 @@ struct ToggleConsume : public Action
ToggleConsume() : Action(aToggleConsume, "toggle_consume") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ToggleCrossfade : public Action
@@ -580,7 +586,7 @@ struct ToggleCrossfade : public Action
ToggleCrossfade() : Action(aToggleCrossfade, "toggle_crossfade") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct SetCrossfade : public Action
@@ -588,7 +594,7 @@ struct SetCrossfade : public Action
SetCrossfade() : Action(aSetCrossfade, "set_crossfade") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct EditSong : public Action
@@ -597,7 +603,7 @@ struct EditSong : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct EditLibraryTag : public Action
@@ -606,7 +612,7 @@ struct EditLibraryTag : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct EditLibraryAlbum : public Action
@@ -615,7 +621,7 @@ struct EditLibraryAlbum : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct EditDirectoryName : public Action
@@ -624,7 +630,7 @@ struct EditDirectoryName : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct EditPlaylistName : public Action
@@ -633,7 +639,7 @@ struct EditPlaylistName : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct EditLyrics : public Action
@@ -642,7 +648,7 @@ struct EditLyrics : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct JumpToBrowser : public Action
@@ -651,7 +657,7 @@ struct JumpToBrowser : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct JumpToMediaLibrary : public Action
@@ -660,7 +666,7 @@ struct JumpToMediaLibrary : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct JumpToPlaylistEditor : public Action
@@ -669,7 +675,7 @@ struct JumpToPlaylistEditor : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ToggleScreenLock : public Action
@@ -677,7 +683,7 @@ struct ToggleScreenLock : public Action
ToggleScreenLock() : Action(aToggleScreenLock, "toggle_screen_lock") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct JumpToTagEditor : public Action
@@ -686,7 +692,7 @@ struct JumpToTagEditor : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct JumpToPositionInSong : public Action
@@ -695,7 +701,7 @@ struct JumpToPositionInSong : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ReverseSelection : public Action
@@ -704,7 +710,7 @@ struct ReverseSelection : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct RemoveSelection : public Action
@@ -713,7 +719,7 @@ struct RemoveSelection : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct SelectAlbum : public Action
@@ -722,7 +728,7 @@ struct SelectAlbum : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct AddSelectedItems : public Action
@@ -731,7 +737,7 @@ struct AddSelectedItems : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct CropMainPlaylist : public Action
@@ -739,7 +745,7 @@ struct CropMainPlaylist : public Action
CropMainPlaylist() : Action(aCropMainPlaylist, "crop_main_playlist") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct CropPlaylist : public Action
@@ -748,7 +754,7 @@ struct CropPlaylist : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ClearMainPlaylist : public Action
@@ -756,7 +762,7 @@ struct ClearMainPlaylist : public Action
ClearMainPlaylist() : Action(aClearMainPlaylist, "clear_main_playlist") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ClearPlaylist : public Action
@@ -765,7 +771,7 @@ struct ClearPlaylist : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct SortPlaylist : public Action
@@ -774,7 +780,7 @@ struct SortPlaylist : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ReversePlaylist : public Action
@@ -783,7 +789,7 @@ struct ReversePlaylist : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ApplyFilter : public Action
@@ -792,7 +798,7 @@ struct ApplyFilter : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct Find : public Action
@@ -801,7 +807,7 @@ struct Find : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct FindItemForward : public Action
@@ -810,7 +816,7 @@ struct FindItemForward : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct FindItemBackward : public Action
@@ -819,7 +825,7 @@ struct FindItemBackward : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct NextFoundItem : public Action
@@ -828,7 +834,7 @@ struct NextFoundItem : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct PreviousFoundItem : public Action
@@ -837,7 +843,7 @@ struct PreviousFoundItem : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ToggleFindMode : public Action
@@ -845,7 +851,7 @@ struct ToggleFindMode : public Action
ToggleFindMode() : Action(aToggleFindMode, "toggle_find_mode") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ToggleReplayGainMode : public Action
@@ -853,7 +859,7 @@ struct ToggleReplayGainMode : public Action
ToggleReplayGainMode() : Action(aToggleReplayGainMode, "toggle_replay_gain_mode") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ToggleSpaceMode : public Action
@@ -861,7 +867,7 @@ struct ToggleSpaceMode : public Action
ToggleSpaceMode() : Action(aToggleSpaceMode, "toggle_space_mode") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ToggleAddMode : public Action
@@ -869,7 +875,7 @@ struct ToggleAddMode : public Action
ToggleAddMode() : Action(aToggleAddMode, "toggle_add_mode") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ToggleMouse : public Action
@@ -877,7 +883,7 @@ struct ToggleMouse : public Action
ToggleMouse() : Action(aToggleMouse, "toggle_mouse") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ToggleBitrateVisibility : public Action
@@ -885,7 +891,7 @@ struct ToggleBitrateVisibility : public Action
ToggleBitrateVisibility() : Action(aToggleBitrateVisibility, "toggle_bitrate_visibility") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct AddRandomItems : public Action
@@ -893,7 +899,7 @@ struct AddRandomItems : public Action
AddRandomItems() : Action(aAddRandomItems, "add_random_items") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ToggleBrowserSortMode : public Action
@@ -902,7 +908,7 @@ struct ToggleBrowserSortMode : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ToggleLibraryTagType : public Action
@@ -911,7 +917,7 @@ struct ToggleLibraryTagType : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ToggleMediaLibrarySortMode : public Action
@@ -921,7 +927,7 @@ struct ToggleMediaLibrarySortMode : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct RefetchLyrics : public Action
@@ -930,7 +936,7 @@ struct RefetchLyrics : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct RefetchArtistInfo : public Action
@@ -939,7 +945,7 @@ struct RefetchArtistInfo : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct SetSelectedItemsPriority : public Action
@@ -949,7 +955,7 @@ struct SetSelectedItemsPriority : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct FilterPlaylistOnPriorities : public Action
@@ -959,7 +965,7 @@ struct FilterPlaylistOnPriorities : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ShowSongInfo : public Action
@@ -967,7 +973,7 @@ struct ShowSongInfo : public Action
ShowSongInfo() : Action(aShowSongInfo, "show_song_info") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ShowArtistInfo : public Action
@@ -976,7 +982,7 @@ struct ShowArtistInfo : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ShowLyrics : public Action
@@ -984,7 +990,7 @@ struct ShowLyrics : public Action
ShowLyrics() : Action(aShowLyrics, "show_lyrics") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct Quit : public Action
@@ -992,7 +998,7 @@ struct Quit : public Action
Quit() : Action(aQuit, "quit") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct NextScreen : public Action
@@ -1000,7 +1006,7 @@ struct NextScreen : public Action
NextScreen() : Action(aNextScreen, "next_screen") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct PreviousScreen : public Action
@@ -1008,7 +1014,7 @@ struct PreviousScreen : public Action
PreviousScreen() : Action(aPreviousScreen, "previous_screen") { }
protected:
- virtual void Run();
+ virtual void run();
};
struct ShowHelp : public Action
@@ -1017,7 +1023,7 @@ struct ShowHelp : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ShowPlaylist : public Action
@@ -1026,7 +1032,7 @@ struct ShowPlaylist : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ShowBrowser : public Action
@@ -1035,7 +1041,7 @@ struct ShowBrowser : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ChangeBrowseMode : public Action
@@ -1044,7 +1050,7 @@ struct ChangeBrowseMode : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ShowSearchEngine : public Action
@@ -1053,7 +1059,7 @@ struct ShowSearchEngine : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ResetSearchEngine : public Action
@@ -1062,7 +1068,7 @@ struct ResetSearchEngine : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ShowMediaLibrary : public Action
@@ -1071,7 +1077,7 @@ struct ShowMediaLibrary : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ToggleMediaLibraryColumnsMode : public Action
@@ -1081,7 +1087,7 @@ struct ToggleMediaLibraryColumnsMode : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ShowPlaylistEditor : public Action
@@ -1090,7 +1096,7 @@ struct ShowPlaylistEditor : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ShowTagEditor : public Action
@@ -1099,7 +1105,7 @@ struct ShowTagEditor : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ShowOutputs : public Action
@@ -1108,7 +1114,7 @@ struct ShowOutputs : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ShowVisualizer : public Action
@@ -1117,7 +1123,7 @@ struct ShowVisualizer : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ShowClock : public Action
@@ -1126,7 +1132,7 @@ struct ShowClock : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run();
+ virtual void run();
};
struct ShowServerInfo : public Action
@@ -1137,7 +1143,7 @@ protected:
# ifdef HAVE_TAGLIB_H
virtual bool canBeRun() const;
# endif // HAVE_TAGLIB_H
- virtual void Run();
+ virtual void run();
};
#endif // NCMPCPP_ACTIONS_H
diff --git a/src/bindings.cpp b/src/bindings.cpp
index 838083c1..64cf1d67 100644
--- a/src/bindings.cpp
+++ b/src/bindings.cpp
@@ -98,7 +98,7 @@ Action *parseActionLine(const std::string &line, F error)
size_t i = 0;
for (; i < line.size() && !isspace(line[i]); ++i) { }
if (i == line.size()) // only action name
- result = Action::Get(line);
+ result = Action::get(line);
else // there is something else
{
std::string action_name = line.substr(0, i);
@@ -141,7 +141,7 @@ Action *parseActionLine(const std::string &line, F error)
{
// require that given action is runnable
std::string arg = getEnclosedString(line, '"', '"', 0);
- Action *action = Action::Get(arg);
+ Action *action = Action::get(arg);
if (action)
result = new RequireRunnable(action);
else
diff --git a/src/bindings.h b/src/bindings.h
index 19ab5255..0dcf44cc 100644
--- a/src/bindings.h
+++ b/src/bindings.h
@@ -74,7 +74,7 @@ struct Binding
{
typedef std::vector<Action *> ActionChain;
- Binding(ActionType at) : m_is_single(true), m_action(Action::Get(at)) { }
+ Binding(ActionType at) : m_is_single(true), m_action(Action::get(at)) { }
Binding(const ActionChain &actions) {
assert(actions.size() > 0);
if (actions.size() == 1) {
@@ -90,10 +90,10 @@ struct Binding
bool result = false;
if (m_is_single) {
assert(m_action);
- result = m_action->Execute();
+ result = m_action->execute();
} else {
for (auto it = m_chain->begin(); it != m_chain->end(); ++it)
- if (!(*it)->Execute())
+ if (!(*it)->execute())
break;
result = true;
}
diff --git a/src/cmdargs.cpp b/src/cmdargs.cpp
index 6222009b..bc1e112d 100644
--- a/src/cmdargs.cpp
+++ b/src/cmdargs.cpp
@@ -121,7 +121,7 @@ void ParseArgv(int argc, char **argv)
exit(0);
}
- if (!Action::ConnectToMPD())
+ if (!Action::connectToMPD())
exit(1);
if (!strcmp(argv[i], "-s") || !strcmp(argv[i], "--screen"))
diff --git a/src/help.cpp b/src/help.cpp
index 9bbc6c87..a1ec1214 100644
--- a/src/help.cpp
+++ b/src/help.cpp
@@ -131,7 +131,7 @@ std::string Help::DisplayKeys(const ActionType at)
{
for (auto j = it->second.begin(); j != it->second.end(); ++j)
{
- if (j->isSingle() && j->action()->Type() == at)
+ if (j->isSingle() && j->action()->type() == at)
{
result += keyToString(it->first, &print_backspace);
result += " ";
diff --git a/src/macro_utilities.cpp b/src/macro_utilities.cpp
index 05125ad1..142786a5 100644
--- a/src/macro_utilities.cpp
+++ b/src/macro_utilities.cpp
@@ -21,7 +21,7 @@
#include "global.h"
#include "macro_utilities.h"
-void PushCharacters::Run()
+void PushCharacters::run()
{
for (auto it = m_queue.begin(); it != m_queue.end(); ++it)
(*m_window)->pushChar(*it);
@@ -37,7 +37,7 @@ bool RequireScreen::canBeRun() const
return Global::myScreen->type() == m_screen_type;
}
-void RunExternalCommand::Run()
+void RunExternalCommand::run()
{
GNUC_UNUSED int res;
res = std::system(m_command.c_str());
diff --git a/src/macro_utilities.h b/src/macro_utilities.h
index 14031994..906ef5e9 100644
--- a/src/macro_utilities.h
+++ b/src/macro_utilities.h
@@ -31,7 +31,7 @@ struct PushCharacters : public Action
: Action(aMacroUtility, ""), m_window(w), m_queue(queue) { }
protected:
- virtual void Run();
+ virtual void run();
private:
NC::Window **m_window;
@@ -45,7 +45,7 @@ struct RequireRunnable : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run() { }
+ virtual void run() { }
private:
Action *m_action;
@@ -58,7 +58,7 @@ struct RequireScreen : public Action
protected:
virtual bool canBeRun() const;
- virtual void Run() { }
+ virtual void run() { }
private:
ScreenType m_screen_type;
@@ -70,7 +70,7 @@ struct RunExternalCommand : public Action
: Action(aMacroUtility, ""), m_command(command) { }
protected:
- virtual void Run();
+ virtual void run();
private:
std::string m_command;
diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp
index 26b8871f..570d9965 100644
--- a/src/ncmpcpp.cpp
+++ b/src/ncmpcpp.cpp
@@ -60,7 +60,7 @@ namespace
}
else if (signal == SIGWINCH)
{
- Action::ResizeScreen(true);
+ Action::resizeScreen(true);
}
}
# endif // !WIN32
@@ -121,7 +121,7 @@ int main(int argc, char **argv)
if (argc > 1)
ParseArgv(argc, argv);
- if (!Action::ConnectToMPD())
+ if (!Action::connectToMPD())
exit(1);
if (Mpd.Version() < 16)
@@ -150,9 +150,9 @@ int main(int argc, char **argv)
if (Config.new_design)
Config.statusbar_visibility = 0;
- Action::SetWindowsDimensions();
- Action::ValidateScreenSize();
- Action::InitializeScreens();
+ Action::setWindowsDimensions();
+ Action::validateScreenSize();
+ Action::initializeScreens();
wHeader = new NC::Window(0, 0, COLS, Action::HeaderHeight, "", Config.header_color, NC::brNone);
if (Config.header_visibility || Config.new_design)
diff --git a/src/tag_editor.cpp b/src/tag_editor.cpp
index 69570307..c4efc5a0 100644
--- a/src/tag_editor.cpp
+++ b/src/tag_editor.cpp
@@ -468,7 +468,7 @@ void TagEditor::enterPressed()
if (w == TagTypes && id == 5)
{
- bool yes = Action::AskYesNoQuestion("Number tracks?", Status::trace);
+ bool yes = Action::askYesNoQuestion("Number tracks?", Status::trace);
if (yes)
{
auto it = EditedSongs.begin();
@@ -929,7 +929,7 @@ bool TagEditor::ifAnyModifiedAskForDiscarding()
{
bool result = true;
if (isAnyModified(*Tags))
- result = Action::AskYesNoQuestion("There are pending changes, are you sure?", Status::trace);
+ result = Action::askYesNoQuestion("There are pending changes, are you sure?", Status::trace);
return result;
}