summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp53
1 files changed, 38 insertions, 15 deletions
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<LLTextBox>("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<LLViewerChatterBoxSessionStartReply>
gHTTPRegistrationMessageChatterboxsessionstartreply(
"/message/ChatterBoxSessionStartReply");