menu: implement custom iterator

This commit is contained in:
Andrzej Rybczak
2012-08-30 20:17:25 +02:00
parent 7297b8a9ad
commit 7e53654492
12 changed files with 207 additions and 151 deletions

View File

@@ -369,7 +369,7 @@ void Browser::GetDirectory(std::string dir, std::string subdir)
MPD::Item parent;
parent.name = "..";
parent.type = itDirectory;
w->AddOption(parent);
w->AddItem(parent);
}
MPD::ItemList list;
@@ -397,7 +397,7 @@ void Browser::GetDirectory(std::string dir, std::string subdir)
case itPlaylist:
{
utf_to_locale(it->name);
w->AddOption(*it);
w->AddItem(*it);
break;
}
case itDirectory:
@@ -405,7 +405,7 @@ void Browser::GetDirectory(std::string dir, std::string subdir)
utf_to_locale(it->name);
if (it->name == subdir)
highlightme = w->Size();
w->AddOption(*it);
w->AddItem(*it);
break;
}
case itSong:
@@ -419,7 +419,7 @@ void Browser::GetDirectory(std::string dir, std::string subdir)
break;
}
}
w->AddOption(*it, bold);
w->AddItem(*it, bold);
break;
}
}