summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/llfloatertoybox.cpp103
-rw-r--r--indra/newview/llfloatertoybox.h58
-rw-r--r--indra/newview/llviewerfloaterreg.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/floater_toybox.xml63
-rw-r--r--indra/newview/skins/default/xui/en/menu_login.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml14
7 files changed, 240 insertions, 4 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 7351144765..18e092eb4a 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -237,6 +237,7 @@ set(viewer_SOURCE_FILES
llfloatertools.cpp
llfloatertopobjects.cpp
llfloatertos.cpp
+ llfloatertoybox.cpp
llfloateruipreview.cpp
llfloaterurlentry.cpp
llfloatervoiceeffect.cpp
@@ -800,6 +801,7 @@ set(viewer_HEADER_FILES
llfloatertools.h
llfloatertopobjects.h
llfloatertos.h
+ llfloatertoybox.h
llfloateruipreview.h
llfloaterurlentry.h
llfloatervoiceeffect.h
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp
new file mode 100644
index 0000000000..b4fb2e45ab
--- /dev/null
+++ b/indra/newview/llfloatertoybox.cpp
@@ -0,0 +1,103 @@
+/**
+ * @file llfloatertoybox.cpp
+ * @brief The toybox for flexibilizing the UI.
+ *
+ * $LicenseInfo:firstyear=2002&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, 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 "llfloatertoybox.h"
+
+#include "llbutton.h"
+#include "llpanel.h"
+
+
+LLFloaterToybox::LLFloaterToybox(const LLSD& key)
+ : LLFloater(key)
+ , mBtnRestoreDefaults(NULL)
+{
+ mCommitCallbackRegistrar.add("Toybox.RestoreDefaults", boost::bind(&LLFloaterToybox::onBtnRestoreDefaults, this));
+}
+
+LLFloaterToybox::~LLFloaterToybox()
+{
+}
+
+BOOL LLFloaterToybox::postBuild()
+{
+ center();
+
+ mBtnRestoreDefaults = getChild<LLButton>("btn_restore_defaults");
+
+ //
+ // Create Buttons
+ //
+/*
+ LLToyboxButtons::load();
+
+ for (size_t i = 0; i < LLToyboxButtons::buttonCount(); i++)
+ {
+ LLToyboxButton * button = LLToyboxButtons::get(i);
+
+ // Panel opacity depends on whether or not button position is established
+ LLPanel * buttonPanel = createPanelForButton(button);
+
+ mToolBar->add(buttonPanel);
+ }
+*/
+
+ return TRUE;
+}
+
+void LLFloaterToybox::onOpen(const LLSD& key)
+{
+
+}
+
+BOOL LLFloaterToybox::canClose()
+{
+ return TRUE;
+}
+
+void LLFloaterToybox::onClose(bool app_quitting)
+{
+
+}
+
+void LLFloaterToybox::draw()
+{
+ LLFloater::draw();
+}
+
+void LLFloaterToybox::onFocusReceived()
+{
+
+}
+
+void LLFloaterToybox::onBtnRestoreDefaults()
+{
+
+}
+
+
+// eof
diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h
new file mode 100644
index 0000000000..bb9392a0e3
--- /dev/null
+++ b/indra/newview/llfloatertoybox.h
@@ -0,0 +1,58 @@
+/**
+ * @file llfloatertoybox.h
+ * @brief The toybox for flexibilizing the UI.
+ *
+ * $LicenseInfo:firstyear=2002&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, 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$
+ */
+
+#ifndef LL_LLFLOATERTOYBOX_H
+#define LL_LLFLOATERTOYBOX_H
+
+#include "llfloater.h"
+
+
+class LLButton;
+
+
+class LLFloaterToybox
+: public LLFloater
+{
+public:
+ LLFloaterToybox(const LLSD& key);
+ virtual ~LLFloaterToybox();
+
+ // virtuals
+ BOOL postBuild();
+ void onOpen(const LLSD& key);
+ BOOL canClose();
+ void onClose(bool app_quitting);
+ void draw();
+ void onFocusReceived();
+
+protected:
+ void onBtnRestoreDefaults();
+
+public:
+ LLButton * mBtnRestoreDefaults;
+};
+
+#endif // LL_LLFLOATERTOYBOX_H
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 4af5fdd9f3..375ee3ad33 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -103,6 +103,7 @@
#include "llfloatertools.h"
#include "llfloatertos.h"
#include "llfloatertopobjects.h"
+#include "llfloatertoybox.h"
#include "llfloateruipreview.h"
#include "llfloatervoiceeffect.h"
#include "llfloaterwhitelistentry.h"
@@ -255,6 +256,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("test_text_editor", "floater_test_text_editor.xml", &LLFloaterReg::build<LLFloater>);
LLFloaterReg::add("test_widgets", "floater_test_widgets.xml", &LLFloaterReg::build<LLFloater>);
LLFloaterReg::add("top_objects", "floater_top_objects.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTopObjects>);
+ LLFloaterReg::add("toybox", "floater_toybox.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterToybox>);
LLFloaterReg::add("reporter", "floater_report_abuse.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterReporter>);
LLFloaterReg::add("reset_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterResetQueue>);
diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml
new file mode 100644
index 0000000000..1951497309
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_toybox.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ can_close="true"
+ can_dock="false"
+ can_minimize="false"
+ can_resize="false"
+ default_tab_group="1"
+ height="460"
+ help_topic="toybox"
+ layout="topleft"
+ legacy_header_height="18"
+ name="Toybox"
+ open_centered="true"
+ single_instance="true"
+ title="Customize toolbars"
+ width="658">
+ <text
+ follows="left|top"
+ font="SansSerifMedium"
+ halign="left"
+ height="20"
+ layout="topleft"
+ left="40"
+ length="1"
+ name="toybox label 1"
+ right="-40"
+ top="35"
+ type="string">
+ Add or remove buttons by dragging them to or from the toolbars.
+ </text>
+ <text
+ follows="left|top"
+ font="SansSerifMedium"
+ halign="left"
+ height="20"
+ layout="topleft"
+ left="40"
+ length="1"
+ name="toybox label 2"
+ right="-40"
+ top="55"
+ type="string">
+ Buttons will appear as shown or as icon-only depending on each toolbar's settings.
+ </text>
+ <toolbar
+ bottom="395"
+ left="40"
+ right="-40"
+ top="85">
+ </toolbar>
+ <button
+ follows="left|bottom"
+ height="23"
+ label="Restore defaults"
+ label_selected="Restore defaults"
+ layout="topleft"
+ left="40"
+ name="btn_restore_defaults"
+ top="415"
+ width="130">
+ <button.commit_callback function="Toybox.RestoreDefaults" />
+ </button>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml
index 4c4ff3e5c4..bb58dd500f 100644
--- a/indra/newview/skins/default/xui/en/menu_login.xml
+++ b/indra/newview/skins/default/xui/en/menu_login.xml
@@ -13,7 +13,7 @@
tear_off="true"
name="File">
<menu_item_call
- label="Preferences"
+ label="Preferences..."
name="Preferences..."
shortcut="control|P">
<menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 36ebe73753..2e93243b0f 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -9,14 +9,22 @@
name="Me"
tear_off="true">
<menu_item_call
- label="Preferences"
+ label="Preferences..."
name="Preferences"
shortcut="control|P">
<menu_item_call.on_click
function="Floater.Show"
parameter="preferences" />
</menu_item_call>
- <menu_item_call
+ <menu_item_call
+ label="Toolbars..."
+ name="Toolbars"
+ shortcut="control|T">
+ <menu_item_call.on_click
+ function="Floater.Toggle"
+ parameter="toybox" />
+ </menu_item_call>
+ <menu_item_call
label="My Dashboard"
name="Manage My Account">
<menu_item_call.on_click
@@ -2855,7 +2863,7 @@
function="ToggleControl"
parameter="BottomPanelNew" />
</menu_item_check>-->
- <menu_item_call
+ <menu_item_call
label="Media Browser Test"
name="Web Browser Test">
<menu_item_call.on_click