aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:27 -0500
committerJacek Antonelli2008-08-15 23:45:27 -0500
commita8a62201ba762e98dff92cf49033e577fc34d8d4 (patch)
tree11f8513c5cdc222f2fac0c93eb724c089803c200 /linden/indra/newview/llviewermenu.cpp
parentSecond Life viewer sources 1.18.6.4-RC (diff)
downloadmeta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.zip
meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.gz
meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.bz2
meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.xz
Second Life viewer sources 1.19.0.0
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewermenu.cpp59
1 files changed, 44 insertions, 15 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index d48d5ed..18bdaad 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -12,12 +12,12 @@
12 * ("GPL"), unless you have obtained a separate licensing agreement 12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of 13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or 14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlife.com/developers/opensource/gplv2 15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 * 16 *
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://secondlife.com/developers/opensource/flossexception 20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 21 *
22 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
@@ -60,7 +60,6 @@
60#include "lltimer.h" 60#include "lltimer.h"
61#include "llvfile.h" 61#include "llvfile.h"
62#include "llvolumemgr.h" 62#include "llvolumemgr.h"
63#include "llwindow.h" // for shell_open()
64 63
65// newview includes 64// newview includes
66#include "llagent.h" 65#include "llagent.h"
@@ -105,7 +104,6 @@
105#include "llfloatergroupinvite.h" 104#include "llfloatergroupinvite.h"
106#include "llfloatergroups.h" 105#include "llfloatergroups.h"
107#include "llfloaterhtml.h" 106#include "llfloaterhtml.h"
108#include "llfloaterhtmlhelp.h"
109#include "llfloaterinspect.h" 107#include "llfloaterinspect.h"
110#include "llfloaterlagmeter.h" 108#include "llfloaterlagmeter.h"
111#include "llfloaterland.h" 109#include "llfloaterland.h"
@@ -2113,7 +2111,7 @@ class LLObjectMute : public view_listener_t
2113 else 2111 else
2114 { 2112 {
2115 gMuteListp->add(mute); 2113 gMuteListp->add(mute);
2116 gFloaterMute->show(); 2114 LLFloaterMute::showInstance();
2117 } 2115 }
2118 2116
2119 return true; 2117 return true;
@@ -5279,7 +5277,7 @@ class LLShowFloater : public view_listener_t
5279 { 5277 {
5280 if (gAgent.getWearablesLoaded()) 5278 if (gAgent.getWearablesLoaded())
5281 { 5279 {
5282 gAgent.changeCameraToCustomizeAvatar(); 5280 gAgent.changeCameraToCustomizeAvatar(gSavedSettings.getBOOL("AppearanceCameraMovement"));
5283 } 5281 }
5284 } 5282 }
5285 else if (floater_name == "friends") 5283 else if (floater_name == "friends")
@@ -5308,7 +5306,7 @@ class LLShowFloater : public view_listener_t
5308 } 5306 }
5309 else if (floater_name == "mute list") 5307 else if (floater_name == "mute list")
5310 { 5308 {
5311 LLFloaterMute::toggle(NULL); 5309 LLFloaterMute::toggleInstance();
5312 } 5310 }
5313 else if (floater_name == "camera controls") 5311 else if (floater_name == "camera controls")
5314 { 5312 {
@@ -5354,7 +5352,7 @@ class LLShowFloater : public view_listener_t
5354 } 5352 }
5355 else if (floater_name == "about region") 5353 else if (floater_name == "about region")
5356 { 5354 {
5357 LLFloaterRegionInfo::show((void *)NULL); 5355 LLFloaterRegionInfo::showInstance();
5358 } 5356 }
5359 else if (floater_name == "grid options") 5357 else if (floater_name == "grid options")
5360 { 5358 {
@@ -5373,13 +5371,17 @@ class LLShowFloater : public view_listener_t
5373 else if (floater_name == "help in-world") 5371 else if (floater_name == "help in-world")
5374 { 5372 {
5375#if LL_LIBXUL_ENABLED 5373#if LL_LIBXUL_ENABLED
5376 LLFloaterHtml::getInstance()->show( "in-world_help" ); 5374 const bool open_app_slurls = true;
5375 LLFloaterHtml::getInstance()->show(
5376 "in-world_help", open_app_slurls );
5377#endif 5377#endif
5378 } 5378 }
5379 else if (floater_name == "help additional") 5379 else if (floater_name == "help additional")
5380 { 5380 {
5381#if LL_LIBXUL_ENABLED 5381#if LL_LIBXUL_ENABLED
5382 LLFloaterHtml::getInstance()->show( "additional_help" ); 5382 const bool open_app_slurls = true;
5383 LLFloaterHtml::getInstance()->show(
5384 "additional_help", open_app_slurls );
5383#endif 5385#endif
5384 } 5386 }
5385 else if (floater_name == "complaint reporter") 5387 else if (floater_name == "complaint reporter")
@@ -5446,7 +5448,7 @@ class LLFloaterVisible : public view_listener_t
5446 } 5448 }
5447 else if (floater_name == "mute list") 5449 else if (floater_name == "mute list")
5448 { 5450 {
5449 new_value = LLFloaterMute::visible(NULL); 5451 new_value = LLFloaterMute::instanceVisible();
5450 } 5452 }
5451 else if (floater_name == "camera controls") 5453 else if (floater_name == "camera controls")
5452 { 5454 {
@@ -6051,12 +6053,39 @@ BOOL object_selected_and_point_valid(void *user_data)
6051 (selection->getFirstRootObject()->getNVPair("AssetContainer") == NULL); 6053 (selection->getFirstRootObject()->getNVPair("AssetContainer") == NULL);
6052} 6054}
6053 6055
6056
6057BOOL object_is_wearable()
6058{
6059 if (!object_selected_and_point_valid(NULL))
6060 {
6061 return FALSE;
6062 }
6063 if (sitting_on_selection())
6064 {
6065 return FALSE;
6066 }
6067 LLObjectSelectionHandle selection = gSelectMgr->getSelection();
6068 for (LLObjectSelection::valid_root_iterator iter = gSelectMgr->getSelection()->valid_root_begin();
6069 iter != gSelectMgr->getSelection()->valid_root_end(); iter++)
6070 {
6071 LLSelectNode* node = *iter;
6072 if (node->mPermissions->getOwner() == gAgent.getID())
6073 {
6074 return TRUE;
6075 }
6076 }
6077 return FALSE;
6078}
6079
6080
6054// Also for seeing if object can be attached. See above. 6081// Also for seeing if object can be attached. See above.
6055class LLObjectEnableWear : public view_listener_t 6082class LLObjectEnableWear : public view_listener_t
6056{ 6083{
6057 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 6084 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
6058 { 6085 {
6059 return object_selected_and_point_valid(NULL); 6086 bool is_wearable = object_selected_and_point_valid(NULL);
6087 gMenuHolder->findControl(userdata["control"].asString())->setValue(is_wearable);
6088 return TRUE;
6060 } 6089 }
6061}; 6090};
6062 6091
@@ -6931,13 +6960,12 @@ void handle_grab_texture(void* data)
6931 if(view) 6960 if(view)
6932 { 6961 {
6933 LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus(); 6962 LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus();
6934 LLFocusMgr::FocusLostCallback callback = gFocusMgr.getFocusCallback();
6935 6963
6936 view->getPanel()->setSelection(item_id, TAKE_FOCUS_NO); 6964 view->getPanel()->setSelection(item_id, TAKE_FOCUS_NO);
6937 view->getPanel()->openSelected(); 6965 view->getPanel()->openSelected();
6938 //LLInventoryView::dumpSelectionInformation((void*)view); 6966 //LLInventoryView::dumpSelectionInformation((void*)view);
6939 // restore keyboard focus 6967 // restore keyboard focus
6940 gFocusMgr.setKeyboardFocus(focus_ctrl, callback); 6968 gFocusMgr.setKeyboardFocus(focus_ctrl);
6941 } 6969 }
6942 } 6970 }
6943 else 6971 else
@@ -7135,7 +7163,8 @@ void handle_load_from_xml(void*)
7135 7163
7136void handle_slurl_test(void*) 7164void handle_slurl_test(void*)
7137{ 7165{
7138 LLFloaterHtml::getInstance()->show("http://secondlife.com/app/search/slurls.html", "SLURL Test"); 7166 LLFloaterHtml::getInstance()->show(
7167 "http://secondlife.com/app/search/slurls.html", "SLURL Test", true);
7139} 7168}
7140 7169
7141void handle_rebake_textures(void*) 7170void handle_rebake_textures(void*)