From 4fec1fb665e5a6c93b6131d9746e3890a075c105 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 26 Jan 2010 15:36:41 +0200 Subject: =?UTF-8?q?fixed=20EXT-3783=20=E2=80=9CSystem=20messages=20display?= =?UTF-8?q?ed=20in=20nearby=20chat=E2=80=9D,=20made=20voice=20status=20mes?= =?UTF-8?q?sages=20displayed=20in=20pop-out=20window;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llimview.cpp | 53 +++++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 15 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 32b0cbff38..1b1e6501c0 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1577,7 +1577,7 @@ void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id) } } -bool LLOutgoingCallDialog::lifetimeHasExpired() +bool LLCallDialog::lifetimeHasExpired() { if (mLifetimeTimer.getStarted()) { @@ -1590,7 +1590,7 @@ bool LLOutgoingCallDialog::lifetimeHasExpired() return false; } -void LLOutgoingCallDialog::onLifetimeExpired() +void LLCallDialog::onLifetimeExpired() { mLifetimeTimer.stop(); closeFloater(); @@ -1744,19 +1744,6 @@ LLCallDialog(payload) { } -bool LLIncomingCallDialog::lifetimeHasExpired() -{ - if (mLifetimeTimer.getStarted()) - { - F32 elapsed_time = mLifetimeTimer.getElapsedTimeF32(); - if (elapsed_time > mLifetime) - { - return true; - } - } - return false; -} - void LLIncomingCallDialog::onLifetimeExpired() { // check whether a call is valid or not @@ -3218,6 +3205,42 @@ public: } }; +LLCallInfoDialog::LLCallInfoDialog(const LLSD& payload) : LLCallDialog(payload) +{ +} + +BOOL LLCallInfoDialog::postBuild() +{ + // init notification's lifetime + std::istringstream ss( getString("lifetime") ); + if (!(ss >> mLifetime)) + { + mLifetime = DEFAULT_LIFETIME; + } + return LLCallDialog::postBuild(); +} + +void LLCallInfoDialog::onOpen(const LLSD& key) +{ + if(key.has("msg")) + { + std::string msg = key["msg"]; + getChild("msg")->setValue(msg); + } + + mLifetimeTimer.start(); +} + +void LLCallInfoDialog::show(const std::string& status_name, const LLSD& args) +{ + LLUIString message = LLTrans::getString(status_name); + message.setArgs(args); + + LLSD payload; + payload["msg"] = message; + LLFloaterReg::showInstance("call_info", payload); +} + LLHTTPRegistration gHTTPRegistrationMessageChatterboxsessionstartreply( "/message/ChatterBoxSessionStartReply"); -- cgit v1.2.3 From 43bb3d00ecba66fe3dd9fa5a2d487ffc5633ed5e Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 26 Jan 2010 18:25:42 +0200 Subject: =?UTF-8?q?fixed=20EXT-4643=20=E2=80=9CIM=20toasts=20don't=20appea?= =?UTF-8?q?r=20after=20few=20teleport=20offers=20were=20sent=20to=20that?= =?UTF-8?q?=20avatar=E2=80=9D=20corrected=20checking=20opened=20active=20I?= =?UTF-8?q?M=20session;=20corrected=20restoring=20active=20IM=20session=20?= =?UTF-8?q?after=20logging=20IM=20notification;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llimview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 1b1e6501c0..f90a51c3f3 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -95,7 +95,8 @@ void toast_callback(const LLSD& msg){ } // check whether incoming IM belongs to an active session or not - if (LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"]) + if (LLIMModel::getInstance()->getActiveSessionID().notNull() + && LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"]) { return; } -- cgit v1.2.3