aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterbuycontents.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterbuycontents.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/linden/indra/newview/llfloaterbuycontents.cpp b/linden/indra/newview/llfloaterbuycontents.cpp
index d32a631..8b2a031 100644
--- a/linden/indra/newview/llfloaterbuycontents.cpp
+++ b/linden/indra/newview/llfloaterbuycontents.cpp
@@ -50,7 +50,7 @@
50#include "llscrolllistctrl.h" 50#include "llscrolllistctrl.h"
51#include "llviewerobject.h" 51#include "llviewerobject.h"
52#include "llviewerregion.h" 52#include "llviewerregion.h"
53#include "llvieweruictrlfactory.h" 53#include "lluictrlfactory.h"
54#include "llviewerwindow.h" 54#include "llviewerwindow.h"
55 55
56LLFloaterBuyContents* LLFloaterBuyContents::sInstance = NULL; 56LLFloaterBuyContents* LLFloaterBuyContents::sInstance = NULL;
@@ -58,7 +58,7 @@ LLFloaterBuyContents* LLFloaterBuyContents::sInstance = NULL;
58LLFloaterBuyContents::LLFloaterBuyContents() 58LLFloaterBuyContents::LLFloaterBuyContents()
59: LLFloater("floater_buy_contents", "FloaterBuyContentsRect", "") 59: LLFloater("floater_buy_contents", "FloaterBuyContentsRect", "")
60{ 60{
61 gUICtrlFactory->buildFloater(this, "floater_buy_contents.xml"); 61 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_buy_contents.xml");
62 62
63 childSetAction("cancel_btn", onClickCancel, this); 63 childSetAction("cancel_btn", onClickCancel, this);
64 childSetAction("buy_btn", onClickBuy, this); 64 childSetAction("buy_btn", onClickBuy, this);
@@ -79,7 +79,7 @@ LLFloaterBuyContents::~LLFloaterBuyContents()
79// static 79// static
80void LLFloaterBuyContents::show(const LLSaleInfo& sale_info) 80void LLFloaterBuyContents::show(const LLSaleInfo& sale_info)
81{ 81{
82 LLObjectSelectionHandle selection = gSelectMgr->getSelection(); 82 LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
83 83
84 if (selection->getRootObjectCount() != 1) 84 if (selection->getRootObjectCount() != 1)
85 { 85 {
@@ -90,7 +90,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info)
90 // Create a new instance only if needed 90 // Create a new instance only if needed
91 if (sInstance) 91 if (sInstance)
92 { 92 {
93 LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(sInstance, "item_list"); 93 LLScrollListCtrl* list = sInstance->getChild<LLScrollListCtrl>("item_list");
94 if (list) list->deleteAllItems(); 94 if (list) list->deleteAllItems();
95 } 95 }
96 else 96 else
@@ -100,7 +100,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info)
100 100
101 sInstance->open(); /*Flawfinder: ignore*/ 101 sInstance->open(); /*Flawfinder: ignore*/
102 sInstance->setFocus(TRUE); 102 sInstance->setFocus(TRUE);
103 sInstance->mObjectSelection = gSelectMgr->getEditSelection(); 103 sInstance->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
104 104
105 // Always center the dialog. User can change the size, 105 // Always center the dialog. User can change the size,
106 // but purchases are important and should be center screen. 106 // but purchases are important and should be center screen.
@@ -110,7 +110,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info)
110 110
111 LLUUID owner_id; 111 LLUUID owner_id;
112 LLString owner_name; 112 LLString owner_name;
113 BOOL owners_identical = gSelectMgr->selectGetOwner(owner_id, owner_name); 113 BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
114 if (!owners_identical) 114 if (!owners_identical)
115 { 115 {
116 gViewerWindow->alertXml("BuyContentsOneOwner"); 116 gViewerWindow->alertXml("BuyContentsOneOwner");
@@ -223,13 +223,13 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
223 item_is_multi = TRUE; 223 item_is_multi = TRUE;
224 } 224 }
225 225
226 LLUUID icon_id = get_item_icon_uuid(inv_item->getType(), 226 LLString icon_name = get_item_icon_name(inv_item->getType(),
227 inv_item->getInventoryType(), 227 inv_item->getInventoryType(),
228 inv_item->getFlags(), 228 inv_item->getFlags(),
229 item_is_multi); 229 item_is_multi);
230 row["columns"][0]["column"] = "icon"; 230 row["columns"][0]["column"] = "icon";
231 row["columns"][0]["type"] = "icon"; 231 row["columns"][0]["type"] = "icon";
232 row["columns"][0]["value"] = icon_id; 232 row["columns"][0]["value"] = icon_name;
233 233
234 // Append the permissions that you will acquire (not the current 234 // Append the permissions that you will acquire (not the current
235 // permissions). 235 // permissions).
@@ -291,7 +291,7 @@ void LLFloaterBuyContents::onClickBuy(void*)
291 // *NOTE: doesn't work for multiple object buy, which UI does not 291 // *NOTE: doesn't work for multiple object buy, which UI does not
292 // currently support sale info is used for verification only, if 292 // currently support sale info is used for verification only, if
293 // it doesn't match region info then sale is canceled. 293 // it doesn't match region info then sale is canceled.
294 gSelectMgr->sendBuy(gAgent.getID(), category_id, sInstance->mSaleInfo); 294 LLSelectMgr::getInstance()->sendBuy(gAgent.getID(), category_id, sInstance->mSaleInfo);
295 295
296 sInstance->close(); 296 sInstance->close();
297} 297}