aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewermenu.cpp46
1 files changed, 37 insertions, 9 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 314fc94..3d3399a 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -457,6 +457,7 @@ void dump_inventory(void*);
457void edit_ui(void*); 457void edit_ui(void*);
458void toggle_visibility(void*); 458void toggle_visibility(void*);
459BOOL get_visibility(void*); 459BOOL get_visibility(void*);
460void reload_linden_balance(void*);
460 461
461// Avatar Pie menu 462// Avatar Pie menu
462void request_friendship(const LLUUID& agent_id); 463void request_friendship(const LLUUID& agent_id);
@@ -678,6 +679,8 @@ void init_menus()
678 gMenuHolder->childSetLabelArg("ImportUpload", "[UPLOADFEE]", fee); 679 gMenuHolder->childSetLabelArg("ImportUpload", "[UPLOADFEE]", fee);
679 gMenuHolder->childSetLabelArg("Buy and Sell L$...", "[CURRENCY]", 680 gMenuHolder->childSetLabelArg("Buy and Sell L$...", "[CURRENCY]",
680 gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); 681 gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
682 gMenuHolder->childSetLabelArg("Reload Balance", "[CURRENCY]",
683 gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
681 684
682 gAFKMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Away", TRUE); 685 gAFKMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Away", TRUE);
683 gBusyMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Busy", TRUE); 686 gBusyMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Busy", TRUE);
@@ -1068,6 +1071,7 @@ void init_debug_ui_menu(LLMenuGL* menu)
1068{ 1071{
1069 menu->append(new LLMenuItemCheckGL("Use default system color picker", menu_toggle_control, NULL, menu_check_control, (void*)"UseDefaultColorPicker")); 1072 menu->append(new LLMenuItemCheckGL("Use default system color picker", menu_toggle_control, NULL, menu_check_control, (void*)"UseDefaultColorPicker"));
1070 menu->append(new LLMenuItemCheckGL("Show search panel in overlay bar", menu_toggle_control, NULL, menu_check_control, (void*)"ShowSearchBar")); 1073 menu->append(new LLMenuItemCheckGL("Show search panel in overlay bar", menu_toggle_control, NULL, menu_check_control, (void*)"ShowSearchBar"));
1074 menu->append(new LLMenuItemCallGL("Reload L$ balance", &reload_linden_balance, NULL, NULL, 'B', MASK_CONTROL | MASK_ALT));
1071 menu->appendSeparator(); 1075 menu->appendSeparator();
1072 1076
1073 menu->append(new LLMenuItemCallGL("Web Browser Test", &handle_web_browser_test)); 1077 menu->append(new LLMenuItemCallGL("Web Browser Test", &handle_web_browser_test));
@@ -1569,6 +1573,7 @@ void cleanup_menus()
1569{ 1573{
1570 LL_DEBUGS("AFK") << "cleanup_menus start" << LL_ENDL; 1574 LL_DEBUGS("AFK") << "cleanup_menus start" << LL_ENDL;
1571 sMenus.clear(); 1575 sMenus.clear();
1576 LLMenuGL::sMenuContainer = NULL;
1572 1577
1573 delete gMenuParcelObserver; 1578 delete gMenuParcelObserver;
1574 gMenuParcelObserver = NULL; 1579 gMenuParcelObserver = NULL;
@@ -2585,9 +2590,9 @@ bool handle_go_to_callback(const LLSD& notification, const LLSD& response)
2585 2590
2586 if (action == "teleport") 2591 if (action == "teleport")
2587 { 2592 {
2588 LLVector3d hips_offset(0.0f, 0.0f, 1.2f); 2593 pos.mdV[VZ] += gAgent.getAvatarObject()->getPelvisToFoot() + 0.2f;
2589 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); 2594 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
2590 gAgent.teleportViaLocation(pos + hips_offset); 2595 gAgent.teleportViaLocationLookAt(pos);
2591 } 2596 }
2592 else if (action == "move") 2597 else if (action == "move")
2593 { 2598 {
@@ -5840,6 +5845,11 @@ class LLObjectEnableSitOrStand : public view_listener_t
5840 } 5845 }
5841}; 5846};
5842 5847
5848void reload_linden_balance(void*)
5849{
5850 LLStatusBar::sendMoneyBalanceRequest();
5851}
5852
5843void edit_ui(void*) 5853void edit_ui(void*)
5844{ 5854{
5845 LLFloater::setEditModeEnabled(!LLFloater::getEditModeEnabled()); 5855 LLFloater::setEditModeEnabled(!LLFloater::getEditModeEnabled());
@@ -7147,11 +7157,16 @@ void handle_test_female(void*)
7147 7157
7148void handle_toggle_pg(void*) 7158void handle_toggle_pg(void*)
7149{ 7159{
7150 gAgent.setTeen( !gAgent.isTeen() ); 7160 if(gSavedSettings.getBOOL("ToggleTeenMode"))
7151 7161 {
7152 LLFloaterWorldMap::reloadIcons(NULL); 7162 gAgent.setTeen( !gAgent.isTeen() );
7153 7163 LLFloaterWorldMap::reloadIcons(NULL);
7154 llinfos << "PG status set to " << (S32)gAgent.isTeen() << llendl; 7164 llinfos << "PG status set to " << (S32)gAgent.isTeen() << llendl;
7165 }
7166 else
7167 {
7168 llinfos << "Teen mode cannot be toggled on this region" << llendl;
7169 }
7155} 7170}
7156 7171
7157void handle_dump_attachments(void*) 7172void handle_dump_attachments(void*)
@@ -7514,7 +7529,9 @@ class LLViewEnableMouselook : public view_listener_t
7514 { 7529 {
7515 // You can't go directly from customize avatar to mouselook. 7530 // You can't go directly from customize avatar to mouselook.
7516 // TODO: write code with appropriate dialogs to handle this transition. 7531 // TODO: write code with appropriate dialogs to handle this transition.
7517 bool new_value = (CAMERA_MODE_CUSTOMIZE_AVATAR != gAgent.getCameraMode() && !gSavedSettings.getBOOL("FreezeTime")); 7532 static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true);
7533
7534 bool new_value = (CAMERA_MODE_CUSTOMIZE_AVATAR != gAgent.getCameraMode() && !(*sFreezeTime));
7518 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); 7535 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
7519 return true; 7536 return true;
7520 } 7537 }
@@ -9463,7 +9480,17 @@ class LLAdvancedToggleEditableUI : public view_listener_t
9463// become a menu_item_check. Need to add check_edit_ui(void*) 9480// become a menu_item_check. Need to add check_edit_ui(void*)
9464// or functional equivalent to do that. 9481// or functional equivalent to do that.
9465 9482
9466 9483/////////////////////
9484// Reload L$ balance //
9485/////////////////////
9486class LLAdvancedReloadBalance : public view_listener_t
9487{
9488 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
9489 {
9490 reload_linden_balance(NULL);
9491 return true;
9492 }
9493};
9467 9494
9468///////////////////// 9495/////////////////////
9469// DUMP SELECT MGR // 9496// DUMP SELECT MGR //
@@ -11280,6 +11307,7 @@ void initialize_menus()
11280 // Advanced > UI 11307 // Advanced > UI
11281 addMenu(new LLAdvancedWebBrowserTest(), "Advanced.WebBrowserTest"); 11308 addMenu(new LLAdvancedWebBrowserTest(), "Advanced.WebBrowserTest");
11282 addMenu(new LLAdvancedToggleEditableUI(), "Advanced.ToggleEditableUI"); 11309 addMenu(new LLAdvancedToggleEditableUI(), "Advanced.ToggleEditableUI");
11310 addMenu(new LLAdvancedReloadBalance(), "Advanced.ReloadBalance");
11283 //addMenu(new LLAdvancedCheckEditableUI(), "Advanced.CheckEditableUI"); 11311 //addMenu(new LLAdvancedCheckEditableUI(), "Advanced.CheckEditableUI");
11284 addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr"); 11312 addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr");
11285 addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory"); 11313 addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory");