diff options
author | James Cook <james@lindenlab.com> | 2009-12-29 11:55:20 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-12-29 11:55:20 -0800 |
commit | c2915a889987e64484c9794d55740e7f6ac8f9bd (patch) | |
tree | e09a6050829fbc4b1f8fdae03f6c12742ba903ed /indra/newview/llpanellandmarkinfo.cpp | |
parent | 1e9a5c21e5493ad3dabec4d032bc0a627e2f725f (diff) | |
parent | 3519435bbfeec4c838d5ffbe008d0ac7bbc085a8 (diff) |
Merge viewer-2-0 into gooey
Diffstat (limited to 'indra/newview/llpanellandmarkinfo.cpp')
-rw-r--r-- | indra/newview/llpanellandmarkinfo.cpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 5de7c3f851..597b8bdb2d 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -81,7 +81,8 @@ BOOL LLPanelLandmarkInfo::postBuild() mCreator = getChild<LLTextBox>("creator"); mCreated = getChild<LLTextBox>("created"); - mTitleEditor = getChild<LLLineEditor>("title_editor"); + mLandmarkTitle = getChild<LLTextBox>("title_value"); + mLandmarkTitleEditor = getChild<LLLineEditor>("title_editor"); mNotesEditor = getChild<LLTextEditor>("notes_editor"); mFolderCombo = getChild<LLComboBox>("folder_combo"); @@ -101,7 +102,8 @@ void LLPanelLandmarkInfo::resetLocation() mCreator->setText(not_available); mOwner->setText(not_available); mCreated->setText(not_available); - mTitleEditor->setText(LLStringUtil::null); + mLandmarkTitle->setText(LLStringUtil::null); + mLandmarkTitleEditor->setText(LLStringUtil::null); mNotesEditor->setText(LLStringUtil::null); } @@ -122,7 +124,8 @@ void LLPanelLandmarkInfo::setInfoType(INFO_TYPE type) case CREATE_LANDMARK: mCurrentTitle = getString("title_create_landmark"); - mTitleEditor->setEnabled(TRUE); + mLandmarkTitle->setVisible(FALSE); + mLandmarkTitleEditor->setVisible(TRUE); mNotesEditor->setEnabled(TRUE); break; @@ -130,7 +133,8 @@ void LLPanelLandmarkInfo::setInfoType(INFO_TYPE type) default: mCurrentTitle = getString("title_landmark"); - mTitleEditor->setEnabled(FALSE); + mLandmarkTitle->setVisible(TRUE); + mLandmarkTitleEditor->setVisible(FALSE); mNotesEditor->setEnabled(FALSE); break; } @@ -185,12 +189,12 @@ void LLPanelLandmarkInfo::processParcelInfo(const LLParcelData& parcel_data) { if (parcel_data.name.empty()) { - mTitleEditor->setText(llformat("%s (%d, %d, %d)", + mLandmarkTitleEditor->setText(llformat("%s (%d, %d, %d)", parcel_data.sim_name.c_str(), region_x, region_y, region_z)); } else { - mTitleEditor->setText(parcel_data.name); + mLandmarkTitleEditor->setText(parcel_data.name); } std::string desc; @@ -281,7 +285,8 @@ void LLPanelLandmarkInfo::displayItemInfo(const LLInventoryItem* pItem) mCreated->setText(timeStr); } - mTitleEditor->setText(pItem->getName()); + mLandmarkTitle->setText(pItem->getName()); + mLandmarkTitleEditor->setText(pItem->getName()); mNotesEditor->setText(pItem->getDescription()); } @@ -296,11 +301,14 @@ void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled) else { mTitle->setText(mCurrentTitle); + + mLandmarkTitle->setText(mLandmarkTitleEditor->getText()); } if (mNotesEditor->getReadOnly() == (enabled == TRUE)) { - mTitleEditor->setEnabled(enabled); + mLandmarkTitle->setVisible(!enabled); + mLandmarkTitleEditor->setVisible(enabled); mNotesEditor->setReadOnly(!enabled); mFolderCombo->setVisible(enabled); getChild<LLTextBox>("folder_label")->setVisible(enabled); @@ -313,7 +321,7 @@ void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled) const std::string& LLPanelLandmarkInfo::getLandmarkTitle() const { - return mTitleEditor->getText(); + return mLandmarkTitleEditor->getText(); } const std::string LLPanelLandmarkInfo::getLandmarkNotes() const @@ -333,7 +341,7 @@ BOOL LLPanelLandmarkInfo::setLandmarkFolder(const LLUUID& id) void LLPanelLandmarkInfo::createLandmark(const LLUUID& folder_id) { - std::string name = mTitleEditor->getText(); + std::string name = mLandmarkTitleEditor->getText(); std::string desc = mNotesEditor->getText(); LLStringUtil::trim(name); |