diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 37edd8aa5d..e448d278d7 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -26294,6 +26294,17 @@ Change of this parameter will affect the layout of buttons in notification toast
Value
0
+ FSShowEmojiButton
+
+ Comment
+ Show or hide the emoji selection button in chat/IM windows
+ Persist
+ 1
+ Type
+ Boolean
+ Value
+ 1
+
FSAnimationPreviewExpanded
Comment
diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp
index 8591ef1879..2a10654f55 100644
--- a/indra/newview/fsfloaterim.cpp
+++ b/indra/newview/fsfloaterim.cpp
@@ -53,6 +53,7 @@
#include "llconsole.h"
#include "llfloaterabout.h" // for sysinfo button -Zi
#include "llfloateravatarpicker.h"
+#include "llfloateremojipicker.h"
#include "llfloaterreg.h"
#include "llfloatersearchreplace.h"
#include "llgroupactions.h"
@@ -953,8 +954,10 @@ BOOL FSFloaterIM::postBuild()
mInputEditor->enableSingleLineMode(gSavedSettings.getBOOL("FSUseSingleLineChatEntry"));
mInputEditor->setCommitCallback(boost::bind(&FSFloaterIM::sendMsgFromInputEditor, this, CHAT_TYPE_NORMAL));
- getChild("send_chat")->setCommitCallback(boost::bind(&FSFloaterIM::sendMsgFromInputEditor, this, CHAT_TYPE_NORMAL));
+ mEmojiButton = getChild("emoji_panel_btn");
+ mEmojiButton->setClickedCallback(boost::bind(&FSFloaterIM::onEmojiPanelBtnClicked, this));
+ getChild("send_chat")->setCommitCallback(boost::bind(&FSFloaterIM::sendMsgFromInputEditor, this, CHAT_TYPE_NORMAL));
getChild("chat_search_btn")->setCommitCallback(boost::bind(&FSFloaterIM::onChatSearchButtonClicked, this));
bool isFSSupportGroup = FSData::getInstance()->isFirestormGroup(mSessionID);
@@ -2501,3 +2504,34 @@ bool FSFloaterIM::applyRectControl()
return res;
}
+
+void FSFloaterIM::onEmojiPanelBtnClicked(FSFloaterIM* self)
+{
+ if (LLFloaterEmojiPicker* picker = LLFloaterEmojiPicker::getInstance())
+ {
+ if (!picker->isShown())
+ {
+ picker->show(
+ boost::bind(&FSFloaterIM::onEmojiPicked, self, _1),
+ boost::bind(&FSFloaterIM::onEmojiPickerClosed, self));
+ if (LLFloater* root_floater = gFloaterView->getParentFloater(self))
+ {
+ root_floater->addDependentFloater(picker, TRUE, TRUE);
+ }
+ }
+ else
+ {
+ picker->closeFloater();
+ }
+ }
+}
+
+void FSFloaterIM::onEmojiPicked(llwchar emoji)
+{
+ mInputEditor->insertEmoji(emoji);
+}
+
+void FSFloaterIM::onEmojiPickerClosed()
+{
+ mInputEditor->setFocus(TRUE);
+}
diff --git a/indra/newview/fsfloaterim.h b/indra/newview/fsfloaterim.h
index d70bac8155..42012e2d68 100644
--- a/indra/newview/fsfloaterim.h
+++ b/indra/newview/fsfloaterim.h
@@ -173,7 +173,6 @@ protected:
// support sysinfo button -Zi
BOOL enableViewerVersionCallback(const LLSD& notification,const LLSD& response); // Viewer version popup
- void reshapeFloater(bool collapse);
void reshapeChatLayoutPanel();
private:
// process focus events to set a currently active session
@@ -236,10 +235,14 @@ private:
void addSessionParticipants(const uuid_vec_t& uuids);
void addP2PSessionParticipants(const LLSD& notification, const LLSD& response, const uuid_vec_t& uuids);
- void onChatOptionsContextMenuItemClicked(const LLSD& userdata);
- bool onChatOptionsCheckContextMenuItem(const LLSD& userdata);
- bool onChatOptionsVisibleContextMenuItem(const LLSD& userdata);
- bool onChatOptionsEnableContextMenuItem(const LLSD& userdata);
+ void onChatOptionsContextMenuItemClicked(const LLSD& userdata);
+ bool onChatOptionsCheckContextMenuItem(const LLSD& userdata);
+ bool onChatOptionsVisibleContextMenuItem(const LLSD& userdata);
+ bool onChatOptionsEnableContextMenuItem(const LLSD& userdata);
+
+ static void onEmojiPanelBtnClicked(FSFloaterIM* self);
+ void onEmojiPicked(llwchar emoji);
+ void onEmojiPickerClosed();
FSPanelChatControlPanel* mControlPanel;
LLUUID mSessionID;
@@ -254,7 +257,7 @@ private:
LLLayoutStack* mInputPanels;
LLLayoutPanel* mUnreadMessagesNotificationPanel;
LLTextBox* mUnreadMessagesNotificationTextBox;
- // bool mPositioned; // dead code -Zi
+ LLButton* mEmojiButton;
std::string mSavedTitle;
LLUIString mTypingStart;
diff --git a/indra/newview/fsfloaternearbychat.cpp b/indra/newview/fsfloaternearbychat.cpp
index aa49fc0e64..26d7d4d386 100644
--- a/indra/newview/fsfloaternearbychat.cpp
+++ b/indra/newview/fsfloaternearbychat.cpp
@@ -50,6 +50,7 @@
#include "llcommandhandler.h"
#include "llconsole.h"
#include "lldraghandle.h"
+#include "llfloateremojipicker.h"
#include "llfloaterreg.h"
#include "llfloatersearchreplace.h"
#include "llfocusmgr.h"
@@ -141,8 +142,10 @@ BOOL FSFloaterNearbyChat::postBuild()
mChatLayoutPanelHeight = mChatLayoutPanel->getRect().getHeight();
mInputEditorPad = mChatLayoutPanelHeight - mInputEditor->getRect().getHeight();
- getChild("chat_history_btn")->setCommitCallback(boost::bind(&FSFloaterNearbyChat::onHistoryButtonClicked, this));
+ mEmojiButton = getChild("emoji_panel_btn");
+ mEmojiButton->setClickedCallback(boost::bind(&FSFloaterNearbyChat::onEmojiPanelBtnClicked, this));
+ getChild("chat_history_btn")->setCommitCallback(boost::bind(&FSFloaterNearbyChat::onHistoryButtonClicked, this));
getChild("chat_search_btn")->setCommitCallback(boost::bind(&FSFloaterNearbyChat::onSearchButtonClicked, this));
// chat type selector and send chat button
@@ -942,3 +945,34 @@ void FSFloaterNearbyChat::handleMinimized(bool minimized)
gConsole->addSession(LLUUID::null);
}
}
+
+void FSFloaterNearbyChat::onEmojiPanelBtnClicked(FSFloaterNearbyChat* self)
+{
+ if (LLFloaterEmojiPicker* picker = LLFloaterEmojiPicker::getInstance())
+ {
+ if (!picker->isShown())
+ {
+ picker->show(
+ boost::bind(&FSFloaterNearbyChat::onEmojiPicked, self, _1),
+ boost::bind(&FSFloaterNearbyChat::onEmojiPickerClosed, self));
+ if (LLFloater* root_floater = gFloaterView->getParentFloater(self))
+ {
+ root_floater->addDependentFloater(picker, TRUE, TRUE);
+ }
+ }
+ else
+ {
+ picker->closeFloater();
+ }
+ }
+}
+
+void FSFloaterNearbyChat::onEmojiPicked(llwchar emoji)
+{
+ mInputEditor->insertEmoji(emoji);
+}
+
+void FSFloaterNearbyChat::onEmojiPickerClosed()
+{
+ mInputEditor->setFocus(TRUE);
+}
diff --git a/indra/newview/fsfloaternearbychat.h b/indra/newview/fsfloaternearbychat.h
index 05fd42e210..43fb47c460 100644
--- a/indra/newview/fsfloaternearbychat.h
+++ b/indra/newview/fsfloaternearbychat.h
@@ -93,7 +93,6 @@ public:
virtual BOOL handleKeyHere( KEY key, MASK mask );
- static void startChat(const char* line);
static void stopChat();
void updateUnreadMessageNotification(S32 unread_messages, bool muted_history);
@@ -111,22 +110,26 @@ protected:
void onChatBoxCommit();
void onChatTypeChanged();
- void reshapeFloater(bool collapse);
void reshapeChatLayoutPanel();
static S32 sLastSpecialChatChannel;
private:
- void onChatOptionsContextMenuItemClicked(const LLSD& userdata);
- bool onChatOptionsCheckContextMenuItem(const LLSD& userdata);
- bool onChatOptionsVisibleContextMenuItem(const LLSD& userdata);
- bool onChatOptionsEnableContextMenuItem(const LLSD& userdata);
+ void onChatOptionsContextMenuItemClicked(const LLSD& userdata);
+ bool onChatOptionsCheckContextMenuItem(const LLSD& userdata);
+ bool onChatOptionsVisibleContextMenuItem(const LLSD& userdata);
+ bool onChatOptionsEnableContextMenuItem(const LLSD& userdata);
+
+ static void onEmojiPanelBtnClicked(FSFloaterNearbyChat* self);
+ void onEmojiPicked(llwchar emoji);
+ void onEmojiPickerClosed();
FSChatHistory* mChatHistory;
FSChatHistory* mChatHistoryMuted;
LLChatEntry* mInputEditor;
// chat type selector and send chat buttons
+ LLButton* mEmojiButton;
LLButton* mSendChatButton;
LLComboBox* mChatTypeCombo;
diff --git a/indra/newview/skins/default/xui/en/floater_fs_im_session.xml b/indra/newview/skins/default/xui/en/floater_fs_im_session.xml
index 38ae198893..09d1f9f022 100644
--- a/indra/newview/skins/default/xui/en/floater_fs_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_fs_im_session.xml
@@ -650,6 +650,27 @@
right="-3"
wrap="true" />
+
+
+
+
+
+
+
+
+
+