throw away Menu::GetPosition() as Menu::Choice() does the same
oh cool, I forgot that such function already exists under different name ~~
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user