aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterbuy.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llfloaterbuy.cpp
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-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 '')
-rw-r--r--linden/indra/newview/llfloaterbuy.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/linden/indra/newview/llfloaterbuy.cpp b/linden/indra/newview/llfloaterbuy.cpp
index 95a7b41..18d2913 100644
--- a/linden/indra/newview/llfloaterbuy.cpp
+++ b/linden/indra/newview/llfloaterbuy.cpp
@@ -46,7 +46,7 @@
46#include "llselectmgr.h" 46#include "llselectmgr.h"
47#include "llscrolllistctrl.h" 47#include "llscrolllistctrl.h"
48#include "llviewerobject.h" 48#include "llviewerobject.h"
49#include "llvieweruictrlfactory.h" 49#include "lluictrlfactory.h"
50#include "llviewerwindow.h" 50#include "llviewerwindow.h"
51 51
52LLFloaterBuy* LLFloaterBuy::sInstance = NULL; 52LLFloaterBuy* LLFloaterBuy::sInstance = NULL;
@@ -54,7 +54,7 @@ LLFloaterBuy* LLFloaterBuy::sInstance = NULL;
54LLFloaterBuy::LLFloaterBuy() 54LLFloaterBuy::LLFloaterBuy()
55: LLFloater("floater_buy_object", "FloaterBuyRect", "") 55: LLFloater("floater_buy_object", "FloaterBuyRect", "")
56{ 56{
57 gUICtrlFactory->buildFloater(this, "floater_buy_object.xml"); 57 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_buy_object.xml");
58 58
59 childDisable("object_list"); 59 childDisable("object_list");
60 childDisable("item_list"); 60 childDisable("item_list");
@@ -72,17 +72,17 @@ LLFloaterBuy::~LLFloaterBuy()
72 72
73void LLFloaterBuy::reset() 73void LLFloaterBuy::reset()
74{ 74{
75 LLScrollListCtrl* object_list = LLUICtrlFactory::getScrollListByName(this, "object_list"); 75 LLScrollListCtrl* object_list = getChild<LLScrollListCtrl>("object_list");
76 if (object_list) object_list->deleteAllItems(); 76 if (object_list) object_list->deleteAllItems();
77 77
78 LLScrollListCtrl* item_list = LLUICtrlFactory::getScrollListByName(this, "item_list"); 78 LLScrollListCtrl* item_list = getChild<LLScrollListCtrl>("item_list");
79 if (item_list) item_list->deleteAllItems(); 79 if (item_list) item_list->deleteAllItems();
80} 80}
81 81
82// static 82// static
83void LLFloaterBuy::show(const LLSaleInfo& sale_info) 83void LLFloaterBuy::show(const LLSaleInfo& sale_info)
84{ 84{
85 LLObjectSelectionHandle selection = gSelectMgr->getSelection(); 85 LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
86 86
87 if (selection->getRootObjectCount() != 1) 87 if (selection->getRootObjectCount() != 1)
88 { 88 {
@@ -104,7 +104,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
104 sInstance->open(); /*Flawfinder: ignore*/ 104 sInstance->open(); /*Flawfinder: ignore*/
105 sInstance->setFocus(TRUE); 105 sInstance->setFocus(TRUE);
106 sInstance->mSaleInfo = sale_info; 106 sInstance->mSaleInfo = sale_info;
107 sInstance->mObjectSelection = gSelectMgr->getEditSelection(); 107 sInstance->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
108 108
109 // Always center the dialog. User can change the size, 109 // Always center the dialog. User can change the size,
110 // but purchases are important and should be center screen. 110 // but purchases are important and should be center screen.
@@ -133,7 +133,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
133 133
134 LLUUID owner_id; 134 LLUUID owner_id;
135 LLString owner_name; 135 LLString owner_name;
136 BOOL owners_identical = gSelectMgr->selectGetOwner(owner_id, owner_name); 136 BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
137 if (!owners_identical) 137 if (!owners_identical)
138 { 138 {
139 gViewerWindow->alertXml("BuyObjectOneOwner"); 139 gViewerWindow->alertXml("BuyObjectOneOwner");
@@ -151,13 +151,13 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
151 LLSD row; 151 LLSD row;
152 152
153 // Compute icon for this item 153 // Compute icon for this item
154 LLUUID icon_id = get_item_icon_uuid(LLAssetType::AT_OBJECT, 154 LLString icon_name = get_item_icon_name(LLAssetType::AT_OBJECT,
155 LLInventoryType::IT_OBJECT, 155 LLInventoryType::IT_OBJECT,
156 0x0, FALSE); 156 0x0, FALSE);
157 157
158 row["columns"][0]["column"] = "icon"; 158 row["columns"][0]["column"] = "icon";
159 row["columns"][0]["type"] = "icon"; 159 row["columns"][0]["type"] = "icon";
160 row["columns"][0]["value"] = icon_id; 160 row["columns"][0]["value"] = icon_name;
161 161
162 // Append the permissions that you will acquire (not the current 162 // Append the permissions that you will acquire (not the current
163 // permissions). 163 // permissions).
@@ -256,13 +256,13 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
256 item_is_multi = TRUE; 256 item_is_multi = TRUE;
257 } 257 }
258 258
259 LLUUID icon_id = get_item_icon_uuid(inv_item->getType(), 259 LLString icon_name = get_item_icon_name(inv_item->getType(),
260 inv_item->getInventoryType(), 260 inv_item->getInventoryType(),
261 inv_item->getFlags(), 261 inv_item->getFlags(),
262 item_is_multi); 262 item_is_multi);
263 row["columns"][0]["column"] = "icon"; 263 row["columns"][0]["column"] = "icon";
264 row["columns"][0]["type"] = "icon"; 264 row["columns"][0]["type"] = "icon";
265 row["columns"][0]["value"] = icon_id; 265 row["columns"][0]["value"] = icon_name;
266 266
267 // Append the permissions that you will acquire (not the current 267 // Append the permissions that you will acquire (not the current
268 // permissions). 268 // permissions).
@@ -307,7 +307,7 @@ void LLFloaterBuy::onClickBuy(void*)
307 // *NOTE: doesn't work for multiple object buy, which UI does not 307 // *NOTE: doesn't work for multiple object buy, which UI does not
308 // currently support sale info is used for verification only, if 308 // currently support sale info is used for verification only, if
309 // it doesn't match region info then sale is canceled. 309 // it doesn't match region info then sale is canceled.
310 gSelectMgr->sendBuy(gAgent.getID(), category_id, sInstance->mSaleInfo ); 310 LLSelectMgr::getInstance()->sendBuy(gAgent.getID(), category_id, sInstance->mSaleInfo );
311 311
312 sInstance->close(); 312 sInstance->close();
313} 313}