From ecdcaf149b7def0e40898ac202539376a673c7b1 Mon Sep 17 00:00:00 2001 From: callum <none@none> Date: Tue, 11 Oct 2011 15:33:43 -0700 Subject: FIX EXP-1302 Make the Speak button work as a toolbar button and EXP-1324 Push to talk hot key doesn't change button state of speak button --- indra/newview/app_settings/commands.xml | 4 ++-- indra/newview/llagent.cpp | 27 +++++++++++---------------- indra/newview/llagent.h | 4 ++-- 3 files changed, 15 insertions(+), 20 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 296d992b34..3625ce5088 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -215,9 +215,9 @@ icon="Command_Speak_Icon" label_ref="Command_Speak_Label" tooltip_ref="Command_Speak_Tooltip" - execute_function="Agent.ToggleMicrophone" + execute_function="Agent.PressMicrophone" execute_parameters="speak" - execute_stop_function="" + execute_stop_function="Agent.ReleaseMicrophone" execute_stop_parameters="speak" is_enabled_function="Agent.IsActionAllowed" is_enabled_parameters="speak" diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8303a5942d..31a73c8c31 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -188,28 +188,23 @@ bool LLAgent::isActionAllowed(const LLSD& sdname) } // static -void LLAgent::toggleMicrophone(const LLSD& name) +void LLAgent::pressMicrophone(const LLSD& name) { - gAgent.mMicrophoneOn = ! gAgent.mMicrophoneOn; + LLFirstUse::speak(false); - if ( gAgent.mMicrophoneOn ) - { - LLFirstUse::speak(false); + LLVoiceClient::getInstance()->inputUserControlState(true); +} - LLVoiceClient::getInstance()->inputUserControlState(true); - LLVoiceClient::getInstance()->inputUserControlState(false); - } - else - { - LLVoiceClient::getInstance()->inputUserControlState(false); - LLVoiceClient::getInstance()->inputUserControlState(true); - } +// static +void LLAgent::releaseMicrophone(const LLSD& name) +{ + LLVoiceClient::getInstance()->inputUserControlState(false); } // static bool LLAgent::isMicrophoneOn(const LLSD& sdname) { - return gAgent.mMicrophoneOn; + return LLVoiceClient::getInstance()->getUserPTTState(); } // ************************************************************ @@ -294,7 +289,6 @@ LLAgent::LLAgent() : mGenderChosen(FALSE), mVoiceConnected(false), - mMicrophoneOn(false), mAppearanceSerialNum(0), @@ -314,7 +308,8 @@ LLAgent::LLAgent() : LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLAgent::parcelChangedCallback)); LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2)); - LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.ToggleMicrophone", boost::bind(&LLAgent::toggleMicrophone, _2)); + LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2)); + LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2)); LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsMicrophoneOn", boost::bind(&LLAgent::isMicrophoneOn, _2)); } diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 0355e68b6e..0f7ed9ce68 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -290,12 +290,12 @@ public: bool isVoiceConnected() const { return mVoiceConnected; } void setVoiceConnected(const bool b) { mVoiceConnected = b; } - static void toggleMicrophone(const LLSD& name); + static void pressMicrophone(const LLSD& name); + static void releaseMicrophone(const LLSD& name); static bool isMicrophoneOn(const LLSD& sdname); private: bool mVoiceConnected; - bool mMicrophoneOn; //-------------------------------------------------------------------- // Chat -- cgit v1.2.3 From ca9ea840951bcfeaf46f07c9ee0974408c21792a Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 11 Oct 2011 15:54:56 -0700 Subject: * Dimmed overlay color on button image overlays to 0.75*alpha when buttons are unselected. --- indra/llui/llbutton.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 2e9c7a5d3d..0a7584a576 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -828,6 +828,10 @@ void LLButton::draw() { overlay_color.mV[VALPHA] = 0.5f; } + else if (!getToggleState()) + { + overlay_color.mV[VALPHA] = 0.75f; + } overlay_color.mV[VALPHA] *= alpha; switch(mImageOverlayAlignment) -- cgit v1.2.3 From 9f0890fc3a6931562843e4597c009778424ee5bc Mon Sep 17 00:00:00 2001 From: leyla_linden <none@none> Date: Tue, 11 Oct 2011 16:17:23 -0700 Subject: EXP-1293 Nearby chat toasts no longer appear. EXP-1316 Minimized Snapshot floater has a snapshot preview image attached below. EXP-1318 Clicking on nearby chat toasts should bring up Nearby Chat history --- indra/newview/llchatitemscontainerctrl.cpp | 5 +++-- indra/newview/llfloatersnapshot.cpp | 2 +- indra/newview/llnearbychatbar.cpp | 10 ++++++++++ indra/newview/llnearbychatbar.h | 2 ++ indra/newview/llnearbychathandler.cpp | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 8584885bc9..9a84280f25 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -35,6 +35,7 @@ #include "llfloaterreg.h" #include "lllocalcliprect.h" #include "lltrans.h" +#include "llnearbychatbar.h" #include "llviewercontrol.h" #include "llagentdata.h" @@ -315,12 +316,12 @@ BOOL LLNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask) return TRUE; else { - LLFloaterReg::showInstance("nearby_chat",LLSD()); + LLNearbyChatBar::getInstance()->showHistory(); return FALSE; } } - LLFloaterReg::showInstance("nearby_chat",LLSD()); + LLNearbyChatBar::getInstance()->showHistory(); return LLPanel::handleMouseUp(x,y,mask); } diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 9d020517d8..8105844b0d 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -2217,7 +2217,7 @@ void LLFloaterSnapshot::draw() LLFloater::draw(); - if (previewp) + if (previewp && !isMinimized()) { if(previewp->getThumbnailImage()) { diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 3073a19d83..cd84275ef0 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -135,6 +135,16 @@ LLNearbyChatBar* LLNearbyChatBar::getInstance() return LLFloaterReg::getTypedInstance<LLNearbyChatBar>("chat_bar"); } +void LLNearbyChatBar::showHistory() +{ + if (!getChildView("nearby_chat")->getVisible()) + { + onToggleNearbyChatPanel(); + } + + openFloater(); +} + void LLNearbyChatBar::draw() { displaySpeakingIndicator(); diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index a6fd6e5665..5a7edac1bb 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -59,6 +59,8 @@ public: static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate); static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); + void showHistory(); + protected: static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str); static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata); diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index dcf444b048..7503164fe6 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -581,7 +581,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not sChatWatcher->post(notification); - if( nearby_chat->getVisible() + if( chat_bar->getVisible() && nearby_chat->getVisible() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT && gSavedSettings.getBOOL("UseChatBubbles") ) || !mChannel->getShowToasts() ) // to prevent toasts in Busy mode -- cgit v1.2.3