Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-release.

meow-7.2.2
Todd Stinson 2012-04-25 15:27:13 -07:00
commit ee230730c5
18 changed files with 95 additions and 84 deletions

19
.hgtags
View File

@ -271,19 +271,18 @@ e9c82fca5ae6fb8a8af29012d78fb194a29323f3 3.2.9-beta1
a01ef9bed28627f4ca543fbc1d70c79cc297a90f DRTVWR-118_3.2.9-beta2
a01ef9bed28627f4ca543fbc1d70c79cc297a90f 3.2.9-beta2
987425b1acf4752379b2e1eb20944b4b35d67a85 3.2.8-beta2
d5f263687f43f278107363365938f0a214920a4b DRTVWR-119
d5f263687f43f278107363365938f0a214920a4b 3.3.0-beta1
5e8d2662f38a66eca6c591295f5880d47afc73f7 viewer-release-candidate
5e8d2662f38a66eca6c591295f5880d47afc73f7 3.3.0-release
d5f263687f43f278107363365938f0a214920a4b 3.3.0-start
dffd0457ee0745de65bf95f0642a5c9e46b8e2f0 viewer-beta-candidate
d5f263687f43f278107363365938f0a214920a4b DRTVWR-119
d5f263687f43f278107363365938f0a214920a4b 3.3.0-beta1
5e8d2662f38a66eca6c591295f5880d47afc73f7 viewer-release-candidate
5e8d2662f38a66eca6c591295f5880d47afc73f7 3.3.0-release
28b95a6a28dca3338d9a1f4f204b96678df9f6a5 viewer-beta-candidate
b43cd25be49e3984ff5361cefad020e069131d98 3.3.1-start
3e2fca4ed1a0dc9fe6d8a6664e71098bb035a367 DRTVWR-125
b43cd25be49e3984ff5361cefad020e069131d98 3.3.1-start
3e2fca4ed1a0dc9fe6d8a6664e71098bb035a367 3.3.1-start
28b95a6a28dca3338d9a1f4f204b96678df9f6a5 3.3.1-beta1
dffd0457ee0745de65bf95f0642a5c9e46b8e2f0 viewer-beta-candidate
3e2fca4ed1a0dc9fe6d8a6664e71098bb035a367 viewer-beta-candidate
3e2fca4ed1a0dc9fe6d8a6664e71098bb035a367 viewer-beta-candidate
1dc545e44617975da2a4a32fe303386c687a6ca1 viewer-beta-candidate
1dc545e44617975da2a4a32fe303386c687a6ca1 3.3.1-beta2
1dc545e44617975da2a4a32fe303386c687a6ca1 DRTVWR-139
5e8d2662f38a66eca6c591295f5880d47afc73f7 viewer-release-candidate
c623bbc854b6f7ee1b33a3718f76715046aa2937 viewer-release-candidate
c623bbc854b6f7ee1b33a3718f76715046aa2937 3.3.1-release

View File

@ -690,7 +690,7 @@ typedef std::multimap<std::string, LLNotificationPtr> LLNotificationMap;
// Abstract base class (interface) for a channel; also used for the master container.
// This lets us arrange channels into a call hierarchy.
// We maintain a heirarchy of notification channels; events are always started at the top
// We maintain a hierarchy of notification channels; events are always started at the top
// and propagated through the hierarchy only if they pass a filter.
// Any channel can be created with a parent. A null parent (empty string) means it's
// tied to the root of the tree (the LLNotifications class itself).

View File

@ -1113,8 +1113,8 @@ LLChicletPanel::~LLChicletPanel()
}
}
void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){
void LLChicletPanel::onMessageCountChanged(const LLSD& data)
{
LLUUID session_id = data["session_id"].asUUID();
S32 unread = data["participant_unread"].asInteger();
@ -1139,7 +1139,7 @@ void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){
}
}
void object_chiclet_callback(const LLSD& data)
void LLChicletPanel::objectChicletCallback(const LLSD& data)
{
LLUUID notification_id = data["notification_id"];
bool new_message = data["new_message"];
@ -1163,10 +1163,10 @@ void object_chiclet_callback(const LLSD& data)
BOOL LLChicletPanel::postBuild()
{
LLPanel::postBuild();
LLIMModel::instance().addNewMsgCallback(boost::bind(im_chiclet_callback, this, _1));
LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(im_chiclet_callback, this, _1));
LLScriptFloaterManager::getInstance()->addNewObjectCallback(boost::bind(object_chiclet_callback, _1));
LLScriptFloaterManager::getInstance()->addToggleObjectFloaterCallback(boost::bind(object_chiclet_callback, _1));
LLIMModel::instance().addNewMsgCallback(boost::bind(&LLChicletPanel::onMessageCountChanged, this, _1));
LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(&LLChicletPanel::onMessageCountChanged, this, _1));
LLScriptFloaterManager::getInstance()->addNewObjectCallback(boost::bind(&LLChicletPanel::objectChicletCallback, this, _1));
LLScriptFloaterManager::getInstance()->addToggleObjectFloaterCallback(boost::bind(&LLChicletPanel::objectChicletCallback, this, _1));
LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLChicletPanel::findChiclet<LLChiclet>, this, _1));
LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLChicletPanel::onCurrentVoiceChannelChanged, this, _1));

View File

@ -1158,6 +1158,10 @@ protected:
*/
void onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param);
void onMessageCountChanged(const LLSD& data);
void objectChicletCallback(const LLSD& data);
typedef std::vector<LLChiclet*> chiclet_list_t;
/**

View File

@ -42,7 +42,7 @@ LLIMHandler::LLIMHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
mChannel = LLChannelManager::getInstance()->createNotificationChannel();
mChannel = LLChannelManager::getInstance()->createNotificationChannel()->getHandle();
}
//--------------------------------------------------------------------------
@ -55,13 +55,13 @@ void LLIMHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mChannel->init(channel_right_bound - channel_width, channel_right_bound);
mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLIMHandler::processNotification(const LLSD& notify)
{
if(!mChannel)
if(mChannel.isDead())
{
return false;
}
@ -72,7 +72,7 @@ bool LLIMHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
if(!mChannel->getVisible())
if(!mChannel.get()->getVisible())
{
initChannel();
}
@ -104,7 +104,7 @@ bool LLIMHandler::processNotification(const LLSD& notify)
p.panel = im_box;
p.can_be_stored = false;
p.on_delete_toast = boost::bind(&LLIMHandler::onDeleteToast, this, _1);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
@ -113,7 +113,7 @@ bool LLIMHandler::processNotification(const LLSD& notify)
}
else if (notify["sigtype"].asString() == "delete")
{
mChannel->killToastByNotificationID(notification->getID());
mChannel.get()->killToastByNotificationID(notification->getID());
}
return false;
}

View File

@ -171,8 +171,8 @@ void LLIMModel::setActiveSessionID(const LLUUID& session_id)
LLIMModel::LLIMModel()
{
addNewMsgCallback(LLIMFloater::newIMCallback);
addNewMsgCallback(toast_callback);
addNewMsgCallback(boost::bind(&LLIMFloater::newIMCallback, _1));
addNewMsgCallback(boost::bind(&toast_callback, _1));
}
LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice)

View File

@ -153,7 +153,6 @@ public:
std::map<LLUUID, LLIMSession*> mId2SessionMap;
typedef boost::signals2::signal<void(const LLSD&)> session_signal_t;
typedef boost::function<void(const LLSD&)> session_callback_t;
session_signal_t mNewMsgSignal;
session_signal_t mNoUnreadMsgsSignal;
@ -174,8 +173,8 @@ public:
*/
void processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id);
boost::signals2::connection addNewMsgCallback( session_callback_t cb ) { return mNewMsgSignal.connect(cb); }
boost::signals2::connection addNoUnreadMsgsCallback( session_callback_t cb ) { return mNoUnreadMsgsSignal.connect(cb); }
boost::signals2::connection addNewMsgCallback(const session_signal_t::slot_type& cb ) { return mNewMsgSignal.connect(cb); }
boost::signals2::connection addNoUnreadMsgsCallback(const session_signal_t::slot_type& cb ) { return mNoUnreadMsgsSignal.connect(cb); }
/**
* Create new session object in a model

View File

@ -458,7 +458,9 @@ LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& i
channel->setCreatePanelCallback(callback);
mChannel = LLChannelManager::getInstance()->addChannel(channel);
LLChannelManager::getInstance()->addChannel(channel);
mChannel = channel->getHandle();
}
LLNearbyChatHandler::~LLNearbyChatHandler()
@ -558,11 +560,12 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg,
&& nearby_chat->isInVisibleChain()
|| ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
&& gSavedSettings.getBOOL("UseChatBubbles") )
|| !mChannel->getShowToasts() ) // to prevent toasts in Busy mode
|| mChannel.isDead()
|| !mChannel.get()->getShowToasts() ) // to prevent toasts in Busy mode
return;//no need in toast if chat is visible or if bubble chat is enabled
// arrange a channel on a screen
if(!mChannel->getVisible())
if(!mChannel.get()->getVisible())
{
initChannel();
}
@ -579,7 +582,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg,
}
*/
LLNearbyChatScreenChannel* channel = dynamic_cast<LLNearbyChatScreenChannel*>(mChannel);
LLNearbyChatScreenChannel* channel = dynamic_cast<LLNearbyChatScreenChannel*>(mChannel.get());
if(channel)
{

View File

@ -51,8 +51,8 @@ LLAlertHandler::LLAlertHandler(e_notification_type type, const LLSD& id) : mIsMo
p.channel_align = CA_CENTRE;
// Getting a Channel for our notifications
mChannel = LLChannelManager::getInstance()->getChannel(p);
mChannel->setCanStoreToasts(false);
mChannel = LLChannelManager::getInstance()->getChannel(p)->getHandle();
mChannel.get()->setCanStoreToasts(false);
}
//--------------------------------------------------------------------------
@ -64,13 +64,13 @@ LLAlertHandler::~LLAlertHandler()
void LLAlertHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().getWidth() / 2;
mChannel->init(channel_right_bound, channel_right_bound);
mChannel.get()->init(channel_right_bound, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLAlertHandler::processNotification(const LLSD& notify)
{
if(!mChannel)
if(mChannel.isDead())
{
return false;
}
@ -81,7 +81,7 @@ bool LLAlertHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
if(!mChannel->getVisible())
if(!mChannel.get()->getVisible())
{
initChannel();
}
@ -114,22 +114,22 @@ bool LLAlertHandler::processNotification(const LLSD& notify)
// Show alert in middle of progress view (during teleport) (EXT-1093)
LLProgressView* progress = gViewerWindow->getProgressView();
LLRect rc = progress && progress->getVisible() ? progress->getRect() : gViewerWindow->getWorldViewRectScaled();
mChannel->updatePositionAndSize(rc);
mChannel.get()->updatePositionAndSize(rc);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
}
else if (notify["sigtype"].asString() == "change")
{
LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->modifyToastByNotificationID(notification->getID(), (LLToastPanel*)alert_dialog);
}
else
{
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->killToastByNotificationID(notification->getID());
}

View File

@ -42,10 +42,12 @@ LLGroupHandler::LLGroupHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
mChannel = LLChannelManager::getInstance()->createNotificationChannel();
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel();
if(channel)
{
channel->setOnRejectToastCallback(boost::bind(&LLGroupHandler::onRejectToast, this, _1));
mChannel = channel->getHandle();
}
}
//--------------------------------------------------------------------------
@ -58,13 +60,13 @@ void LLGroupHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mChannel->init(channel_right_bound - channel_width, channel_right_bound);
mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLGroupHandler::processNotification(const LLSD& notify)
{
if(!mChannel)
if(mChannel.isDead())
{
return false;
}
@ -75,7 +77,7 @@ bool LLGroupHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
if(!mChannel->getVisible())
if(!mChannel.get()->getVisible())
{
initChannel();
}
@ -91,7 +93,7 @@ bool LLGroupHandler::processNotification(const LLSD& notify)
p.panel = notify_box;
p.on_delete_toast = boost::bind(&LLGroupHandler::onDeleteToast, this, _1);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
@ -102,7 +104,7 @@ bool LLGroupHandler::processNotification(const LLSD& notify)
}
else if (notify["sigtype"].asString() == "delete")
{
mChannel->killToastByNotificationID(notification->getID());
mChannel.get()->killToastByNotificationID(notification->getID());
}
return false;
}

View File

@ -103,8 +103,8 @@ protected:
// at the moment, when a handlers creates a channel.
virtual void initChannel()=0;
LLScreenChannelBase* mChannel;
e_notification_type mType;
LLHandle<LLScreenChannelBase> mChannel;
e_notification_type mType;
};

View File

@ -64,7 +64,7 @@ LLSysHandler::LLSysHandler()
void LLSysHandler::removeExclusiveNotifications(const LLNotificationPtr& notif)
{
LLScreenChannel* channel = dynamic_cast<LLScreenChannel *>(mChannel);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel *>(mChannel.get());
if (channel == NULL)
{
return;

View File

@ -45,12 +45,13 @@ LLOfferHandler::LLOfferHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
mChannel = LLChannelManager::getInstance()->createNotificationChannel();
mChannel->setControlHovering(true);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel();
if(channel)
{
channel->setControlHovering(true);
channel->setOnRejectToastCallback(boost::bind(&LLOfferHandler::onRejectToast, this, _1));
mChannel = channel->getHandle();
}
}
//--------------------------------------------------------------------------
@ -63,13 +64,13 @@ void LLOfferHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mChannel->init(channel_right_bound - channel_width, channel_right_bound);
mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLOfferHandler::processNotification(const LLSD& notify)
{
if(!mChannel)
if(mChannel.isDead())
{
return false;
}
@ -80,7 +81,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
if(!mChannel->getVisible())
if(!mChannel.get()->getVisible())
{
initChannel();
}
@ -134,7 +135,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
// we not save offer notifications to the syswell floater that should be added to the IM floater
p.can_be_stored = !add_notid_to_im;
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
@ -175,7 +176,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
{
LLHandlerUtil::decIMMesageCounter(notification);
}
mChannel->killToastByNotificationID(notification->getID());
mChannel.get()->killToastByNotificationID(notification->getID());
}
}

View File

@ -47,13 +47,13 @@ LLScriptHandler::LLScriptHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
mChannel = LLChannelManager::getInstance()->createNotificationChannel();
mChannel->setControlHovering(true);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel();
if(channel)
{
channel->setControlHovering(true);
channel->setOnRejectToastCallback(boost::bind(&LLScriptHandler::onRejectToast, this, _1));
mChannel = channel->getHandle();
}
}
//--------------------------------------------------------------------------
@ -66,13 +66,13 @@ void LLScriptHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mChannel->init(channel_right_bound - channel_width, channel_right_bound);
mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLScriptHandler::processNotification(const LLSD& notify)
{
if(!mChannel)
if(mChannel.isDead())
{
return false;
}
@ -83,7 +83,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
if(!mChannel->getVisible())
if(!mChannel.get()->getVisible())
{
initChannel();
}
@ -109,7 +109,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify)
p.panel = notify_box;
p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
{
channel->addToast(p);
@ -127,7 +127,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify)
}
else
{
mChannel->killToastByNotificationID(notification->getID());
mChannel.get()->killToastByNotificationID(notification->getID());
}
}
return false;

View File

@ -46,11 +46,12 @@ LLTipHandler::LLTipHandler(e_notification_type type, const LLSD& id)
mType = type;
// Getting a Channel for our notifications
mChannel = LLChannelManager::getInstance()->createNotificationChannel();
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel();
if(channel)
{
channel->setOnRejectToastCallback(boost::bind(&LLTipHandler::onRejectToast, this, _1));
mChannel = channel->getHandle();
}
}
//--------------------------------------------------------------------------
@ -63,13 +64,13 @@ void LLTipHandler::initChannel()
{
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mChannel->init(channel_right_bound - channel_width, channel_right_bound);
mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound);
}
//--------------------------------------------------------------------------
bool LLTipHandler::processNotification(const LLSD& notify)
{
if(!mChannel)
if(mChannel.isDead())
{
return false;
}
@ -80,7 +81,7 @@ bool LLTipHandler::processNotification(const LLSD& notify)
return false;
// arrange a channel on a screen
if(!mChannel->getVisible())
if(!mChannel.get()->getVisible())
{
initChannel();
}
@ -137,13 +138,13 @@ bool LLTipHandler::processNotification(const LLSD& notify)
removeExclusiveNotifications(notification);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
}
else if (notify["sigtype"].asString() == "delete")
{
mChannel->killToastByNotificationID(notification->getID());
mChannel.get()->killToastByNotificationID(notification->getID());
}
return false;
}

View File

@ -117,7 +117,7 @@ public:
// get ID of a channel
LLUUID getChannelID() { return mID; }
LLHandle<LLScreenChannelBase> getHandle() { mRootHandle.bind(this); return mRootHandle; }
LLHandle<LLScreenChannelBase> getHandle() { return getDerivedHandle<LLScreenChannelBase>(); }
protected:
void updateRect();
@ -130,7 +130,6 @@ protected:
bool mDisplayToastsAlways;
// controls whether a channel shows toasts or not
bool mShowToasts;
LLRootHandle<LLScreenChannelBase> mRootHandle;
//
EToastAlignment mToastAlignment;
EChannelAlignment mChannelAlignment;

View File

@ -424,8 +424,8 @@ LLToastAlertPanel::~LLToastAlertPanel()
LLTransientFloaterMgr::GLOBAL, this);
// EXP-1822
// return focus to the previously focused view
if (mPreviouslyFocusedView.get())
// return focus to the previously focused view if the viewer is not exiting
if (mPreviouslyFocusedView.get() && !LLApp::isExiting())
{
mPreviouslyFocusedView.get()->setFocus(TRUE);
}

View File

@ -144,7 +144,10 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
}
else
{
gAgentAvatarp->updateRegion(regionp);
if (isAgentAvatarValid())
{
gAgentAvatarp->updateRegion(regionp);
}
}
res = gAgentAvatarp;
}