From cbd66288c6f64a5532c93df29740342edc82075a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 5 Jan 2010 00:01:56 +0000 Subject: More view tweaks, it's nice. --- src/viewdefault.cpp | 24 +++++++++++++++++------- src/viewdefault.h | 3 +++ 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/viewdefault.cpp b/src/viewdefault.cpp index 25082ac..df7be13 100644 --- a/src/viewdefault.cpp +++ b/src/viewdefault.cpp @@ -61,7 +61,7 @@ void ViewDefault::skipTarget( const Bu::FString &/*sProfile*/, iCurrent++; } -void ViewDefault::beginTarget( const Bu::FString &/*sProfile*/, +void ViewDefault::beginTarget( const Bu::FString &sProfile, const Target &rTarget ) { if( iDepth == 0 ) @@ -69,25 +69,33 @@ void ViewDefault::beginTarget( const Bu::FString &/*sProfile*/, bDispedTrg = false; iTotal = rTarget.getDepCount(); iCurrent = 0; - if( bFirst == false ) - { - sio << sio.nl; - } - bFirst = false; } iDepth++; + + sCurProfile = sProfile; } -void ViewDefault::processTarget( const Bu::FString &sProfile, +void ViewDefault::drawTargetHdr( const Bu::FString &sProfile, const Target &rTarget ) { if( bDispedTrg == false ) { bDispedTrg = true; + if( bFirst == false ) + { + sio << sio.nl; + } + bFirst = false; sio << C_BR_WHITE << " --- " << C_BR_CYAN << sProfile << " " << rTarget.getOutputList().first() << C_BR_WHITE << " --- " << C_RESET << sio.nl; } +} + +void ViewDefault::processTarget( const Bu::FString &sProfile, + const Target &rTarget ) +{ + drawTargetHdr( sProfile, rTarget ); iCurrent++; int iPct = (iTotal>0)?(iCurrent*100/iTotal):(100); @@ -106,6 +114,8 @@ void ViewDefault::endTarget() void ViewDefault::buildRequires( const Target &rTarget ) { + drawTargetHdr( sCurProfile, rTarget ); + int iPct = (iTotal>0)?(iCurrent*100/iTotal):(100); sio << C_BR_WHITE << "[" << C_BR_GREEN << Fmt(3) << iPct << "%" << C_BR_WHITE << "] " << C_BR_MAGENTA diff --git a/src/viewdefault.h b/src/viewdefault.h index b8d65e9..263b9d7 100644 --- a/src/viewdefault.h +++ b/src/viewdefault.h @@ -32,6 +32,8 @@ public: virtual void sysError( const Bu::FString &sMsg ); virtual void sysWarning( const Bu::FString &sMsg ); + void drawTargetHdr( const Bu::FString &sProfile, const Target &rTarget ); + private: bool bFirst; bool bDisped; @@ -39,6 +41,7 @@ private: int iDepth; int iTotal; int iCurrent; + Bu::FString sCurProfile; }; #endif -- cgit v1.2.3