summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsessiontab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.cpp')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 78271369d2..3d9751dd35 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -40,6 +40,7 @@
#include "llchicletbar.h"
#include "lldraghandle.h"
#include "llfloaterreg.h"
+#include "llfloateremojipicker.h"
#include "llfloaterimsession.h"
#include "llfloaterimcontainer.h" // to replace separate IM Floaters with multifloater container
#include "lllayoutstack.h"
@@ -250,10 +251,13 @@ BOOL LLFloaterIMSessionTab::postBuild()
mTearOffBtn = getChild<LLButton>("tear_off_btn");
mTearOffBtn->setCommitCallback(boost::bind(&LLFloaterIMSessionTab::onTearOffClicked, this));
+ mEmojiBtn = getChild<LLButton>("emoji_panel_btn");
+ mEmojiBtn->setClickedCallback(boost::bind(&LLFloaterIMSessionTab::onEmojiPanelBtnClicked, this));
+
mGearBtn = getChild<LLButton>("gear_btn");
mAddBtn = getChild<LLButton>("add_btn");
mVoiceButton = getChild<LLButton>("voice_call_btn");
-
+
mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel");
mRightPartPanel = getChild<LLLayoutPanel>("right_part_holder");
@@ -424,6 +428,30 @@ void LLFloaterIMSessionTab::onInputEditorClicked()
gToolBarView->flashCommand(LLCommandId("chat"), false);
}
+void LLFloaterIMSessionTab::onEmojiPanelBtnClicked(LLFloaterIMSessionTab* self)
+{
+ if (LLFloaterEmojiPicker* picker = LLFloaterEmojiPicker::getInstance())
+ {
+ if (!picker->isShown())
+ {
+ picker->show(boost::bind(&LLFloaterIMSessionTab::onEmojiSelected, self, _1));
+ if (LLFloater* root_floater = gFloaterView->getParentFloater(self))
+ {
+ root_floater->addDependentFloater(picker);
+ }
+ }
+ else
+ {
+ picker->closeFloater();
+ }
+ }
+}
+
+void LLFloaterIMSessionTab::onEmojiSelected(llwchar emoji)
+{
+ mInputEditor->insertEmoji(emoji);
+}
+
std::string LLFloaterIMSessionTab::appendTime()
{
time_t utc_time;