summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloatercontainer.cpp
diff options
context:
space:
mode:
authorPaul ProductEngine <pguslisty@productengine.com>2012-08-31 12:05:36 +0300
committerPaul ProductEngine <pguslisty@productengine.com>2012-08-31 12:05:36 +0300
commitc2bb1a189c5f4c2367ee38e03371b28948e3ea81 (patch)
treee5f12f2b351d017be6fe557bc7dfb6000802c011 /indra/newview/llimfloatercontainer.cpp
parentdab6788c42260135d298b619ff92a71838bba2b8 (diff)
CHUI-154 FIXED (Add link to chat preferences from Conversation floater)
- Added link to chat preferences from Conversation floater
Diffstat (limited to 'indra/newview/llimfloatercontainer.cpp')
-rw-r--r--indra/newview/llimfloatercontainer.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index aa85e5023d..f85b60cb36 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -40,6 +40,7 @@
#include "llavatarnamecache.h"
#include "llgroupiconctrl.h"
#include "llfloateravatarpicker.h"
+#include "llfloaterpreference.h"
#include "llimview.h"
#include "lltransientfloatermgr.h"
#include "llviewercontrol.h"
@@ -53,6 +54,8 @@ LLIMFloaterContainer::LLIMFloaterContainer(const LLSD& seed)
mExpandCollapseBtn(NULL),
mConversationsRoot(NULL)
{
+ mCommitCallbackRegistrar.add("IMFloaterContainer.Action", boost::bind(&LLIMFloaterContainer::onCustomAction, this, _2));
+
// Firstly add our self to IMSession observers, so we catch session events
LLIMMgr::getInstance()->addSessionObserver(this);
@@ -435,6 +438,25 @@ void LLIMFloaterContainer::onAvatarPicked(const uuid_vec_t& ids)
}
}
+void LLIMFloaterContainer::onCustomAction(const LLSD& userdata)
+{
+ std::string command = userdata.asString();
+
+ if ("chat_preferences" == command)
+ {
+ LLFloaterPreference* floater_prefs = LLFloaterReg::showTypedInstance<LLFloaterPreference>("preferences");
+ if (floater_prefs)
+ {
+ LLTabContainer* tab_container = floater_prefs->getChild<LLTabContainer>("pref core");
+ LLPanel* chat_panel = tab_container->getPanelByName("chat");
+ if (tab_container && chat_panel)
+ {
+ tab_container->selectTabPanel(chat_panel);
+ }
+ }
+ }
+}
+
void LLIMFloaterContainer::repositioningWidgets()
{
LLRect panel_rect = mConversationsListPanel->getRect();