diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llpaneldirbrowser.cpp | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-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/llpaneldirbrowser.cpp')
-rw-r--r-- | linden/indra/newview/llpaneldirbrowser.cpp | 68 |
1 files changed, 14 insertions, 54 deletions
diff --git a/linden/indra/newview/llpaneldirbrowser.cpp b/linden/indra/newview/llpaneldirbrowser.cpp index 3ce533c..0d359d7 100644 --- a/linden/indra/newview/llpaneldirbrowser.cpp +++ b/linden/indra/newview/llpaneldirbrowser.cpp | |||
@@ -67,7 +67,7 @@ | |||
67 | #include "llviewercontrol.h" | 67 | #include "llviewercontrol.h" |
68 | #include "llviewerimagelist.h" | 68 | #include "llviewerimagelist.h" |
69 | #include "llviewermessage.h" | 69 | #include "llviewermessage.h" |
70 | #include "llvieweruictrlfactory.h" | 70 | #include "lluictrlfactory.h" |
71 | 71 | ||
72 | #include <string> | 72 | #include <string> |
73 | #include <sstream> | 73 | #include <sstream> |
@@ -128,7 +128,7 @@ void LLPanelDirBrowser::draw() | |||
128 | // item. Unfortunately, we don't know when the find is actually done, | 128 | // item. Unfortunately, we don't know when the find is actually done, |
129 | // so only do this if it's been some time since the last packet of | 129 | // so only do this if it's been some time since the last packet of |
130 | // results was received. | 130 | // results was received. |
131 | if (getVisible() && mLastResultTimer.getElapsedTimeF32() > 0.5) | 131 | if (mLastResultTimer.getElapsedTimeF32() > 0.5) |
132 | { | 132 | { |
133 | if (!mDidAutoSelect && | 133 | if (!mDidAutoSelect && |
134 | !childHasFocus("results")) | 134 | !childHasFocus("results")) |
@@ -182,8 +182,7 @@ void LLPanelDirBrowser::resetSearchStart() | |||
182 | // protected | 182 | // protected |
183 | void LLPanelDirBrowser::updateResultCount() | 183 | void LLPanelDirBrowser::updateResultCount() |
184 | { | 184 | { |
185 | LLScrollListCtrl* list = gUICtrlFactory->getScrollListByName(this, "results"); | 185 | LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results"); |
186 | if (!list) return; | ||
187 | 186 | ||
188 | S32 result_count = list->getItemCount(); | 187 | S32 result_count = list->getItemCount(); |
189 | LLString result_text; | 188 | LLString result_text; |
@@ -496,13 +495,11 @@ void LLPanelDirBrowser::processDirPeopleReply(LLMessageSystem *msg, void**) | |||
496 | LLSD row; | 495 | LLSD row; |
497 | row["id"] = agent_id; | 496 | row["id"] = agent_id; |
498 | 497 | ||
499 | LLUUID image_id; | ||
500 | // We don't show online status in the finder anymore, | 498 | // We don't show online status in the finder anymore, |
501 | // so just use the 'offline' icon as the generic 'person' icon | 499 | // so just use the 'offline' icon as the generic 'person' icon |
502 | image_id.set( gViewerArt.getString("icon_avatar_offline.tga") ); | ||
503 | row["columns"][0]["column"] = "icon"; | 500 | row["columns"][0]["column"] = "icon"; |
504 | row["columns"][0]["type"] = "icon"; | 501 | row["columns"][0]["type"] = "icon"; |
505 | row["columns"][0]["value"] = image_id; | 502 | row["columns"][0]["value"] = "icon_avatar_offline.tga"; |
506 | 503 | ||
507 | content["type"] = AVATAR_CODE; | 504 | content["type"] = AVATAR_CODE; |
508 | 505 | ||
@@ -655,11 +652,9 @@ void LLPanelDirBrowser::processDirPopularReply(LLMessageSystem *msg, void**) | |||
655 | LLSD row; | 652 | LLSD row; |
656 | row["id"] = parcel_id; | 653 | row["id"] = parcel_id; |
657 | 654 | ||
658 | LLUUID image_id; | ||
659 | image_id.set( gViewerArt.getString("icon_popular.tga") ); | ||
660 | row["columns"][0]["column"] = "icon"; | 655 | row["columns"][0]["column"] = "icon"; |
661 | row["columns"][0]["type"] = "icon"; | 656 | row["columns"][0]["type"] = "icon"; |
662 | row["columns"][0]["value"] = image_id; | 657 | row["columns"][0]["value"] = "icon_popular.tga"; |
663 | 658 | ||
664 | row["columns"][1]["column"] = "name"; | 659 | row["columns"][1]["column"] = "name"; |
665 | row["columns"][1]["value"] = name; | 660 | row["columns"][1]["value"] = name; |
@@ -759,17 +754,15 @@ void LLPanelDirBrowser::processDirEventsReply(LLMessageSystem* msg, void**) | |||
759 | LLUUID image_id; | 754 | LLUUID image_id; |
760 | if (event_flags & EVENT_FLAG_MATURE) | 755 | if (event_flags & EVENT_FLAG_MATURE) |
761 | { | 756 | { |
762 | image_id.set( gViewerArt.getString("icon_event_mature.tga") ); | ||
763 | row["columns"][0]["column"] = "icon"; | 757 | row["columns"][0]["column"] = "icon"; |
764 | row["columns"][0]["type"] = "icon"; | 758 | row["columns"][0]["type"] = "icon"; |
765 | row["columns"][0]["value"] = image_id; | 759 | row["columns"][0]["value"] = "icon_event_mature.tga"; |
766 | } | 760 | } |
767 | else | 761 | else |
768 | { | 762 | { |
769 | image_id.set( gViewerArt.getString("icon_event.tga") ); | ||
770 | row["columns"][0]["column"] = "icon"; | 763 | row["columns"][0]["column"] = "icon"; |
771 | row["columns"][0]["type"] = "icon"; | 764 | row["columns"][0]["type"] = "icon"; |
772 | row["columns"][0]["value"] = image_id; | 765 | row["columns"][0]["value"] = "icon_event.tga"; |
773 | } | 766 | } |
774 | 767 | ||
775 | row["columns"][1]["column"] = "name"; | 768 | row["columns"][1]["column"] = "name"; |
@@ -855,10 +848,9 @@ void LLPanelDirBrowser::processDirGroupsReply(LLMessageSystem* msg, void**) | |||
855 | row["id"] = group_id; | 848 | row["id"] = group_id; |
856 | 849 | ||
857 | LLUUID image_id; | 850 | LLUUID image_id; |
858 | image_id.set( gViewerArt.getString("icon_group.tga") ); | ||
859 | row["columns"][0]["column"] = "icon"; | 851 | row["columns"][0]["column"] = "icon"; |
860 | row["columns"][0]["type"] = "icon"; | 852 | row["columns"][0]["type"] = "icon"; |
861 | row["columns"][0]["value"] = image_id; | 853 | row["columns"][0]["value"] = "icon_group.tga"; |
862 | 854 | ||
863 | row["columns"][1]["column"] = "name"; | 855 | row["columns"][1]["column"] = "name"; |
864 | row["columns"][1]["value"] = group_name; | 856 | row["columns"][1]["value"] = group_name; |
@@ -1088,11 +1080,9 @@ void LLPanelDirBrowser::addClassified(LLCtrlListInterface *list, const LLUUID& p | |||
1088 | LLSD row; | 1080 | LLSD row; |
1089 | row["id"] = pick_id; | 1081 | row["id"] = pick_id; |
1090 | 1082 | ||
1091 | LLUUID image_id; | ||
1092 | image_id.set( gViewerArt.getString("icon_top_pick.tga") ); | ||
1093 | row["columns"][0]["column"] = "icon"; | 1083 | row["columns"][0]["column"] = "icon"; |
1094 | row["columns"][0]["type"] = "icon"; | 1084 | row["columns"][0]["type"] = "icon"; |
1095 | row["columns"][0]["value"] = image_id; | 1085 | row["columns"][0]["value"] = "icon_top_pick.tga"; |
1096 | 1086 | ||
1097 | row["columns"][1]["column"] = "name"; | 1087 | row["columns"][1]["column"] = "name"; |
1098 | row["columns"][1]["value"] = name; | 1088 | row["columns"][1]["value"] = name; |
@@ -1114,28 +1104,25 @@ LLSD LLPanelDirBrowser::createLandSale(const LLUUID& parcel_id, BOOL is_auction, | |||
1114 | // Icon and type | 1104 | // Icon and type |
1115 | if(is_auction) | 1105 | if(is_auction) |
1116 | { | 1106 | { |
1117 | image_id.set( gViewerArt.getString("icon_auction.tga") ); | ||
1118 | row["columns"][0]["column"] = "icon"; | 1107 | row["columns"][0]["column"] = "icon"; |
1119 | row["columns"][0]["type"] = "icon"; | 1108 | row["columns"][0]["type"] = "icon"; |
1120 | row["columns"][0]["value"] = image_id; | 1109 | row["columns"][0]["value"] = "icon_auction.tga"; |
1121 | 1110 | ||
1122 | *type = AUCTION_CODE; | 1111 | *type = AUCTION_CODE; |
1123 | } | 1112 | } |
1124 | else if (is_for_sale) | 1113 | else if (is_for_sale) |
1125 | { | 1114 | { |
1126 | image_id.set( gViewerArt.getString("icon_for_sale.tga") ); | ||
1127 | row["columns"][0]["column"] = "icon"; | 1115 | row["columns"][0]["column"] = "icon"; |
1128 | row["columns"][0]["type"] = "icon"; | 1116 | row["columns"][0]["type"] = "icon"; |
1129 | row["columns"][0]["value"] = image_id; | 1117 | row["columns"][0]["value"] = "icon_for_sale.tga"; |
1130 | 1118 | ||
1131 | *type = FOR_SALE_CODE; | 1119 | *type = FOR_SALE_CODE; |
1132 | } | 1120 | } |
1133 | else | 1121 | else |
1134 | { | 1122 | { |
1135 | image_id.set( gViewerArt.getString("icon_place.tga") ); | ||
1136 | row["columns"][0]["column"] = "icon"; | 1123 | row["columns"][0]["column"] = "icon"; |
1137 | row["columns"][0]["type"] = "icon"; | 1124 | row["columns"][0]["type"] = "icon"; |
1138 | row["columns"][0]["value"] = image_id; | 1125 | row["columns"][0]["value"] = "icon_place.tga"; |
1139 | 1126 | ||
1140 | *type = PLACE_CODE; | 1127 | *type = PLACE_CODE; |
1141 | } | 1128 | } |
@@ -1175,35 +1162,9 @@ void LLPanelDirBrowser::newClassified() | |||
1175 | } | 1162 | } |
1176 | } | 1163 | } |
1177 | 1164 | ||
1178 | void LLPanelDirBrowser::renameClassified(const LLUUID& classified_id, const char* name) | ||
1179 | { | ||
1180 | // TomY What, really? | ||
1181 | /*LLScrollListItem* row; | ||
1182 | for (row = mResultsList->getFirstData(); row; row = mResultsList->getNextData()) | ||
1183 | { | ||
1184 | if (row->getUUID() == classified_id) | ||
1185 | { | ||
1186 | const LLScrollListCell* column; | ||
1187 | LLScrollListText* text; | ||
1188 | |||
1189 | // icon | ||
1190 | // type | ||
1191 | column = row->getColumn(2); // name (visible) | ||
1192 | text = (LLScrollListText*)column; | ||
1193 | text->setText(name); | ||
1194 | |||
1195 | column = row->getColumn(3); // name (invisible) | ||
1196 | text = (LLScrollListText*)column; | ||
1197 | text->setText(name); | ||
1198 | } | ||
1199 | }*/ | ||
1200 | } | ||
1201 | |||
1202 | |||
1203 | void LLPanelDirBrowser::setupNewSearch() | 1165 | void LLPanelDirBrowser::setupNewSearch() |
1204 | { | 1166 | { |
1205 | LLScrollListCtrl* list = gUICtrlFactory->getScrollListByName(this, "results"); | 1167 | LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results"); |
1206 | if (!list) return; | ||
1207 | 1168 | ||
1208 | gDirBrowserInstances.removeData(mSearchID); | 1169 | gDirBrowserInstances.removeData(mSearchID); |
1209 | // Make a new query ID | 1170 | // Make a new query ID |
@@ -1263,8 +1224,7 @@ void LLPanelDirBrowser::sendDirFindQuery( | |||
1263 | 1224 | ||
1264 | void LLPanelDirBrowser::addHelpText(const char* text) | 1225 | void LLPanelDirBrowser::addHelpText(const char* text) |
1265 | { | 1226 | { |
1266 | LLScrollListCtrl* list = gUICtrlFactory->getScrollListByName(this, "results"); | 1227 | LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results"); |
1267 | if (!list) return; | ||
1268 | 1228 | ||
1269 | list->addCommentText(text); | 1229 | list->addCommentText(text); |
1270 | childDisable("results"); | 1230 | childDisable("results"); |