diff options
| -rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 22 | ||||
| -rw-r--r-- | indra/newview/llimfloatercontainer.h | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/menu_participant_view.xml | 7 | 
3 files changed, 31 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(); diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index 300a820a26..a72a3e2221 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -103,6 +103,8 @@ private:  	void onAddButtonClicked();  	void onAvatarPicked(const uuid_vec_t& ids); +	void onCustomAction (const LLSD& userdata); +  	LLButton* mExpandCollapseBtn;  	LLLayoutPanel* mMessagesPane;  	LLLayoutPanel* mConversationsPane; diff --git a/indra/newview/skins/default/xui/en/menu_participant_view.xml b/indra/newview/skins/default/xui/en/menu_participant_view.xml index 6401b0e3b7..df2700c94c 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_view.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_view.xml @@ -2,6 +2,13 @@  <toggleable_menu   layout="topleft"   name="participant_manu_view"> +    <menu_item_call +         label="Chat preferences..." +         name="chat_preferences"> +        <on_click +         function="IMFloaterContainer.Action" +         parameter="chat_preferences" /> +      </menu_item_call>      <menu_item_check           label="Open conversation log"           name="Conversation"  | 
