aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelclassified.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:27 -0500
committerJacek Antonelli2008-08-15 23:45:27 -0500
commita8a62201ba762e98dff92cf49033e577fc34d8d4 (patch)
tree11f8513c5cdc222f2fac0c93eb724c089803c200 /linden/indra/newview/llpanelclassified.cpp
parentSecond Life viewer sources 1.18.6.4-RC (diff)
downloadmeta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.zip
meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.gz
meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.bz2
meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.xz
Second Life viewer sources 1.19.0.0
Diffstat (limited to 'linden/indra/newview/llpanelclassified.cpp')
-rw-r--r--linden/indra/newview/llpanelclassified.cpp40
1 files changed, 22 insertions, 18 deletions
diff --git a/linden/indra/newview/llpanelclassified.cpp b/linden/indra/newview/llpanelclassified.cpp
index aafe05d..811527e 100644
--- a/linden/indra/newview/llpanelclassified.cpp
+++ b/linden/indra/newview/llpanelclassified.cpp
@@ -12,12 +12,12 @@
12 * ("GPL"), unless you have obtained a separate licensing agreement 12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of 13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or 14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlife.com/developers/opensource/gplv2 15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 * 16 *
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlife.com/developers/opensource/flossexception 20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 21 *
22 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
@@ -109,9 +109,8 @@ static LLDispatchClassifiedClickThrough sClassifiedClickThrough;
109class LLClassifiedTeleportHandler : public LLCommandHandler 109class LLClassifiedTeleportHandler : public LLCommandHandler
110{ 110{
111public: 111public:
112 // Inform the system you handle commands starting 112 // don't allow from external browsers because it moves you immediately
113 // with "foo" 113 LLClassifiedTeleportHandler() : LLCommandHandler("classifiedteleport", false) { }
114 LLClassifiedTeleportHandler() : LLCommandHandler("classifiedteleport") { }
115 114
116 bool handle(const LLSD& tokens, const LLSD& queryMap) 115 bool handle(const LLSD& tokens, const LLSD& queryMap)
117 { 116 {
@@ -134,7 +133,8 @@ public:
134 const bool from_search = true; 133 const bool from_search = true;
135 LLPanelClassified::sendClassifiedClickMessage(classified_id, "teleport", from_search); 134 LLPanelClassified::sendClassifiedClickMessage(classified_id, "teleport", from_search);
136 // Invoke teleport 135 // Invoke teleport
137 return LLURLDispatcher::dispatch(url); 136 const bool from_external_browser = false;
137 return LLURLDispatcher::dispatch(url, from_external_browser);
138 } 138 }
139}; 139};
140// Creating the object registers with the dispatcher. 140// Creating the object registers with the dispatcher.
@@ -228,14 +228,14 @@ BOOL LLPanelClassified::postBuild()
228 mNameEditor = LLViewerUICtrlFactory::getLineEditorByName(this, "given_name_editor"); 228 mNameEditor = LLViewerUICtrlFactory::getLineEditorByName(this, "given_name_editor");
229 mNameEditor->setMaxTextLength(DB_PARCEL_NAME_LEN); 229 mNameEditor->setMaxTextLength(DB_PARCEL_NAME_LEN);
230 mNameEditor->setCommitOnFocusLost(TRUE); 230 mNameEditor->setCommitOnFocusLost(TRUE);
231 mNameEditor->setFocusReceivedCallback(onFocusReceived); 231 mNameEditor->setFocusReceivedCallback(onFocusReceived, this);
232 mNameEditor->setCommitCallback(onCommitAny); 232 mNameEditor->setCommitCallback(onCommitAny);
233 mNameEditor->setCallbackUserData(this); 233 mNameEditor->setCallbackUserData(this);
234 mNameEditor->setPrevalidate( LLLineEditor::prevalidateASCII ); 234 mNameEditor->setPrevalidate( LLLineEditor::prevalidateASCII );
235 235
236 mDescEditor = LLUICtrlFactory::getTextEditorByName(this, "desc_editor"); 236 mDescEditor = LLUICtrlFactory::getTextEditorByName(this, "desc_editor");
237 mDescEditor->setCommitOnFocusLost(TRUE); 237 mDescEditor->setCommitOnFocusLost(TRUE);
238 mDescEditor->setFocusReceivedCallback(onFocusReceived); 238 mDescEditor->setFocusReceivedCallback(onFocusReceived, this);
239 mDescEditor->setCommitCallback(onCommitAny); 239 mDescEditor->setCommitCallback(onCommitAny);
240 mDescEditor->setCallbackUserData(this); 240 mDescEditor->setCallbackUserData(this);
241 mDescEditor->setTabToNextField(TRUE); 241 mDescEditor->setTabToNextField(TRUE);
@@ -847,17 +847,21 @@ void LLPanelClassified::confirmPublish(S32 option)
847 } 847 }
848 848
849 // Tell all the widgets to reset their dirty state since the ad was just saved 849 // Tell all the widgets to reset their dirty state since the ad was just saved
850 mSnapshotCtrl->resetDirty(); 850 if (mSnapshotCtrl)
851 mNameEditor->resetDirty(); 851 mSnapshotCtrl->resetDirty();
852 mDescEditor->resetDirty(); 852 if (mNameEditor)
853 mLocationEditor->resetDirty(); 853 mNameEditor->resetDirty();
854 if (mDescEditor)
855 mDescEditor->resetDirty();
856 if (mLocationEditor)
857 mLocationEditor->resetDirty();
854 mLocationChanged = false; 858 mLocationChanged = false;
855 mCategoryCombo->resetDirty(); 859 if (mCategoryCombo)
856 mMatureCheck->resetDirty(); 860 mCategoryCombo->resetDirty();
861 if (mMatureCheck)
862 mMatureCheck->resetDirty();
857 if (mAutoRenewCheck) 863 if (mAutoRenewCheck)
858 {
859 mAutoRenewCheck->resetDirty(); 864 mAutoRenewCheck->resetDirty();
860 }
861} 865}
862 866
863// static 867// static
@@ -964,10 +968,10 @@ void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data)
964} 968}
965 969
966// static 970// static
967void LLPanelClassified::onFocusReceived(LLUICtrl* ctrl, void* data) 971void LLPanelClassified::onFocusReceived(LLFocusableElement* ctrl, void* data)
968{ 972{
969 // allow the data to be saved 973 // allow the data to be saved
970 onCommitAny(ctrl, data); 974 onCommitAny((LLUICtrl*)ctrl, data);
971} 975}
972 976
973 977