STORM-774 WIP Misc renames to improve readability.
parent
f3d65643e5
commit
c78db88d06
|
|
@ -121,7 +121,7 @@ protected:
|
|||
if (!toast) return;
|
||||
LL_DEBUGS("NearbyChat") << "Pooling toast" << llendl;
|
||||
toast->setVisible(FALSE);
|
||||
toast->stopFading();
|
||||
toast->stopTimer();
|
||||
toast->setIsHidden(true);
|
||||
|
||||
// Nearby chat toasts that are hidden, not destroyed. They are collected to the toast pool, so that
|
||||
|
|
@ -296,7 +296,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
|
|||
{
|
||||
panel->addMessage(notification);
|
||||
toast->reshapeToPanel();
|
||||
toast->startFading();
|
||||
toast->startTimer();
|
||||
|
||||
arrangeToasts();
|
||||
return;
|
||||
|
|
@ -341,7 +341,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
|
|||
panel->init(notification);
|
||||
|
||||
toast->reshapeToPanel();
|
||||
toast->startFading();
|
||||
toast->startTimer();
|
||||
|
||||
m_active_toasts.push_back(toast->getHandle());
|
||||
|
||||
|
|
|
|||
|
|
@ -253,8 +253,8 @@ void LLScreenChannel::addToast(const LLToast::Params& p)
|
|||
if(mControlHovering)
|
||||
{
|
||||
new_toast_elem.toast->setOnToastHoverCallback(boost::bind(&LLScreenChannel::onToastHover, this, _1, _2));
|
||||
new_toast_elem.toast->setMouseEnterCallback(boost::bind(&LLScreenChannel::stopFadingToast, this, new_toast_elem.toast));
|
||||
new_toast_elem.toast->setMouseLeaveCallback(boost::bind(&LLScreenChannel::startFadingToast, this, new_toast_elem.toast));
|
||||
new_toast_elem.toast->setMouseEnterCallback(boost::bind(&LLScreenChannel::stopToastTimer, this, new_toast_elem.toast));
|
||||
new_toast_elem.toast->setMouseLeaveCallback(boost::bind(&LLScreenChannel::startToastTimer, this, new_toast_elem.toast));
|
||||
}
|
||||
|
||||
if(show_toast)
|
||||
|
|
@ -369,7 +369,7 @@ void LLScreenChannel::loadStoredToastsToChannel()
|
|||
for(it = mStoredToastList.begin(); it != mStoredToastList.end(); ++it)
|
||||
{
|
||||
(*it).toast->setIsHidden(false);
|
||||
(*it).toast->startFading();
|
||||
(*it).toast->startTimer();
|
||||
mToastList.push_back((*it));
|
||||
}
|
||||
|
||||
|
|
@ -394,7 +394,7 @@ void LLScreenChannel::loadStoredToastByNotificationIDToChannel(LLUUID id)
|
|||
}
|
||||
|
||||
toast->setIsHidden(false);
|
||||
toast->startFading();
|
||||
toast->startTimer();
|
||||
mToastList.push_back((*it));
|
||||
|
||||
redrawToasts();
|
||||
|
|
@ -477,7 +477,7 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
|
|||
toast->removeChild(old_panel);
|
||||
delete old_panel;
|
||||
toast->insertPanel(panel);
|
||||
toast->startFading();
|
||||
toast->startTimer();
|
||||
redrawToasts();
|
||||
}
|
||||
}
|
||||
|
|
@ -588,7 +588,7 @@ void LLScreenChannel::showToastsBottom()
|
|||
mHiddenToastsNum = 0;
|
||||
for(; it != mToastList.rend(); it++)
|
||||
{
|
||||
(*it).toast->stopFading();
|
||||
(*it).toast->stopTimer();
|
||||
(*it).toast->setVisible(FALSE);
|
||||
mHiddenToastsNum++;
|
||||
}
|
||||
|
|
@ -697,15 +697,15 @@ void LLScreenChannel::closeStartUpToast()
|
|||
}
|
||||
}
|
||||
|
||||
void LLNotificationsUI::LLScreenChannel::stopFadingToast(LLToast* toast)
|
||||
void LLNotificationsUI::LLScreenChannel::stopToastTimer(LLToast* toast)
|
||||
{
|
||||
if (!toast || toast != mHoveredToast) return;
|
||||
|
||||
// Pause fade timer of the hovered toast.
|
||||
toast->stopFading();
|
||||
toast->stopTimer();
|
||||
}
|
||||
|
||||
void LLNotificationsUI::LLScreenChannel::startFadingToast(LLToast* toast)
|
||||
void LLNotificationsUI::LLScreenChannel::startToastTimer(LLToast* toast)
|
||||
{
|
||||
if (!toast || toast == mHoveredToast)
|
||||
{
|
||||
|
|
@ -713,7 +713,7 @@ void LLNotificationsUI::LLScreenChannel::startFadingToast(LLToast* toast)
|
|||
}
|
||||
|
||||
// Reset its fade timer.
|
||||
toast->startFading();
|
||||
toast->startTimer();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -194,10 +194,10 @@ public:
|
|||
|
||||
|
||||
/** Stop fading given toast */
|
||||
virtual void stopFadingToast(LLToast* toast);
|
||||
virtual void stopToastTimer(LLToast* toast);
|
||||
|
||||
/** Start fading given toast */
|
||||
virtual void startFadingToast(LLToast* toast);
|
||||
virtual void startToastTimer(LLToast* toast);
|
||||
|
||||
// get StartUp Toast's state
|
||||
static bool getStartUpToastShown() { return mWasStartUpToastShown; }
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ LLToast::LLToast(const LLToast::Params& p)
|
|||
mHideBtnPressed(false),
|
||||
mIsTip(p.is_tip),
|
||||
mWrapperPanel(NULL),
|
||||
mIsTransparent(false)
|
||||
mIsFading(false)
|
||||
{
|
||||
mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ LLToast::~LLToast()
|
|||
void LLToast::hide()
|
||||
{
|
||||
setVisible(FALSE);
|
||||
setTransparentState(false);
|
||||
setFading(false);
|
||||
mTimer->stop();
|
||||
mIsHidden = true;
|
||||
mOnFadeSignal(this);
|
||||
|
|
@ -244,22 +244,24 @@ void LLToast::expire()
|
|||
{
|
||||
if (mCanFade)
|
||||
{
|
||||
if (mIsTransparent)
|
||||
if (mIsFading)
|
||||
{
|
||||
// Fade timer expired. Time to hide.
|
||||
hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
setTransparentState(true);
|
||||
// "Life" time has ended. Time to fade.
|
||||
setFading(true);
|
||||
mTimer->restart();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLToast::setTransparentState(bool transparent)
|
||||
void LLToast::setFading(bool transparent)
|
||||
{
|
||||
setBackgroundOpaque(!transparent);
|
||||
mIsTransparent = transparent;
|
||||
mIsFading = transparent;
|
||||
|
||||
if (transparent)
|
||||
{
|
||||
|
|
@ -275,7 +277,7 @@ F32 LLToast::getTimeLeftToLive()
|
|||
{
|
||||
F32 time_to_live = mTimer->getRemainingTimeF32();
|
||||
|
||||
if (!mIsTransparent)
|
||||
if (!mIsFading)
|
||||
{
|
||||
time_to_live += mToastFadingTime;
|
||||
}
|
||||
|
|
@ -445,20 +447,20 @@ void LLToast::setBackgroundOpaque(BOOL b)
|
|||
}
|
||||
}
|
||||
|
||||
void LLNotificationsUI::LLToast::stopFading()
|
||||
void LLNotificationsUI::LLToast::stopTimer()
|
||||
{
|
||||
if(mCanFade)
|
||||
{
|
||||
setTransparentState(false);
|
||||
setFading(false);
|
||||
mTimer->stop();
|
||||
}
|
||||
}
|
||||
|
||||
void LLNotificationsUI::LLToast::startFading()
|
||||
void LLNotificationsUI::LLToast::startTimer()
|
||||
{
|
||||
if(mCanFade)
|
||||
{
|
||||
setTransparentState(false);
|
||||
setFading(false);
|
||||
mTimer->start();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,11 +114,11 @@ public:
|
|||
|
||||
//Fading
|
||||
|
||||
/** Stop fading timer */
|
||||
virtual void stopFading();
|
||||
/** Stop lifetime/fading timer */
|
||||
virtual void stopTimer();
|
||||
|
||||
/** Start fading timer */
|
||||
virtual void startFading();
|
||||
/** Start lifetime/fading timer */
|
||||
virtual void startTimer();
|
||||
|
||||
bool isHovered();
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ private:
|
|||
|
||||
void expire();
|
||||
|
||||
void setTransparentState(bool transparent);
|
||||
void setFading(bool fading);
|
||||
|
||||
LLUUID mNotificationID;
|
||||
LLUUID mSessionID;
|
||||
|
|
@ -232,7 +232,7 @@ private:
|
|||
bool mHideBtnPressed;
|
||||
bool mIsHidden; // this flag is TRUE when a toast has faded or was hidden with (x) button (EXT-1849)
|
||||
bool mIsTip;
|
||||
bool mIsTransparent;
|
||||
bool mIsFading;
|
||||
|
||||
commit_signal_t mToastMouseEnterSignal;
|
||||
commit_signal_t mToastMouseLeaveSignal;
|
||||
|
|
|
|||
Loading…
Reference in New Issue