diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-27 14:22:18 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-27 14:22:18 -0800 |
commit | e3162845f1fbab2df12f80963e243aa129f9afcf (patch) | |
tree | 3d960e11b6dcdfdb654e3810f3dfbcf16f43348c /indra/newview | |
parent | 68422d9505ecf78e793bb5fb29eb8db58e6b6f89 (diff) | |
parent | dbb2dadb68f5ed4349626bb91dcfcce76d901124 (diff) |
merge.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llappviewer.h | 4 | ||||
-rw-r--r-- | indra/newview/llappviewermacosx.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llappviewermacosx.h | 3 | ||||
-rw-r--r-- | indra/newview/llstatusbar.cpp | 6 |
5 files changed, 37 insertions, 4 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0e248ff88b..9aa15789ed 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2685,7 +2685,7 @@ void LLAppViewer::handleViewerCrash() gMessageSystem->stopLogging(); } - LLWorld::getInstance()->getInfo(gDebugInfo); + if (LLWorld::instanceExists()) LLWorld::getInstance()->getInfo(gDebugInfo); // Close the debug file pApp->writeDebugInfo(); @@ -4405,3 +4405,15 @@ void LLAppViewer::launchUpdater() // LLAppViewer::instance()->forceQuit(); } + +//virtual +void LLAppViewer::setMasterSystemAudioMute(bool mute) +{ + gSavedSettings.setBOOL("MuteAudio", mute); +} + +//virtual +bool LLAppViewer::getMasterSystemAudioMute() +{ + return gSavedSettings.getBOOL("MuteAudio"); +} diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 40e74061b5..a011c5ebfd 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -168,6 +168,10 @@ public: void purgeCache(); // Clear the local cache. + // mute/unmute the system's master audio + virtual void setMasterSystemAudioMute(bool mute); + virtual bool getMasterSystemAudioMute(); + protected: virtual bool initWindow(); // Initialize the viewer's window. virtual bool initLogging(); // Initialize log files, logging system, return false on failure. diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 1282e437f2..cc38a0940c 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -444,6 +444,20 @@ std::string LLAppViewerMacOSX::generateSerialNumber() return serial_md5; } +//virtual +void LLAppViewerMacOSX::setMasterSystemAudioMute(bool mute) +{ + // XXX TODO: make this actually set the OS's audio mute state + gSavedSettings.setBOOL("MuteAudio", mute); +} + +//virtual +bool LLAppViewerMacOSX::getMasterSystemAudioMute() +{ + // XXX TODO: make this actually get the OS's audio mute state + return gSavedSettings.getBOOL("MuteAudio"); +} + OSErr AEGURLHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn) { OSErr result = noErr; diff --git a/indra/newview/llappviewermacosx.h b/indra/newview/llappviewermacosx.h index bc841fc3a7..cbf7e6c209 100644 --- a/indra/newview/llappviewermacosx.h +++ b/indra/newview/llappviewermacosx.h @@ -48,6 +48,9 @@ public: // virtual bool init(); // Override to do application initialization + // mute/unmute the system's master audio + virtual void setMasterSystemAudioMute(bool mute); + virtual bool getMasterSystemAudioMute(); protected: virtual bool restoreErrorTrap(); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 8a36475510..bff32af228 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -354,7 +354,7 @@ void LLStatusBar::refresh() childSetEnabled("stat_btn", net_stats_visible); // update the master volume button state - BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); + bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute(); mBtnVolume->setToggleState(mute_audio); } @@ -523,8 +523,8 @@ void LLStatusBar::onMouseEnterVolume(LLUICtrl* ctrl) static void onClickVolume(void* data) { // toggle the master mute setting - BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); - gSavedSettings.setBOOL("MuteAudio", !mute_audio); + bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute(); + LLAppViewer::instance()->setMasterSystemAudioMute(!mute_audio); } // sets the static variables necessary for the date |