From a222cbb5160138871aa3fbf8b7a9305346338943 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 3 Apr 2010 16:12:15 -0700 Subject: Created new Advanced preferences panel, ready for filling --- linden/indra/newview/CMakeLists.txt | 3 ++ linden/indra/newview/llfloaterpreference.cpp | 15 +++++- linden/indra/newview/llfloaterpreference.h | 2 + linden/indra/newview/llprefsadvanced.cpp | 58 ++++++++++++++++++++++ linden/indra/newview/llprefsadvanced.h | 50 +++++++++++++++++++ .../xui/en-us/panel_preferences_advanced.xml | 5 ++ 6 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 linden/indra/newview/llprefsadvanced.cpp create mode 100644 linden/indra/newview/llprefsadvanced.h create mode 100644 linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index b339947..f75360c 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -310,6 +310,7 @@ set(viewer_SOURCE_FILES llpatchvertexarray.cpp llpolymesh.cpp llpolymorph.cpp + llprefsadvanced.cpp llprefschat.cpp llprefsim.cpp llprefsvoice.cpp @@ -735,6 +736,7 @@ set(viewer_HEADER_FILES llpatchvertexarray.h llpolymesh.h llpolymorph.h + llprefsadvanced.h llprefschat.h llprefsim.h llprefsvoice.h @@ -1244,6 +1246,7 @@ set(viewer_XUI_FILES skins/default/xui/en-us/panel_overlaybar.xml skins/default/xui/en-us/panel_place_small.xml skins/default/xui/en-us/panel_place.xml + skins/default/xui/en-us/panel_preferences_advanced.xml skins/default/xui/en-us/panel_preferences_audio.xml skins/default/xui/en-us/panel_preferences_chat.xml skins/default/xui/en-us/panel_preferences_general.xml diff --git a/linden/indra/newview/llfloaterpreference.cpp b/linden/indra/newview/llfloaterpreference.cpp index 17a59cc..c468a5e 100644 --- a/linden/indra/newview/llfloaterpreference.cpp +++ b/linden/indra/newview/llfloaterpreference.cpp @@ -62,6 +62,7 @@ #include "llpanelmsgs.h" #include "llpanelweb.h" #include "llpanelskins.h" +#include "llprefsadvanced.h" #include "llprefschat.h" #include "llprefsvoice.h" #include "llprefsim.h" @@ -132,7 +133,8 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mAudioPanel(NULL), mMsgPanel(NULL), mSkinsPanel(NULL), - mLCDPanel(NULL) + mLCDPanel(NULL), + mPrefsAdvanced(NULL) { mGeneralPanel = new LLPanelGeneral(); mTabContainer->addTabPanel(mGeneralPanel, mGeneralPanel->getLabel(), FALSE, onTabChanged, mTabContainer); @@ -192,6 +194,10 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mTabContainer->addTabPanel(mSkinsPanel, mSkinsPanel->getLabel(), FALSE, onTabChanged, mTabContainer); mSkinsPanel->setDefaultBtn(default_btn); + mPrefsAdvanced = new LLPrefsAdvanced(); + mTabContainer->addTabPanel(mPrefsAdvanced, mPrefsAdvanced->getLabel(), FALSE, onTabChanged, mTabContainer); + mPrefsAdvanced->setDefaultBtn(default_btn); + if (!mTabContainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) { mTabContainer->selectFirstTab(); @@ -251,6 +257,11 @@ LLPreferenceCore::~LLPreferenceCore() delete mSkinsPanel; mSkinsPanel = NULL; } + if (mPrefsAdvanced) + { + delete mPrefsAdvanced; + mPrefsAdvanced = NULL; + } } @@ -267,6 +278,7 @@ void LLPreferenceCore::apply() mPrefsIM->apply(); mMsgPanel->apply(); mSkinsPanel->apply(); + mPrefsAdvanced->apply(); // hardware menu apply LLFloaterHardwareSettings::instance()->apply(); @@ -295,6 +307,7 @@ void LLPreferenceCore::cancel() mPrefsIM->cancel(); mMsgPanel->cancel(); mSkinsPanel->cancel(); + mPrefsAdvanced->cancel(); // cancel hardware menu LLFloaterHardwareSettings::instance()->cancel(); diff --git a/linden/indra/newview/llfloaterpreference.h b/linden/indra/newview/llfloaterpreference.h index f48696f..894d242 100644 --- a/linden/indra/newview/llfloaterpreference.h +++ b/linden/indra/newview/llfloaterpreference.h @@ -56,6 +56,7 @@ class LLPrefsVoice; class LLPrefsIM; class LLPanelMsgs; class LLPanelSkins; +class LLPrefsAdvanced; class LLScrollListCtrl; class LLPreferenceCore @@ -92,6 +93,7 @@ private: LLPanelWeb *mWebPanel; LLPanelMsgs *mMsgPanel; LLPanelLCD *mLCDPanel; + LLPrefsAdvanced *mPrefsAdvanced; }; // Floater to control preferences (display, audio, bandwidth, general. diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp new file mode 100644 index 0000000..c25f04b --- /dev/null +++ b/linden/indra/newview/llprefsadvanced.cpp @@ -0,0 +1,58 @@ +/** +* @file llprefsadvanced.cpp +* @brief Advanced preferences options for Imprudence +* +* $LicenseInfo:firstyear=2009&license=viewergpl$ +* +* Copyright (c) 2010, McCabe Maxsted +* +* Imprudence Viewer Source Code +* The source code in this file ("Source Code") is provided to you +* under the terms of the GNU General Public License, version 2.0 +* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in +* this distribution, or online at +* http://secondlifegrid.net/programs/open_source/licensing/gplv2 +* +* There are special exceptions to the terms and conditions of the GPL as +* it is applied to this Source Code. View the full text of the exception +* in the file doc/FLOSS-exception.txt in this software distribution, or +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception +* +* By copying, modifying or distributing this software, you acknowledge +* that you have read and understood your obligations described above, +* and agree to abide by those obligations. +* +* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO +* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, +* COMPLETENESS OR PERFORMANCE. +* $/LicenseInfo$ +*/ + +#include "llviewerprecompiledheaders.h" + +#include "llprefsadvanced.h" + +#include "lluictrlfactory.h" + +LLPrefsAdvanced::LLPrefsAdvanced() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_advanced.xml"); +} + +LLPrefsAdvanced::~LLPrefsAdvanced() +{ + // Children all cleaned up by default view destructor. +} + +BOOL LLPrefsAdvanced::postBuild() +{ + return TRUE; +} + +void LLPrefsAdvanced::apply() +{ +} + +void LLPrefsAdvanced::cancel() +{ +} diff --git a/linden/indra/newview/llprefsadvanced.h b/linden/indra/newview/llprefsadvanced.h new file mode 100644 index 0000000..382156e --- /dev/null +++ b/linden/indra/newview/llprefsadvanced.h @@ -0,0 +1,50 @@ +/** +* @file llprefsadvanced.h +* @brief Advanced preferences options for Imprudence +* +* $LicenseInfo:firstyear=2009&license=viewergpl$ +* +* Copyright (c) 2010, McCabe Maxsted +* +* Imprudence Viewer Source Code +* The source code in this file ("Source Code") is provided to you +* under the terms of the GNU General Public License, version 2.0 +* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in +* this distribution, or online at +* http://secondlifegrid.net/programs/open_source/licensing/gplv2 +* +* There are special exceptions to the terms and conditions of the GPL as +* it is applied to this Source Code. View the full text of the exception +* in the file doc/FLOSS-exception.txt in this software distribution, or +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception +* +* By copying, modifying or distributing this software, you acknowledge +* that you have read and understood your obligations described above, +* and agree to abide by those obligations. +* +* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO +* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, +* COMPLETENESS OR PERFORMANCE. +* $/LicenseInfo$ +*/ + +#ifndef LLPREFSADVANCED_H +#define LLPREFSADVANCED_H + +#include "llpanel.h" + +class LLPrefsAdvanced : public LLPanel +{ +public: + LLPrefsAdvanced(); + ~LLPrefsAdvanced(); + + BOOL postBuild(); + + void apply(); + void cancel(); + +private: +}; + +#endif // LLPREFSADVANCED_H diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml new file mode 100644 index 0000000..31d1ffd --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml @@ -0,0 +1,5 @@ + + + -- cgit v1.1