void LLPanelNearByMedia::onClickSelectedMediaMute()
{
	LLUUID selected_media_id = mMediaList->getValue().asUUID();
	if (selected_media_id == PARCEL_AUDIO_LIST_ITEM_UUID)
	{
		gSavedSettings.setBOOL("MuteMusic", mMuteBtn->getValue());
	}
	else {
		LLViewerMediaImpl* impl = (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) ?
			((LLViewerMediaImpl*)LLViewerParcelMedia::getParcelMedia()) : LLViewerMedia::getMediaImplFromTextureID(selected_media_id);
		if (NULL != impl)
		{
			F32 volume = impl->getVolume();
			if(volume > 0.0)
			{
				impl->setVolume(0.0);
			}
			else if (mVolumeSlider->getValueF32() == 0.0)
			{
				impl->setVolume(1.0);
				mVolumeSlider->setValue(1.0);
			}
			else 
			{
				impl->setVolume(mVolumeSlider->getValueF32());
			}
		}
	}
}
bool toggle_show_mini_location_panel(const LLSD& newvalue)
{
	bool value = newvalue.asBoolean();

	LLPanelTopInfoBar::getInstance()->setVisible(value);
	gSavedSettings.setBOOL("ShowNavbarNavigationPanel", !value);

	return true;
}
bool toggle_show_navigation_panel(const LLSD& newvalue)
{
	bool value = newvalue.asBoolean();

	LLNavigationBar::getInstance()->showNavigationPanel(value);
	gSavedSettings.setBOOL("ShowMiniLocationPanel", !value);

	return true;
}
bool handleHighResSnapshotChanged(const LLSD& newvalue)
{
	// High Res Snapshot active, must uncheck RenderUIInSnapshot
	if (newvalue.asBoolean())
	{
		gSavedSettings.setBOOL( "RenderUIInSnapshot", FALSE );
	}
	return true;
}
void LLFloaterNearbyMedia::onOpen()
{
	//Mess around with control rect to not change unless the user actually tweaked it..
	LLRect rect = gSavedSettings.getRect("FloaterNearbyMediaRect");
	if(!rect.isEmpty())
	{
		setRectControl("FloaterNearbyMediaRect");
		applyRectControl();
	}
	else
	{
		const LLRect media_rect = gOverlayBar->mMediaRemote->calcScreenRect();
		setOrigin(media_rect.mLeft - getRect().getWidth(), media_rect.mBottom + gOverlayBar->mChatBar->getRect().getHeight());
	}
	gSavedSettings.setBOOL("ShowNearbyMediaFloater", true);
}
void LLFloaterNearbyMedia::onClose(bool app_quitting)
{
	if(!app_quitting)
		gSavedSettings.setBOOL("ShowNearbyMediaFloater", false);
	LLFloater::onClose(app_quitting);
}