updated for new CProgressCaption

git-svn-id: svn://10.0.0.236/trunk@9010 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pinkerton%netscape.com
1998-09-01 20:16:43 +00:00
parent 4c0e52f3e9
commit 4e5e360aa2
2 changed files with 14 additions and 14 deletions

View File

@@ -21,7 +21,7 @@
#include "CProgressListener.h"
#include "CPatternProgressBar.h"
#include "CProgressCaption.h"
#include "CNSContext.h" // for progress messages
#include "xp.h"
@@ -35,7 +35,7 @@ CProgressListener::CProgressListener(LView* super, LBroadcaster* context)
{
Assert_(super);
Assert_(context);
mProgressCaption = dynamic_cast<CPatternProgressCaption*>(super->FindPaneByID('Stat'));
mProgressCaption = dynamic_cast<CProgressCaption*>(super->FindPaneByID('Stat'));
mProgressLastTicks = 0;
mMessageLastTicks = 0;
mPercentLastTicks = 0;
@@ -74,9 +74,10 @@ void CProgressListener::ListenToMessage(MessageT inMessage, void *ioParam)
case msg_NSCProgressEnd:
case msg_NSCAllConnectionsComplete:
case msg_NSCFinishedLayout:
if (mLaziness == lazy_VeryButForThisCommandOnly)
mLaziness = mPreviousLaziness;
mProgressCaption->SetValue(CPatternProgressCaption::eSeamless);
mProgressCaption->SetValue(0);
mProgressCaption->SetDescriptor("\p");
break;
@@ -88,7 +89,6 @@ void CProgressListener::ListenToMessage(MessageT inMessage, void *ioParam)
mProgressLastTicks = ::TickCount();
CContextProgress* progress = (CContextProgress*)ioParam;
mProgressCaption->SetDescriptor(progress->mMessage);
// mProgressCaption->SetValue(progress->mPercent);
}
}
break;
@@ -109,6 +109,7 @@ void CProgressListener::ListenToMessage(MessageT inMessage, void *ioParam)
mProgressCaption->SetDescriptor("\p");
}
break;
case msg_NSCProgressPercentChanged:
if (::TickCount() - mPercentLastTicks >= MIN_TICKS)
{

View File

@@ -24,8 +24,8 @@
#include <LListener.h>
class LCaption;
class CPatternProgressCaption;
class LBroadcaster;
class CProgressCaption;
//======================================
class CProgressListener : public LListener
@@ -61,7 +61,7 @@ public:
lazy_VeryButForThisCommandOnly
};
CProgressListener(CPatternProgressCaption* progressCaption)
CProgressListener(CProgressCaption* progressCaption)
: mProgressCaption(progressCaption) {}
CProgressListener(LView* superview, LBroadcaster* broadcaster);
// The broadcaster is the one to listen to.
@@ -70,12 +70,11 @@ public:
void SetLaziness(ProgressBarLaziness inLaziness);
protected:
// LCaption* mCaption;
// CProgressBar* mProgressBar;
CPatternProgressCaption* mProgressCaption;
unsigned long mProgressLastTicks;
unsigned long mMessageLastTicks;
unsigned long mPercentLastTicks;
ProgressBarLaziness mLaziness;
ProgressBarLaziness mPreviousLaziness;
CProgressCaption* mProgressCaption;
unsigned long mProgressLastTicks;
unsigned long mMessageLastTicks;
unsigned long mPercentLastTicks;
ProgressBarLaziness mLaziness;
ProgressBarLaziness mPreviousLaziness;
}; // class ProgressListener