diff options
author | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
commit | cd17687f01420952712a500107e0f93e7ab8d5f8 (patch) | |
tree | ce48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llpanelavatar.cpp | |
parent | Second Life viewer sources 1.19.0.5 (diff) | |
download | meta-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 'linden/indra/newview/llpanelavatar.cpp')
-rw-r--r-- | linden/indra/newview/llpanelavatar.cpp | 105 |
1 files changed, 42 insertions, 63 deletions
diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index 664c9a6..5d32f4b 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp | |||
@@ -159,7 +159,7 @@ BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, | |||
159 | { | 159 | { |
160 | // check if inside | 160 | // check if inside |
161 | //LLRect parent_rect = mParentView->getRect(); | 161 | //LLRect parent_rect = mParentView->getRect(); |
162 | //mRect.set(0, parent_rect.getHeight(), parent_rect.getWidth(), 0); | 162 | //getRect().set(0, parent_rect.getHeight(), parent_rect.getWidth(), 0); |
163 | handled = TRUE; | 163 | handled = TRUE; |
164 | 164 | ||
165 | // check the type | 165 | // check the type |
@@ -282,13 +282,12 @@ void LLPanelAvatarSecondLife::updatePartnerName() | |||
282 | { | 282 | { |
283 | if (mPartnerID.notNull()) | 283 | if (mPartnerID.notNull()) |
284 | { | 284 | { |
285 | char first[128]; /*Flawfinder: ignore*/ | 285 | std::string first, last; |
286 | char last[128]; /*Flawfinder: ignore*/ | ||
287 | BOOL found = gCacheName->getName(mPartnerID, first, last); | 286 | BOOL found = gCacheName->getName(mPartnerID, first, last); |
288 | if (found) | 287 | if (found) |
289 | { | 288 | { |
290 | childSetTextArg("partner_edit", "[FIRST]", LLString(first)); | 289 | childSetTextArg("partner_edit", "[FIRST]", first); |
291 | childSetTextArg("partner_edit", "[LAST]", LLString(last)); | 290 | childSetTextArg("partner_edit", "[LAST]", last); |
292 | } | 291 | } |
293 | childSetEnabled("partner_info", TRUE); | 292 | childSetEnabled("partner_info", TRUE); |
294 | } | 293 | } |
@@ -301,7 +300,7 @@ void LLPanelAvatarSecondLife::updatePartnerName() | |||
301 | //----------------------------------------------------------------------------- | 300 | //----------------------------------------------------------------------------- |
302 | void LLPanelAvatarSecondLife::clearControls() | 301 | void LLPanelAvatarSecondLife::clearControls() |
303 | { | 302 | { |
304 | LLTextureCtrl* image_ctrl = LLUICtrlFactory::getTexturePickerByName(this,"img"); | 303 | LLTextureCtrl* image_ctrl = getChild<LLTextureCtrl>("img"); |
305 | if(image_ctrl) | 304 | if(image_ctrl) |
306 | { | 305 | { |
307 | image_ctrl->setImageAssetID(LLUUID::null); | 306 | image_ctrl->setImageAssetID(LLUUID::null); |
@@ -495,15 +494,13 @@ BOOL LLPanelAvatarWeb::postBuild(void) | |||
495 | 494 | ||
496 | childSetControlName("auto_load","AutoLoadWebProfiles"); | 495 | childSetControlName("auto_load","AutoLoadWebProfiles"); |
497 | 496 | ||
498 | #if LL_LIBXUL_ENABLED | 497 | mWebBrowser = getChild<LLWebBrowserCtrl>("profile_html"); |
499 | mWebBrowser = (LLWebBrowserCtrl*)getChildByName("profile_html"); | ||
500 | 498 | ||
501 | // links open in internally | 499 | // links open in internally |
502 | mWebBrowser->setOpenInExternalBrowser( false ); | 500 | mWebBrowser->setOpenInExternalBrowser( false ); |
503 | 501 | ||
504 | // observe browser events | 502 | // observe browser events |
505 | mWebBrowser->addObserver( this ); | 503 | mWebBrowser->addObserver( this ); |
506 | #endif // LL_LIBXUL_ENABLED | ||
507 | 504 | ||
508 | return TRUE; | 505 | return TRUE; |
509 | } | 506 | } |
@@ -563,13 +560,11 @@ LLPanelAvatarWeb::LLPanelAvatarWeb(const std::string& name, const LLRect& rect, | |||
563 | 560 | ||
564 | LLPanelAvatarWeb::~LLPanelAvatarWeb() | 561 | LLPanelAvatarWeb::~LLPanelAvatarWeb() |
565 | { | 562 | { |
566 | #if LL_LIBXUL_ENABLED | ||
567 | // stop observing browser events | 563 | // stop observing browser events |
568 | if ( mWebBrowser ) | 564 | if ( mWebBrowser ) |
569 | { | 565 | { |
570 | mWebBrowser->remObserver( this ); | 566 | mWebBrowser->remObserver( this ); |
571 | }; | 567 | }; |
572 | #endif | ||
573 | } | 568 | } |
574 | 569 | ||
575 | void LLPanelAvatarWeb::enableControls(BOOL self) | 570 | void LLPanelAvatarWeb::enableControls(BOOL self) |
@@ -610,12 +605,6 @@ void LLPanelAvatarWeb::setWebURL(std::string url) | |||
610 | BOOL own_avatar = (getPanelAvatar()->getAvatarID() == gAgent.getID() ); | 605 | BOOL own_avatar = (getPanelAvatar()->getAvatarID() == gAgent.getID() ); |
611 | childSetVisible("status_text",!own_avatar && !mURL.empty()); | 606 | childSetVisible("status_text",!own_avatar && !mURL.empty()); |
612 | 607 | ||
613 | #if !LL_LIBXUL_ENABLED | ||
614 | childSetVisible("load",false); | ||
615 | childSetVisible("profile_html",false); | ||
616 | childSetVisible("status_text",false); | ||
617 | #endif | ||
618 | |||
619 | } | 608 | } |
620 | 609 | ||
621 | // static | 610 | // static |
@@ -631,18 +620,13 @@ void LLPanelAvatarWeb::onCommitURL(LLUICtrl* ctrl, void* data) | |||
631 | // static | 620 | // static |
632 | void LLPanelAvatarWeb::onClickWebProfileHelp(void *) | 621 | void LLPanelAvatarWeb::onClickWebProfileHelp(void *) |
633 | { | 622 | { |
634 | #if LL_LIBXUL_ENABLED | ||
635 | gViewerWindow->alertXml("ClickWebProfileHelpAvatar"); | 623 | gViewerWindow->alertXml("ClickWebProfileHelpAvatar"); |
636 | #else | ||
637 | gViewerWindow->alertXml("ClickWebProfileNoWebHelpAvatar"); | ||
638 | #endif | ||
639 | } | 624 | } |
640 | 625 | ||
641 | void LLPanelAvatarWeb::load(std::string url) | 626 | void LLPanelAvatarWeb::load(std::string url) |
642 | { | 627 | { |
643 | bool have_url = (!url.empty()); | 628 | bool have_url = (!url.empty()); |
644 | 629 | ||
645 | #if LL_LIBXUL_ENABLED | ||
646 | if (have_url) | 630 | if (have_url) |
647 | { | 631 | { |
648 | llinfos << "Loading " << url << llendl; | 632 | llinfos << "Loading " << url << llendl; |
@@ -662,9 +646,6 @@ void LLPanelAvatarWeb::load(std::string url) | |||
662 | childSetEnabled("home",use_home); | 646 | childSetEnabled("home",use_home); |
663 | childSetEnabled("open",have_url); | 647 | childSetEnabled("open",have_url); |
664 | 648 | ||
665 | #else | ||
666 | childSetEnabled("open",have_url); | ||
667 | #endif | ||
668 | } | 649 | } |
669 | 650 | ||
670 | void LLPanelAvatarWeb::load() | 651 | void LLPanelAvatarWeb::load() |
@@ -696,7 +677,6 @@ void LLPanelAvatarWeb::onClickOpen(void* data) | |||
696 | } | 677 | } |
697 | } | 678 | } |
698 | 679 | ||
699 | #if LL_LIBXUL_ENABLED | ||
700 | void LLPanelAvatarWeb::onStatusTextChange( const EventType& eventIn ) | 680 | void LLPanelAvatarWeb::onStatusTextChange( const EventType& eventIn ) |
701 | { | 681 | { |
702 | childSetText("status_text", eventIn.getStringValue() ); | 682 | childSetText("status_text", eventIn.getStringValue() ); |
@@ -706,7 +686,6 @@ void LLPanelAvatarWeb::onLocationChange( const EventType& eventIn ) | |||
706 | { | 686 | { |
707 | childSetText("url_edit", eventIn.getStringValue() ); | 687 | childSetText("url_edit", eventIn.getStringValue() ); |
708 | } | 688 | } |
709 | #endif | ||
710 | 689 | ||
711 | 690 | ||
712 | //----------------------------------------------------------------------------- | 691 | //----------------------------------------------------------------------------- |
@@ -746,7 +725,7 @@ void LLPanelAvatarAdvanced::enableControls(BOOL self) | |||
746 | // setEnable is called, for some reason | 725 | // setEnable is called, for some reason |
747 | if (mWantToEdit) mWantToEdit->setReadOnlyBgColor(LLColor4::transparent); | 726 | if (mWantToEdit) mWantToEdit->setReadOnlyBgColor(LLColor4::transparent); |
748 | if (mSkillsEdit) mSkillsEdit->setReadOnlyBgColor(LLColor4::transparent); | 727 | if (mSkillsEdit) mSkillsEdit->setReadOnlyBgColor(LLColor4::transparent); |
749 | LLLineEditor* languages_edit = (LLLineEditor*)getChildByName("languages_edit"); | 728 | LLLineEditor* languages_edit = getChild<LLLineEditor>("languages_edit"); |
750 | languages_edit->setReadOnlyBgColor(LLColor4::transparent); | 729 | languages_edit->setReadOnlyBgColor(LLColor4::transparent); |
751 | } | 730 | } |
752 | } | 731 | } |
@@ -822,7 +801,7 @@ void LLPanelAvatarNotes::refresh() | |||
822 | 801 | ||
823 | void LLPanelAvatarNotes::clearControls() | 802 | void LLPanelAvatarNotes::clearControls() |
824 | { | 803 | { |
825 | childSetText("notes edit", childGetText("Loading")); | 804 | childSetText("notes edit", getString("Loading")); |
826 | childSetEnabled("notes edit", false); | 805 | childSetEnabled("notes edit", false); |
827 | } | 806 | } |
828 | 807 | ||
@@ -849,7 +828,7 @@ void LLPanelAvatarClassified::refresh() | |||
849 | { | 828 | { |
850 | BOOL self = (gAgent.getID() == getPanelAvatar()->getAvatarID()); | 829 | BOOL self = (gAgent.getID() == getPanelAvatar()->getAvatarID()); |
851 | 830 | ||
852 | LLTabContainerCommon* tabs = LLUICtrlFactory::getTabContainerByName(this,"classified tab"); | 831 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(this,"classified tab"); |
853 | 832 | ||
854 | S32 tab_count = tabs ? tabs->getTabCount() : 0; | 833 | S32 tab_count = tabs ? tabs->getTabCount() : 0; |
855 | 834 | ||
@@ -883,7 +862,7 @@ void LLPanelAvatarClassified::refresh() | |||
883 | 862 | ||
884 | BOOL LLPanelAvatarClassified::canClose() | 863 | BOOL LLPanelAvatarClassified::canClose() |
885 | { | 864 | { |
886 | LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); | 865 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); |
887 | for (S32 i = 0; i < tabs->getTabCount(); i++) | 866 | for (S32 i = 0; i < tabs->getTabCount(); i++) |
888 | { | 867 | { |
889 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); | 868 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); |
@@ -897,7 +876,7 @@ BOOL LLPanelAvatarClassified::canClose() | |||
897 | 876 | ||
898 | BOOL LLPanelAvatarClassified::titleIsValid() | 877 | BOOL LLPanelAvatarClassified::titleIsValid() |
899 | { | 878 | { |
900 | LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); | 879 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); |
901 | if ( tabs ) | 880 | if ( tabs ) |
902 | { | 881 | { |
903 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getCurrentPanel(); | 882 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getCurrentPanel(); |
@@ -915,7 +894,7 @@ BOOL LLPanelAvatarClassified::titleIsValid() | |||
915 | 894 | ||
916 | void LLPanelAvatarClassified::apply() | 895 | void LLPanelAvatarClassified::apply() |
917 | { | 896 | { |
918 | LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); | 897 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); |
919 | for (S32 i = 0; i < tabs->getTabCount(); i++) | 898 | for (S32 i = 0; i < tabs->getTabCount(); i++) |
920 | { | 899 | { |
921 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); | 900 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); |
@@ -926,7 +905,7 @@ void LLPanelAvatarClassified::apply() | |||
926 | 905 | ||
927 | void LLPanelAvatarClassified::deleteClassifiedPanels() | 906 | void LLPanelAvatarClassified::deleteClassifiedPanels() |
928 | { | 907 | { |
929 | LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this,"classified tab"); | 908 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(this,"classified tab"); |
930 | if (tabs) | 909 | if (tabs) |
931 | { | 910 | { |
932 | tabs->deleteAllTabs(); | 911 | tabs->deleteAllTabs(); |
@@ -946,7 +925,7 @@ void LLPanelAvatarClassified::processAvatarClassifiedReply(LLMessageSystem* msg, | |||
946 | char classified_name[DB_PICK_NAME_SIZE]; /*Flawfinder: ignore*/ | 925 | char classified_name[DB_PICK_NAME_SIZE]; /*Flawfinder: ignore*/ |
947 | LLPanelClassified* panel_classified = NULL; | 926 | LLPanelClassified* panel_classified = NULL; |
948 | 927 | ||
949 | LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this,"classified tab"); | 928 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(this,"classified tab"); |
950 | 929 | ||
951 | // Don't remove old panels. We need to be able to process multiple | 930 | // Don't remove old panels. We need to be able to process multiple |
952 | // packets for people who have lots of classifieds. JC | 931 | // packets for people who have lots of classifieds. JC |
@@ -957,7 +936,7 @@ void LLPanelAvatarClassified::processAvatarClassifiedReply(LLMessageSystem* msg, | |||
957 | msg->getUUIDFast(_PREHASH_Data, _PREHASH_ClassifiedID, classified_id, block); | 936 | msg->getUUIDFast(_PREHASH_Data, _PREHASH_ClassifiedID, classified_id, block); |
958 | msg->getStringFast(_PREHASH_Data, _PREHASH_Name, DB_PICK_NAME_SIZE, classified_name, block); | 937 | msg->getStringFast(_PREHASH_Data, _PREHASH_Name, DB_PICK_NAME_SIZE, classified_name, block); |
959 | 938 | ||
960 | panel_classified = new LLPanelClassified(FALSE); | 939 | panel_classified = new LLPanelClassified(false, false); |
961 | 940 | ||
962 | panel_classified->setClassifiedID(classified_id); | 941 | panel_classified->setClassifiedID(classified_id); |
963 | 942 | ||
@@ -1002,9 +981,9 @@ void LLPanelAvatarClassified::callbackNew(S32 option, void* data) | |||
1002 | 981 | ||
1003 | if (0 == option) | 982 | if (0 == option) |
1004 | { | 983 | { |
1005 | LLPanelClassified* panel_classified = new LLPanelClassified(FALSE); | 984 | LLPanelClassified* panel_classified = new LLPanelClassified(false, false); |
1006 | panel_classified->initNewClassified(); | 985 | panel_classified->initNewClassified(); |
1007 | LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(self,"classified tab"); | 986 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(self,"classified tab"); |
1008 | if(tabs) | 987 | if(tabs) |
1009 | { | 988 | { |
1010 | tabs->addTabPanel(panel_classified, panel_classified->getClassifiedName()); | 989 | tabs->addTabPanel(panel_classified, panel_classified->getClassifiedName()); |
@@ -1019,7 +998,7 @@ void LLPanelAvatarClassified::onClickDelete(void* data) | |||
1019 | { | 998 | { |
1020 | LLPanelAvatarClassified* self = (LLPanelAvatarClassified*)data; | 999 | LLPanelAvatarClassified* self = (LLPanelAvatarClassified*)data; |
1021 | 1000 | ||
1022 | LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(self,"classified tab"); | 1001 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(self,"classified tab"); |
1023 | LLPanelClassified* panel_classified = NULL; | 1002 | LLPanelClassified* panel_classified = NULL; |
1024 | if(tabs) | 1003 | if(tabs) |
1025 | { | 1004 | { |
@@ -1038,7 +1017,7 @@ void LLPanelAvatarClassified::onClickDelete(void* data) | |||
1038 | void LLPanelAvatarClassified::callbackDelete(S32 option, void* data) | 1017 | void LLPanelAvatarClassified::callbackDelete(S32 option, void* data) |
1039 | { | 1018 | { |
1040 | LLPanelAvatarClassified* self = (LLPanelAvatarClassified*)data; | 1019 | LLPanelAvatarClassified* self = (LLPanelAvatarClassified*)data; |
1041 | LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(self,"classified tab"); | 1020 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(self,"classified tab"); |
1042 | LLPanelClassified* panel_classified=NULL; | 1021 | LLPanelClassified* panel_classified=NULL; |
1043 | if(tabs) | 1022 | if(tabs) |
1044 | { | 1023 | { |
@@ -1083,14 +1062,12 @@ LLPanelAvatarPicks::LLPanelAvatarPicks(const std::string& name, | |||
1083 | void LLPanelAvatarPicks::refresh() | 1062 | void LLPanelAvatarPicks::refresh() |
1084 | { | 1063 | { |
1085 | BOOL self = (gAgent.getID() == getPanelAvatar()->getAvatarID()); | 1064 | BOOL self = (gAgent.getID() == getPanelAvatar()->getAvatarID()); |
1086 | 1065 | LLTabContainer* tabs = LLViewerUICtrlFactory::getTabContainerByName(this,"picks tab"); | |
1087 | LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this,"picks tab"); | ||
1088 | S32 tab_count = tabs ? tabs->getTabCount() : 0; | 1066 | S32 tab_count = tabs ? tabs->getTabCount() : 0; |
1089 | BOOL allow_new = (tab_count < MAX_AVATAR_PICKS); | 1067 | childSetEnabled("New...", self && tab_count < MAX_AVATAR_PICKS); |
1090 | BOOL allow_delete = (tab_count > 0); | 1068 | childSetEnabled("Delete...", self && tab_count > 0); |
1091 | 1069 | childSetVisible("New...", self && getPanelAvatar()->isEditable()); | |
1092 | childSetEnabled("New...",self && allow_new); | 1070 | childSetVisible("Delete...", self && getPanelAvatar()->isEditable()); |
1093 | childSetEnabled("Delete...",self && allow_delete); | ||
1094 | 1071 | ||
1095 | sendAvatarProfileRequestIfNeeded("avatarpicksrequest"); | 1072 | sendAvatarProfileRequestIfNeeded("avatarpicksrequest"); |
1096 | } | 1073 | } |
@@ -1098,7 +1075,7 @@ void LLPanelAvatarPicks::refresh() | |||
1098 | 1075 | ||
1099 | void LLPanelAvatarPicks::deletePickPanels() | 1076 | void LLPanelAvatarPicks::deletePickPanels() |
1100 | { | 1077 | { |
1101 | LLTabContainerCommon* tabs = LLUICtrlFactory::getTabContainerByName(this,"picks tab"); | 1078 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(this,"picks tab"); |
1102 | if(tabs) | 1079 | if(tabs) |
1103 | { | 1080 | { |
1104 | tabs->deleteAllTabs(); | 1081 | tabs->deleteAllTabs(); |
@@ -1117,7 +1094,7 @@ void LLPanelAvatarPicks::processAvatarPicksReply(LLMessageSystem* msg, void**) | |||
1117 | char pick_name[DB_PICK_NAME_SIZE]; /*Flawfinder: ignore*/ | 1094 | char pick_name[DB_PICK_NAME_SIZE]; /*Flawfinder: ignore*/ |
1118 | LLPanelPick* panel_pick = NULL; | 1095 | LLPanelPick* panel_pick = NULL; |
1119 | 1096 | ||
1120 | LLTabContainerCommon* tabs = LLUICtrlFactory::getTabContainerByName(this,"picks tab"); | 1097 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(this,"picks tab"); |
1121 | 1098 | ||
1122 | // Clear out all the old panels. We'll replace them with the correct | 1099 | // Clear out all the old panels. We'll replace them with the correct |
1123 | // number of new panels. | 1100 | // number of new panels. |
@@ -1167,7 +1144,7 @@ void LLPanelAvatarPicks::onClickNew(void* data) | |||
1167 | { | 1144 | { |
1168 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; | 1145 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; |
1169 | LLPanelPick* panel_pick = new LLPanelPick(FALSE); | 1146 | LLPanelPick* panel_pick = new LLPanelPick(FALSE); |
1170 | LLTabContainerCommon* tabs = LLUICtrlFactory::getTabContainerByName(self,"picks tab"); | 1147 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(self,"picks tab"); |
1171 | 1148 | ||
1172 | panel_pick->initNewPick(); | 1149 | panel_pick->initNewPick(); |
1173 | if(tabs) | 1150 | if(tabs) |
@@ -1182,7 +1159,7 @@ void LLPanelAvatarPicks::onClickNew(void* data) | |||
1182 | void LLPanelAvatarPicks::onClickDelete(void* data) | 1159 | void LLPanelAvatarPicks::onClickDelete(void* data) |
1183 | { | 1160 | { |
1184 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; | 1161 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; |
1185 | LLTabContainerCommon* tabs = LLUICtrlFactory::getTabContainerByName(self,"picks tab"); | 1162 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(self,"picks tab"); |
1186 | LLPanelPick* panel_pick = tabs?(LLPanelPick*)tabs->getCurrentPanel():NULL; | 1163 | LLPanelPick* panel_pick = tabs?(LLPanelPick*)tabs->getCurrentPanel():NULL; |
1187 | 1164 | ||
1188 | if (!panel_pick) return; | 1165 | if (!panel_pick) return; |
@@ -1200,7 +1177,7 @@ void LLPanelAvatarPicks::onClickDelete(void* data) | |||
1200 | void LLPanelAvatarPicks::callbackDelete(S32 option, void* data) | 1177 | void LLPanelAvatarPicks::callbackDelete(S32 option, void* data) |
1201 | { | 1178 | { |
1202 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; | 1179 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; |
1203 | LLTabContainerCommon* tabs = LLUICtrlFactory::getTabContainerByName(self,"picks tab"); | 1180 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(self,"picks tab"); |
1204 | LLPanelPick* panel_pick = tabs?(LLPanelPick*)tabs->getCurrentPanel():NULL; | 1181 | LLPanelPick* panel_pick = tabs?(LLPanelPick*)tabs->getCurrentPanel():NULL; |
1205 | LLMessageSystem* msg = gMessageSystem; | 1182 | LLMessageSystem* msg = gMessageSystem; |
1206 | 1183 | ||
@@ -1417,7 +1394,7 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const LLString &name, | |||
1417 | // Teens don't have this. | 1394 | // Teens don't have this. |
1418 | if (mPanelFirstLife) mPanelFirstLife->enableControls(own_avatar && mAllowEdit); | 1395 | if (mPanelFirstLife) mPanelFirstLife->enableControls(own_avatar && mAllowEdit); |
1419 | 1396 | ||
1420 | LLView *target_view = getChildByName("drop_target_rect", TRUE); | 1397 | LLView *target_view = getChild<LLView>("drop_target_rect"); |
1421 | if(target_view) | 1398 | if(target_view) |
1422 | { | 1399 | { |
1423 | if (mDropTarget) | 1400 | if (mDropTarget) |
@@ -1477,6 +1454,8 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const LLString &name, | |||
1477 | { | 1454 | { |
1478 | childSetVisible("OK",FALSE); | 1455 | childSetVisible("OK",FALSE); |
1479 | childSetEnabled("OK",FALSE); | 1456 | childSetEnabled("OK",FALSE); |
1457 | childSetVisible("Cancel",FALSE); | ||
1458 | childSetEnabled("Cancel",FALSE); | ||
1480 | } | 1459 | } |
1481 | childSetVisible("Instant Message...",FALSE); | 1460 | childSetVisible("Instant Message...",FALSE); |
1482 | childSetEnabled("Instant Message...",FALSE); | 1461 | childSetEnabled("Instant Message...",FALSE); |
@@ -1700,7 +1679,7 @@ void LLPanelAvatar::onClickOK(void *userdata) | |||
1700 | { | 1679 | { |
1701 | self->sendAvatarPropertiesUpdate(); | 1680 | self->sendAvatarPropertiesUpdate(); |
1702 | 1681 | ||
1703 | LLTabContainerCommon* tabs = LLUICtrlFactory::getTabContainerByName(self,"tab"); | 1682 | LLTabContainer* tabs = LLUICtrlFactory::getTabContainerByName(self,"tab"); |
1704 | if ( tabs->getCurrentPanel() != self->mPanelClassified ) | 1683 | if ( tabs->getCurrentPanel() != self->mPanelClassified ) |
1705 | { | 1684 | { |
1706 | self->mPanelClassified->apply(); | 1685 | self->mPanelClassified->apply(); |
@@ -1767,7 +1746,7 @@ void LLPanelAvatar::sendAvatarNotesUpdate() | |||
1767 | std::string notes = mPanelNotes->childGetValue("notes edit").asString(); | 1746 | std::string notes = mPanelNotes->childGetValue("notes edit").asString(); |
1768 | 1747 | ||
1769 | if (!mHaveNotes | 1748 | if (!mHaveNotes |
1770 | && (notes.empty() || notes == childGetText("Loading"))) | 1749 | && (notes.empty() || notes == getString("Loading"))) |
1771 | { | 1750 | { |
1772 | // no notes from server and no user updates | 1751 | // no notes from server and no user updates |
1773 | return; | 1752 | return; |
@@ -1868,7 +1847,7 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**) | |||
1868 | if(caption_text.empty()) | 1847 | if(caption_text.empty()) |
1869 | { | 1848 | { |
1870 | LLString::format_map_t args; | 1849 | LLString::format_map_t args; |
1871 | caption_text = self->mPanelSecondLife->childGetValue("CaptionTextAcctInfo").asString(); | 1850 | caption_text = self->mPanelSecondLife->getString("CaptionTextAcctInfo"); |
1872 | 1851 | ||
1873 | const char* ACCT_TYPE[] = { | 1852 | const char* ACCT_TYPE[] = { |
1874 | "AcctTypeResident", | 1853 | "AcctTypeResident", |
@@ -1877,7 +1856,7 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**) | |||
1877 | "AcctTypeEmployee" | 1856 | "AcctTypeEmployee" |
1878 | }; | 1857 | }; |
1879 | caption_index = llclamp(caption_index, (U8)0, (U8)(sizeof(ACCT_TYPE)/sizeof(ACCT_TYPE[0])-1)); | 1858 | caption_index = llclamp(caption_index, (U8)0, (U8)(sizeof(ACCT_TYPE)/sizeof(ACCT_TYPE[0])-1)); |
1880 | args["[ACCTTYPE]"] = self->mPanelSecondLife->childGetValue(ACCT_TYPE[caption_index]).asString(); | 1859 | args["[ACCTTYPE]"] = self->mPanelSecondLife->getString(ACCT_TYPE[caption_index]); |
1881 | 1860 | ||
1882 | LLString payment_text = " "; | 1861 | LLString payment_text = " "; |
1883 | const S32 DEFAULT_CAPTION_LINDEN_INDEX = 3; | 1862 | const S32 DEFAULT_CAPTION_LINDEN_INDEX = 3; |
@@ -1895,10 +1874,10 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**) | |||
1895 | { | 1874 | { |
1896 | payment_text = "NoPaymentInfoOnFile"; | 1875 | payment_text = "NoPaymentInfoOnFile"; |
1897 | } | 1876 | } |
1898 | args["[PAYMENTINFO]"] = self->mPanelSecondLife->childGetValue(payment_text).asString(); | 1877 | args["[PAYMENTINFO]"] = self->mPanelSecondLife->getString(payment_text); |
1899 | LLString age_text = age_verified ? "AgeVerified" : "NotAgeVerified"; | 1878 | LLString age_text = age_verified ? "AgeVerified" : "NotAgeVerified"; |
1900 | // Do not display age verification status at this time | 1879 | // Do not display age verification status at this time |
1901 | //args["[AGEVERIFICATION]"] = self->mPanelSecondLife->childGetValue(age_text).asString(); | 1880 | //args["[AGEVERIFICATION]"] = self->mPanelSecondLife->getString(age_text); |
1902 | args["[AGEVERIFICATION]"] = " "; | 1881 | args["[AGEVERIFICATION]"] = " "; |
1903 | } | 1882 | } |
1904 | else | 1883 | else |
@@ -1918,7 +1897,7 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**) | |||
1918 | 1897 | ||
1919 | self->mPanelWeb->setWebURL(std::string(profile_url)); | 1898 | self->mPanelWeb->setWebURL(std::string(profile_url)); |
1920 | 1899 | ||
1921 | LLTextureCtrl* image_ctrl = LLUICtrlFactory::getTexturePickerByName(self->mPanelSecondLife,"img"); | 1900 | LLTextureCtrl* image_ctrl = self->mPanelSecondLife->getChild<LLTextureCtrl>("img"); |
1922 | if(image_ctrl) | 1901 | if(image_ctrl) |
1923 | { | 1902 | { |
1924 | image_ctrl->setImageAssetID(image_id); | 1903 | image_ctrl->setImageAssetID(image_id); |
@@ -1932,7 +1911,7 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**) | |||
1932 | { | 1911 | { |
1933 | // Teens don't get these | 1912 | // Teens don't get these |
1934 | self->mPanelFirstLife->childSetValue("about", fl_about_text); | 1913 | self->mPanelFirstLife->childSetValue("about", fl_about_text); |
1935 | LLTextureCtrl* image_ctrl = LLUICtrlFactory::getTexturePickerByName(self->mPanelFirstLife,"img"); | 1914 | LLTextureCtrl* image_ctrl = self->mPanelFirstLife->getChild<LLTextureCtrl>("img"); |
1936 | if(image_ctrl) | 1915 | if(image_ctrl) |
1937 | { | 1916 | { |
1938 | image_ctrl->setImageAssetID(fl_image_id); | 1917 | image_ctrl->setImageAssetID(fl_image_id); |
@@ -2098,7 +2077,7 @@ void LLPanelAvatar::sendAvatarPropertiesUpdate() | |||
2098 | if (mPanelFirstLife) | 2077 | if (mPanelFirstLife) |
2099 | { | 2078 | { |
2100 | first_life_about_text = mPanelFirstLife->childGetValue("about").asString(); | 2079 | first_life_about_text = mPanelFirstLife->childGetValue("about").asString(); |
2101 | LLTextureCtrl* image_ctrl = LLUICtrlFactory::getTexturePickerByName(mPanelFirstLife,"img"); | 2080 | LLTextureCtrl* image_ctrl = mPanelFirstLife->getChild<LLTextureCtrl>("img"); |
2102 | if(image_ctrl) | 2081 | if(image_ctrl) |
2103 | { | 2082 | { |
2104 | first_life_image_id = image_ctrl->getImageAssetID(); | 2083 | first_life_image_id = image_ctrl->getImageAssetID(); |
@@ -2115,7 +2094,7 @@ void LLPanelAvatar::sendAvatarPropertiesUpdate() | |||
2115 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() ); | 2094 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() ); |
2116 | msg->nextBlockFast(_PREHASH_PropertiesData); | 2095 | msg->nextBlockFast(_PREHASH_PropertiesData); |
2117 | 2096 | ||
2118 | LLTextureCtrl* image_ctrl = LLUICtrlFactory::getTexturePickerByName(mPanelSecondLife,"img"); | 2097 | LLTextureCtrl* image_ctrl = mPanelSecondLife->getChild<LLTextureCtrl>("img"); |
2119 | if(image_ctrl) | 2098 | if(image_ctrl) |
2120 | { | 2099 | { |
2121 | msg->addUUIDFast( _PREHASH_ImageID, image_ctrl->getImageAssetID()); | 2100 | msg->addUUIDFast( _PREHASH_ImageID, image_ctrl->getImageAssetID()); |