aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelpermissions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpanelpermissions.cpp')
-rw-r--r--linden/indra/newview/llpanelpermissions.cpp134
1 files changed, 67 insertions, 67 deletions
diff --git a/linden/indra/newview/llpanelpermissions.cpp b/linden/indra/newview/llpanelpermissions.cpp
index cd97d0c..ea742ba 100644
--- a/linden/indra/newview/llpanelpermissions.cpp
+++ b/linden/indra/newview/llpanelpermissions.cpp
@@ -61,7 +61,7 @@
61#include "llfloatergroups.h" 61#include "llfloatergroups.h"
62#include "llnamebox.h" 62#include "llnamebox.h"
63#include "llviewercontrol.h" 63#include "llviewercontrol.h"
64#include "llvieweruictrlfactory.h" 64#include "lluictrlfactory.h"
65#include "roles_constants.h" 65#include "roles_constants.h"
66 66
67///---------------------------------------------------------------------------- 67///----------------------------------------------------------------------------
@@ -109,7 +109,7 @@ BOOL LLPanelPermissions::postBuild()
109 this->childSetCommitCallback("clickaction",LLPanelPermissions::onCommitClickAction,this); 109 this->childSetCommitCallback("clickaction",LLPanelPermissions::onCommitClickAction,this);
110 this->childSetCommitCallback("search_check",LLPanelPermissions::onCommitIncludeInSearch,this); 110 this->childSetCommitCallback("search_check",LLPanelPermissions::onCommitIncludeInSearch,this);
111 111
112 LLTextBox* group_rect_proxy = gUICtrlFactory->getTextBoxByName(this,"Group Name Proxy"); 112 LLTextBox* group_rect_proxy = getChild<LLTextBox>("Group Name Proxy");
113 if(group_rect_proxy ) 113 if(group_rect_proxy )
114 { 114 {
115 mLabelGroupName = new LLNameBox("Group Name", group_rect_proxy->getRect()); 115 mLabelGroupName = new LLNameBox("Group Name", group_rect_proxy->getRect());
@@ -132,7 +132,7 @@ LLPanelPermissions::~LLPanelPermissions()
132 132
133void LLPanelPermissions::refresh() 133void LLPanelPermissions::refresh()
134{ 134{
135 LLButton* BtnDeedToGroup = gUICtrlFactory->getButtonByName(this,"button deed"); 135 LLButton* BtnDeedToGroup = getChild<LLButton>("button deed");
136 if(BtnDeedToGroup) 136 if(BtnDeedToGroup)
137 { 137 {
138 LLString deedText; 138 LLString deedText;
@@ -148,16 +148,16 @@ void LLPanelPermissions::refresh()
148 BtnDeedToGroup->setLabelUnselected(deedText); 148 BtnDeedToGroup->setLabelUnselected(deedText);
149 } 149 }
150 BOOL root_selected = TRUE; 150 BOOL root_selected = TRUE;
151 LLSelectNode* nodep = gSelectMgr->getSelection()->getFirstRootNode(); 151 LLSelectNode* nodep = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
152 S32 object_count = gSelectMgr->getSelection()->getRootObjectCount(); 152 S32 object_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
153 if(!nodep || 0 == object_count) 153 if(!nodep || 0 == object_count)
154 { 154 {
155 nodep = gSelectMgr->getSelection()->getFirstNode(); 155 nodep = LLSelectMgr::getInstance()->getSelection()->getFirstNode();
156 object_count = gSelectMgr->getSelection()->getObjectCount(); 156 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
157 root_selected = FALSE; 157 root_selected = FALSE;
158 } 158 }
159 159
160 //BOOL attachment_selected = gSelectMgr->getSelection()->isAttachment(); 160 //BOOL attachment_selected = LLSelectMgr::getInstance()->getSelection()->isAttachment();
161 //attachment_selected = false; 161 //attachment_selected = false;
162 LLViewerObject* objectp = NULL; 162 LLViewerObject* objectp = NULL;
163 if(nodep) objectp = nodep->getObject(); 163 if(nodep) objectp = nodep->getObject();
@@ -222,7 +222,7 @@ void LLPanelPermissions::refresh()
222 childSetValue("search_check", FALSE); 222 childSetValue("search_check", FALSE);
223 childSetEnabled("search_check", false); 223 childSetEnabled("search_check", false);
224 224
225 LLRadioGroup* RadioSaleType = gUICtrlFactory->getRadioGroupByName(this,"sale type"); 225 LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("sale type");
226 if(RadioSaleType) 226 if(RadioSaleType)
227 { 227 {
228 RadioSaleType->setSelectedIndex(-1); 228 RadioSaleType->setSelectedIndex(-1);
@@ -234,7 +234,7 @@ void LLPanelPermissions::refresh()
234 childSetEnabled("EdCost",false); 234 childSetEnabled("EdCost",false);
235 235
236 childSetEnabled("label click action",false); 236 childSetEnabled("label click action",false);
237 LLComboBox* ComboClickAction = gUICtrlFactory->getComboBoxByName(this,"clickaction"); 237 LLComboBox* ComboClickAction = getChild<LLComboBox>("clickaction");
238 if(ComboClickAction) 238 if(ComboClickAction)
239 { 239 {
240 ComboClickAction->setEnabled(FALSE); 240 ComboClickAction->setEnabled(FALSE);
@@ -254,9 +254,9 @@ void LLPanelPermissions::refresh()
254 BOOL is_one_object = (object_count == 1); 254 BOOL is_one_object = (object_count == 1);
255 255
256 // BUG: fails if a root and non-root are both single-selected. 256 // BUG: fails if a root and non-root are both single-selected.
257 BOOL is_perm_modify = (gSelectMgr->getSelection()->getFirstRootNode() 257 BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()
258 && gSelectMgr->selectGetRootsModify()) 258 && LLSelectMgr::getInstance()->selectGetRootsModify())
259 || gSelectMgr->selectGetModify(); 259 || LLSelectMgr::getInstance()->selectGetModify();
260 const LLView* keyboard_focus_view = gFocusMgr.getKeyboardFocus(); 260 const LLView* keyboard_focus_view = gFocusMgr.getKeyboardFocus();
261 S32 string_index = 0; 261 S32 string_index = 0;
262 LLString MODIFY_INFO_STRINGS[] = 262 LLString MODIFY_INFO_STRINGS[] =
@@ -283,7 +283,7 @@ void LLPanelPermissions::refresh()
283 childSetEnabled("Creator:",true); 283 childSetEnabled("Creator:",true);
284 BOOL creators_identical; 284 BOOL creators_identical;
285 LLString creator_name; 285 LLString creator_name;
286 creators_identical = gSelectMgr->selectGetCreator(mCreatorID, 286 creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID,
287 creator_name); 287 creator_name);
288 288
289 childSetText("Creator Name",creator_name); 289 childSetText("Creator Name",creator_name);
@@ -295,13 +295,13 @@ void LLPanelPermissions::refresh()
295 295
296 BOOL owners_identical; 296 BOOL owners_identical;
297 LLString owner_name; 297 LLString owner_name;
298 owners_identical = gSelectMgr->selectGetOwner(mOwnerID, owner_name); 298 owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name);
299 299
300// llinfos << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << llendl; 300// llinfos << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << llendl;
301 301
302 if (mOwnerID.isNull()) 302 if (mOwnerID.isNull())
303 { 303 {
304 if(gSelectMgr->selectIsGroupOwned()) 304 if(LLSelectMgr::getInstance()->selectIsGroupOwned())
305 { 305 {
306 // Group owned already displayed by selectGetOwner 306 // Group owned already displayed by selectGetOwner
307 } 307 }
@@ -309,7 +309,7 @@ void LLPanelPermissions::refresh()
309 { 309 {
310 // Display last owner if public 310 // Display last owner if public
311 LLString last_owner_name; 311 LLString last_owner_name;
312 gSelectMgr->selectGetLastOwner(mLastOwnerID, last_owner_name); 312 LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name);
313 313
314 // It should never happen that the last owner is null and the owner 314 // It should never happen that the last owner is null and the owner
315 // is null, but it seems to be a bug in the simulator right now. JC 315 // is null, but it seems to be a bug in the simulator right now. JC
@@ -323,12 +323,12 @@ void LLPanelPermissions::refresh()
323 323
324 childSetText("Owner Name",owner_name); 324 childSetText("Owner Name",owner_name);
325 childSetEnabled("Owner Name",TRUE); 325 childSetEnabled("Owner Name",TRUE);
326 childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || gSelectMgr->selectIsGroupOwned())); 326 childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned()));
327 327
328 // update group text field 328 // update group text field
329 childSetEnabled("Group:",true); 329 childSetEnabled("Group:",true);
330 LLUUID group_id; 330 LLUUID group_id;
331 BOOL groups_identical = gSelectMgr->selectGetGroup(group_id); 331 BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
332 if (groups_identical) 332 if (groups_identical)
333 { 333 {
334 if(mLabelGroupName) 334 if(mLabelGroupName)
@@ -348,14 +348,14 @@ void LLPanelPermissions::refresh()
348 if(is_one_object) 348 if(is_one_object)
349 { 349 {
350 childSetEnabled("Name:",true); 350 childSetEnabled("Name:",true);
351 LLLineEditor* LineEditorObjectName = gUICtrlFactory->getLineEditorByName(this,"Object Name"); 351 LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name");
352 if(keyboard_focus_view != LineEditorObjectName) 352 if(keyboard_focus_view != LineEditorObjectName)
353 { 353 {
354 childSetText("Object Name",nodep->mName); 354 childSetText("Object Name",nodep->mName);
355 } 355 }
356 356
357 childSetEnabled("Description:",true); 357 childSetEnabled("Description:",true);
358 LLLineEditor* LineEditorObjectDesc = gUICtrlFactory->getLineEditorByName(this,"Object Description"); 358 LLLineEditor* LineEditorObjectDesc = getChild<LLLineEditor>("Object Description");
359 if(LineEditorObjectDesc) 359 if(LineEditorObjectDesc)
360 { 360 {
361 if(keyboard_focus_view != LineEditorObjectDesc) 361 if(keyboard_focus_view != LineEditorObjectDesc)
@@ -378,8 +378,8 @@ void LLPanelPermissions::refresh()
378 378
379 379
380 // Pre-compute object info string 380 // Pre-compute object info string
381 S32 prim_count = gSelectMgr->getSelection()->getObjectCount(); 381 S32 prim_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
382 S32 obj_count = gSelectMgr->getSelection()->getRootObjectCount(); 382 S32 obj_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
383 383
384 LLString object_info_string; 384 LLString object_info_string;
385 if (1 == obj_count) 385 if (1 == obj_count)
@@ -406,17 +406,17 @@ void LLPanelPermissions::refresh()
406 childSetEnabled("prim info",true); 406 childSetEnabled("prim info",true);
407 407
408 S32 price; 408 S32 price;
409 BOOL is_for_sale = gSelectMgr->selectIsForSale(price); 409 BOOL is_for_sale = LLSelectMgr::getInstance()->selectIsForSale(price);
410 if (!is_for_sale) 410 if (!is_for_sale)
411 { 411 {
412 price = DEFAULT_PRICE; 412 price = DEFAULT_PRICE;
413 } 413 }
414 414
415 BOOL self_owned = (gAgent.getID() == mOwnerID); 415 BOOL self_owned = (gAgent.getID() == mOwnerID);
416 BOOL group_owned = gSelectMgr->selectIsGroupOwned() ; 416 BOOL group_owned = LLSelectMgr::getInstance()->selectIsGroupOwned() ;
417 BOOL public_owned = (mOwnerID.isNull() && !gSelectMgr->selectIsGroupOwned()); 417 BOOL public_owned = (mOwnerID.isNull() && !LLSelectMgr::getInstance()->selectIsGroupOwned());
418 BOOL can_transfer = gSelectMgr->selectGetRootsTransfer(); 418 BOOL can_transfer = LLSelectMgr::getInstance()->selectGetRootsTransfer();
419 BOOL can_copy = gSelectMgr->selectGetRootsCopy(); 419 BOOL can_copy = LLSelectMgr::getInstance()->selectGetRootsCopy();
420 420
421 if(!owners_identical) 421 if(!owners_identical)
422 { 422 {
@@ -426,7 +426,7 @@ void LLPanelPermissions::refresh()
426 } 426 }
427 else if(self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE))) 427 else if(self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE)))
428 { 428 {
429 LLLineEditor* EditPrice = gUICtrlFactory->getLineEditorByName(this,"EdCost"); 429 LLLineEditor* EditPrice = getChild<LLLineEditor>("EdCost");
430 if(keyboard_focus_view != EditPrice) 430 if(keyboard_focus_view != EditPrice)
431 { 431 {
432 childSetText("EdCost",llformat("%d",price)); 432 childSetText("EdCost",llformat("%d",price));
@@ -478,23 +478,23 @@ void LLPanelPermissions::refresh()
478 U32 next_owner_mask_on = 0; 478 U32 next_owner_mask_on = 0;
479 U32 next_owner_mask_off = 0; 479 U32 next_owner_mask_off = 0;
480 480
481 valid_base_perms = gSelectMgr->selectGetPerm(PERM_BASE, 481 valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE,
482 &base_mask_on, 482 &base_mask_on,
483 &base_mask_off); 483 &base_mask_off);
484 484
485 valid_owner_perms = gSelectMgr->selectGetPerm(PERM_OWNER, 485 valid_owner_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER,
486 &owner_mask_on, 486 &owner_mask_on,
487 &owner_mask_off); 487 &owner_mask_off);
488 488
489 valid_group_perms = gSelectMgr->selectGetPerm(PERM_GROUP, 489 valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP,
490 &group_mask_on, 490 &group_mask_on,
491 &group_mask_off); 491 &group_mask_off);
492 492
493 valid_everyone_perms = gSelectMgr->selectGetPerm(PERM_EVERYONE, 493 valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE,
494 &everyone_mask_on, 494 &everyone_mask_on,
495 &everyone_mask_off); 495 &everyone_mask_off);
496 496
497 valid_next_perms = gSelectMgr->selectGetPerm(PERM_NEXT_OWNER, 497 valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER,
498 &next_owner_mask_on, 498 &next_owner_mask_on,
499 &next_owner_mask_off); 499 &next_owner_mask_off);
500 500
@@ -724,10 +724,10 @@ void LLPanelPermissions::refresh()
724 724
725 // reflect sale information 725 // reflect sale information
726 LLSaleInfo sale_info; 726 LLSaleInfo sale_info;
727 BOOL valid_sale_info = gSelectMgr->selectGetSaleInfo(sale_info); 727 BOOL valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
728 LLSaleInfo::EForSale sale_type = sale_info.getSaleType(); 728 LLSaleInfo::EForSale sale_type = sale_info.getSaleType();
729 729
730 LLRadioGroup* RadioSaleType = gUICtrlFactory->getRadioGroupByName(this,"sale type"); 730 LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("sale type");
731 if(RadioSaleType) 731 if(RadioSaleType)
732 { 732 {
733 if (valid_sale_info) 733 if (valid_sale_info)
@@ -753,18 +753,18 @@ void LLPanelPermissions::refresh()
753 } 753 }
754 754
755 // Check search status of objects 755 // Check search status of objects
756 BOOL all_volume = gSelectMgr->selectionAllPCode( LL_PCODE_VOLUME ); 756 BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
757 bool include_in_search; 757 bool include_in_search;
758 bool all_include_in_search = gSelectMgr->selectionGetIncludeInSearch(&include_in_search); 758 bool all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search);
759 childSetEnabled("search_check", has_change_sale_ability && all_volume); 759 childSetEnabled("search_check", has_change_sale_ability && all_volume);
760 childSetValue("search_check", include_in_search); 760 childSetValue("search_check", include_in_search);
761 childSetTentative("search_check", ! all_include_in_search); 761 childSetTentative("search_check", ! all_include_in_search);
762 762
763 // Click action (touch, sit, buy) 763 // Click action (touch, sit, buy)
764 U8 click_action = 0; 764 U8 click_action = 0;
765 if (gSelectMgr->selectionGetClickAction(&click_action)) 765 if (LLSelectMgr::getInstance()->selectionGetClickAction(&click_action))
766 { 766 {
767 LLComboBox* ComboClickAction = gUICtrlFactory->getComboBoxByName(this,"clickaction"); 767 LLComboBox* ComboClickAction = getChild<LLComboBox>("clickaction");
768 if(ComboClickAction) 768 if(ComboClickAction)
769 { 769 {
770 ComboClickAction->setCurrentByIndex((S32)click_action); 770 ComboClickAction->setCurrentByIndex((S32)click_action);
@@ -779,14 +779,14 @@ void LLPanelPermissions::refresh()
779void LLPanelPermissions::onClickClaim(void*) 779void LLPanelPermissions::onClickClaim(void*)
780{ 780{
781 // try to claim ownership 781 // try to claim ownership
782 gSelectMgr->sendOwner(gAgent.getID(), gAgent.getGroupID()); 782 LLSelectMgr::getInstance()->sendOwner(gAgent.getID(), gAgent.getGroupID());
783} 783}
784 784
785// static 785// static
786void LLPanelPermissions::onClickRelease(void*) 786void LLPanelPermissions::onClickRelease(void*)
787{ 787{
788 // try to release ownership 788 // try to release ownership
789 gSelectMgr->sendOwner(LLUUID::null, LLUUID::null); 789 LLSelectMgr::getInstance()->sendOwner(LLUUID::null, LLUUID::null);
790} 790}
791 791
792// static 792// static
@@ -802,10 +802,10 @@ void LLPanelPermissions::onClickOwner(void *data)
802{ 802{
803 LLPanelPermissions *self = (LLPanelPermissions *)data; 803 LLPanelPermissions *self = (LLPanelPermissions *)data;
804 804
805 if (gSelectMgr->selectIsGroupOwned()) 805 if (LLSelectMgr::getInstance()->selectIsGroupOwned())
806 { 806 {
807 LLUUID group_id; 807 LLUUID group_id;
808 gSelectMgr->selectGetGroup(group_id); 808 LLSelectMgr::getInstance()->selectGetGroup(group_id);
809 LLFloaterGroupInfo::showFromUUID(group_id); 809 LLFloaterGroupInfo::showFromUUID(group_id);
810 } 810 }
811 else 811 else
@@ -819,7 +819,7 @@ void LLPanelPermissions::onClickGroup(void* data)
819 LLPanelPermissions* panelp = (LLPanelPermissions*)data; 819 LLPanelPermissions* panelp = (LLPanelPermissions*)data;
820 LLUUID owner_id; 820 LLUUID owner_id;
821 LLString name; 821 LLString name;
822 BOOL owners_identical = gSelectMgr->selectGetOwner(owner_id, name); 822 BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, name);
823 LLFloater* parent_floater = gFloaterView->getParentFloater(panelp); 823 LLFloater* parent_floater = gFloaterView->getParentFloater(panelp);
824 824
825 if(owners_identical && (owner_id == gAgent.getID())) 825 if(owners_identical && (owner_id == gAgent.getID()))
@@ -845,7 +845,7 @@ void LLPanelPermissions::cbGroupID(LLUUID group_id, void* userdata)
845 { 845 {
846 self->mLabelGroupName->setNameID(group_id, TRUE); 846 self->mLabelGroupName->setNameID(group_id, TRUE);
847 } 847 }
848 gSelectMgr->sendGroup(group_id); 848 LLSelectMgr::getInstance()->sendGroup(group_id);
849} 849}
850 850
851void callback_deed_to_group(S32 option, void*) 851void callback_deed_to_group(S32 option, void*)
@@ -853,11 +853,11 @@ void callback_deed_to_group(S32 option, void*)
853 if (0 == option) 853 if (0 == option)
854 { 854 {
855 LLUUID group_id; 855 LLUUID group_id;
856 BOOL groups_identical = gSelectMgr->selectGetGroup(group_id); 856 BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
857 if(groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED))) 857 if(groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED)))
858 { 858 {
859 gSelectMgr->sendOwner(LLUUID::null, group_id, FALSE); 859 LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, FALSE);
860// gViewerStats->incStat(LLViewerStats::ST_RELEASE_COUNT); 860// LLViewerStats::getInstance()->incStat(LLViewerStats::ST_RELEASE_COUNT);
861 } 861 }
862 } 862 }
863} 863}
@@ -875,7 +875,7 @@ void LLPanelPermissions::onClickDeedToGroup(void* data)
875// static 875// static
876void LLPanelPermissions::onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 perm) 876void LLPanelPermissions::onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 perm)
877{ 877{
878 LLViewerObject* object = gSelectMgr->getSelection()->getFirstRootObject(); 878 LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject();
879 if(!object) return; 879 if(!object) return;
880 880
881 // Checkbox will have toggled itself 881 // Checkbox will have toggled itself
@@ -883,7 +883,7 @@ void LLPanelPermissions::onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32
883 LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl; 883 LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
884 BOOL new_state = check->get(); 884 BOOL new_state = check->get();
885 885
886 gSelectMgr->selectionSetObjectPermissions(field, new_state, perm); 886 LLSelectMgr::getInstance()->selectionSetObjectPermissions(field, new_state, perm);
887} 887}
888 888
889// static 889// static
@@ -931,11 +931,11 @@ void LLPanelPermissions::onCommitName(LLUICtrl*, void* data)
931{ 931{
932 //llinfos << "LLPanelPermissions::onCommitName()" << llendl; 932 //llinfos << "LLPanelPermissions::onCommitName()" << llendl;
933 LLPanelPermissions* self = (LLPanelPermissions*)data; 933 LLPanelPermissions* self = (LLPanelPermissions*)data;
934 LLLineEditor* tb = gUICtrlFactory->getLineEditorByName(self,"Object Name"); 934 LLLineEditor* tb = self->getChild<LLLineEditor>("Object Name");
935 if(tb) 935 if(tb)
936 { 936 {
937 gSelectMgr->selectionSetObjectName(tb->getText()); 937 LLSelectMgr::getInstance()->selectionSetObjectName(tb->getText());
938// gSelectMgr->selectionSetObjectName(self->mLabelObjectName->getText()); 938// LLSelectMgr::getInstance()->selectionSetObjectName(self->mLabelObjectName->getText());
939 } 939 }
940} 940}
941 941
@@ -945,10 +945,10 @@ void LLPanelPermissions::onCommitDesc(LLUICtrl*, void* data)
945{ 945{
946 //llinfos << "LLPanelPermissions::onCommitDesc()" << llendl; 946 //llinfos << "LLPanelPermissions::onCommitDesc()" << llendl;
947 LLPanelPermissions* self = (LLPanelPermissions*)data; 947 LLPanelPermissions* self = (LLPanelPermissions*)data;
948 LLLineEditor* le = gUICtrlFactory->getLineEditorByName(self,"Object Description"); 948 LLLineEditor* le = self->getChild<LLLineEditor>("Object Description");
949 if(le) 949 if(le)
950 { 950 {
951 gSelectMgr->selectionSetObjectDescription(le->getText()); 951 LLSelectMgr::getInstance()->selectionSetObjectDescription(le->getText());
952 } 952 }
953} 953}
954 954
@@ -971,11 +971,11 @@ void LLPanelPermissions::setAllSaleInfo()
971 llinfos << "LLPanelPermissions::setAllSaleInfo()" << llendl; 971 llinfos << "LLPanelPermissions::setAllSaleInfo()" << llendl;
972 LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_NOT; 972 LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_NOT;
973 973
974 LLCheckBoxCtrl* mCheckPurchase = gUICtrlFactory->getCheckBoxByName(this,"checkbox for sale"); 974 LLCheckBoxCtrl* mCheckPurchase = getChild<LLCheckBoxCtrl>("checkbox for sale");
975 975
976 if(mCheckPurchase && mCheckPurchase->get()) 976 if(mCheckPurchase && mCheckPurchase->get())
977 { 977 {
978 LLRadioGroup* RadioSaleType = gUICtrlFactory->getRadioGroupByName(this,"sale type"); 978 LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("sale type");
979 if(RadioSaleType) 979 if(RadioSaleType)
980 { 980 {
981 switch(RadioSaleType->getSelectedIndex()) 981 switch(RadioSaleType->getSelectedIndex())
@@ -995,7 +995,7 @@ void LLPanelPermissions::setAllSaleInfo()
995 } 995 }
996 } 996 }
997 } 997 }
998 LLLineEditor* mEditPrice = gUICtrlFactory->getLineEditorByName(this,"EdCost"); 998 LLLineEditor* mEditPrice = getChild<LLLineEditor>("EdCost");
999 999
1000 S32 price = -1; 1000 S32 price = -1;
1001 if(mEditPrice) 1001 if(mEditPrice)
@@ -1010,17 +1010,17 @@ void LLPanelPermissions::setAllSaleInfo()
1010 } 1010 }
1011 1011
1012 LLSaleInfo sale_info(sale_type, price); 1012 LLSaleInfo sale_info(sale_type, price);
1013 gSelectMgr->selectionSetObjectSaleInfo(sale_info); 1013 LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(sale_info);
1014 1014
1015 // If turned off for-sale, make sure click-action buy is turned 1015 // If turned off for-sale, make sure click-action buy is turned
1016 // off as well 1016 // off as well
1017 if (sale_type == LLSaleInfo::FS_NOT) 1017 if (sale_type == LLSaleInfo::FS_NOT)
1018 { 1018 {
1019 U8 click_action = 0; 1019 U8 click_action = 0;
1020 gSelectMgr->selectionGetClickAction(&click_action); 1020 LLSelectMgr::getInstance()->selectionGetClickAction(&click_action);
1021 if (click_action == CLICK_ACTION_BUY) 1021 if (click_action == CLICK_ACTION_BUY)
1022 { 1022 {
1023 gSelectMgr->selectionSetClickAction(CLICK_ACTION_TOUCH); 1023 LLSelectMgr::getInstance()->selectionSetClickAction(CLICK_ACTION_TOUCH);
1024 } 1024 }
1025 } 1025 }
1026} 1026}
@@ -1046,14 +1046,14 @@ void LLPanelPermissions::onCommitClickAction(LLUICtrl* ctrl, void*)
1046 if (click_action == CLICK_ACTION_BUY) 1046 if (click_action == CLICK_ACTION_BUY)
1047 { 1047 {
1048 LLSaleInfo sale_info; 1048 LLSaleInfo sale_info;
1049 gSelectMgr->selectGetSaleInfo(sale_info); 1049 LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
1050 if (!sale_info.isForSale()) 1050 if (!sale_info.isForSale())
1051 { 1051 {
1052 gViewerWindow->alertXml("CantSetBuyObject"); 1052 gViewerWindow->alertXml("CantSetBuyObject");
1053 1053
1054 // Set click action back to its old value 1054 // Set click action back to its old value
1055 U8 click_action = 0; 1055 U8 click_action = 0;
1056 gSelectMgr->selectionGetClickAction(&click_action); 1056 LLSelectMgr::getInstance()->selectionGetClickAction(&click_action);
1057 box->setCurrentByIndex((S32)click_action); 1057 box->setCurrentByIndex((S32)click_action);
1058 1058
1059 return; 1059 return;
@@ -1063,14 +1063,14 @@ void LLPanelPermissions::onCommitClickAction(LLUICtrl* ctrl, void*)
1063 { 1063 {
1064 // Verify object has script with money() handler 1064 // Verify object has script with money() handler
1065 LLSelectionPayable payable; 1065 LLSelectionPayable payable;
1066 bool can_pay = gSelectMgr->getSelection()->applyToObjects(&payable); 1066 bool can_pay = LLSelectMgr::getInstance()->getSelection()->applyToObjects(&payable);
1067 if (!can_pay) 1067 if (!can_pay)
1068 { 1068 {
1069 // Warn, but do it anyway. 1069 // Warn, but do it anyway.
1070 gViewerWindow->alertXml("ClickActionNotPayable"); 1070 gViewerWindow->alertXml("ClickActionNotPayable");
1071 } 1071 }
1072 } 1072 }
1073 gSelectMgr->selectionSetClickAction(click_action); 1073 LLSelectMgr::getInstance()->selectionSetClickAction(click_action);
1074} 1074}
1075 1075
1076// static 1076// static
@@ -1079,6 +1079,6 @@ void LLPanelPermissions::onCommitIncludeInSearch(LLUICtrl* ctrl, void*)
1079 LLCheckBoxCtrl* box = (LLCheckBoxCtrl*)ctrl; 1079 LLCheckBoxCtrl* box = (LLCheckBoxCtrl*)ctrl;
1080 llassert(box); 1080 llassert(box);
1081 1081
1082 gSelectMgr->selectionSetIncludeInSearch(box->get()); 1082 LLSelectMgr::getInstance()->selectionSetIncludeInSearch(box->get());
1083} 1083}
1084 1084