diff --git a/src/browser.cpp b/src/browser.cpp index b362cc72..c8bebdc8 100644 --- a/src/browser.cpp +++ b/src/browser.cpp @@ -276,7 +276,7 @@ void Browser::MouseButtonPressed(MEVENT me) } else { - size_t pos = w->GetPosition(); + size_t pos = w->Choice(); SpacePressed(); if (pos < w->Size()-1) w->Scroll(wUp); @@ -286,7 +286,7 @@ void Browser::MouseButtonPressed(MEVENT me) case itSong: if (me.bstate & BUTTON1_PRESSED) { - size_t pos = w->GetPosition(); + size_t pos = w->Choice(); SpacePressed(); if (pos < w->Size()-1) w->Scroll(wUp); diff --git a/src/media_library.cpp b/src/media_library.cpp index d94ea319..87542bd0 100644 --- a/src/media_library.cpp +++ b/src/media_library.cpp @@ -373,7 +373,7 @@ void MediaLibrary::MouseButtonPressed(MEVENT me) Songs->Goto(me.y); if (me.bstate & BUTTON1_PRESSED) { - size_t pos = Songs->GetPosition(); + size_t pos = Songs->Choice(); SpacePressed(); if (pos < Songs->Size()-1) Songs->Scroll(wUp); diff --git a/src/menu.h b/src/menu.h index 282e8ff7..c7adc5d3 100644 --- a/src/menu.h +++ b/src/menu.h @@ -120,8 +120,6 @@ namespace NCurses void Move(size_t from, size_t to); bool Goto(size_t y); - size_t GetPosition() const { return itsHighlight; } - bool isBold(int id = -1); void BoldOption(int index, bool bold); diff --git a/src/outputs.cpp b/src/outputs.cpp index e832088d..d223dd63 100644 --- a/src/outputs.cpp +++ b/src/outputs.cpp @@ -69,14 +69,14 @@ void Outputs::EnterPressed() { if (w->Current().second) { - if (Mpd->DisableOutput(w->GetPosition())) + if (Mpd->DisableOutput(w->Choice())) ShowMessage("Output \"%s\" disabled", w->Current().first.c_str()); w->Current().second = 0; w->BoldOption(w->Choice(), 0); } else { - if (Mpd->EnableOutput(w->GetPosition())) + if (Mpd->EnableOutput(w->Choice())) ShowMessage("Output \"%s\" enabled", w->Current().first.c_str()); w->Current().second = 1; w->BoldOption(w->Choice(), 1); diff --git a/src/playlist_editor.cpp b/src/playlist_editor.cpp index 1e87731a..bb7e4bf3 100644 --- a/src/playlist_editor.cpp +++ b/src/playlist_editor.cpp @@ -306,7 +306,7 @@ void PlaylistEditor::MouseButtonPressed(MEVENT me) Content->Goto(me.y); if (me.bstate & BUTTON1_PRESSED) { - size_t pos = Content->GetPosition(); + size_t pos = Content->Choice(); SpacePressed(); if (pos < Content->Size()-1) Content->Scroll(wUp); diff --git a/src/search_engine.cpp b/src/search_engine.cpp index 9b2ea920..a413f3f8 100644 --- a/src/search_engine.cpp +++ b/src/search_engine.cpp @@ -304,13 +304,13 @@ void SearchEngine::MouseButtonPressed(MEVENT me) if (!w->Goto(me.y)) return; w->Refresh(); - if ((me.bstate & BUTTON3_PRESSED || w->GetPosition() > 10) && w->GetPosition() < StaticOptions) + if ((me.bstate & BUTTON3_PRESSED || w->Choice() > 10) && w->Choice() < StaticOptions) EnterPressed(); - else if (w->GetPosition() >= StaticOptions) + else if (w->Choice() >= StaticOptions) { if (me.bstate & BUTTON1_PRESSED) { - size_t pos = w->GetPosition(); + size_t pos = w->Choice(); SpacePressed(); if (pos < w->Size()-1) w->Scroll(wUp);