diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanelavatar.cpp | 117 |
1 files changed, 40 insertions, 77 deletions
diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index 5d32f4b..3314ec1 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp | |||
@@ -74,14 +74,13 @@ | |||
74 | #include "llviewergenericmessage.h" // send_generic_message | 74 | #include "llviewergenericmessage.h" // send_generic_message |
75 | #include "llviewerobjectlist.h" | 75 | #include "llviewerobjectlist.h" |
76 | #include "llviewerregion.h" | 76 | #include "llviewerregion.h" |
77 | #include "llviewborder.h" | ||
78 | #include "llweb.h" | 77 | #include "llweb.h" |
79 | #include "llinventorymodel.h" | 78 | #include "llinventorymodel.h" |
80 | #include "roles_constants.h" | 79 | #include "roles_constants.h" |
81 | 80 | ||
82 | #define kArraySize( _kArray ) ( sizeof( (_kArray) ) / sizeof( _kArray[0] ) ) | 81 | #define kArraySize( _kArray ) ( sizeof( (_kArray) ) / sizeof( _kArray[0] ) ) |
83 | 82 | ||
84 | #include "llvieweruictrlfactory.h" | 83 | #include "lluictrlfactory.h" |
85 | 84 | ||
86 | // Statics | 85 | // Statics |
87 | std::list<LLPanelAvatar*> LLPanelAvatar::sAllPanels; | 86 | std::list<LLPanelAvatar*> LLPanelAvatar::sAllPanels; |
@@ -104,9 +103,6 @@ public: | |||
104 | LLDropTarget(const std::string& name, const LLRect& rect, const LLUUID& agent_id); | 103 | LLDropTarget(const std::string& name, const LLRect& rect, const LLUUID& agent_id); |
105 | ~LLDropTarget(); | 104 | ~LLDropTarget(); |
106 | 105 | ||
107 | virtual EWidgetType getWidgetType() const; | ||
108 | virtual LLString getWidgetTag() const; | ||
109 | |||
110 | void doDrop(EDragAndDropType cargo_type, void* cargo_data); | 106 | void doDrop(EDragAndDropType cargo_type, void* cargo_data); |
111 | 107 | ||
112 | // | 108 | // |
@@ -133,16 +129,6 @@ LLDropTarget::~LLDropTarget() | |||
133 | { | 129 | { |
134 | } | 130 | } |
135 | 131 | ||
136 | EWidgetType LLDropTarget::getWidgetType() const | ||
137 | { | ||
138 | return WIDGET_TYPE_DROP_TARGET; | ||
139 | } | ||
140 | |||
141 | LLString LLDropTarget::getWidgetTag() const | ||
142 | { | ||
143 | return LL_DROP_TARGET_TAG; | ||
144 | } | ||
145 | |||
146 | void LLDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data) | 132 | void LLDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data) |
147 | { | 133 | { |
148 | llinfos << "LLDropTarget::doDrop()" << llendl; | 134 | llinfos << "LLDropTarget::doDrop()" << llendl; |
@@ -243,12 +229,9 @@ LLPanelAvatarTab::LLPanelAvatarTab(const std::string& name, const LLRect &rect, | |||
243 | // virtual | 229 | // virtual |
244 | void LLPanelAvatarTab::draw() | 230 | void LLPanelAvatarTab::draw() |
245 | { | 231 | { |
246 | if (getVisible()) | 232 | refresh(); |
247 | { | ||
248 | refresh(); | ||
249 | 233 | ||
250 | LLPanel::draw(); | 234 | LLPanel::draw(); |
251 | } | ||
252 | } | 235 | } |
253 | 236 | ||
254 | void LLPanelAvatarTab::sendAvatarProfileRequestIfNeeded(const char* method) | 237 | void LLPanelAvatarTab::sendAvatarProfileRequestIfNeeded(const char* method) |
@@ -314,12 +297,12 @@ void LLPanelAvatarSecondLife::clearControls() | |||
314 | 297 | ||
315 | mPartnerID = LLUUID::null; | 298 | mPartnerID = LLUUID::null; |
316 | 299 | ||
317 | LLScrollListCtrl* group_list = LLUICtrlFactory::getScrollListByName(this,"groups"); | 300 | LLScrollListCtrl* group_list = getChild<LLScrollListCtrl>("groups"); |
318 | if(group_list) | 301 | if(group_list) |
319 | { | 302 | { |
320 | group_list->deleteAllItems(); | 303 | group_list->deleteAllItems(); |
321 | } | 304 | } |
322 | LLScrollListCtrl* ratings_list = LLUICtrlFactory::getScrollListByName(this,"ratings"); | 305 | LLScrollListCtrl* ratings_list = getChild<LLScrollListCtrl>("ratings"); |
323 | if(ratings_list) | 306 | if(ratings_list) |
324 | { | 307 | { |
325 | ratings_list->deleteAllItems(); | 308 | ratings_list->deleteAllItems(); |
@@ -339,15 +322,6 @@ void LLPanelAvatarSecondLife::enableControls(BOOL self) | |||
339 | childSetEnabled("allow_publish", self); | 322 | childSetEnabled("allow_publish", self); |
340 | childSetVisible("?", self); | 323 | childSetVisible("?", self); |
341 | childSetEnabled("?", self); | 324 | childSetEnabled("?", self); |
342 | |||
343 | if (!self) | ||
344 | { | ||
345 | // This is because the LLTextEditor | ||
346 | // appears to reset the read only background color when | ||
347 | // setEnable is called, for some reason | ||
348 | LLTextEditor* about = LLUICtrlFactory::getTextEditorByName(this,"about"); | ||
349 | if (about) about->setReadOnlyBgColor(LLColor4::transparent); | ||
350 | } | ||
351 | } | 325 | } |
352 | 326 | ||
353 | 327 | ||
@@ -361,7 +335,7 @@ void LLPanelAvatarSecondLife::onDoubleClickGroup(void* data) | |||
361 | LLPanelAvatarSecondLife* self = (LLPanelAvatarSecondLife*)data; | 335 | LLPanelAvatarSecondLife* self = (LLPanelAvatarSecondLife*)data; |
362 | 336 | ||
363 | 337 | ||
364 | LLScrollListCtrl* group_list = LLUICtrlFactory::getScrollListByName(self,"groups"); | 338 | LLScrollListCtrl* group_list = self->getChild<LLScrollListCtrl>("groups"); |
365 | if(group_list) | 339 | if(group_list) |
366 | { | 340 | { |
367 | LLScrollListItem* item = group_list->getFirstSelected(); | 341 | LLScrollListItem* item = group_list->getFirstSelected(); |
@@ -478,7 +452,7 @@ BOOL LLPanelAvatarNotes::postBuild(void) | |||
478 | { | 452 | { |
479 | childSetCommitCallback("notes edit",onCommitNotes,this); | 453 | childSetCommitCallback("notes edit",onCommitNotes,this); |
480 | 454 | ||
481 | LLTextEditor* te = LLUICtrlFactory::getTextEditorByName(this,"notes edit"); | 455 | LLTextEditor* te = getChild<LLTextEditor>("notes edit"); |
482 | if(te) te->setCommitOnFocusLost(TRUE); | 456 | if(te) te->setCommitOnFocusLost(TRUE); |
483 | return TRUE; | 457 | return TRUE; |
484 | } | 458 | } |
@@ -529,7 +503,7 @@ BOOL LLPanelAvatarAdvanced::postBuild() | |||
529 | for(S32 tt=0; tt < mWantToCount; ++tt) | 503 | for(S32 tt=0; tt < mWantToCount; ++tt) |
530 | { | 504 | { |
531 | LLString ctlname = llformat("chk%d", tt); | 505 | LLString ctlname = llformat("chk%d", tt); |
532 | mWantToCheck[tt] = LLUICtrlFactory::getCheckBoxByName(this,ctlname); | 506 | mWantToCheck[tt] = getChild<LLCheckBoxCtrl>(ctlname); |
533 | } | 507 | } |
534 | mSkillsCount = (6>kArraySize(mSkillsCheck))?kArraySize(mSkillsCheck):6; | 508 | mSkillsCount = (6>kArraySize(mSkillsCheck))?kArraySize(mSkillsCheck):6; |
535 | 509 | ||
@@ -537,11 +511,11 @@ BOOL LLPanelAvatarAdvanced::postBuild() | |||
537 | { | 511 | { |
538 | //Find the Skills checkboxes and save off thier controls | 512 | //Find the Skills checkboxes and save off thier controls |
539 | LLString ctlname = llformat("schk%d",tt); | 513 | LLString ctlname = llformat("schk%d",tt); |
540 | mSkillsCheck[tt] = LLUICtrlFactory::getCheckBoxByName(this,ctlname); | 514 | mSkillsCheck[tt] = getChild<LLCheckBoxCtrl>(ctlname); |
541 | } | 515 | } |
542 | 516 | ||
543 | mWantToEdit = LLUICtrlFactory::getLineEditorByName(this,"want_to_edit"); | 517 | mWantToEdit = getChild<LLLineEditor>("want_to_edit"); |
544 | mSkillsEdit = LLUICtrlFactory::getLineEditorByName(this,"skills_edit"); | 518 | mSkillsEdit = getChild<LLLineEditor>("skills_edit"); |
545 | childSetVisible("skills_edit",LLPanelAvatar::sAllowFirstLife); | 519 | childSetVisible("skills_edit",LLPanelAvatar::sAllowFirstLife); |
546 | childSetVisible("want_to_edit",LLPanelAvatar::sAllowFirstLife); | 520 | childSetVisible("want_to_edit",LLPanelAvatar::sAllowFirstLife); |
547 | 521 | ||
@@ -717,17 +691,6 @@ void LLPanelAvatarAdvanced::enableControls(BOOL self) | |||
717 | if (mWantToEdit) mWantToEdit->setEnabled(self); | 691 | if (mWantToEdit) mWantToEdit->setEnabled(self); |
718 | if (mSkillsEdit) mSkillsEdit->setEnabled(self); | 692 | if (mSkillsEdit) mSkillsEdit->setEnabled(self); |
719 | childSetEnabled("languages_edit",self); | 693 | childSetEnabled("languages_edit",self); |
720 | |||
721 | if (!self) | ||
722 | { | ||
723 | // This is because the LLTextEditor | ||
724 | // appears to reset the read only background color when | ||
725 | // setEnable is called, for some reason | ||
726 | if (mWantToEdit) mWantToEdit->setReadOnlyBgColor(LLColor4::transparent); | ||
727 | if (mSkillsEdit) mSkillsEdit->setReadOnlyBgColor(LLColor4::transparent); | ||
728 | LLLineEditor* languages_edit = getChild<LLLineEditor>("languages_edit"); | ||
729 | languages_edit->setReadOnlyBgColor(LLColor4::transparent); | ||
730 | } | ||
731 | } | 694 | } |
732 | 695 | ||
733 | void LLPanelAvatarAdvanced::setWantSkills(U32 want_to_mask, const std::string& want_to_text, | 696 | void LLPanelAvatarAdvanced::setWantSkills(U32 want_to_mask, const std::string& want_to_text, |
@@ -828,7 +791,7 @@ void LLPanelAvatarClassified::refresh() | |||
828 | { | 791 | { |
829 | BOOL self = (gAgent.getID() == getPanelAvatar()->getAvatarID()); | 792 | BOOL self = (gAgent.getID() == getPanelAvatar()->getAvatarID()); |
830 | 793 | ||
831 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(this,"classified tab"); | 794 | LLTabContainer* tabs = getChild<LLTabContainer>("classified tab"); |
832 | 795 | ||
833 | S32 tab_count = tabs ? tabs->getTabCount() : 0; | 796 | S32 tab_count = tabs ? tabs->getTabCount() : 0; |
834 | 797 | ||
@@ -862,7 +825,7 @@ void LLPanelAvatarClassified::refresh() | |||
862 | 825 | ||
863 | BOOL LLPanelAvatarClassified::canClose() | 826 | BOOL LLPanelAvatarClassified::canClose() |
864 | { | 827 | { |
865 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); | 828 | LLTabContainer* tabs = getChild<LLTabContainer>("classified tab"); |
866 | for (S32 i = 0; i < tabs->getTabCount(); i++) | 829 | for (S32 i = 0; i < tabs->getTabCount(); i++) |
867 | { | 830 | { |
868 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); | 831 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); |
@@ -876,7 +839,7 @@ BOOL LLPanelAvatarClassified::canClose() | |||
876 | 839 | ||
877 | BOOL LLPanelAvatarClassified::titleIsValid() | 840 | BOOL LLPanelAvatarClassified::titleIsValid() |
878 | { | 841 | { |
879 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); | 842 | LLTabContainer* tabs = getChild<LLTabContainer>("classified tab"); |
880 | if ( tabs ) | 843 | if ( tabs ) |
881 | { | 844 | { |
882 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getCurrentPanel(); | 845 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getCurrentPanel(); |
@@ -894,7 +857,7 @@ BOOL LLPanelAvatarClassified::titleIsValid() | |||
894 | 857 | ||
895 | void LLPanelAvatarClassified::apply() | 858 | void LLPanelAvatarClassified::apply() |
896 | { | 859 | { |
897 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); | 860 | LLTabContainer* tabs = getChild<LLTabContainer>("classified tab"); |
898 | for (S32 i = 0; i < tabs->getTabCount(); i++) | 861 | for (S32 i = 0; i < tabs->getTabCount(); i++) |
899 | { | 862 | { |
900 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); | 863 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); |
@@ -905,7 +868,7 @@ void LLPanelAvatarClassified::apply() | |||
905 | 868 | ||
906 | void LLPanelAvatarClassified::deleteClassifiedPanels() | 869 | void LLPanelAvatarClassified::deleteClassifiedPanels() |
907 | { | 870 | { |
908 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(this,"classified tab"); | 871 | LLTabContainer* tabs = getChild<LLTabContainer>("classified tab"); |
909 | if (tabs) | 872 | if (tabs) |
910 | { | 873 | { |
911 | tabs->deleteAllTabs(); | 874 | tabs->deleteAllTabs(); |
@@ -925,7 +888,7 @@ void LLPanelAvatarClassified::processAvatarClassifiedReply(LLMessageSystem* msg, | |||
925 | char classified_name[DB_PICK_NAME_SIZE]; /*Flawfinder: ignore*/ | 888 | char classified_name[DB_PICK_NAME_SIZE]; /*Flawfinder: ignore*/ |
926 | LLPanelClassified* panel_classified = NULL; | 889 | LLPanelClassified* panel_classified = NULL; |
927 | 890 | ||
928 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(this,"classified tab"); | 891 | LLTabContainer* tabs = getChild<LLTabContainer>("classified tab"); |
929 | 892 | ||
930 | // Don't remove old panels. We need to be able to process multiple | 893 | // Don't remove old panels. We need to be able to process multiple |
931 | // packets for people who have lots of classifieds. JC | 894 | // packets for people who have lots of classifieds. JC |
@@ -983,7 +946,7 @@ void LLPanelAvatarClassified::callbackNew(S32 option, void* data) | |||
983 | { | 946 | { |
984 | LLPanelClassified* panel_classified = new LLPanelClassified(false, false); | 947 | LLPanelClassified* panel_classified = new LLPanelClassified(false, false); |
985 | panel_classified->initNewClassified(); | 948 | panel_classified->initNewClassified(); |
986 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(self,"classified tab"); | 949 | LLTabContainer* tabs = self->getChild<LLTabContainer>("classified tab"); |
987 | if(tabs) | 950 | if(tabs) |
988 | { | 951 | { |
989 | tabs->addTabPanel(panel_classified, panel_classified->getClassifiedName()); | 952 | tabs->addTabPanel(panel_classified, panel_classified->getClassifiedName()); |
@@ -998,7 +961,7 @@ void LLPanelAvatarClassified::onClickDelete(void* data) | |||
998 | { | 961 | { |
999 | LLPanelAvatarClassified* self = (LLPanelAvatarClassified*)data; | 962 | LLPanelAvatarClassified* self = (LLPanelAvatarClassified*)data; |
1000 | 963 | ||
1001 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(self,"classified tab"); | 964 | LLTabContainer* tabs = self->getChild<LLTabContainer>("classified tab"); |
1002 | LLPanelClassified* panel_classified = NULL; | 965 | LLPanelClassified* panel_classified = NULL; |
1003 | if(tabs) | 966 | if(tabs) |
1004 | { | 967 | { |
@@ -1017,7 +980,7 @@ void LLPanelAvatarClassified::onClickDelete(void* data) | |||
1017 | void LLPanelAvatarClassified::callbackDelete(S32 option, void* data) | 980 | void LLPanelAvatarClassified::callbackDelete(S32 option, void* data) |
1018 | { | 981 | { |
1019 | LLPanelAvatarClassified* self = (LLPanelAvatarClassified*)data; | 982 | LLPanelAvatarClassified* self = (LLPanelAvatarClassified*)data; |
1020 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(self,"classified tab"); | 983 | LLTabContainer* tabs = self->getChild<LLTabContainer>("classified tab"); |
1021 | LLPanelClassified* panel_classified=NULL; | 984 | LLPanelClassified* panel_classified=NULL; |
1022 | if(tabs) | 985 | if(tabs) |
1023 | { | 986 | { |
@@ -1062,7 +1025,7 @@ LLPanelAvatarPicks::LLPanelAvatarPicks(const std::string& name, | |||
1062 | void LLPanelAvatarPicks::refresh() | 1025 | void LLPanelAvatarPicks::refresh() |
1063 | { | 1026 | { |
1064 | BOOL self = (gAgent.getID() == getPanelAvatar()->getAvatarID()); | 1027 | BOOL self = (gAgent.getID() == getPanelAvatar()->getAvatarID()); |
1065 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(this,"picks tab"); | 1028 | LLTabContainer* tabs = getChild<LLTabContainer>("picks tab"); |
1066 | S32 tab_count = tabs ? tabs->getTabCount() : 0; | 1029 | S32 tab_count = tabs ? tabs->getTabCount() : 0; |
1067 | childSetEnabled("New...", self && tab_count < MAX_AVATAR_PICKS); | 1030 | childSetEnabled("New...", self && tab_count < MAX_AVATAR_PICKS); |
1068 | childSetEnabled("Delete...", self && tab_count > 0); | 1031 | childSetEnabled("Delete...", self && tab_count > 0); |
@@ -1075,7 +1038,7 @@ void LLPanelAvatarPicks::refresh() | |||
1075 | 1038 | ||
1076 | void LLPanelAvatarPicks::deletePickPanels() | 1039 | void LLPanelAvatarPicks::deletePickPanels() |
1077 | { | 1040 | { |
1078 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(this,"picks tab"); | 1041 | LLTabContainer* tabs = getChild<LLTabContainer>("picks tab"); |
1079 | if(tabs) | 1042 | if(tabs) |
1080 | { | 1043 | { |
1081 | tabs->deleteAllTabs(); | 1044 | tabs->deleteAllTabs(); |
@@ -1094,7 +1057,7 @@ void LLPanelAvatarPicks::processAvatarPicksReply(LLMessageSystem* msg, void**) | |||
1094 | char pick_name[DB_PICK_NAME_SIZE]; /*Flawfinder: ignore*/ | 1057 | char pick_name[DB_PICK_NAME_SIZE]; /*Flawfinder: ignore*/ |
1095 | LLPanelPick* panel_pick = NULL; | 1058 | LLPanelPick* panel_pick = NULL; |
1096 | 1059 | ||
1097 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(this,"picks tab"); | 1060 | LLTabContainer* tabs = getChild<LLTabContainer>("picks tab"); |
1098 | 1061 | ||
1099 | // Clear out all the old panels. We'll replace them with the correct | 1062 | // Clear out all the old panels. We'll replace them with the correct |
1100 | // number of new panels. | 1063 | // number of new panels. |
@@ -1144,7 +1107,7 @@ void LLPanelAvatarPicks::onClickNew(void* data) | |||
1144 | { | 1107 | { |
1145 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; | 1108 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; |
1146 | LLPanelPick* panel_pick = new LLPanelPick(FALSE); | 1109 | LLPanelPick* panel_pick = new LLPanelPick(FALSE); |
1147 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(self,"picks tab"); | 1110 | LLTabContainer* tabs = self->getChild<LLTabContainer>("picks tab"); |
1148 | 1111 | ||
1149 | panel_pick->initNewPick(); | 1112 | panel_pick->initNewPick(); |
1150 | if(tabs) | 1113 | if(tabs) |
@@ -1159,7 +1122,7 @@ void LLPanelAvatarPicks::onClickNew(void* data) | |||
1159 | void LLPanelAvatarPicks::onClickDelete(void* data) | 1122 | void LLPanelAvatarPicks::onClickDelete(void* data) |
1160 | { | 1123 | { |
1161 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; | 1124 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; |
1162 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(self,"picks tab"); | 1125 | LLTabContainer* tabs = self->getChild<LLTabContainer>("picks tab"); |
1163 | LLPanelPick* panel_pick = tabs?(LLPanelPick*)tabs->getCurrentPanel():NULL; | 1126 | LLPanelPick* panel_pick = tabs?(LLPanelPick*)tabs->getCurrentPanel():NULL; |
1164 | 1127 | ||
1165 | if (!panel_pick) return; | 1128 | if (!panel_pick) return; |
@@ -1177,7 +1140,7 @@ void LLPanelAvatarPicks::onClickDelete(void* data) | |||
1177 | void LLPanelAvatarPicks::callbackDelete(S32 option, void* data) | 1140 | void LLPanelAvatarPicks::callbackDelete(S32 option, void* data) |
1178 | { | 1141 | { |
1179 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; | 1142 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; |
1180 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(self,"picks tab"); | 1143 | LLTabContainer* tabs = self->getChild<LLTabContainer>("picks tab"); |
1181 | LLPanelPick* panel_pick = tabs?(LLPanelPick*)tabs->getCurrentPanel():NULL; | 1144 | LLPanelPick* panel_pick = tabs?(LLPanelPick*)tabs->getCurrentPanel():NULL; |
1182 | LLMessageSystem* msg = gMessageSystem; | 1145 | LLMessageSystem* msg = gMessageSystem; |
1183 | 1146 | ||
@@ -1257,7 +1220,7 @@ LLPanelAvatar::LLPanelAvatar( | |||
1257 | factory_map["1st Life"] = LLCallbackMap(createPanelAvatarFirstLife, this); | 1220 | factory_map["1st Life"] = LLCallbackMap(createPanelAvatarFirstLife, this); |
1258 | factory_map["My Notes"] = LLCallbackMap(createPanelAvatarNotes, this); | 1221 | factory_map["My Notes"] = LLCallbackMap(createPanelAvatarNotes, this); |
1259 | 1222 | ||
1260 | gUICtrlFactory->buildPanel(this, "panel_avatar.xml", &factory_map); | 1223 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar.xml", &factory_map); |
1261 | 1224 | ||
1262 | selectTab(0); | 1225 | selectTab(0); |
1263 | 1226 | ||
@@ -1266,7 +1229,7 @@ LLPanelAvatar::LLPanelAvatar( | |||
1266 | 1229 | ||
1267 | BOOL LLPanelAvatar::postBuild(void) | 1230 | BOOL LLPanelAvatar::postBuild(void) |
1268 | { | 1231 | { |
1269 | mTab = LLUICtrlFactory::getTabContainerByName(this,"tab"); | 1232 | mTab = getChild<LLTabContainer>("tab"); |
1270 | childSetAction("Kick",onClickKick,this); | 1233 | childSetAction("Kick",onClickKick,this); |
1271 | childSetAction("Freeze",onClickFreeze, this); | 1234 | childSetAction("Freeze",onClickFreeze, this); |
1272 | childSetAction("Unfreeze", onClickUnfreeze, this); | 1235 | childSetAction("Unfreeze", onClickUnfreeze, this); |
@@ -1406,7 +1369,7 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const LLString &name, | |||
1406 | mDropTarget->setAgentID(mAvatarID); | 1369 | mDropTarget->setAgentID(mAvatarID); |
1407 | } | 1370 | } |
1408 | 1371 | ||
1409 | LLNameEditor* name_edit = LLViewerUICtrlFactory::getNameEditorByName(this, "name"); | 1372 | LLNameEditor* name_edit = getChild<LLNameEditor>("name"); |
1410 | if(name_edit) | 1373 | if(name_edit) |
1411 | { | 1374 | { |
1412 | if (name.empty()) | 1375 | if (name.empty()) |
@@ -1535,7 +1498,7 @@ void LLPanelAvatar::resetGroupList() | |||
1535 | 1498 | ||
1536 | if (mPanelSecondLife) | 1499 | if (mPanelSecondLife) |
1537 | { | 1500 | { |
1538 | LLScrollListCtrl* group_list = LLUICtrlFactory::getScrollListByName(mPanelSecondLife,"groups"); | 1501 | LLScrollListCtrl* group_list = mPanelSecondLife->getChild<LLScrollListCtrl>("groups"); |
1539 | if (group_list) | 1502 | if (group_list) |
1540 | { | 1503 | { |
1541 | group_list->deleteAllItems(); | 1504 | group_list->deleteAllItems(); |
@@ -1584,7 +1547,7 @@ void LLPanelAvatar::onClickIM(void* userdata) | |||
1584 | gIMMgr->setFloaterOpen(TRUE); | 1547 | gIMMgr->setFloaterOpen(TRUE); |
1585 | 1548 | ||
1586 | std::string name; | 1549 | std::string name; |
1587 | LLNameEditor* nameedit = LLViewerUICtrlFactory::getNameEditorByName(self->mPanelSecondLife, "name"); | 1550 | LLNameEditor* nameedit = self->mPanelSecondLife->getChild<LLNameEditor>("name"); |
1588 | if (nameedit) name = nameedit->getText(); | 1551 | if (nameedit) name = nameedit->getText(); |
1589 | gIMMgr->addSession(name, IM_NOTHING_SPECIAL, self->mAvatarID); | 1552 | gIMMgr->addSession(name, IM_NOTHING_SPECIAL, self->mAvatarID); |
1590 | } | 1553 | } |
@@ -1601,7 +1564,7 @@ void LLPanelAvatar::onClickTrack(void* userdata) | |||
1601 | if( gFloaterWorldMap ) | 1564 | if( gFloaterWorldMap ) |
1602 | { | 1565 | { |
1603 | std::string name; | 1566 | std::string name; |
1604 | LLNameEditor* nameedit = LLViewerUICtrlFactory::getNameEditorByName(self->mPanelSecondLife, "name"); | 1567 | LLNameEditor* nameedit = self->mPanelSecondLife->getChild<LLNameEditor>("name"); |
1605 | if (nameedit) name = nameedit->getText(); | 1568 | if (nameedit) name = nameedit->getText(); |
1606 | gFloaterWorldMap->trackAvatar(self->mAvatarID, name); | 1569 | gFloaterWorldMap->trackAvatar(self->mAvatarID, name); |
1607 | LLFloaterWorldMap::show(NULL, TRUE); | 1570 | LLFloaterWorldMap::show(NULL, TRUE); |
@@ -1613,7 +1576,7 @@ void LLPanelAvatar::onClickTrack(void* userdata) | |||
1613 | void LLPanelAvatar::onClickAddFriend(void* userdata) | 1576 | void LLPanelAvatar::onClickAddFriend(void* userdata) |
1614 | { | 1577 | { |
1615 | LLPanelAvatar* self = (LLPanelAvatar*) userdata; | 1578 | LLPanelAvatar* self = (LLPanelAvatar*) userdata; |
1616 | LLNameEditor* name_edit = LLViewerUICtrlFactory::getNameEditorByName(self->mPanelSecondLife, "name"); | 1579 | LLNameEditor* name_edit = self->mPanelSecondLife->getChild<LLNameEditor>("name"); |
1617 | if (name_edit) | 1580 | if (name_edit) |
1618 | { | 1581 | { |
1619 | LLPanelFriends::requestFriendshipDialog(self->getAvatarID(), | 1582 | LLPanelFriends::requestFriendshipDialog(self->getAvatarID(), |
@@ -1629,21 +1592,21 @@ void LLPanelAvatar::onClickMute(void *userdata) | |||
1629 | LLPanelAvatar* self = (LLPanelAvatar*) userdata; | 1592 | LLPanelAvatar* self = (LLPanelAvatar*) userdata; |
1630 | 1593 | ||
1631 | LLUUID agent_id = self->getAvatarID(); | 1594 | LLUUID agent_id = self->getAvatarID(); |
1632 | LLNameEditor* name_edit = LLViewerUICtrlFactory::getNameEditorByName(self->mPanelSecondLife, "name"); | 1595 | LLNameEditor* name_edit = self->mPanelSecondLife->getChild<LLNameEditor>("name"); |
1633 | 1596 | ||
1634 | if (name_edit) | 1597 | if (name_edit) |
1635 | { | 1598 | { |
1636 | std::string agent_name = name_edit->getText(); | 1599 | std::string agent_name = name_edit->getText(); |
1637 | LLFloaterMute::showInstance(); | 1600 | LLFloaterMute::showInstance(); |
1638 | 1601 | ||
1639 | if (gMuteListp->isMuted(agent_id)) | 1602 | if (LLMuteList::getInstance()->isMuted(agent_id)) |
1640 | { | 1603 | { |
1641 | gFloaterMute->selectMute(agent_id); | 1604 | LLFloaterMute::getInstance()->selectMute(agent_id); |
1642 | } | 1605 | } |
1643 | else | 1606 | else |
1644 | { | 1607 | { |
1645 | LLMute mute(agent_id, agent_name, LLMute::AGENT); | 1608 | LLMute mute(agent_id, agent_name, LLMute::AGENT); |
1646 | gMuteListp->add(mute); | 1609 | LLMuteList::getInstance()->add(mute); |
1647 | } | 1610 | } |
1648 | } | 1611 | } |
1649 | } | 1612 | } |
@@ -1679,7 +1642,7 @@ void LLPanelAvatar::onClickOK(void *userdata) | |||
1679 | { | 1642 | { |
1680 | self->sendAvatarPropertiesUpdate(); | 1643 | self->sendAvatarPropertiesUpdate(); |
1681 | 1644 | ||
1682 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(self,"tab"); | 1645 | LLTabContainer* tabs = self->getChild<LLTabContainer>("tab"); |
1683 | if ( tabs->getCurrentPanel() != self->mPanelClassified ) | 1646 | if ( tabs->getCurrentPanel() != self->mPanelClassified ) |
1684 | { | 1647 | { |
1685 | self->mPanelClassified->apply(); | 1648 | self->mPanelClassified->apply(); |
@@ -1984,7 +1947,7 @@ void LLPanelAvatar::processAvatarGroupsReply(LLMessageSystem *msg, void**) | |||
1984 | continue; | 1947 | continue; |
1985 | } | 1948 | } |
1986 | 1949 | ||
1987 | LLScrollListCtrl* group_list = LLUICtrlFactory::getScrollListByName(self->mPanelSecondLife,"groups"); | 1950 | LLScrollListCtrl* group_list = self->mPanelSecondLife->getChild<LLScrollListCtrl>("groups"); |
1988 | // if(group_list) | 1951 | // if(group_list) |
1989 | // { | 1952 | // { |
1990 | // group_list->deleteAllItems(); | 1953 | // group_list->deleteAllItems(); |
@@ -2316,7 +2279,7 @@ void LLPanelAvatar::onClickCSR(void* userdata) | |||
2316 | LLPanelAvatar* self = (LLPanelAvatar*)userdata; | 2279 | LLPanelAvatar* self = (LLPanelAvatar*)userdata; |
2317 | if (!self) return; | 2280 | if (!self) return; |
2318 | 2281 | ||
2319 | LLNameEditor* name_edit = LLViewerUICtrlFactory::getNameEditorByName(self, "name"); | 2282 | LLNameEditor* name_edit = self->getChild<LLNameEditor>("name"); |
2320 | if (!name_edit) return; | 2283 | if (!name_edit) return; |
2321 | 2284 | ||
2322 | LLString name = name_edit->getText(); | 2285 | LLString name = name_edit->getText(); |