aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--linden/indra/newview/llviewermenu.cpp58
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/notifications.xml14
2 files changed, 70 insertions, 2 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 7f45751..594694d 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -334,6 +334,7 @@ void label_sit_or_stand(std::string& label, void*);
334BOOL enable_take(); 334BOOL enable_take();
335void handle_take(); 335void handle_take();
336bool confirm_take(const LLSD& notification, const LLSD& response); 336bool confirm_take(const LLSD& notification, const LLSD& response);
337bool confirm_derender_callback(const LLSD& notification, const LLSD& response);
337BOOL enable_buy(void*); 338BOOL enable_buy(void*);
338void handle_buy(void *); 339void handle_buy(void *);
339void handle_buy_object(LLSaleInfo sale_info); 340void handle_buy_object(LLSaleInfo sale_info);
@@ -2071,6 +2072,59 @@ class LLObjectDerender : public view_listener_t
2071 id = root_key; 2072 id = root_key;
2072 //LLSelectMgr::getInstance()->removeObjectFromSelections(root_key); 2073 //LLSelectMgr::getInstance()->removeObjectFromSelections(root_key);
2073 } 2074 }
2075
2076 LLSD payload;
2077 payload["id"] = id;
2078
2079 // There REALLY needs to be a better (aka centralized) way to get this info
2080 LLSD args;
2081 std::string name;
2082 LLViewerObject *objectp = gObjectList.findObject(id);
2083 if (objectp)
2084 {
2085 if (objectp->isAvatar())
2086 {
2087 LLNameValue* firstname = objectp->getNVPair("FirstName");
2088 LLNameValue* lastname = objectp->getNVPair("LastName");
2089 if (firstname && lastname)
2090 {
2091 name.append(firstname->getString());
2092 name.append(1, ' ');
2093 name.append(lastname->getString());
2094 }
2095 else
2096 {
2097 name.append(LLTrans::getString("TooltipPerson"));
2098 }
2099 }
2100 else
2101 {
2102 LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
2103 if (node)
2104 {
2105 name.append(node->mName);
2106 }
2107 else
2108 {
2109 name.append(LLTrans::getString("TooltipNoName"));
2110 }
2111 }
2112 }
2113 args["NAME"] = name;
2114
2115 LLNotifications::instance().add("ConfirmDerender", args, payload, &confirm_derender_callback);
2116
2117 return true;
2118 }
2119};
2120
2121bool confirm_derender_callback(const LLSD& notification, const LLSD& response)
2122{
2123 LLUUID id = notification["payload"]["id"].asUUID();
2124
2125 S32 option = LLNotification::getSelectedOption(notification, response);
2126 if (option == 0)
2127 {
2074 LLSelectMgr::getInstance()->removeObjectFromSelections(id); 2128 LLSelectMgr::getInstance()->removeObjectFromSelections(id);
2075 2129
2076 // ...don't kill the avatar 2130 // ...don't kill the avatar
@@ -2082,9 +2136,9 @@ class LLObjectDerender : public view_listener_t
2082 gObjectList.killObject(objectp); 2136 gObjectList.killObject(objectp);
2083 } 2137 }
2084 } 2138 }
2085 return true;
2086 } 2139 }
2087}; 2140 return false;
2141}
2088 2142
2089 2143
2090//--------------------------------------------------------------------------- 2144//---------------------------------------------------------------------------
diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
index c59d713..8eb2233 100644
--- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
@@ -6754,6 +6754,20 @@ Are you sure you want to move here?
6754</notification> 6754</notification>
6755 6755
6756<notification 6756<notification
6757 icon="alert.tga"
6758 name="ConfirmDerender"
6759 type="alert">
6760Are you sure you want to derender [NAME]?
6761
6762[NAME] will be hidden until you exit the region.
6763 <usetemplate
6764 ignoretext="When using derender"
6765 name="okcancelignore"
6766 notext="Cancel"
6767 yestext="Derender"/>
6768</notification>
6769
6770<notification
6757 icon="alertmodal.tga" 6771 icon="alertmodal.tga"
6758 name="ConfirmDoubleClickTP" 6772 name="ConfirmDoubleClickTP"
6759 type="alertmodal"> 6773 type="alertmodal">