aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelgroup.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llpanelgroup.cpp
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpanelgroup.cpp43
1 files changed, 11 insertions, 32 deletions
diff --git a/linden/indra/newview/llpanelgroup.cpp b/linden/indra/newview/llpanelgroup.cpp
index e26d1d2..b6f4681 100644
--- a/linden/indra/newview/llpanelgroup.cpp
+++ b/linden/indra/newview/llpanelgroup.cpp
@@ -67,22 +67,14 @@ BOOL LLPanelGroupTab::isVisibleByAgent(LLAgent* agentp)
67BOOL LLPanelGroupTab::postBuild() 67BOOL LLPanelGroupTab::postBuild()
68{ 68{
69 // Hook up the help button callback. 69 // Hook up the help button callback.
70 LLButton* button = (LLButton*) getChildByName("help_button"); 70 LLButton* button = getChild<LLButton>("help_button");
71 if (button) 71 if (button)
72 { 72 {
73 button->setClickedCallback(onClickHelp); 73 button->setClickedCallback(onClickHelp);
74 button->setCallbackUserData(this); 74 button->setCallbackUserData(this);
75 } 75 }
76 76
77 // Read help text from the xml file. 77 mHelpText = getString("help_text");
78 LLTextBox* txt;
79 // Don't recurse for this, since we don't currently have a recursive removeChild()
80 txt = (LLTextBox*) getChildByName("help_text");
81 if (txt)
82 {
83 mHelpText = txt->getText();
84 removeChild(txt, TRUE);
85 }
86 return TRUE; 78 return TRUE;
87} 79}
88 80
@@ -219,14 +211,14 @@ void LLPanelGroup::updateTabVisibility()
219 211
220BOOL LLPanelGroup::postBuild() 212BOOL LLPanelGroup::postBuild()
221{ 213{
222 mTabContainer = (LLTabContainerCommon*) getChildByName("group_tab_container"); 214 mTabContainer = getChild<LLTabContainer>("group_tab_container");
223 215
224 if (mTabContainer) 216 if (mTabContainer)
225 { 217 {
226 // Select the initial tab specified via constructor 218 // Select the initial tab specified via constructor
227 const BOOL recurse = TRUE; 219 const BOOL recurse = TRUE;
228 LLPanelGroupTab* tabp = 220 LLPanelGroupTab* tabp =
229 (LLPanelGroupTab*) getChildByName(mInitialTab, recurse); 221 getChild<LLPanelGroupTab>(mInitialTab, recurse);
230 222
231 if (!tabp) 223 if (!tabp)
232 { 224 {
@@ -272,23 +264,10 @@ BOOL LLPanelGroup::postBuild()
272 mCurrentTab->activate(); 264 mCurrentTab->activate();
273 } 265 }
274 266
275 // Read apply text from the xml file. 267 mDefaultNeedsApplyMesg = getString("default_needs_apply_text");
276 LLTextBox* txt; 268 mWantApplyMesg = getString("want_apply_text");
277 // Don't recurse for this, since we don't currently have a recursive removeChild()
278 txt = (LLTextBox*)getChildByName("default_needs_apply_text");
279 if (txt)
280 {
281 mDefaultNeedsApplyMesg = txt->getText();
282 removeChild(txt, TRUE);
283 }
284 txt = (LLTextBox*)getChildByName("want_apply_text");
285 if (txt)
286 {
287 mWantApplyMesg = txt->getText();
288 removeChild(txt, TRUE);
289 }
290 269
291 LLButton* button = (LLButton*) getChildByName("btn_ok"); 270 LLButton* button = getChild<LLButton>("btn_ok");
292 if (button) 271 if (button)
293 { 272 {
294 button->setClickedCallback(onBtnOK); 273 button->setClickedCallback(onBtnOK);
@@ -296,7 +275,7 @@ BOOL LLPanelGroup::postBuild()
296 button->setVisible(mAllowEdit); 275 button->setVisible(mAllowEdit);
297 } 276 }
298 277
299 button = (LLButton*) getChildByName("btn_cancel"); 278 button = getChild<LLButton>("btn_cancel");
300 if (button) 279 if (button)
301 { 280 {
302 button->setClickedCallback(onBtnCancel); 281 button->setClickedCallback(onBtnCancel);
@@ -304,7 +283,7 @@ BOOL LLPanelGroup::postBuild()
304 button->setVisible(mAllowEdit); 283 button->setVisible(mAllowEdit);
305 } 284 }
306 285
307 button = (LLButton*) getChildByName("btn_apply"); 286 button = getChild<LLButton>("btn_apply");
308 if (button) 287 if (button)
309 { 288 {
310 button->setClickedCallback(onBtnApply); 289 button->setClickedCallback(onBtnApply);
@@ -314,7 +293,7 @@ BOOL LLPanelGroup::postBuild()
314 mApplyBtn = button; 293 mApplyBtn = button;
315 } 294 }
316 295
317 button = (LLButton*) getChildByName("btn_refresh"); 296 button = getChild<LLButton>("btn_refresh");
318 if (button) 297 if (button)
319 { 298 {
320 button->setClickedCallback(onBtnRefresh); 299 button->setClickedCallback(onBtnRefresh);
@@ -400,7 +379,7 @@ void LLPanelGroup::selectTab(std::string tab_name)
400 const BOOL recurse = TRUE; 379 const BOOL recurse = TRUE;
401 380
402 LLPanelGroupTab* tabp = 381 LLPanelGroupTab* tabp =
403 (LLPanelGroupTab*) getChildByName(tab_name, recurse); 382 getChild<LLPanelGroupTab>(tab_name, recurse);
404 383
405 if ( tabp && mTabContainer ) 384 if ( tabp && mTabContainer )
406 { 385 {