summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersounddevices.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2011-04-27 16:45:57 -0700
committerLeyla Farazha <leyla@lindenlab.com>2011-04-27 16:45:57 -0700
commit892c5109e8679ca28a53799289732efcbebd9d48 (patch)
tree4fc24efbe818dc64bb021d23cae369194d2e3dce /indra/newview/llfloatersounddevices.cpp
parent37ef2c4f0f7958106ea09abcd486cb9c305316e4 (diff)
EXP-670 Voice for basic mode new files
reviewed by merov
Diffstat (limited to 'indra/newview/llfloatersounddevices.cpp')
-rw-r--r--indra/newview/llfloatersounddevices.cpp85
1 files changed, 85 insertions, 0 deletions
diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp
new file mode 100644
index 0000000000..1f6a992fc5
--- /dev/null
+++ b/indra/newview/llfloatersounddevices.cpp
@@ -0,0 +1,85 @@
+/**
+ * @file llfloatersounddevices.cpp
+ * @author Leyla Farazha
+ * @brief Sound Preferences used for minimal skin
+ *
+* $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatersounddevices.h"
+
+#include "llbottomtray.h"
+#include "lldraghandle.h"
+
+#include "llpanelvoicedevicesettings.h"
+
+// Library includes
+#include "indra_constants.h"
+
+// protected
+LLFloaterSoundDevices::LLFloaterSoundDevices(const LLSD& key)
+: LLTransientDockableFloater(NULL, false, key)
+{
+ LLTransientFloaterMgr::getInstance()->addControlView(this);
+
+ // force docked state since this floater doesn't save it between recreations
+ setDocked(true);
+}
+
+LLFloaterSoundDevices::~LLFloaterSoundDevices()
+{
+ LLTransientFloaterMgr::getInstance()->removeControlView(this);
+}
+
+// virtual
+BOOL LLFloaterSoundDevices::postBuild()
+{
+ LLTransientDockableFloater::postBuild();
+
+ LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("speak_flyout_btn");
+ setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(), LLDockControl::TOP));
+
+ setIsChrome(TRUE);
+ if (mDragHandle)
+ mDragHandle->setTitleVisible(TRUE);
+ updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
+
+ return TRUE;
+}
+
+//virtual
+void LLFloaterSoundDevices::setDocked(bool docked, bool pop_on_undock/* = true*/)
+{
+ LLTransientDockableFloater::setDocked(docked, pop_on_undock);
+}
+
+// virtual
+void LLFloaterSoundDevices::setFocus( BOOL b )
+{
+ LLTransientDockableFloater::setFocus(b);
+
+ // Force using active floater transparency
+ // We have to override setFocus() for because selecting an item of the
+ // combobox causes the floater to lose focus and thus become transparent.
+ updateTransparency(TT_ACTIVE);
+} \ No newline at end of file