summaryrefslogtreecommitdiff
path: root/indra/newview/llchiclet.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-09-09 04:27:06 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-09-09 04:27:06 +0000
commit4601aef70abe611a2a25b3e236cc089ff2bcb6af (patch)
treead639e7d5c1724c64cc0d894ebceb017f57dd92b /indra/newview/llchiclet.cpp
parent579d8447d3269fc6ed747774f1b612a88d850781 (diff)
merge -r 1586-1593 https://svn.aws.productengine.com/secondlife/pe/stable-2 -> viewer-2.0.0-3
Fixes: EXT-839 EXT-859 EXT-868 EXT-795 EXT-861 EXT-678 EXT-848 EXT-873
Diffstat (limited to 'indra/newview/llchiclet.cpp')
-rw-r--r--indra/newview/llchiclet.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index e54b068d47..9ce194c712 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -214,6 +214,37 @@ void LLIMChiclet::draw()
gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4(0.0f,0.0f,0.0f,1.f), FALSE);
}
+// static
+LLIMChiclet::EType LLIMChiclet::getIMSessionType(const LLUUID& session_id)
+{
+ EType type = TYPE_UNKNOWN;
+ LLFloaterIMPanel* im = NULL;
+
+ if(session_id.isNull())
+ return type;
+
+ if (!(im = LLIMMgr::getInstance()->findFloaterBySession(session_id)))
+ {
+ llassert_always(0 && "IM session not found"); // should never happen
+ return type;
+ }
+
+ switch(im->getDialogType())
+ {
+ case IM_NOTHING_SPECIAL:
+ type = TYPE_IM;
+ break;
+ case IM_SESSION_GROUP_START:
+ case IM_SESSION_INVITE:
+ type = TYPE_GROUP;
+ break;
+ default:
+ break;
+ }
+
+ return type;
+}
+
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
@@ -224,6 +255,7 @@ LLIMP2PChiclet::Params::Params()
, speaker("speaker")
, show_speaker("show_speaker")
{
+ // *TODO Vadim: Get rid of hardcoded values.
rect(LLRect(0, 25, 45, 0));
avatar_icon.name("avatar_icon");
@@ -1028,11 +1060,14 @@ BOOL LLChicletPanel::handleScrollWheel(S32 x, S32 y, S32 clicks)
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
+// *TODO Vadim: Move this out of llchiclet.cpp.
+
LLTalkButton::Params::Params()
: speak_button("speak_button")
, show_button("show_button")
, monitor("monitor")
{
+ // *TODO Vadim: move hardcoded labels (!) and other params to XUI.
speak_button.name("left");
speak_button.label("Speak");
speak_button.label_selected("Speak");