diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-26 12:59:19 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-26 12:59:19 +0200 |
commit | 6912ada083fbfd249fa3d68ba4121649171eb2d1 (patch) | |
tree | 02ad4934a914ef75c70725a499456229c85e956f /indra | |
parent | b884eede5126309bcb1742555ea14308efaa9f20 (diff) | |
parent | e2f4ad93ed0dd28673ea00622f9fabdfaa0829cd (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llcallfloater.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llcallfloater.h | 6 | ||||
-rw-r--r-- | indra/newview/llspeakbutton.cpp | 41 | ||||
-rw-r--r-- | indra/newview/llspeakbutton.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewerfloaterreg.cpp | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_voice_controls.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_bottomtray.xml | 8 |
7 files changed, 29 insertions, 49 deletions
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index eaa048f5aa..2c77933b68 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -36,17 +36,18 @@ #include "llcallfloater.h" #include "llavatarlist.h" +#include "llbottomtray.h" #include "llparticipantlist.h" #include "llspeakers.h" -LLCallFloater::LLCallFloater() -: LLFloater(LLSD()) +LLCallFloater::LLCallFloater(const LLSD& key) +: LLDockableFloater(NULL, key) , mSpeakerManager(NULL) , mPaticipants(NULL) , mAvatarList(NULL) { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_voice_controls.xml", NULL); + } LLCallFloater::~LLCallFloater() @@ -58,12 +59,18 @@ LLCallFloater::~LLCallFloater() // virtual BOOL LLCallFloater::postBuild() { - LLFloater::postBuild(); + LLDockableFloater::postBuild(); mAvatarList = getChild<LLAvatarList>("speakers_list"); mSpeakerManager = LLLocalSpeakerMgr::getInstance(); mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList); + LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("speak_panel"); + + setDockControl(new LLDockControl( + anchor_panel, this, + getDockTongue(), LLDockControl::TOP)); + return TRUE; } //EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index f1afddb1cc..8c4a204943 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -34,7 +34,7 @@ #ifndef LL_LLCALLFLOATER_H #define LL_LLCALLFLOATER_H -#include "llfloater.h" +#include "lldockablefloater.h" class LLAvatarList; class LLParticipantList; @@ -51,10 +51,10 @@ class LLSpeakerMgr; * When the Resident is engaged in Group Voice Chat, the Voice Control Panel also provides an * 'End Call' button to allow the Resident to leave that voice channel. */ -class LLCallFloater : public LLFloater +class LLCallFloater : public LLDockableFloater { public: - LLCallFloater(); + LLCallFloater(const LLSD& key); ~LLCallFloater(); /*virtual*/ BOOL postBuild(); diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index 9562d7828c..5edc4804ca 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" // must be first include #include "llbutton.h" +#include "llfloaterreg.h" #include "llagent.h" #include "llbottomtray.h" @@ -95,8 +96,8 @@ LLSpeakButton::LLSpeakButton(const Params& p) addChild(mShowBtn); LLTransientFloaterMgr::getInstance()->addControlView(mShowBtn); - mShowBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_ShowBtn, this)); - mShowBtn->setToggleState(FALSE); +// mShowBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_ShowBtn, this)); +// mShowBtn->setToggleState(FALSE); static const S32 MONITOR_RIGHT_PAD = 2; @@ -168,39 +169,3 @@ void LLSpeakButton::onMouseUp_SpeakBtn() gVoiceClient->inputUserControlState(down); } -void LLSpeakButton::onClick_ShowBtn() -{ - if(!mShowBtn->getToggleState()) - { - if (!mPrivateCallPanel.isDead()) - { - LLFloater* instance = mPrivateCallPanel.get(); - instance->onClickClose(instance); - } - mShowBtn->setToggleState(FALSE); - return; - } - - S32 x = mSpeakBtn->getRect().mLeft; - S32 y = 0; - - localPointToScreen(x, y, &x, &y); - - LLCallFloater* instance = new LLCallFloater; - mPrivateCallPanel = instance->getHandle(); - - // *TODO: mantipov: why we are adding this floater to Root View? It is in FloaterView by default - getRootView()->addChild(instance); - - y = LLBottomTray::getInstance()->getRect().getHeight() + instance->getRect().getHeight(); - - LLRect rect; - rect.setLeftTopAndSize(x, y, instance->getRect().getWidth(), instance->getRect().getHeight()); - instance->setRect(rect); - - instance->setVisible(TRUE); - instance->setFrontmost(TRUE); - - mShowBtn->setToggleState(TRUE); -} - diff --git a/indra/newview/llspeakbutton.h b/indra/newview/llspeakbutton.h index 33f7c9fa28..6660b50240 100644 --- a/indra/newview/llspeakbutton.h +++ b/indra/newview/llspeakbutton.h @@ -86,8 +86,6 @@ protected: void onMouseDown_SpeakBtn(); void onMouseUp_SpeakBtn(); - void onClick_ShowBtn(); - private: LLButton* mSpeakBtn; LLButton* mShowBtn; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 642df92379..227f6c4971 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -38,6 +38,7 @@ #include "llviewerfloaterreg.h" #include "llcompilequeue.h" +#include "llcallfloater.h" #include "llfloaterabout.h" #include "llfloateractivespeakers.h" #include "llfloateranimpreview.h" @@ -174,7 +175,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloater>); LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloaterContainer>); - LLFloaterReg::add("script_floater", "floater_script.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLScriptFloater>); LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIncomingCallDialog>); LLFloaterReg::add("inventory", "floater_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInventory>); LLFloaterReg::add("inspect", "floater_inspect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInspect>); @@ -234,6 +234,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("script_debug", "floater_script_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptDebug>); LLFloaterReg::add("script_debug_output", "floater_script_debug_panel.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptDebugOutput>); + LLFloaterReg::add("script_floater", "floater_script.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLScriptFloater>); LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater); LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>); LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>); @@ -248,6 +249,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundPreview>, "upload"); LLFloaterReg::add("voice_call", "floater_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCall>); + LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>); LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>); LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>); diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index 82b4372a4b..b718cc40fe 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -5,6 +5,8 @@ layout="topleft" name="floater_voice_controls" title="Voice Controls" + save_visibility="true" + single_instance="true" width="282"> <panel bevel_style="in" diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index da8006d545..ec3f7ea7c5 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -72,7 +72,13 @@ left="0" name="talk" top="4" - width="100" /> + width="100"> + <show_button> + <show_button.init_callback + function="Button.SetDockableFloaterToggle" + parameter="voice_controls" /> + </show_button> + </talk_button> </layout_panel> <icon auto_resize="false" |