CHUI-154 FIXED (Add link to chat preferences from Conversation floater)
- Added link to chat preferences from Conversation floatermeow-7.2.2
parent
dab6788c42
commit
c2bb1a189c
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue