rename Menu::BoldOption() to Menu::Bold()
This commit is contained in:
@@ -108,7 +108,7 @@ void Browser::EnterPressed()
|
|||||||
}
|
}
|
||||||
case itSong:
|
case itSong:
|
||||||
{
|
{
|
||||||
w->BoldOption(w->Choice(), myPlaylist->Add(*item.song, w->isBold(), 1));
|
w->Bold(w->Choice(), myPlaylist->Add(*item.song, w->isBold(), 1));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case itPlaylist:
|
case itPlaylist:
|
||||||
@@ -167,7 +167,7 @@ void Browser::SpacePressed()
|
|||||||
}
|
}
|
||||||
case itSong:
|
case itSong:
|
||||||
{
|
{
|
||||||
w->BoldOption(w->Choice(), myPlaylist->Add(*item.song, w->isBold(), 0));
|
w->Bold(w->Choice(), myPlaylist->Add(*item.song, w->isBold(), 0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case itPlaylist:
|
case itPlaylist:
|
||||||
@@ -503,7 +503,7 @@ void Browser::UpdateItemList()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
w->BoldOption(i, bold);
|
w->Bold(i, bold);
|
||||||
bold = 0;
|
bold = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ void UpdateSongList(Menu<Song> *menu)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
menu->BoldOption(i, bold);
|
menu->Bold(i, bold);
|
||||||
bold = 0;
|
bold = 0;
|
||||||
}
|
}
|
||||||
menu->Refresh();
|
menu->Refresh();
|
||||||
|
|||||||
@@ -502,7 +502,7 @@ void MediaLibrary::AddToPlaylist(bool add_n_play)
|
|||||||
ShowMessage("Adding songs from album \"%s\"", Albums->Current().second.Album.c_str());
|
ShowMessage("Adding songs from album \"%s\"", Albums->Current().second.Album.c_str());
|
||||||
}
|
}
|
||||||
else if (w == Songs && !Songs->Empty())
|
else if (w == Songs && !Songs->Empty())
|
||||||
Songs->BoldOption(Songs->Choice(), myPlaylist->Add(Songs->Current(), Songs->isBold(), add_n_play));
|
Songs->Bold(Songs->Choice(), myPlaylist->Add(Songs->Current(), Songs->isBold(), add_n_play));
|
||||||
FreeSongList(list);
|
FreeSongList(list);
|
||||||
if (!add_n_play)
|
if (!add_n_play)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ namespace NCurses
|
|||||||
/// @param pos position of item to be bolded/unbolded
|
/// @param pos position of item to be bolded/unbolded
|
||||||
/// @param state state of bold attribute
|
/// @param state state of bold attribute
|
||||||
///
|
///
|
||||||
void BoldOption(int pos, bool state);
|
void Bold(int pos, bool state);
|
||||||
|
|
||||||
/// Makes given position static/active.
|
/// Makes given position static/active.
|
||||||
/// Static positions cannot be highlighted.
|
/// Static positions cannot be highlighted.
|
||||||
@@ -651,7 +651,7 @@ template <typename T> void NCurses::Menu<T>::IntoSeparator(size_t pos)
|
|||||||
(*itsOptionsPtr)[pos] = 0;
|
(*itsOptionsPtr)[pos] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T> void NCurses::Menu<T>::BoldOption(int pos, bool state)
|
template <typename T> void NCurses::Menu<T>::Bold(int pos, bool state)
|
||||||
{
|
{
|
||||||
if (!itsOptionsPtr->at(pos))
|
if (!itsOptionsPtr->at(pos))
|
||||||
return;
|
return;
|
||||||
@@ -729,7 +729,7 @@ template <typename T> void NCurses::Menu<T>::Refresh()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((*itsOptionsPtr)[i]->isBold)
|
if ((*itsOptionsPtr)[i]->isBold)
|
||||||
Bold(1);
|
Window::Bold(1);
|
||||||
if (highlightEnabled && int(i) == itsHighlight)
|
if (highlightEnabled && int(i) == itsHighlight)
|
||||||
{
|
{
|
||||||
Reverse(1);
|
Reverse(1);
|
||||||
@@ -748,7 +748,7 @@ template <typename T> void NCurses::Menu<T>::Refresh()
|
|||||||
Reverse(0);
|
Reverse(0);
|
||||||
}
|
}
|
||||||
if ((*itsOptionsPtr)[i]->isBold)
|
if ((*itsOptionsPtr)[i]->isBold)
|
||||||
Bold(0);
|
Window::Bold(0);
|
||||||
line++;
|
line++;
|
||||||
}
|
}
|
||||||
Window::Refresh();
|
Window::Refresh();
|
||||||
|
|||||||
@@ -813,7 +813,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
for (std::vector<size_t>::iterator it = list.begin(); it != list.end(); ++it)
|
for (std::vector<size_t>::iterator it = list.begin(); it != list.end(); ++it)
|
||||||
if (*it == size_t(myPlaylist->NowPlaying) && list.front() > 0)
|
if (*it == size_t(myPlaylist->NowPlaying) && list.front() > 0)
|
||||||
myPlaylist->Items->BoldOption(myPlaylist->NowPlaying, 0);
|
myPlaylist->Items->Bold(myPlaylist->NowPlaying, 0);
|
||||||
|
|
||||||
std::vector<size_t> origs(list);
|
std::vector<size_t> origs(list);
|
||||||
|
|
||||||
@@ -844,7 +844,7 @@ int main(int argc, char *argv[])
|
|||||||
from = to = myPlaylist->Items->Choice();
|
from = to = myPlaylist->Items->Choice();
|
||||||
// unbold now playing as if song changes during move, this won't be unbolded.
|
// unbold now playing as if song changes during move, this won't be unbolded.
|
||||||
if (to == size_t(myPlaylist->NowPlaying) && to > 0)
|
if (to == size_t(myPlaylist->NowPlaying) && to > 0)
|
||||||
myPlaylist->Items->BoldOption(myPlaylist->NowPlaying, 0);
|
myPlaylist->Items->Bold(myPlaylist->NowPlaying, 0);
|
||||||
while (Keypressed(input, Key.MvSongUp) && to > 0)
|
while (Keypressed(input, Key.MvSongUp) && to > 0)
|
||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
@@ -927,7 +927,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
for (std::vector<size_t>::iterator it = list.begin(); it != list.end(); ++it)
|
for (std::vector<size_t>::iterator it = list.begin(); it != list.end(); ++it)
|
||||||
if (*it == size_t(myPlaylist->NowPlaying) && list.back() < myPlaylist->Items->Size()-1)
|
if (*it == size_t(myPlaylist->NowPlaying) && list.back() < myPlaylist->Items->Size()-1)
|
||||||
myPlaylist->Items->BoldOption(myPlaylist->NowPlaying, 0);
|
myPlaylist->Items->Bold(myPlaylist->NowPlaying, 0);
|
||||||
|
|
||||||
std::vector<size_t> origs(list);
|
std::vector<size_t> origs(list);
|
||||||
|
|
||||||
@@ -958,7 +958,7 @@ int main(int argc, char *argv[])
|
|||||||
from = to = myPlaylist->Items->Choice();
|
from = to = myPlaylist->Items->Choice();
|
||||||
// unbold now playing as if song changes during move, this won't be unbolded.
|
// unbold now playing as if song changes during move, this won't be unbolded.
|
||||||
if (to == size_t(myPlaylist->NowPlaying) && to < myPlaylist->Items->Size()-1)
|
if (to == size_t(myPlaylist->NowPlaying) && to < myPlaylist->Items->Size()-1)
|
||||||
myPlaylist->Items->BoldOption(myPlaylist->NowPlaying, 0);
|
myPlaylist->Items->Bold(myPlaylist->NowPlaying, 0);
|
||||||
while (Keypressed(input, Key.MvSongDown) && to < myPlaylist->Items->Size()-1)
|
while (Keypressed(input, Key.MvSongDown) && to < myPlaylist->Items->Size()-1)
|
||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ void Outputs::EnterPressed()
|
|||||||
{
|
{
|
||||||
ShowMessage("Output \"%s\" disabled", w->Current().first.c_str());
|
ShowMessage("Output \"%s\" disabled", w->Current().first.c_str());
|
||||||
w->Current().second = 0;
|
w->Current().second = 0;
|
||||||
w->BoldOption(w->Choice(), 0);
|
w->Bold(w->Choice(), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -87,7 +87,7 @@ void Outputs::EnterPressed()
|
|||||||
{
|
{
|
||||||
ShowMessage("Output \"%s\" enabled", w->Current().first.c_str());
|
ShowMessage("Output \"%s\" enabled", w->Current().first.c_str());
|
||||||
w->Current().second = 1;
|
w->Current().second = 1;
|
||||||
w->BoldOption(w->Choice(), 1);
|
w->Bold(w->Choice(), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ void PlaylistEditor::AddToPlaylist(bool add_n_play)
|
|||||||
ShowMessage("Loading playlist %s...", Playlists->Current().c_str());
|
ShowMessage("Loading playlist %s...", Playlists->Current().c_str());
|
||||||
}
|
}
|
||||||
else if (w == Content && !Content->Empty())
|
else if (w == Content && !Content->Empty())
|
||||||
Content->BoldOption(Content->Choice(), myPlaylist->Add(Content->Current(), Content->isBold(), add_n_play));
|
Content->Bold(Content->Choice(), myPlaylist->Add(Content->Current(), Content->isBold(), add_n_play));
|
||||||
|
|
||||||
FreeSongList(list);
|
FreeSongList(list);
|
||||||
if (!add_n_play)
|
if (!add_n_play)
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ void SearchEngine::EnterPressed()
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
w->BoldOption(w->Choice(), myPlaylist->Add(*w->Current().second, w->isBold(), 1));
|
w->Bold(w->Choice(), myPlaylist->Add(*w->Current().second, w->isBold(), 1));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -256,7 +256,7 @@ void SearchEngine::SpacePressed()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
w->BoldOption(w->Choice(), myPlaylist->Add(*w->Current().second, w->isBold(), 0));
|
w->Bold(w->Choice(), myPlaylist->Add(*w->Current().second, w->isBold(), 0));
|
||||||
w->Scroll(wDown);
|
w->Scroll(wDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,7 +321,7 @@ void SearchEngine::UpdateFoundList()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
w->BoldOption(i, bold);
|
w->Bold(i, bold);
|
||||||
bold = 0;
|
bold = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,12 +193,12 @@ void NcmpcppStatusChanged(Connection *, StatusChanges changed, void *)
|
|||||||
myPlaylist->Items->ShowAll();
|
myPlaylist->Items->ShowAll();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
myPlaylist->Items->BoldOption(myPlaylist->OldPlaying, 0);
|
myPlaylist->Items->Bold(myPlaylist->OldPlaying, 0);
|
||||||
}
|
}
|
||||||
catch (std::out_of_range) { }
|
catch (std::out_of_range) { }
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
myPlaylist->Items->BoldOption(myPlaylist->NowPlaying, 1);
|
myPlaylist->Items->Bold(myPlaylist->NowPlaying, 1);
|
||||||
}
|
}
|
||||||
catch (std::out_of_range) { }
|
catch (std::out_of_range) { }
|
||||||
if (was_filtered)
|
if (was_filtered)
|
||||||
|
|||||||
Reference in New Issue
Block a user