diff options
author | Stinson Linden <stinson@lindenlab.com> | 2014-05-19 22:19:55 +0100 |
---|---|---|
committer | Stinson Linden <stinson@lindenlab.com> | 2014-05-19 22:19:55 +0100 |
commit | babd89b77050ab49166f2fbd6d460884070140d9 (patch) | |
tree | dd3039e009f3e0f7ca2de578f4599e79ca15a1dc /indra/newview/llchannelmanager.cpp | |
parent | 08e83a341e76de8fa4d8c4a974edbe3e0bd1c128 (diff) | |
parent | 644ca6a0f8a7759119814f88df93b8e838321a12 (diff) |
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-release.
Diffstat (limited to 'indra/newview/llchannelmanager.cpp')
-rwxr-xr-x | indra/newview/llchannelmanager.cpp | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 928c3baafa..b0537a83f1 100755 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -113,33 +113,29 @@ void LLChannelManager::onLoginCompleted() } else { - // TODO: Seems this code leads to MAINT-3536 new crash in XML_ParserFree. - // Need to investigate this and fix possible problems with notifications in startup time - // Viewer can normally receive and show of postponed notifications about purchasing in marketplace on startup time. - // Other types of postponed notifications did not tested. - //// create a channel for the StartUp Toast - //LLScreenChannelBase::Params p; - //p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID")); - //p.channel_align = CA_RIGHT; - //mStartUpChannel = createChannel(p); - - //if(!mStartUpChannel) - //{ - // onStartUpToastClose(); - //} - //else - //{ - // gViewerWindow->getRootView()->addChild(mStartUpChannel); - - // // init channel's position and size - // S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); - // S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); - // mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound); - // mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4)); - - // mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this)); - // mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime")); - //} + // create a channel for the StartUp Toast + LLScreenChannelBase::Params p; + p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID")); + p.channel_align = CA_RIGHT; + mStartUpChannel = createChannel(p); + + if(!mStartUpChannel) + { + onStartUpToastClose(); + } + else + { + gViewerWindow->getRootView()->addChild(mStartUpChannel); + + // init channel's position and size + S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); + S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); + mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound); + mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4)); + + mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this)); + mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime")); + } } LLPersistentNotificationStorage::getInstance()->loadNotifications(); |