diff options
author | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2012-11-14 19:39:50 +0200 |
---|---|---|
committer | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2012-11-14 19:39:50 +0200 |
commit | 7a088e9b2c8ffddbf5cd8dad72281a64a32d7c63 (patch) | |
tree | 7fbab361051e1cb2e08cd1b83a55145c48da1105 /indra | |
parent | ad846560163d72db23a459de2bc7fbc84beb82e6 (diff) |
CHUI-501 FIXED Add link to Privacy tab from Comms floater
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 19 | ||||
-rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.h | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_participant_view.xml | 7 |
4 files changed, 42 insertions, 8 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index af5db13023..ec1068d191 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -717,15 +717,18 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata) } if ("chat_preferences" == command) { - LLFloaterPreference* floater_prefs = LLFloaterReg::showTypedInstance<LLFloaterPreference>("preferences"); - if (floater_prefs) + LLFloaterPreference * floater_prefp = LLFloaterReg::showTypedInstance<LLFloaterPreference>("preferences"); + if (floater_prefp) { - 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); - } + floater_prefp->selectChatPanel(); + } + } + if ("privacy_preferences" == command) + { + LLFloaterPreference * floater_prefp = LLFloaterReg::showTypedInstance<LLFloaterPreference>("preferences"); + if (floater_prefp) + { + floater_prefp->selectPrivacyPanel(); } } } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 7c5e0776a7..ffd59ba8b6 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1570,6 +1570,26 @@ void LLFloaterPreference::setCacheLocation(const LLStringExplicit& location) cache_location_editor->setToolTip(location); } +void LLFloaterPreference::selectPanel(const LLSD& name) +{ + LLTabContainer * tab_containerp = getChild<LLTabContainer>("pref core"); + LLPanel * panel = tab_containerp->getPanelByName(name); + if (NULL != panel) + { + tab_containerp->selectTabPanel(panel); + } +} + +void LLFloaterPreference::selectPrivacyPanel() +{ + selectPanel("im"); +} + +void LLFloaterPreference::selectChatPanel() +{ + selectPanel("chat"); +} + //------------------------------Updater--------------------------------------- static bool handleBandwidthChanged(const LLSD& newvalue) diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 10a416beb5..4c1c122fb1 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -82,6 +82,8 @@ public: void processProfileProperties(const LLAvatarData* pAvatarData ); void storeAvatarProperties( const LLAvatarData* pAvatarData ); void saveAvatarProperties( void ); + void selectPrivacyPanel(); + void selectChatPanel(); protected: void onBtnOK(); @@ -164,6 +166,8 @@ public: void buildPopupLists(); static void refreshSkin(void* data); + void selectPanel(const LLSD& name); + private: static std::string sSkin; bool mClickActionDirty; ///< Set to true when the click/double-click options get changed by user. 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 6fa0707eea..523ce7b35b 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_view.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_view.xml @@ -68,6 +68,13 @@ function="IMFloaterContainer.Action" parameter="chat_preferences" /> </menu_item_call> + <menu_item_call + label="Privacy preferences..." + name="privacy_preferences"> + <on_click + function="IMFloaterContainer.Action" + parameter="privacy_preferences" /> + </menu_item_call> <menu_item_check label="Open conversation log" name="Conversation" |