diff options
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 65 |
1 files changed, 34 insertions, 31 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 2f9cc3acff..d77b09fb31 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -53,7 +53,6 @@ #include "llconsole.h" #include "lldebugview.h" #include "llenvironment.h" -#include "llfacebookconnect.h" #include "llfilepicker.h" #include "llfirstuse.h" #include "llfloaterabout.h" @@ -4063,10 +4062,8 @@ void near_sit_down_point(BOOL success, void *) if (success) { gAgent.setFlying(FALSE); + gAgent.clearControlFlags(AGENT_CONTROL_STAND_UP); // might have been set by autopilot gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); - - // Might be first sit - //LLFirstUse::useSit(); } } @@ -4751,6 +4748,12 @@ void handle_take() category_id.setNull(); } + // check inbox + const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX); + if (category_id == inbox_id || gInventory.isObjectDescendentOf(category_id, inbox_id)) + { + category_id.setNull(); + } } } if(category_id.isNull()) @@ -8541,44 +8544,44 @@ class LLWorldEnvSettings : public view_listener_t LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); LLEnvironment::instance().updateEnvironment(); defocusEnvFloaters(); - } + } else if (event_name == "sunset") { LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_SUNSET); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); LLEnvironment::instance().updateEnvironment(); defocusEnvFloaters(); - } + } else if (event_name == "midnight") { LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_MIDNIGHT); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); LLEnvironment::instance().updateEnvironment(); defocusEnvFloaters(); - } + } else if (event_name == "region") { LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_LOCAL); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); LLEnvironment::instance().updateEnvironment(); defocusEnvFloaters(); - } + } else if (event_name == "pause_clouds") { if (LLEnvironment::instance().isCloudScrollPaused()) LLEnvironment::instance().resumeCloudScroll(); - else + else LLEnvironment::instance().pauseCloudScroll(); } else if (event_name == "adjust_tool") - { + { LLFloaterReg::showInstance("env_adjust_snapshot"); } else if (event_name == "my_environs") { LLFloaterReg::showInstance("my_environments"); - } - + } + return true; } }; @@ -8591,9 +8594,9 @@ class LLWorldEnableEnvSettings : public view_listener_t std::string event_name = userdata.asString(); if (event_name == "pause_clouds") - { + { return LLEnvironment::instance().isCloudScrollPaused(); - } + } LLSettingsSky::ptr_t sky = LLEnvironment::instance().getEnvironmentFixedSky(LLEnvironment::ENV_LOCAL); @@ -8606,27 +8609,27 @@ class LLWorldEnableEnvSettings : public view_listener_t LLUUID skyid = (sky) ? sky->getAssetId() : LLUUID::null; if (event_name == "sunrise") - { + { result = (skyid == LLEnvironment::KNOWN_SKY_SUNRISE); - } + } else if (event_name == "noon") - { + { result = (skyid == LLEnvironment::KNOWN_SKY_MIDDAY); - } + } else if (event_name == "sunset") - { + { result = (skyid == LLEnvironment::KNOWN_SKY_SUNSET); - } + } else if (event_name == "midnight") - { + { result = (skyid == LLEnvironment::KNOWN_SKY_MIDNIGHT); - } + } else if (event_name == "region") - { - return false; - } - else - { + { + return false; + } + else + { LL_WARNS() << "Unknown time-of-day item: " << event_name << LL_ENDL; } return result; @@ -8646,15 +8649,15 @@ class LLWorldEnvPreset : public view_listener_t else if (item == "edit_water") { LLFloaterReg::showInstance("env_fixed_environmentent_water", "edit"); - } + } else if (item == "new_sky") { LLFloaterReg::showInstance("env_fixed_environmentent_sky", "new"); - } + } else if (item == "edit_sky") { LLFloaterReg::showInstance("env_fixed_environmentent_sky", "edit"); - } + } else if (item == "new_day_cycle") { LLFloaterReg::showInstance("env_edit_extdaycycle", LLSDMap("edit_context", "inventory")); @@ -9242,7 +9245,7 @@ void initialize_menus() enable.add("Object.EnableOpen", boost::bind(&enable_object_open)); enable.add("Object.EnableTouch", boost::bind(&enable_object_touch, _1)); enable.add("Object.EnableDelete", boost::bind(&enable_object_delete)); - enable.add("Object.EnableWear", boost::bind(&object_selected_and_point_valid)); + enable.add("Object.EnableWear", boost::bind(&object_is_wearable)); enable.add("Object.EnableStandUp", boost::bind(&enable_object_stand_up)); enable.add("Object.EnableSit", boost::bind(&enable_object_sit, _1)); |