From 1a498fbeea677908f2a182186082c22c28a4ef91 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 23 Nov 2009 14:48:50 +0000 Subject: reg and rename. --- indra/newview/llviewerfloaterreg.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 7772f613f0..860f794a95 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -243,6 +243,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("upload_image", "floater_image_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); + LLFloaterReg::add("volume_pulldown", "floater_volume_pulldown.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("voice_call", "floater_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); -- cgit v1.2.3 From 278ce0be7a553b71c43771b027c49f7816cbcf2d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 23 Nov 2009 14:52:33 +0000 Subject: clone tutorial floater for volume pulldown. --- indra/newview/llviewerfloaterreg.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 860f794a95..c8a9b96e25 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -105,6 +105,7 @@ #include "llfloateruipreview.h" #include "llfloaterurldisplay.h" #include "llfloatervoicedevicesettings.h" +#include "llfloatervolumepulldown.h" #include "llfloaterwater.h" #include "llfloaterwhitelistentry.h" #include "llfloaterwindlight.h" -- cgit v1.2.3 From 4c1faceefcb128fd0c620ce16e1e651ed02a45c1 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 23 Nov 2009 15:14:32 +0000 Subject: bones. --- indra/newview/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e8302ab5eb..ccdf514440 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -185,7 +185,7 @@ set(viewer_SOURCE_FILES llfloatermediasettings.cpp llfloatermemleak.cpp llfloaternamedesc.cpp - llfloaternearbymedia.cpp + llfloaternearbymedia.cpp llfloaternotificationsconsole.cpp llfloateropenobject.cpp llfloaterparcel.cpp @@ -212,6 +212,7 @@ set(viewer_SOURCE_FILES llfloaterurldisplay.cpp llfloaterurlentry.cpp llfloatervoicedevicesettings.cpp + llfloatervolumepulldown.cpp llfloaterwater.cpp llfloaterwhitelistentry.cpp llfloaterwindlight.cpp -- cgit v1.2.3 From f6f9e63091d82f10fb76778d993ae7d2087a1452 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 23 Nov 2009 16:10:37 +0000 Subject: incomplete but almost-working volume pulldown, except it's not a pulldown. --- indra/newview/llstatusbar.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index b649a0c38e..bc9edec0ba 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -509,6 +509,9 @@ static void onClickVolume(void* data) // toggle the master mute setting BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); gSavedSettings.setBOOL("MuteAudio", !mute_audio); + + // toggle the master volume pull-down + LLFloaterReg::showInstance("volume_pulldown"); //tmp } // sets the static variables necessary for the date -- cgit v1.2.3 From afd81a7d742731188f91f4b247abfc69813a95be Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 23 Nov 2009 16:29:14 +0000 Subject: start to make this a panel instead of a floater. --- .../skins/default/xui/en/panel_volume_pulldown.xml | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 indra/newview/skins/default/xui/en/panel_volume_pulldown.xml (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml new file mode 100644 index 0000000000..5d731663cb --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -0,0 +1,50 @@ + + + + + + + + -- cgit v1.2.3 From 655f33a9f818d75dd0f8d6040dfffd0520344222 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 23 Nov 2009 17:52:37 +0000 Subject: panelized volume pulldown, that doesn't work at all. --- indra/newview/llstatusbar.cpp | 6 ++++-- .../skins/default/xui/en/panel_volume_pulldown.xml | 24 +++------------------- 2 files changed, 7 insertions(+), 23 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index bc9edec0ba..2bd8d5fa55 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -42,6 +42,7 @@ #include "llfloaterbuycurrency.h" #include "llfloaterchat.h" #include "llfloaterlagmeter.h" +#include "llfloatervolumepulldown.h" #include "llfloaterregioninfo.h" #include "llfloaterscriptdebug.h" #include "llhudicon.h" @@ -201,7 +202,6 @@ LLStatusBar::LLStatusBar(const LLRect& rect) addChild(mSGPacketLoss); childSetActionTextbox("stat_btn", onClickStatGraph); - } LLStatusBar::~LLStatusBar() @@ -511,7 +511,9 @@ static void onClickVolume(void* data) gSavedSettings.setBOOL("MuteAudio", !mute_audio); // toggle the master volume pull-down - LLFloaterReg::showInstance("volume_pulldown"); //tmp + //LLFloaterReg::showInstance("volume_pulldown"); //tmp + //LLPanelVolumePulldown *foo= + new LLPanelVolumePulldown(); } // sets the static variables necessary for the date diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml index 5d731663cb..289cdbc821 100644 --- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -1,23 +1,6 @@ - - - - + -- cgit v1.2.3 From f2b3aca83a27386e2fb066afcfe566e89a34fa32 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 24 Nov 2009 13:51:26 +0000 Subject: hmm, more panel-ization, but it's not displaying. --- indra/newview/llstatusbar.cpp | 5 +++-- indra/newview/skins/default/xui/en/panel_volume_pulldown.xml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 2bd8d5fa55..8289930d97 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -512,8 +512,9 @@ static void onClickVolume(void* data) // toggle the master volume pull-down //LLFloaterReg::showInstance("volume_pulldown"); //tmp - //LLPanelVolumePulldown *foo= - new LLPanelVolumePulldown(); + LLPanelVolumePulldown *foo= + new LLPanelVolumePulldown(); + foo->setVisible(TRUE); } // sets the static variables necessary for the date diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml index 289cdbc821..8c12fd1fb4 100644 --- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -19,14 +19,14 @@ initial_value="0.5" layout="topleft" left="0" - name="xSystem Volume" + name="System Volume" show_text="false" slider_label.halign="right" top_pad="5" volume="true" width="120"> -- cgit v1.2.3 From 7c340079ef679fa4b459cbe2ec0404b3a9a911df Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 25 Nov 2009 10:22:39 +0000 Subject: more attempts to panelize the volume pulldown, but why won't it show? --- indra/newview/llstatusbar.cpp | 16 +++++++++++++--- indra/newview/llstatusbar.h | 3 ++- indra/newview/skins/default/xui/en/panel_status_bar.xml | 11 +++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 8289930d97..6178ca6da0 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -124,6 +124,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mSGPacketLoss(NULL), mBtnBuyCurrency(NULL), mBtnVolume(NULL), + mPanelVolume(NULL), mBalance(0), mHealth(100), mSquareMetersCredit(0), @@ -159,6 +160,8 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBtnVolume = getChild( "volume_btn" ); mBtnVolume->setClickedCallback( onClickVolume, this ); + mPanelVolume = getChild( "volume_pulldown" ); + gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); childSetAction("scriptout", onClickScriptDebug, this); @@ -511,10 +514,17 @@ static void onClickVolume(void* data) gSavedSettings.setBOOL("MuteAudio", !mute_audio); // toggle the master volume pull-down + //LLFloaterReg::showInstance("volume_pulldown"); //tmp - LLPanelVolumePulldown *foo= - new LLPanelVolumePulldown(); - foo->setVisible(TRUE); + //LLPanelVolumePulldown *foo= + //new LLPanelVolumePulldown(); + //LLPanel* container = getRootView();//->getChild("nav_bar_container"); + //container->addChild(foo); + LLStatusBar *sb = (LLStatusBar*)(data); + llassert_always(sb); + sb->mPanelVolume->setRect(LLRect(1,1,100,100)); + sb->mPanelVolume->setVisible(TRUE); + sb->mPanelVolume->setEnabled(TRUE); } // sets the static variables necessary for the date diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 3ce3549961..d764163384 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -87,6 +87,8 @@ public: S32 getSquareMetersCommitted() const; S32 getSquareMetersLeft() const; + LLPanel *mPanelVolume; + private: // simple method to setup the part that holds the date void setupDate(); @@ -94,7 +96,6 @@ private: void onVolumeChanged(const LLSD& newvalue); static void onClickStatGraph(void* data); - private: LLTextBox *mTextHealth; diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index b1afe76500..f1e8f7ebd7 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -82,6 +82,17 @@ name="volume_btn" tool_tip="Global Volume Control" width="16" /> + Date: Wed, 25 Nov 2009 17:09:36 +0000 Subject: more fiddling with panel visibility --- indra/newview/llstatusbar.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 6178ca6da0..2c18c41a5e 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -523,6 +523,8 @@ static void onClickVolume(void* data) LLStatusBar *sb = (LLStatusBar*)(data); llassert_always(sb); sb->mPanelVolume->setRect(LLRect(1,1,100,100)); + sb->mPanelVolume->setShape(LLRect(1,1,100,100)); + sb->mPanelVolume->setBackgroundColor(LLColor3(1.0, 0.0, 0.0)); sb->mPanelVolume->setVisible(TRUE); sb->mPanelVolume->setEnabled(TRUE); } -- cgit v1.2.3 From 9b0236990ba2df3c7c890d2d351724b455eddbb0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 26 Nov 2009 09:41:18 +0000 Subject: sketch what I think it wrong here. --- indra/newview/llstatusbar.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 2c18c41a5e..f668a72c4e 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -527,6 +527,8 @@ static void onClickVolume(void* data) sb->mPanelVolume->setBackgroundColor(LLColor3(1.0, 0.0, 0.0)); sb->mPanelVolume->setVisible(TRUE); sb->mPanelVolume->setEnabled(TRUE); + gFocusMgr.setTopCtrl(sb->mPanelVolume); + // also set focus explicitly to mpanelvolume } // sets the static variables necessary for the date -- cgit v1.2.3 From 5fc387c9183b62b3fa1567432ac8897a89a205f6 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 26 Nov 2009 17:07:35 +0000 Subject: More trying to get my panel to show. I must still be missing something obvious. --- indra/newview/llstatusbar.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 6074bb2be9..15c76a13c6 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -529,6 +529,7 @@ static void onClickVolume(void* data) sb->mPanelVolume->setBackgroundColor(LLColor3(1.0, 0.0, 0.0)); sb->mPanelVolume->setVisible(TRUE); sb->mPanelVolume->setEnabled(TRUE); + sb->addChild(sb->mPanelVolume); gFocusMgr.setTopCtrl(sb->mPanelVolume); // also set focus explicitly to mpanelvolume } -- cgit v1.2.3 From e90e8e8f775ac728d0ac4e191f5a28304a98d253 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 27 Nov 2009 11:55:37 +0000 Subject: more stabbing that doesn't work. --- indra/newview/llstatusbar.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 15c76a13c6..c1d8c26dce 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -530,6 +530,7 @@ static void onClickVolume(void* data) sb->mPanelVolume->setVisible(TRUE); sb->mPanelVolume->setEnabled(TRUE); sb->addChild(sb->mPanelVolume); + sb->mPanelVolume->getParent()->sendChildToFront(sb->mPanelVolume); gFocusMgr.setTopCtrl(sb->mPanelVolume); // also set focus explicitly to mpanelvolume } -- cgit v1.2.3 From cf485a384ba8cd5249ae11949fe3464252f5ba06 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 27 Nov 2009 12:58:45 +0000 Subject: more fiddling and tracing. --- indra/newview/llstatusbar.cpp | 2 +- indra/newview/llstatusbar.h | 3 ++- indra/newview/skins/default/xui/en/panel_status_bar.xml | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index c1d8c26dce..ed125e0a59 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -162,7 +162,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBtnVolume = getChild( "volume_btn" ); mBtnVolume->setClickedCallback( onClickVolume, this ); - mPanelVolume = getChild( "volume_pulldown" ); + mPanelVolume = getChild( "volume_pulldown" ); gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 7be119dd4d..acb211b738 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -47,6 +47,7 @@ class LLUICtrl; class LLUUID; class LLFrameTimer; class LLStatGraph; +class LLPanelVolumePulldown; class LLStatusBar : public LLPanel @@ -86,7 +87,7 @@ public: S32 getSquareMetersCommitted() const; S32 getSquareMetersLeft() const; - LLPanel *mPanelVolume; + LLPanelVolumePulldown *mPanelVolume; private: // simple method to setup the part that holds the date diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index a296795aed..d3419eec4d 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -83,7 +83,6 @@ width="16" /> Date: Fri, 27 Nov 2009 14:56:13 +0000 Subject: back to the floater version of the volume drop-down - I was having no luck with having the panel version display properly. --- indra/newview/llstatusbar.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index ed125e0a59..89c007280e 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -247,7 +247,6 @@ BOOL LLStatusBar::handleRightMouseDown(S32 x, S32 y, MASK mask) BOOL LLStatusBar::postBuild() { - gMenuBarView->setRightMouseDownCallback(boost::bind(&show_navbar_context_menu, _1, _2, _3)); return TRUE; @@ -517,7 +516,10 @@ static void onClickVolume(void* data) // toggle the master volume pull-down - //LLFloaterReg::showInstance("volume_pulldown"); //tmp + //LLFloater* vp = + LLFloaterReg::showInstance("volume_pulldown"); //tmp + +#if 0 //LLPanelVolumePulldown *foo= //new LLPanelVolumePulldown(); //LLPanel* container = getRootView();//->getChild("nav_bar_container"); @@ -530,9 +532,13 @@ static void onClickVolume(void* data) sb->mPanelVolume->setVisible(TRUE); sb->mPanelVolume->setEnabled(TRUE); sb->addChild(sb->mPanelVolume); + gFloaterView->addChild(sb->mPanelVolume); sb->mPanelVolume->getParent()->sendChildToFront(sb->mPanelVolume); gFocusMgr.setTopCtrl(sb->mPanelVolume); // also set focus explicitly to mpanelvolume + + //sb->mPanelVolume->setFrontmost() +#endif } // sets the static variables necessary for the date -- cgit v1.2.3 From 6b1cc111f57193fd98821e00f450b02b2bfded65 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 27 Nov 2009 16:47:07 +0000 Subject: working but incomplete, I think I'll go back to panel... again. --- indra/newview/skins/default/xui/en/panel_status_bar.xml | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index d3419eec4d..65bc48265d 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -81,16 +81,6 @@ name="volume_btn" tool_tip="Global Volume Control" width="16" /> - Date: Fri, 27 Nov 2009 17:34:50 +0000 Subject: whee, back to a floater for now. i'm going to stop worrying about the position for a while and work on the functionality. --- indra/newview/llstatusbar.cpp | 4 ++-- indra/newview/skins/default/xui/en/panel_status_bar.xml | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 89c007280e..d57564a9f0 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -516,10 +516,10 @@ static void onClickVolume(void* data) // toggle the master volume pull-down +#if 1 //LLFloater* vp = LLFloaterReg::showInstance("volume_pulldown"); //tmp - -#if 0 +#else //LLPanelVolumePulldown *foo= //new LLPanelVolumePulldown(); //LLPanel* container = getRootView();//->getChild("nav_bar_container"); diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 65bc48265d..9c66653e3c 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -81,6 +81,17 @@ name="volume_btn" tool_tip="Global Volume Control" width="16" /> + + Date: Mon, 30 Nov 2009 15:22:16 +0000 Subject: pretty good volume bar appear-on-hover --- indra/newview/llstatusbar.cpp | 12 ++++++++++++ indra/newview/llstatusbar.h | 1 + 2 files changed, 13 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index d57564a9f0..04b96a3a01 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -161,6 +161,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBtnVolume = getChild( "volume_btn" ); mBtnVolume->setClickedCallback( onClickVolume, this ); + mBtnVolume->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterVolume, this)); mPanelVolume = getChild( "volume_pulldown" ); @@ -508,6 +509,17 @@ static void onClickScriptDebug(void*) LLFloaterScriptDebug::show(LLUUID::null); } +//static +void LLStatusBar::onMouseEnterVolume(LLUICtrl* ctrl) +{ +#if 1 + //LLFloater* vp = + LLFloaterReg::showInstance("volume_pulldown"); //tmp +#else + #error do this for panel +#endif +} + static void onClickVolume(void* data) { // toggle the master mute setting diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index acb211b738..347530806e 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -95,6 +95,7 @@ private: void onVolumeChanged(const LLSD& newvalue); + static void onMouseEnterVolume(LLUICtrl* ctrl); static void onClickStatGraph(void* data); private: -- cgit v1.2.3 From ec42c50fe814e36cafc8e21da8badf272b383782 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 30 Nov 2009 15:24:23 +0000 Subject: tidy-up. clicking mute button doesn't need to bring up the volume slider any more. --- indra/newview/llstatusbar.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 04b96a3a01..d16a7c728b 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -512,21 +512,7 @@ static void onClickScriptDebug(void*) //static void LLStatusBar::onMouseEnterVolume(LLUICtrl* ctrl) { -#if 1 - //LLFloater* vp = - LLFloaterReg::showInstance("volume_pulldown"); //tmp -#else - #error do this for panel -#endif -} - -static void onClickVolume(void* data) -{ - // toggle the master mute setting - BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); - gSavedSettings.setBOOL("MuteAudio", !mute_audio); - - // toggle the master volume pull-down + // show the master volume pull-down #if 1 //LLFloater* vp = @@ -553,6 +539,13 @@ static void onClickVolume(void* data) #endif } +static void onClickVolume(void* data) +{ + // toggle the master mute setting + BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); + gSavedSettings.setBOOL("MuteAudio", !mute_audio); +} + // sets the static variables necessary for the date void LLStatusBar::setupDate() { -- cgit v1.2.3 From b9a6776a736e4b5cc440e678d8003eb7f23aed82 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 30 Nov 2009 17:14:29 +0000 Subject: remove dead panel version of the master volume pulldown. the floater version turned out easier to get on-spec (though not perfect). --- .../skins/default/xui/en/panel_volume_pulldown.xml | 32 ---------------------- 1 file changed, 32 deletions(-) delete mode 100644 indra/newview/skins/default/xui/en/panel_volume_pulldown.xml (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml deleted file mode 100644 index 8c12fd1fb4..0000000000 --- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - -- cgit v1.2.3 From c2fbdab7f122123239715ea652d2bc126b5d1705 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 30 Nov 2009 17:30:45 +0000 Subject: lots more clean-up. --- indra/newview/llstatusbar.cpp | 28 +--------------------------- indra/newview/llstatusbar.h | 2 -- 2 files changed, 1 insertion(+), 29 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index d16a7c728b..4915720036 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -126,7 +126,6 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mSGPacketLoss(NULL), mBtnBuyCurrency(NULL), mBtnVolume(NULL), - mPanelVolume(NULL), mBalance(0), mHealth(100), mSquareMetersCredit(0), @@ -163,8 +162,6 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBtnVolume->setClickedCallback( onClickVolume, this ); mBtnVolume->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterVolume, this)); - mPanelVolume = getChild( "volume_pulldown" ); - gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); childSetAction("scriptout", onClickScriptDebug, this); @@ -513,30 +510,7 @@ static void onClickScriptDebug(void*) void LLStatusBar::onMouseEnterVolume(LLUICtrl* ctrl) { // show the master volume pull-down - -#if 1 - //LLFloater* vp = - LLFloaterReg::showInstance("volume_pulldown"); //tmp -#else - //LLPanelVolumePulldown *foo= - //new LLPanelVolumePulldown(); - //LLPanel* container = getRootView();//->getChild("nav_bar_container"); - //container->addChild(foo); - LLStatusBar *sb = (LLStatusBar*)(data); - llassert_always(sb); - sb->mPanelVolume->setRect(LLRect(1,1,100,100)); - sb->mPanelVolume->setShape(LLRect(1,1,100,100)); - sb->mPanelVolume->setBackgroundColor(LLColor3(1.0, 0.0, 0.0)); - sb->mPanelVolume->setVisible(TRUE); - sb->mPanelVolume->setEnabled(TRUE); - sb->addChild(sb->mPanelVolume); - gFloaterView->addChild(sb->mPanelVolume); - sb->mPanelVolume->getParent()->sendChildToFront(sb->mPanelVolume); - gFocusMgr.setTopCtrl(sb->mPanelVolume); - // also set focus explicitly to mpanelvolume - - //sb->mPanelVolume->setFrontmost() -#endif + LLFloaterReg::showInstance("volume_pulldown"); } static void onClickVolume(void* data) diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 347530806e..f77cc1acb8 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -87,8 +87,6 @@ public: S32 getSquareMetersCommitted() const; S32 getSquareMetersLeft() const; - LLPanelVolumePulldown *mPanelVolume; - private: // simple method to setup the part that holds the date void setupDate(); -- cgit v1.2.3 From 5040a726755939704a3de14187d9d020caea4d9d Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Mon, 30 Nov 2009 16:01:20 -0800 Subject: DEV-43041 DEV-41648 - disable OK and Apply if the media data is the same as the initial Review #48 This change kills two birds with one stone: every frame, we check to see if the media data is the same as the one we 'initialize' with. If it is, we disable OK and Cancel. Otherwise we enable them. This makes it very difficult to set empty media data, as well as fixing the "apply button doesn't grey out" bug. --- indra/newview/llfloatermediasettings.cpp | 55 ++++++++++++++++++---- indra/newview/llfloatermediasettings.h | 12 +++-- indra/newview/llpanelmediasettingsgeneral.cpp | 18 +++---- indra/newview/llpanelmediasettingssecurity.cpp | 2 +- .../xui/en/panel_media_settings_general.xml | 23 ++++++--- 5 files changed, 82 insertions(+), 28 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index 44e68d7745..f7ce826a39 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -41,6 +41,7 @@ #include "lluictrlfactory.h" #include "llbutton.h" #include "llselectmgr.h" +#include "llsdutil.h" LLFloaterMediaSettings* LLFloaterMediaSettings::sInstance = NULL; @@ -145,15 +146,15 @@ LLFloaterMediaSettings* LLFloaterMediaSettings::getInstance() //static void LLFloaterMediaSettings::apply() { - LLSD settings; + LLSD settings; sInstance->mPanelMediaSettingsGeneral->preApply(); - sInstance->mPanelMediaSettingsGeneral->getValues( settings ); + sInstance->mPanelMediaSettingsGeneral->getValues( settings ); sInstance->mPanelMediaSettingsSecurity->preApply(); sInstance->mPanelMediaSettingsSecurity->getValues( settings ); sInstance->mPanelMediaSettingsPermissions->preApply(); - sInstance->mPanelMediaSettingsPermissions->getValues( settings ); + sInstance->mPanelMediaSettingsPermissions->getValues( settings ); LLSelectMgr::getInstance()->selectionSetMedia( LLTextureEntry::MF_HAS_MEDIA ); - LLSelectMgr::getInstance()->selectionSetMediaData(settings); + LLSelectMgr::getInstance()->selectionSetMediaData(settings); sInstance->mPanelMediaSettingsGeneral->postApply(); sInstance->mPanelMediaSettingsSecurity->postApply(); sInstance->mPanelMediaSettingsPermissions->postApply(); @@ -183,7 +184,12 @@ void LLFloaterMediaSettings::initValues( const LLSD& media_settings, bool editab sInstance->mPanelMediaSettingsPermissions-> initValues( sInstance->mPanelMediaSettingsPermissions, media_settings, editable ); - + + // Squirrel away initial values + sInstance->mInitialValues.clear(); + sInstance->mPanelMediaSettingsGeneral->getValues( sInstance->mInitialValues ); + sInstance->mPanelMediaSettingsSecurity->getValues( sInstance->mInitialValues ); + sInstance->mPanelMediaSettingsPermissions->getValues( sInstance->mInitialValues ); } //////////////////////////////////////////////////////////////////////////////// @@ -206,7 +212,7 @@ void LLFloaterMediaSettings::clearValues( bool editable) { // clean up all panels before updating sInstance->mPanelMediaSettingsGeneral ->clearValues(sInstance->mPanelMediaSettingsGeneral, editable); - sInstance->mPanelMediaSettingsSecurity ->clearValues(sInstance->mPanelMediaSettingsSecurity, editable); + sInstance->mPanelMediaSettingsSecurity ->clearValues(sInstance->mPanelMediaSettingsSecurity, editable); sInstance->mPanelMediaSettingsPermissions->clearValues(sInstance->mPanelMediaSettingsPermissions, editable); } @@ -235,7 +241,7 @@ void LLFloaterMediaSettings::onBtnApply( void* userdata ) // static void LLFloaterMediaSettings::onBtnCancel( void* userdata ) { - sInstance->closeFloater(); + sInstance->closeFloater(); } //////////////////////////////////////////////////////////////////////////////// @@ -250,7 +256,6 @@ void LLFloaterMediaSettings::onTabChanged(void* user_data, bool from_click) // void LLFloaterMediaSettings::enableOkApplyBtns( bool enable ) { - setCtrlsEnabled( enable ); childSetEnabled( "OK", enable ); childSetEnabled( "Apply", enable ); } @@ -265,7 +270,6 @@ const std::string LLFloaterMediaSettings::getHomeUrl() return std::string( "" ); } - //////////////////////////////////////////////////////////////////////////////// // bool LLFloaterMediaSettings::passesWhiteList( const std::string& test_url ) @@ -279,3 +283,36 @@ bool LLFloaterMediaSettings::passesWhiteList( const std::string& test_url ) // this is all we can do return false; } + +//////////////////////////////////////////////////////////////////////////////// +// virtual +void LLFloaterMediaSettings::draw() +{ + // *NOTE: The code below is very inefficient. Better to do this + // only when data change. + // Every frame, check to see what the values are. If they are not + // the same as the default media data, enable the OK/Apply buttons + LLSD settings; + sInstance->mPanelMediaSettingsGeneral->getValues( settings ); + sInstance->mPanelMediaSettingsSecurity->getValues( settings ); + sInstance->mPanelMediaSettingsPermissions->getValues( settings ); + + bool values_changed = false; + + LLSD::map_const_iterator iter = settings.beginMap(); + LLSD::map_const_iterator end = settings.endMap(); + for ( ; iter != end; ++iter ) + { + const std::string ¤t_key = iter->first; + const LLSD ¤t_value = iter->second; + if ( ! llsd_equals(current_value, mInitialValues[current_key])) + { + values_changed = true; + break; + } + } + + enableOkApplyBtns(values_changed); + + LLFloater::draw(); +} diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h index 17a47cb0f5..e2af1705bf 100644 --- a/indra/newview/llfloatermediasettings.h +++ b/indra/newview/llfloatermediasettings.h @@ -54,11 +54,13 @@ public: static void apply(); static void initValues( const LLSD& media_settings , bool editable); static void clearValues( bool editable); - void enableOkApplyBtns( bool enable ); - LLPanelMediaSettingsSecurity* getPanelSecurity(){return mPanelMediaSettingsSecurity;}; - const std::string getHomeUrl(); + + LLPanelMediaSettingsSecurity* getPanelSecurity(){return mPanelMediaSettingsSecurity;}; + const std::string getHomeUrl(); bool passesWhiteList( const std::string& test_url ); + virtual void draw(); + bool mIdenticalHasMediaInfo; bool mMultipleMedia; bool mMultipleValidMedia; @@ -83,6 +85,10 @@ protected: static LLFloaterMediaSettings* sInstance; private: + + void enableOkApplyBtns( bool enable ); + + LLSD mInitialValues; bool mWaitingToClose; }; diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 5bb266a01d..b1e7dd3d50 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -392,19 +392,19 @@ void LLPanelMediaSettingsGeneral::preApply() // void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in ) { - fill_me_in[LLMediaEntry::AUTO_LOOP_KEY] = mAutoLoop->getValue(); - fill_me_in[LLMediaEntry::AUTO_PLAY_KEY] = mAutoPlay->getValue(); - fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = mAutoScale->getValue(); - fill_me_in[LLMediaEntry::AUTO_ZOOM_KEY] = mAutoZoom->getValue(); - fill_me_in[LLMediaEntry::CONTROLS_KEY] = mControls->getCurrentIndex(); + fill_me_in[LLMediaEntry::AUTO_LOOP_KEY] = (LLSD::Boolean)mAutoLoop->getValue(); + fill_me_in[LLMediaEntry::AUTO_PLAY_KEY] = (LLSD::Boolean)mAutoPlay->getValue(); + fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = (LLSD::Boolean)mAutoScale->getValue(); + fill_me_in[LLMediaEntry::AUTO_ZOOM_KEY] = (LLSD::Boolean)mAutoZoom->getValue(); + fill_me_in[LLMediaEntry::CONTROLS_KEY] = (LLSD::Integer)mControls->getCurrentIndex(); //Don't fill in current URL: this is only supposed to get changed via navigate // fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue(); - fill_me_in[LLMediaEntry::HEIGHT_PIXELS_KEY] = mHeightPixels->getValue(); + fill_me_in[LLMediaEntry::HEIGHT_PIXELS_KEY] = (LLSD::Integer)mHeightPixels->getValue(); // Don't fill in the home URL if it is the special "Multiple Media" string! if (LLTrans::getString("Multiple Media") != mHomeURL->getValue()) - fill_me_in[LLMediaEntry::HOME_URL_KEY] = mHomeURL->getValue(); - fill_me_in[LLMediaEntry::FIRST_CLICK_INTERACT_KEY] = mFirstClick->getValue(); - fill_me_in[LLMediaEntry::WIDTH_PIXELS_KEY] = mWidthPixels->getValue(); + fill_me_in[LLMediaEntry::HOME_URL_KEY] = (LLSD::String)mHomeURL->getValue(); + fill_me_in[LLMediaEntry::FIRST_CLICK_INTERACT_KEY] = (LLSD::Boolean)mFirstClick->getValue(); + fill_me_in[LLMediaEntry::WIDTH_PIXELS_KEY] = (LLSD::Integer)mWidthPixels->getValue(); } //////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp index 94e137b0f4..7ec53ed57a 100644 --- a/indra/newview/llpanelmediasettingssecurity.cpp +++ b/indra/newview/llpanelmediasettingssecurity.cpp @@ -213,7 +213,7 @@ void LLPanelMediaSettingsSecurity::preApply() // void LLPanelMediaSettingsSecurity::getValues( LLSD &fill_me_in ) { - fill_me_in[LLMediaEntry::WHITELIST_ENABLE_KEY] = mEnableWhiteList->getValue(); + fill_me_in[LLMediaEntry::WHITELIST_ENABLE_KEY] = (LLSD::Boolean)mEnableWhiteList->getValue(); // iterate over white list and extract items std::vector< LLScrollListItem* > white_list_items = mWhiteListList->getAllData(); diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml index e00f654750..89f1fe35ca 100644 --- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml +++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml @@ -221,12 +221,23 @@ width="50" /> - X + X - + -- cgit v1.2.3