aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llselectmgr.cpp')
-rw-r--r--linden/indra/newview/llselectmgr.cpp53
1 files changed, 22 insertions, 31 deletions
diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp
index af97e2e..e4f914f 100644
--- a/linden/indra/newview/llselectmgr.cpp
+++ b/linden/indra/newview/llselectmgr.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -2696,7 +2697,8 @@ void LLSelectMgr::selectDelete()
2696 return; 2697 return;
2697 } 2698 }
2698 2699
2699 LLObjectSelectionHandle* selection_handlep = new LLObjectSelectionHandle(getSelection()); 2700 LLNotification::Params params("ConfirmObjectDeleteLock");
2701 params.functor(boost::bind(&LLSelectMgr::confirmDelete, _1, _2, getSelection()));
2700 2702
2701 if(locked_but_deleteable_object || 2703 if(locked_but_deleteable_object ||
2702 no_copy_but_deleteable_object || 2704 no_copy_but_deleteable_object ||
@@ -2712,72 +2714,55 @@ void LLSelectMgr::selectDelete()
2712 if(locked_but_deleteable_object && !no_copy_but_deleteable_object && all_owned_by_you) 2714 if(locked_but_deleteable_object && !no_copy_but_deleteable_object && all_owned_by_you)
2713 { 2715 {
2714 //Locked only 2716 //Locked only
2715 gViewerWindow->alertXml( "ConfirmObjectDeleteLock", 2717 params.name("ConfirmObjectDeleteLock");
2716 &LLSelectMgr::confirmDelete,
2717 selection_handlep);
2718 } 2718 }
2719 else if(!locked_but_deleteable_object && no_copy_but_deleteable_object && all_owned_by_you) 2719 else if(!locked_but_deleteable_object && no_copy_but_deleteable_object && all_owned_by_you)
2720 { 2720 {
2721 //No Copy only 2721 //No Copy only
2722 gViewerWindow->alertXml( "ConfirmObjectDeleteNoCopy", 2722 params.name("ConfirmObjectDeleteNoCopy");
2723 &LLSelectMgr::confirmDelete,
2724 selection_handlep);
2725 } 2723 }
2726 else if(!locked_but_deleteable_object && !no_copy_but_deleteable_object && !all_owned_by_you) 2724 else if(!locked_but_deleteable_object && !no_copy_but_deleteable_object && !all_owned_by_you)
2727 { 2725 {
2728 //not owned only 2726 //not owned only
2729 gViewerWindow->alertXml( "ConfirmObjectDeleteNoOwn", 2727 params.name("ConfirmObjectDeleteNoOwn");
2730 &LLSelectMgr::confirmDelete,
2731 selection_handlep);
2732 } 2728 }
2733 else if(locked_but_deleteable_object && no_copy_but_deleteable_object && all_owned_by_you) 2729 else if(locked_but_deleteable_object && no_copy_but_deleteable_object && all_owned_by_you)
2734 { 2730 {
2735 //locked and no copy 2731 //locked and no copy
2736 gViewerWindow->alertXml( "ConfirmObjectDeleteLockNoCopy", 2732 params.name("ConfirmObjectDeleteLockNoCopy");
2737 &LLSelectMgr::confirmDelete,
2738 selection_handlep);
2739 } 2733 }
2740 else if(locked_but_deleteable_object && !no_copy_but_deleteable_object && !all_owned_by_you) 2734 else if(locked_but_deleteable_object && !no_copy_but_deleteable_object && !all_owned_by_you)
2741 { 2735 {
2742 //locked and not owned 2736 //locked and not owned
2743 gViewerWindow->alertXml( "ConfirmObjectDeleteLockNoOwn", 2737 params.name("ConfirmObjectDeleteLockNoOwn");
2744 &LLSelectMgr::confirmDelete,
2745 selection_handlep);
2746 } 2738 }
2747 else if(!locked_but_deleteable_object && no_copy_but_deleteable_object && !all_owned_by_you) 2739 else if(!locked_but_deleteable_object && no_copy_but_deleteable_object && !all_owned_by_you)
2748 { 2740 {
2749 //no copy and not owned 2741 //no copy and not owned
2750 gViewerWindow->alertXml( "ConfirmObjectDeleteNoCopyNoOwn", 2742 params.name("ConfirmObjectDeleteNoCopyNoOwn");
2751 &LLSelectMgr::confirmDelete,
2752 selection_handlep);
2753 } 2743 }
2754 else 2744 else
2755 { 2745 {
2756 //locked, no copy and not owned 2746 //locked, no copy and not owned
2757 gViewerWindow->alertXml( "ConfirmObjectDeleteLockNoCopyNoOwn", 2747 params.name("ConfirmObjectDeleteLockNoCopyNoOwn");
2758 &LLSelectMgr::confirmDelete,
2759 selection_handlep);
2760 } 2748 }
2761 2749
2762 2750 LLNotifications::instance().add(params);
2763
2764 } 2751 }
2765 else 2752 else
2766 { 2753 {
2767 confirmDelete(0, (void*)selection_handlep); 2754 LLNotifications::instance().forceResponse(params, 0);
2768 } 2755 }
2769} 2756}
2770 2757
2771// static 2758// static
2772void LLSelectMgr::confirmDelete(S32 option, void* data) 2759bool LLSelectMgr::confirmDelete(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle handle)
2773{ 2760{
2774 LLObjectSelectionHandle handle = *(LLObjectSelectionHandle*)data; 2761 S32 option = LLNotification::getSelectedOption(notification, response);
2775 delete (LLObjectSelectionHandle*)data;
2776
2777 if (!handle->getObjectCount()) 2762 if (!handle->getObjectCount())
2778 { 2763 {
2779 llwarns << "Nothing to delete!" << llendl; 2764 llwarns << "Nothing to delete!" << llendl;
2780 return; 2765 return false;
2781 } 2766 }
2782 2767
2783 switch(option) 2768 switch(option)
@@ -2816,6 +2801,7 @@ void LLSelectMgr::confirmDelete(S32 option, void* data)
2816 default: 2801 default:
2817 break; 2802 break;
2818 } 2803 }
2804 return false;
2819} 2805}
2820 2806
2821 2807
@@ -5426,6 +5412,11 @@ void dialog_refresh_all()
5426 gPieObject->arrange(); 5412 gPieObject->arrange();
5427 } 5413 }
5428 5414
5415 if( gPieAttachment->getVisible() )
5416 {
5417 gPieAttachment->arrange();
5418 }
5419
5429 LLFloaterProperties::dirtyAll(); 5420 LLFloaterProperties::dirtyAll();
5430 LLFloaterInspect::dirty(); 5421 LLFloaterInspect::dirty();
5431} 5422}