From cefb6d2e83798cf4b0af627067d31e56d5a9a892 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 14 Mar 2013 21:35:27 +0100 Subject: [PATCH] FIRE-5295: Gear icon doesnt do anything on volume controls floater in Vintage skin --- indra/newview/utilitybar.cpp | 26 +++++++++++++++++++++++++- indra/newview/utilitybar.h | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/indra/newview/utilitybar.cpp b/indra/newview/utilitybar.cpp index 83437c73fc..1ae6b7b295 100644 --- a/indra/newview/utilitybar.cpp +++ b/indra/newview/utilitybar.cpp @@ -26,8 +26,13 @@ #include "utilitybar.h" -#include "llagent.h" #include "llbutton.h" +#include "llfloaterreg.h" +#include "llpanel.h" +#include "lltabcontainer.h" + +#include "llagent.h" +#include "llfloaterpreference.h" #include "llstatusbar.h" #include "llviewercontrol.h" #include "llviewermedia.h" @@ -64,6 +69,8 @@ void UtilityBar::init() mTalkButton->setMouseUpCallback(boost::bind(&LLAgent::releaseMicrophone, _2)); } + LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Vol.GoAudioPrefs", boost::bind(&UtilityBar::onAudioPrefsButtonClicked, this)); + mEventTimer.start(); } @@ -139,3 +146,20 @@ void UtilityBar::setAOInterfaceButtonExpanded(bool expanded) } } } + +void UtilityBar::onAudioPrefsButtonClicked() +{ + // bring up the prefs floater + LLFloaterPreference* prefsfloater = LLFloaterReg::showTypedInstance("preferences"); + if (prefsfloater) + { + // grab the 'audio' panel from the preferences floater and + // bring it the front! + LLTabContainer* tabcontainer = prefsfloater->getChild("pref core"); + LLPanel* audiopanel = prefsfloater->getChild("audio"); + if (tabcontainer && audiopanel) + { + tabcontainer->selectTabPanel(audiopanel); + } + } +} \ No newline at end of file diff --git a/indra/newview/utilitybar.h b/indra/newview/utilitybar.h index 7a4797571d..8f0bf80d50 100644 --- a/indra/newview/utilitybar.h +++ b/indra/newview/utilitybar.h @@ -49,6 +49,7 @@ class UtilityBar protected: void onParcelStreamClicked(); void onParcelMediaClicked(); + void onAudioPrefsButtonClicked(); LLButton* mParcelStreamPlayButton; LLButton* mParcelMediaPlayButton;