change namespace Playlist into class

This commit is contained in:
Andrzej Rybczak
2009-02-13 22:27:26 +01:00
parent 08e162f6ac
commit 6e167d67e2
16 changed files with 246 additions and 205 deletions

View File

@@ -21,9 +21,9 @@
#include "display.h"
#include "global.h"
#include "helpers.h"
#include "playlist.h"
using Global::Config;
using Global::mPlaylist;
using MPD::Song;
using std::string;
@@ -99,10 +99,10 @@ void Display::TotalPlaylistLength(Window &w)
const int YEAR = 365*DAY;
int length = 0;
for (size_t i = 0; i < mPlaylist->Size(); i++)
length += mPlaylist->at(i).GetTotalLength();
for (size_t i = 0; i < myPlaylist->Main()->Size(); i++)
length += myPlaylist->Main()->at(i).GetTotalLength();
w << '(' << mPlaylist->Size() << (mPlaylist->Size() == 1 ? " item" : " items");
w << '(' << myPlaylist->Main()->Size() << (myPlaylist->Main()->Size() == 1 ? " item" : " items");
if (length)
{