diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-08-07 23:41:29 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-08-07 23:41:29 +0000 |
commit | 9828faf565d0146739495cb14270c400c9249c8d (patch) | |
tree | 65485957eb21f5829c754bcd11f3c5bdc721578f /indra/newview/llpanelplaceinfo.cpp | |
parent | e3d84d5e88751633eac27723bc775a5ad0248906 (diff) |
Command: Merging from https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0/indra, revision 1245 to https://svn.aws.productengine.com/secondlife/pe/stable-1/indra, revision 1246 into P:\svn\viewer-2-0\latest\indra, ignoring ancestry
* EXT-277 - Modifications to the Location Bar Context Menu
* EXT-252 - /whisper, /shout
* EXT-254 - IM chiclet counter
* EXT-267 - 'Status' drop-down menu doesn't drop in the Side tray / Me panel
* EXT-298 - Update Places Panel Spec to reflect latest Create Landmark format
* EXT-278 - Input Field History should display human readable names
* EXT-317 - Avatar profile isn't opened in the sidetray as Profile Info panel when selecting an avatar in the search
* Changes to notification tips
* Changes to movement and camera controls
* Side Tray functionality additions and code cleanup
Diffstat (limited to 'indra/newview/llpanelplaceinfo.cpp')
-rw-r--r-- | indra/newview/llpanelplaceinfo.cpp | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 40275be82f..a2d491c2cf 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -67,7 +67,10 @@ LLPanelPlaceInfo::LLPanelPlaceInfo() mRequestedID(), mPosRegion(), mLandmarkID(), - mMinHeight(0) + mMinHeight(0), + mScrollingPanel(NULL), + mInfoPanel(NULL), + mMediaPanel(NULL) {} LLPanelPlaceInfo::~LLPanelPlaceInfo() @@ -110,9 +113,10 @@ BOOL LLPanelPlaceInfo::postBuild() mMinHeight = scroll_container->getScrolledViewRect().getHeight(); mScrollingPanel = getChild<LLPanel>("scrolling_panel"); - - mInfoPanel = getChild<LLPanel>("info_panel", TRUE, FALSE); - mMediaPanel = getChild<LLMediaPanel>("media_panel", TRUE, FALSE); + mInfoPanel = getChild<LLPanel>("info_panel"); + mMediaPanel = getChild<LLMediaPanel>("media_panel"); + if (!(mMediaPanel && mInfoPanel && mScrollingPanel)) + return FALSE; return TRUE; } @@ -240,12 +244,20 @@ void LLPanelPlaceInfo::setInfoType(INFO_TYPE type) if (!mInfoPanel) return; + if (type != PLACE) + toggleMediaPanel(FALSE); + + bool is_landmark_info_type = type == LANDMARK; + LLPanel* landmark_info_panel = getChild<LLPanel>("landmark_info_panel"); + if (landmark_info_panel) + { + landmark_info_panel->setVisible(is_landmark_info_type); + } + switch(type) { case CREATE_LANDMARK: mCurrentTitle = getString("title_create_landmark"); - - toggleMediaPanel(FALSE); break; case PLACE: @@ -261,14 +273,10 @@ void LLPanelPlaceInfo::setInfoType(INFO_TYPE type) // a landmark or a teleport history item case LANDMARK: mCurrentTitle = getString("title_landmark"); - - toggleMediaPanel(FALSE); break; - + case TELEPORT_HISTORY: mCurrentTitle = getString("title_place"); - - toggleMediaPanel(FALSE); break; } } @@ -383,7 +391,7 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data) if (mCurrentTitle != getString("title_landmark")) { - mTitleEditor->setText(parcel_data.name + "; " + name); + mTitleEditor->setText(parcel_data.name); mNotesEditor->setText(LLStringUtil::null); } } @@ -499,7 +507,7 @@ void LLPanelPlaceInfo::createLandmark(const LLUUID& folder_id) // If typed name is empty use the parcel name instead. if (name.empty()) { - name = mParcelName->getText() + "; " + mRegionName->getText(); + name = mParcelName->getText(); } LLStringUtil::replaceChar(desc, '\n', ' '); @@ -510,7 +518,7 @@ void LLPanelPlaceInfo::createLandmark(const LLUUID& folder_id) void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent) { - if (mMinHeight > 0) + if (mMinHeight > 0 && mScrollingPanel != NULL) { mScrollingPanel->reshape(mScrollingPanel->getRect().getWidth(), mMinHeight); } |