summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaceinfo.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-07-08 05:19:19 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-07-08 05:19:19 +0000
commitf26f7e3e29019abf3a10f6925e30baca19eb4e2d (patch)
tree071fd0d451b482c9dd8376479b968da4aa099a78 /indra/newview/llpanelplaceinfo.cpp
parentc5d100a9e4595c0d3bc685e0d6a2972ef228013d (diff)
merge -r 889-936 https://svn.aws.productengine.com/secondlife/pe/stable/ -> viewer-2-0
Also: * Moved media remote shortcut to Communicate menu * Changed mini map menu to toggle instead of show
Diffstat (limited to 'indra/newview/llpanelplaceinfo.cpp')
-rw-r--r--indra/newview/llpanelplaceinfo.cpp56
1 files changed, 45 insertions, 11 deletions
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index d40e10478a..5bbcf4207f 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -43,29 +43,20 @@
#include "llqueryflags.h"
#include "llbutton.h"
-#include "llfloater.h"
-#include "llfloaterreg.h"
#include "lllineeditor.h"
#include "llscrollcontainer.h"
#include "lltextbox.h"
-#include "lltrans.h"
-#include "llui.h"
-#include "lluictrlfactory.h"
#include "llagent.h"
#include "llfloaterworldmap.h"
#include "llinventorymodel.h"
#include "lltexturectrl.h"
-#include "lluiconstants.h"
-#include "llviewercontrol.h"
#include "llviewerinventory.h"
#include "llviewerregion.h"
#include "llviewertexteditor.h"
-#include "llviewerwindow.h"
-#include "llweb.h"
#include "llworldmap.h"
-static LLRegisterPanelClassWrapper<LLPanelPlaceInfo> t_places("panel_landmark_info");
+static LLRegisterPanelClassWrapper<LLPanelPlaceInfo> t_place_info("panel_place_info");
LLPanelPlaceInfo::LLPanelPlaceInfo()
: LLPanel(),
@@ -86,6 +77,9 @@ LLPanelPlaceInfo::~LLPanelPlaceInfo()
BOOL LLPanelPlaceInfo::postBuild()
{
+ mTitle = getChild<LLTextBox>("panel_title");
+ mCurrentTitle = mTitle->getText();
+
// Since this is only used in the directory browser, always
// disable the snapshot control. Otherwise clicking on it will
// open a texture picker.
@@ -114,7 +108,8 @@ BOOL LLPanelPlaceInfo::postBuild()
mScrollingPanel = getChild<LLPanel>("scrolling_panel");
- mInfoPanel = getChild<LLPanel>("info_panel");
+ mInfoPanel = getChild<LLPanel>("info_panel", TRUE, FALSE);
+ mMediaPanel = getChild<LLMediaPanel>("media_panel", TRUE, FALSE);
return TRUE;
}
@@ -235,6 +230,45 @@ void LLPanelPlaceInfo::setParcelID(const LLUUID& parcel_id)
sendParcelInfoRequest();
}
+void LLPanelPlaceInfo::setInfoType(INFO_TYPE type)
+{
+ if (!mInfoPanel)
+ return;
+
+ if (type == PLACE)
+ {
+ mCurrentTitle = getString("title_place");
+ }
+ else
+ {
+ mCurrentTitle = getString("title_landmark");
+ }
+
+ if (mInfoPanel->getVisible())
+ {
+ mTitle->setText(mCurrentTitle);
+ }
+}
+
+void LLPanelPlaceInfo::toggleMediaPanel()
+{
+ if (!(mMediaPanel && mInfoPanel))
+ return;
+
+ bool visible = mInfoPanel->getVisible();
+ if (visible)
+ {
+ mTitle->setText(getString("title_media"));
+ }
+ else
+ {
+ mTitle->setText(mCurrentTitle);
+ }
+
+ mInfoPanel->setVisible(!visible);
+ mMediaPanel->setVisible(visible);
+}
+
void LLPanelPlaceInfo::sendParcelInfoRequest()
{
if (mParcelID != mRequestedID)