get rid of 'using namespace NCurses' directive

This commit is contained in:
Andrzej Rybczak
2012-09-02 15:37:42 +02:00
parent 6f59a175ec
commit d47cad1d50
58 changed files with 607 additions and 613 deletions

View File

@@ -22,6 +22,7 @@
#include <iomanip>
#include "global.h"
#include "helpers.h"
#include "server_info.h"
using Global::MainHeight;
@@ -33,7 +34,7 @@ ServerInfo *myServerInfo = new ServerInfo;
void ServerInfo::Init()
{
SetDimensions();
w = new Scrollpad((COLS-itsWidth)/2, (MainHeight-itsHeight)/2+MainStartY, itsWidth, itsHeight, "MPD server info", Config.main_color, Config.window_border);
w = new NC::Scrollpad((COLS-itsWidth)/2, (MainHeight-itsHeight)/2+MainStartY, itsWidth, itsHeight, "MPD server info", Config.main_color, Config.window_border);
itsURLHandlers = Mpd.GetURLHandlers();
itsTagTypes = Mpd.GetTagTypes();
@@ -99,26 +100,26 @@ void ServerInfo::Update()
Mpd.UpdateStats();
w->Clear();
*w << fmtBold << U("Version: ") << fmtBoldEnd << U("0.") << Mpd.Version() << U(".*\n");
*w << fmtBold << U("Uptime: ") << fmtBoldEnd;
*w << NC::fmtBold << U("Version: ") << NC::fmtBoldEnd << U("0.") << Mpd.Version() << U(".*\n");
*w << NC::fmtBold << U("Uptime: ") << NC::fmtBoldEnd;
ShowTime(*w, Mpd.Uptime(), 1);
*w << '\n';
*w << fmtBold << U("Time playing: ") << fmtBoldEnd << MPD::Song::ShowTime(Mpd.PlayTime()) << '\n';
*w << NC::fmtBold << U("Time playing: ") << NC::fmtBoldEnd << MPD::Song::ShowTime(Mpd.PlayTime()) << '\n';
*w << '\n';
*w << fmtBold << U("Total playtime: ") << fmtBoldEnd;
*w << NC::fmtBold << U("Total playtime: ") << NC::fmtBoldEnd;
ShowTime(*w, Mpd.DBPlayTime(), 1);
*w << '\n';
*w << fmtBold << U("Artist names: ") << fmtBoldEnd << Mpd.NumberOfArtists() << '\n';
*w << fmtBold << U("Album names: ") << fmtBoldEnd << Mpd.NumberOfAlbums() << '\n';
*w << fmtBold << U("Songs in database: ") << fmtBoldEnd << Mpd.NumberOfSongs() << '\n';
*w << NC::fmtBold << U("Artist names: ") << NC::fmtBoldEnd << Mpd.NumberOfArtists() << '\n';
*w << NC::fmtBold << U("Album names: ") << NC::fmtBoldEnd << Mpd.NumberOfAlbums() << '\n';
*w << NC::fmtBold << U("Songs in database: ") << NC::fmtBoldEnd << Mpd.NumberOfSongs() << '\n';
*w << '\n';
*w << fmtBold << U("Last DB update: ") << fmtBoldEnd << Timestamp(Mpd.DBUpdateTime()) << '\n';
*w << NC::fmtBold << U("Last DB update: ") << NC::fmtBoldEnd << Timestamp(Mpd.DBUpdateTime()) << '\n';
*w << '\n';
*w << fmtBold << U("URL Handlers:") << fmtBoldEnd;
*w << NC::fmtBold << U("URL Handlers:") << NC::fmtBoldEnd;
for (auto it = itsURLHandlers.begin(); it != itsURLHandlers.end(); ++it)
*w << (it != itsURLHandlers.begin() ? U(", ") : U(" ")) << *it;
*w << U("\n\n");
*w << fmtBold << U("Tag Types:") << fmtBoldEnd;
*w << NC::fmtBold << U("Tag Types:") << NC::fmtBoldEnd;
for (auto it = itsTagTypes.begin(); it != itsTagTypes.end(); ++it)
*w << (it != itsTagTypes.begin() ? U(", ") : U(" ")) << *it;