FIRE-5295: Gear icon doesnt do anything on volume controls floater in Vintage skin

Ansariel 2013-03-14 21:35:27 +01:00
parent d0dd72658c
commit cefb6d2e83
2 changed files with 26 additions and 1 deletions

View File

@ -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<LLFloaterPreference>("preferences");
if (prefsfloater)
{
// grab the 'audio' panel from the preferences floater and
// bring it the front!
LLTabContainer* tabcontainer = prefsfloater->getChild<LLTabContainer>("pref core");
LLPanel* audiopanel = prefsfloater->getChild<LLPanel>("audio");
if (tabcontainer && audiopanel)
{
tabcontainer->selectTabPanel(audiopanel);
}
}
}

View File

@ -49,6 +49,7 @@ class UtilityBar
protected:
void onParcelStreamClicked();
void onParcelMediaClicked();
void onAudioPrefsButtonClicked();
LLButton* mParcelStreamPlayButton;
LLButton* mParcelMediaPlayButton;