diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-08-28 08:04:26 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-08-28 08:04:26 +0000 |
commit | 9e2cb2f4a00a6acc48738f9df788ad5adfc7d62a (patch) | |
tree | 1a8d50ed5791e6c5fe3239e88c41ce5d6b561e68 /indra/newview/llimview.cpp | |
parent | 745845f79987e4b4ab7f5728746a0eda8898930f (diff) |
DEV-38942 Eliminate startModal() from LLModalDialog
Also moved TOS and Critical floaters to login debug menu for testing
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 4cbf88f3da..404751a44a 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -840,10 +840,9 @@ BOOL LLFloaterIM::postBuild() // Class LLIncomingCallDialog //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) : - LLModalDialog(payload, 240, 200), + LLModalDialog(payload), mPayload(payload) { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_incoming_call.xml", NULL); } BOOL LLIncomingCallDialog::postBuild() @@ -1134,6 +1133,13 @@ LLIMMgr::LLIMMgr() : mFriendObserver(NULL), mIMReceived(FALSE) { + static bool registered_dialog = false; + if (!registered_dialog) + { + LLFloaterReg::add("incoming_call", "floater_incoming_call.xml.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIncomingCallDialog>); + registered_dialog = true; + } + mFriendObserver = new LLIMViewFriendObserver(this); LLAvatarTracker::instance().addObserver(mFriendObserver); @@ -1535,8 +1541,7 @@ void LLIMMgr::inviteToSession( { if (notify_box_type == "VoiceInviteP2P" || notify_box_type == "VoiceInviteAdHoc") { - LLIncomingCallDialog *dialog = new LLIncomingCallDialog(payload); - dialog->startModal(); + LLFloaterReg::showInstance("incoming_call", payload, TRUE); } else { @@ -1544,10 +1549,7 @@ void LLIMMgr::inviteToSession( args["NAME"] = caller_name; args["GROUP"] = session_name; - LLNotifications::instance().add(notify_box_type, - args, - payload, - &inviteUserResponse); + LLNotifications::instance().add(notify_box_type, args, payload, &inviteUserResponse); } } mPendingInvitations[session_id.asString()] = LLSD(); @@ -1563,8 +1565,7 @@ void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const std::stri if (notify_box_type == "VoiceInviteP2P" || notify_box_type == "VoiceInviteAdHoc") { - LLIncomingCallDialog *dialog = new LLIncomingCallDialog(payload); - dialog->startModal(); + LLFloaterReg::showInstance("incoming_call", payload, TRUE); } else { |