aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelpick.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llpanelpick.cpp
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/newview/llpanelpick.cpp')
-rw-r--r--linden/indra/newview/llpanelpick.cpp35
1 files changed, 16 insertions, 19 deletions
diff --git a/linden/indra/newview/llpanelpick.cpp b/linden/indra/newview/llpanelpick.cpp
index eddbc45..32894ce 100644
--- a/linden/indra/newview/llpanelpick.cpp
+++ b/linden/indra/newview/llpanelpick.cpp
@@ -52,7 +52,7 @@
52#include "lltexturectrl.h" 52#include "lltexturectrl.h"
53#include "lluiconstants.h" 53#include "lluiconstants.h"
54#include "llviewergenericmessage.h" 54#include "llviewergenericmessage.h"
55#include "llvieweruictrlfactory.h" 55#include "lluictrlfactory.h"
56#include "llviewerparcelmgr.h" 56#include "llviewerparcelmgr.h"
57#include "llworldmap.h" 57#include "llworldmap.h"
58#include "llfloaterworldmap.h" 58#include "llfloaterworldmap.h"
@@ -88,11 +88,11 @@ LLPanelPick::LLPanelPick(BOOL top_pick)
88 std::string pick_def_file; 88 std::string pick_def_file;
89 if (top_pick) 89 if (top_pick)
90 { 90 {
91 gUICtrlFactory->buildPanel(this, "panel_top_pick.xml"); 91 LLUICtrlFactory::getInstance()->buildPanel(this, "panel_top_pick.xml");
92 } 92 }
93 else 93 else
94 { 94 {
95 gUICtrlFactory->buildPanel(this, "panel_avatar_pick.xml"); 95 LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar_pick.xml");
96 } 96 }
97} 97}
98 98
@@ -121,44 +121,44 @@ void LLPanelPick::reset()
121 121
122BOOL LLPanelPick::postBuild() 122BOOL LLPanelPick::postBuild()
123{ 123{
124 mSnapshotCtrl = LLViewerUICtrlFactory::getTexturePickerByName(this, "snapshot_ctrl"); 124 mSnapshotCtrl = getChild<LLTextureCtrl>("snapshot_ctrl");
125 mSnapshotCtrl->setCommitCallback(onCommitAny); 125 mSnapshotCtrl->setCommitCallback(onCommitAny);
126 mSnapshotCtrl->setCallbackUserData(this); 126 mSnapshotCtrl->setCallbackUserData(this);
127 127
128 mNameEditor = LLViewerUICtrlFactory::getLineEditorByName(this, "given_name_editor"); 128 mNameEditor = getChild<LLLineEditor>("given_name_editor");
129 mNameEditor->setCommitOnFocusLost(TRUE); 129 mNameEditor->setCommitOnFocusLost(TRUE);
130 mNameEditor->setCommitCallback(onCommitAny); 130 mNameEditor->setCommitCallback(onCommitAny);
131 mNameEditor->setCallbackUserData(this); 131 mNameEditor->setCallbackUserData(this);
132 132
133 mDescEditor = LLUICtrlFactory::getTextEditorByName(this, "desc_editor"); 133 mDescEditor = getChild<LLTextEditor>("desc_editor");
134 mDescEditor->setCommitOnFocusLost(TRUE); 134 mDescEditor->setCommitOnFocusLost(TRUE);
135 mDescEditor->setCommitCallback(onCommitAny); 135 mDescEditor->setCommitCallback(onCommitAny);
136 mDescEditor->setCallbackUserData(this); 136 mDescEditor->setCallbackUserData(this);
137 mDescEditor->setTabsToNextField(TRUE); 137 mDescEditor->setTabsToNextField(TRUE);
138 138
139 mLocationEditor = LLViewerUICtrlFactory::getLineEditorByName(this, "location_editor"); 139 mLocationEditor = getChild<LLLineEditor>("location_editor");
140 140
141 mSetBtn = LLViewerUICtrlFactory::getButtonByName(this, "set_location_btn"); 141 mSetBtn = getChild<LLButton>( "set_location_btn");
142 mSetBtn->setClickedCallback(onClickSet); 142 mSetBtn->setClickedCallback(onClickSet);
143 mSetBtn->setCallbackUserData(this); 143 mSetBtn->setCallbackUserData(this);
144 144
145 mTeleportBtn = LLViewerUICtrlFactory::getButtonByName(this, "pick_teleport_btn"); 145 mTeleportBtn = getChild<LLButton>( "pick_teleport_btn");
146 mTeleportBtn->setClickedCallback(onClickTeleport); 146 mTeleportBtn->setClickedCallback(onClickTeleport);
147 mTeleportBtn->setCallbackUserData(this); 147 mTeleportBtn->setCallbackUserData(this);
148 148
149 mMapBtn = LLViewerUICtrlFactory::getButtonByName(this, "pick_map_btn"); 149 mMapBtn = getChild<LLButton>( "pick_map_btn");
150 mMapBtn->setClickedCallback(onClickMap); 150 mMapBtn->setClickedCallback(onClickMap);
151 mMapBtn->setCallbackUserData(this); 151 mMapBtn->setCallbackUserData(this);
152 152
153 mSortOrderText = LLViewerUICtrlFactory::getTextBoxByName(this, "sort_order_text"); 153 mSortOrderText = getChild<LLTextBox>("sort_order_text");
154 154
155 mSortOrderEditor = LLViewerUICtrlFactory::getLineEditorByName(this, "sort_order_editor"); 155 mSortOrderEditor = getChild<LLLineEditor>("sort_order_editor");
156 mSortOrderEditor->setPrevalidate(LLLineEditor::prevalidateInt); 156 mSortOrderEditor->setPrevalidate(LLLineEditor::prevalidateInt);
157 mSortOrderEditor->setCommitOnFocusLost(TRUE); 157 mSortOrderEditor->setCommitOnFocusLost(TRUE);
158 mSortOrderEditor->setCommitCallback(onCommitAny); 158 mSortOrderEditor->setCommitCallback(onCommitAny);
159 mSortOrderEditor->setCallbackUserData(this); 159 mSortOrderEditor->setCallbackUserData(this);
160 160
161 mEnabledCheck = LLViewerUICtrlFactory::getCheckBoxByName(this, "enabled_check"); 161 mEnabledCheck = getChild<LLCheckBoxCtrl>( "enabled_check");
162 mEnabledCheck->setCommitCallback(onCommitAny); 162 mEnabledCheck->setCommitCallback(onCommitAny);
163 mEnabledCheck->setCallbackUserData(this); 163 mEnabledCheck->setCallbackUserData(this);
164 164
@@ -176,7 +176,7 @@ void LLPanelPick::initNewPick()
176 mPosGlobal = gAgent.getPositionGlobal(); 176 mPosGlobal = gAgent.getPositionGlobal();
177 177
178 // Try to fill in the current parcel 178 // Try to fill in the current parcel
179 LLParcel* parcel = gParcelMgr->getAgentParcel(); 179 LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
180 if (parcel) 180 if (parcel)
181 { 181 {
182 mNameEditor->setText(parcel->getName()); 182 mNameEditor->setText(parcel->getName());
@@ -367,12 +367,9 @@ void LLPanelPick::processPickInfoReply(LLMessageSystem *msg, void **)
367 367
368void LLPanelPick::draw() 368void LLPanelPick::draw()
369{ 369{
370 if (getVisible()) 370 refresh();
371 {
372 refresh();
373 371
374 LLPanel::draw(); 372 LLPanel::draw();
375 }
376} 373}
377 374
378 375