diff options
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 568 |
1 files changed, 180 insertions, 388 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 486e4f1..864c6f5 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2002-2008, Linden Research, Inc. | 7 | * Copyright (c) 2002-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -85,6 +85,7 @@ | |||
85 | #include "llfloateranimpreview.h" | 85 | #include "llfloateranimpreview.h" |
86 | #include "llfloateravatarinfo.h" | 86 | #include "llfloateravatarinfo.h" |
87 | #include "llfloateravatartextures.h" | 87 | #include "llfloateravatartextures.h" |
88 | #include "llfloaterbeacons.h" | ||
88 | #include "llfloaterbuildoptions.h" | 89 | #include "llfloaterbuildoptions.h" |
89 | #include "llfloaterbulkpermission.h" | 90 | #include "llfloaterbulkpermission.h" |
90 | #include "llfloaterbump.h" | 91 | #include "llfloaterbump.h" |
@@ -323,13 +324,6 @@ void handle_talk_to(void *userdata); | |||
323 | // Debug menu | 324 | // Debug menu |
324 | void show_permissions_control(void*); | 325 | void show_permissions_control(void*); |
325 | void toggle_build_options(void* user_data); | 326 | void toggle_build_options(void* user_data); |
326 | #if 0 // Unused | ||
327 | void handle_audio_status_1(void*); | ||
328 | void handle_audio_status_2(void*); | ||
329 | void handle_audio_status_3(void*); | ||
330 | void handle_audio_status_4(void*); | ||
331 | #endif | ||
332 | void manage_landmarks(void*); | ||
333 | void reload_ui(void*); | 327 | void reload_ui(void*); |
334 | void handle_agent_stop_moving(void*); | 328 | void handle_agent_stop_moving(void*); |
335 | void print_packets_lost(void*); | 329 | void print_packets_lost(void*); |
@@ -409,6 +403,7 @@ void force_error_llerror(void *); | |||
409 | void force_error_bad_memory_access(void *); | 403 | void force_error_bad_memory_access(void *); |
410 | void force_error_infinite_loop(void *); | 404 | void force_error_infinite_loop(void *); |
411 | void force_error_software_exception(void *); | 405 | void force_error_software_exception(void *); |
406 | void force_error_driver_crash(void *); | ||
412 | 407 | ||
413 | void handle_stopall(void*); | 408 | void handle_stopall(void*); |
414 | //void handle_hinge(void*); | 409 | //void handle_hinge(void*); |
@@ -935,6 +930,8 @@ void init_client_menu(LLMenuGL* menu) | |||
935 | sub->append(new LLMenuItemCallGL("Force LLError And Crash", &force_error_llerror)); | 930 | sub->append(new LLMenuItemCallGL("Force LLError And Crash", &force_error_llerror)); |
936 | sub->append(new LLMenuItemCallGL("Force Bad Memory Access", &force_error_bad_memory_access)); | 931 | sub->append(new LLMenuItemCallGL("Force Bad Memory Access", &force_error_bad_memory_access)); |
937 | sub->append(new LLMenuItemCallGL("Force Infinite Loop", &force_error_infinite_loop)); | 932 | sub->append(new LLMenuItemCallGL("Force Infinite Loop", &force_error_infinite_loop)); |
933 | sub->append(new LLMenuItemCallGL("Force Driver Crash", &force_error_driver_crash)); | ||
934 | sub->append(new LLMenuItemCallGL("Force Disconnect Viewer", &handle_disconnect_viewer)); | ||
938 | // *NOTE:Mani this isn't handled yet... sub->append(new LLMenuItemCallGL("Force Software Exception", &force_error_unhandled_exception)); | 935 | // *NOTE:Mani this isn't handled yet... sub->append(new LLMenuItemCallGL("Force Software Exception", &force_error_unhandled_exception)); |
939 | sub->createJumpKeys(); | 936 | sub->createJumpKeys(); |
940 | menu->appendMenu(sub); | 937 | menu->appendMenu(sub); |
@@ -1018,7 +1015,6 @@ void init_debug_ui_menu(LLMenuGL* menu) | |||
1018 | { | 1015 | { |
1019 | menu->append(new LLMenuItemCallGL("SLURL Test", &handle_slurl_test)); | 1016 | menu->append(new LLMenuItemCallGL("SLURL Test", &handle_slurl_test)); |
1020 | menu->append(new LLMenuItemCallGL("Editable UI", &edit_ui)); | 1017 | menu->append(new LLMenuItemCallGL("Editable UI", &edit_ui)); |
1021 | menu->append(new LLMenuItemToggleGL("Async Keystrokes", &gHandleKeysAsync)); | ||
1022 | menu->append(new LLMenuItemCallGL( "Dump SelectMgr", &dump_select_mgr)); | 1018 | menu->append(new LLMenuItemCallGL( "Dump SelectMgr", &dump_select_mgr)); |
1023 | menu->append(new LLMenuItemCallGL( "Dump Inventory", &dump_inventory)); | 1019 | menu->append(new LLMenuItemCallGL( "Dump Inventory", &dump_inventory)); |
1024 | menu->append(new LLMenuItemCallGL( "Dump Focus Holder", &handle_dump_focus, NULL, NULL, 'F', MASK_ALT | MASK_CONTROL)); | 1020 | menu->append(new LLMenuItemCallGL( "Dump Focus Holder", &handle_dump_focus, NULL, NULL, 'F', MASK_ALT | MASK_CONTROL)); |
@@ -1149,10 +1145,6 @@ void init_debug_rendering_menu(LLMenuGL* menu) | |||
1149 | &LLPipeline::toggleRenderDebugFeature, NULL, | 1145 | &LLPipeline::toggleRenderDebugFeature, NULL, |
1150 | &LLPipeline::toggleRenderDebugFeatureControl, | 1146 | &LLPipeline::toggleRenderDebugFeatureControl, |
1151 | (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOG, KEY_F6, MASK_ALT|MASK_CONTROL)); | 1147 | (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOG, KEY_F6, MASK_ALT|MASK_CONTROL)); |
1152 | sub_menu->append(new LLMenuItemCheckGL("Palletized Textures", | ||
1153 | &LLPipeline::toggleRenderDebugFeature, NULL, | ||
1154 | &LLPipeline::toggleRenderDebugFeatureControl, | ||
1155 | (void*)LLPipeline::RENDER_DEBUG_FEATURE_PALETTE, KEY_F7, MASK_ALT|MASK_CONTROL)); | ||
1156 | sub_menu->append(new LLMenuItemCheckGL("Test FRInfo", | 1148 | sub_menu->append(new LLMenuItemCheckGL("Test FRInfo", |
1157 | &LLPipeline::toggleRenderDebugFeature, NULL, | 1149 | &LLPipeline::toggleRenderDebugFeature, NULL, |
1158 | &LLPipeline::toggleRenderDebugFeatureControl, | 1150 | &LLPipeline::toggleRenderDebugFeatureControl, |
@@ -1203,9 +1195,6 @@ void init_debug_rendering_menu(LLMenuGL* menu) | |||
1203 | sub_menu->append(new LLMenuItemCheckGL("Face Area (sqrt(A))",&LLPipeline::toggleRenderDebug, NULL, | 1195 | sub_menu->append(new LLMenuItemCheckGL("Face Area (sqrt(A))",&LLPipeline::toggleRenderDebug, NULL, |
1204 | &LLPipeline::toggleRenderDebugControl, | 1196 | &LLPipeline::toggleRenderDebugControl, |
1205 | (void*)LLPipeline::RENDER_DEBUG_FACE_AREA)); | 1197 | (void*)LLPipeline::RENDER_DEBUG_FACE_AREA)); |
1206 | sub_menu->append(new LLMenuItemCheckGL("Pick Render", &LLPipeline::toggleRenderDebug, NULL, | ||
1207 | &LLPipeline::toggleRenderDebugControl, | ||
1208 | (void*)LLPipeline::RENDER_DEBUG_PICKING)); | ||
1209 | sub_menu->append(new LLMenuItemCheckGL("Lights", &LLPipeline::toggleRenderDebug, NULL, | 1198 | sub_menu->append(new LLMenuItemCheckGL("Lights", &LLPipeline::toggleRenderDebug, NULL, |
1210 | &LLPipeline::toggleRenderDebugControl, | 1199 | &LLPipeline::toggleRenderDebugControl, |
1211 | (void*)LLPipeline::RENDER_DEBUG_LIGHTS)); | 1200 | (void*)LLPipeline::RENDER_DEBUG_LIGHTS)); |
@@ -1224,9 +1213,7 @@ void init_debug_rendering_menu(LLMenuGL* menu) | |||
1224 | sub_menu->append(new LLMenuItemCheckGL("Sculpt", &LLPipeline::toggleRenderDebug, NULL, | 1213 | sub_menu->append(new LLMenuItemCheckGL("Sculpt", &LLPipeline::toggleRenderDebug, NULL, |
1225 | &LLPipeline::toggleRenderDebugControl, | 1214 | &LLPipeline::toggleRenderDebugControl, |
1226 | (void*)LLPipeline::RENDER_DEBUG_SCULPTED)); | 1215 | (void*)LLPipeline::RENDER_DEBUG_SCULPTED)); |
1227 | 1216 | ||
1228 | sub_menu->append(new LLMenuItemToggleGL("Show Select Buffer", &gDebugSelect)); | ||
1229 | |||
1230 | sub_menu->append(new LLMenuItemCallGL("Vectorize Perf Test", &run_vectorize_perf_test)); | 1217 | sub_menu->append(new LLMenuItemCallGL("Vectorize Perf Test", &run_vectorize_perf_test)); |
1231 | 1218 | ||
1232 | sub_menu = new LLMenuGL("Render Tests"); | 1219 | sub_menu = new LLMenuGL("Render Tests"); |
@@ -1771,6 +1758,23 @@ class LLViewCheckJoystickFlycam : public view_listener_t | |||
1771 | } | 1758 | } |
1772 | }; | 1759 | }; |
1773 | 1760 | ||
1761 | class LLViewCommunicate : public view_listener_t | ||
1762 | { | ||
1763 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
1764 | { | ||
1765 | if (LLFloaterChatterBox::getInstance()->getFloaterCount() == 0) | ||
1766 | { | ||
1767 | LLFloaterMyFriends::toggleInstance(); | ||
1768 | } | ||
1769 | else | ||
1770 | { | ||
1771 | LLFloaterChatterBox::toggleInstance(); | ||
1772 | } | ||
1773 | return true; | ||
1774 | } | ||
1775 | }; | ||
1776 | |||
1777 | |||
1774 | void handle_toggle_flycam() | 1778 | void handle_toggle_flycam() |
1775 | { | 1779 | { |
1776 | LLViewerJoystick::getInstance()->toggleFlycam(); | 1780 | LLViewerJoystick::getInstance()->toggleFlycam(); |
@@ -2239,37 +2243,71 @@ class LLAvatarDebug : public view_listener_t | |||
2239 | } | 2243 | } |
2240 | }; | 2244 | }; |
2241 | 2245 | ||
2246 | struct MenuCallbackData | ||
2247 | { | ||
2248 | bool ban_enabled; | ||
2249 | LLUUID avatar_id; | ||
2250 | }; | ||
2251 | |||
2242 | void callback_eject(S32 option, void* data) | 2252 | void callback_eject(S32 option, void* data) |
2243 | { | 2253 | { |
2244 | LLUUID* avatar_id = (LLUUID*) data; | 2254 | MenuCallbackData *callback_data = (MenuCallbackData*)data; |
2255 | if (!callback_data) | ||
2256 | { | ||
2257 | return; | ||
2258 | } | ||
2259 | if (2 == option) | ||
2260 | { | ||
2261 | // Cancle button. | ||
2262 | return; | ||
2263 | } | ||
2264 | LLUUID avatar_id = callback_data->avatar_id; | ||
2265 | bool ban_enabled = callback_data->ban_enabled; | ||
2245 | 2266 | ||
2246 | if (0 == option || 1 == option) | 2267 | if (0 == option) |
2247 | { | 2268 | { |
2269 | // Eject button | ||
2248 | LLMessageSystem* msg = gMessageSystem; | 2270 | LLMessageSystem* msg = gMessageSystem; |
2249 | LLViewerObject* avatar = gObjectList.findObject(*avatar_id); | 2271 | LLViewerObject* avatar = gObjectList.findObject(avatar_id); |
2250 | 2272 | ||
2251 | if (avatar) | 2273 | if (avatar) |
2252 | { | 2274 | { |
2253 | U32 flags = 0x0; | 2275 | U32 flags = 0x0; |
2254 | if (1 == option) | 2276 | msg->newMessage("EjectUser"); |
2255 | { | 2277 | msg->nextBlock("AgentData"); |
2256 | // eject and add to ban list | 2278 | msg->addUUID("AgentID", gAgent.getID() ); |
2257 | flags |= 0x1; | 2279 | msg->addUUID("SessionID", gAgent.getSessionID() ); |
2258 | } | 2280 | msg->nextBlock("Data"); |
2281 | msg->addUUID("TargetID", avatar_id ); | ||
2282 | msg->addU32("Flags", flags ); | ||
2283 | msg->sendReliable( avatar->getRegion()->getHost() ); | ||
2284 | } | ||
2285 | } | ||
2286 | else if (ban_enabled) | ||
2287 | { | ||
2288 | // This is tricky. It is similar to say if it is not an 'Eject' button, | ||
2289 | // and it is also not an 'Cancle' button, and ban_enabled==ture, | ||
2290 | // it should be the 'Eject and Ban' button. | ||
2291 | LLMessageSystem* msg = gMessageSystem; | ||
2292 | LLViewerObject* avatar = gObjectList.findObject(avatar_id); | ||
2259 | 2293 | ||
2294 | if (avatar) | ||
2295 | { | ||
2296 | U32 flags = 0x1; | ||
2260 | msg->newMessage("EjectUser"); | 2297 | msg->newMessage("EjectUser"); |
2261 | msg->nextBlock("AgentData"); | 2298 | msg->nextBlock("AgentData"); |
2262 | msg->addUUID("AgentID", gAgent.getID() ); | 2299 | msg->addUUID("AgentID", gAgent.getID() ); |
2263 | msg->addUUID("SessionID", gAgent.getSessionID() ); | 2300 | msg->addUUID("SessionID", gAgent.getSessionID() ); |
2264 | msg->nextBlock("Data"); | 2301 | msg->nextBlock("Data"); |
2265 | msg->addUUID("TargetID", *avatar_id ); | 2302 | msg->addUUID("TargetID", avatar_id ); |
2266 | msg->addU32("Flags", flags ); | 2303 | msg->addU32("Flags", flags ); |
2267 | msg->sendReliable( avatar->getRegion()->getHost() ); | 2304 | msg->sendReliable( avatar->getRegion()->getHost() ); |
2268 | } | 2305 | } |
2269 | } | 2306 | } |
2270 | 2307 | ||
2271 | delete avatar_id; | 2308 | |
2272 | avatar_id = NULL; | 2309 | delete callback_data; |
2310 | callback_data = NULL; | ||
2273 | } | 2311 | } |
2274 | 2312 | ||
2275 | class LLAvatarEject : public view_listener_t | 2313 | class LLAvatarEject : public view_listener_t |
@@ -2279,23 +2317,50 @@ class LLAvatarEject : public view_listener_t | |||
2279 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); | 2317 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); |
2280 | if( avatar ) | 2318 | if( avatar ) |
2281 | { | 2319 | { |
2282 | LLUUID* avatar_id = new LLUUID( avatar->getID() ); | 2320 | MenuCallbackData *data = new MenuCallbackData; |
2321 | (*data).avatar_id = avatar->getID(); | ||
2283 | std::string fullname = avatar->getFullname(); | 2322 | std::string fullname = avatar->getFullname(); |
2284 | 2323 | ||
2285 | if (!fullname.empty()) | 2324 | const LLVector3d& pos = avatar->getPositionGlobal(); |
2325 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->selectParcelAt(pos)->getParcel(); | ||
2326 | |||
2327 | if (LLViewerParcelMgr::getInstance()->isParcelOwnedByAgent(parcel,GP_LAND_MANAGE_BANNED)) | ||
2286 | { | 2328 | { |
2287 | LLStringUtil::format_map_t args; | 2329 | (*data).ban_enabled = true; |
2288 | args["[AVATAR_NAME]"] = fullname; | 2330 | if (!fullname.empty()) |
2289 | gViewerWindow->alertXml("EjectAvatarFullname", | 2331 | { |
2290 | args, | 2332 | LLStringUtil::format_map_t args; |
2291 | callback_eject, | 2333 | args["[AVATAR_NAME]"] = fullname; |
2292 | (void*)avatar_id); | 2334 | gViewerWindow->alertXml("EjectAvatarFullname", |
2335 | args, | ||
2336 | callback_eject, | ||
2337 | (void*)data); | ||
2338 | } | ||
2339 | else | ||
2340 | { | ||
2341 | gViewerWindow->alertXml("EjectAvatar", | ||
2342 | callback_eject, | ||
2343 | (void*)data); | ||
2344 | } | ||
2293 | } | 2345 | } |
2294 | else | 2346 | else |
2295 | { | 2347 | { |
2296 | gViewerWindow->alertXml("EjectAvatar", | 2348 | (*data).ban_enabled = false; |
2297 | callback_eject, | 2349 | if (!fullname.empty()) |
2298 | (void*)avatar_id); | 2350 | { |
2351 | LLStringUtil::format_map_t args; | ||
2352 | args["[AVATAR_NAME]"] = fullname; | ||
2353 | gViewerWindow->alertXml("EjectAvatarFullnameNoBan", | ||
2354 | args, | ||
2355 | callback_eject, | ||
2356 | (void*)data); | ||
2357 | } | ||
2358 | else | ||
2359 | { | ||
2360 | gViewerWindow->alertXml("EjectAvatarNoBan", | ||
2361 | callback_eject, | ||
2362 | (void*)data); | ||
2363 | } | ||
2299 | } | 2364 | } |
2300 | } | 2365 | } |
2301 | return true; | 2366 | return true; |
@@ -2312,12 +2377,18 @@ class LLAvatarEnableFreezeEject : public view_listener_t | |||
2312 | if (new_value) | 2377 | if (new_value) |
2313 | { | 2378 | { |
2314 | const LLVector3& pos = avatar->getPositionRegion(); | 2379 | const LLVector3& pos = avatar->getPositionRegion(); |
2380 | const LLVector3d& pos_global = avatar->getPositionGlobal(); | ||
2381 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->selectParcelAt(pos_global)->getParcel(); | ||
2315 | LLViewerRegion* region = avatar->getRegion(); | 2382 | LLViewerRegion* region = avatar->getRegion(); |
2316 | new_value = (region != NULL); | 2383 | new_value = (region != NULL); |
2317 | 2384 | ||
2318 | if (new_value) | 2385 | if (new_value) |
2319 | { | 2386 | { |
2320 | new_value = (region->isOwnedSelf(pos) || region->isOwnedGroup(pos)); | 2387 | new_value = region->isOwnedSelf(pos); |
2388 | if (!new_value || region->isOwnedGroup(pos)) | ||
2389 | { | ||
2390 | new_value = LLViewerParcelMgr::getInstance()->isParcelOwnedByAgent(parcel,GP_LAND_ADMIN); | ||
2391 | } | ||
2321 | } | 2392 | } |
2322 | } | 2393 | } |
2323 | 2394 | ||
@@ -2688,33 +2759,6 @@ void process_grant_godlike_powers(LLMessageSystem* msg, void**) | |||
2688 | } | 2759 | } |
2689 | } | 2760 | } |
2690 | 2761 | ||
2691 | void load_url_local_file(const std::string& file_name) | ||
2692 | { | ||
2693 | if( gAgent.cameraMouselook() ) | ||
2694 | { | ||
2695 | gAgent.changeCameraToDefault(); | ||
2696 | } | ||
2697 | |||
2698 | #if LL_DARWIN || LL_LINUX || LL_SOLARIS | ||
2699 | // MBW -- If the Mac client is in fullscreen mode, it needs to go windowed so the browser will be visible. | ||
2700 | if(gViewerWindow->mWindow->getFullscreen()) | ||
2701 | { | ||
2702 | gViewerWindow->toggleFullscreen(TRUE); | ||
2703 | } | ||
2704 | #endif | ||
2705 | |||
2706 | // JC - system() blocks until IE has launched. | ||
2707 | // spawn() runs asynchronously, but opens a command prompt. | ||
2708 | // ShellExecute() just opens the damn file with the default | ||
2709 | // web browser. | ||
2710 | std::string full_path = "file:///"; | ||
2711 | full_path.append(gDirUtilp->getAppRODataDir()); | ||
2712 | full_path.append(gDirUtilp->getDirDelimiter()); | ||
2713 | full_path.append(file_name); | ||
2714 | |||
2715 | LLWeb::loadURL(full_path); | ||
2716 | } | ||
2717 | |||
2718 | /* | 2762 | /* |
2719 | class LLHaveCallingcard : public LLInventoryCollectFunctor | 2763 | class LLHaveCallingcard : public LLInventoryCollectFunctor |
2720 | { | 2764 | { |
@@ -2922,63 +2966,16 @@ void show_permissions_control(void*) | |||
2922 | floaterp->mPermissions->addPermissionsData("foo3", LLUUID::null, 0); | 2966 | floaterp->mPermissions->addPermissionsData("foo3", LLUUID::null, 0); |
2923 | } | 2967 | } |
2924 | 2968 | ||
2925 | #if 0 // Unused (these just modify AudioInfoPage which is not used anywhere in the code | ||
2926 | void handle_audio_status_1(void*) | ||
2927 | { | ||
2928 | S32 page = gSavedSettings.getS32("AudioInfoPage"); | ||
2929 | if (1 == page) | ||
2930 | { | ||
2931 | page = 0; | ||
2932 | } | ||
2933 | else | ||
2934 | { | ||
2935 | page = 1; | ||
2936 | } | ||
2937 | gSavedSettings.setS32("AudioInfoPage", page); | ||
2938 | } | ||
2939 | |||
2940 | void handle_audio_status_2(void*) | ||
2941 | { | ||
2942 | S32 page = gSavedSettings.getS32("AudioInfoPage"); | ||
2943 | if (2 == page) | ||
2944 | { | ||
2945 | page = 0; | ||
2946 | } | ||
2947 | else | ||
2948 | { | ||
2949 | page = 2; | ||
2950 | } | ||
2951 | gSavedSettings.setS32("AudioInfoPage", page); | ||
2952 | } | ||
2953 | 2969 | ||
2954 | void handle_audio_status_3(void*) | 2970 | class LLCreateLandmarkCallback : public LLInventoryCallback |
2955 | { | 2971 | { |
2956 | S32 page = gSavedSettings.getS32("AudioInfoPage"); | 2972 | public: |
2957 | if (3 == page) | 2973 | /*virtual*/ void fire(const LLUUID& inv_item) |
2958 | { | ||
2959 | page = 0; | ||
2960 | } | ||
2961 | else | ||
2962 | { | ||
2963 | page = 3; | ||
2964 | } | ||
2965 | gSavedSettings.setS32("AudioInfoPage", page); | ||
2966 | } | ||
2967 | |||
2968 | void handle_audio_status_4(void*) | ||
2969 | { | ||
2970 | S32 page = gSavedSettings.getS32("AudioInfoPage"); | ||
2971 | if (4 == page) | ||
2972 | { | ||
2973 | page = 0; | ||
2974 | } | ||
2975 | else | ||
2976 | { | 2974 | { |
2977 | page = 4; | 2975 | llinfos << "Created landmark with inventory id " << inv_item |
2976 | << llendl; | ||
2978 | } | 2977 | } |
2979 | gSavedSettings.setS32("AudioInfoPage", page); | 2978 | }; |
2980 | } | ||
2981 | #endif | ||
2982 | 2979 | ||
2983 | void reload_ui(void *) | 2980 | void reload_ui(void *) |
2984 | { | 2981 | { |
@@ -3211,26 +3208,7 @@ void reset_view_final( BOOL proceed, void* ) | |||
3211 | return; | 3208 | return; |
3212 | } | 3209 | } |
3213 | 3210 | ||
3214 | gAgent.changeCameraToDefault(); | 3211 | gAgent.resetView(TRUE, TRUE); |
3215 | |||
3216 | if (LLViewerJoystick::getInstance()->getOverrideCamera()) | ||
3217 | { | ||
3218 | handle_toggle_flycam(); | ||
3219 | } | ||
3220 | |||
3221 | // reset avatar mode from eventual residual motion | ||
3222 | if (LLToolMgr::getInstance()->inBuildMode()) | ||
3223 | { | ||
3224 | LLViewerJoystick::getInstance()->moveAvatar(true); | ||
3225 | } | ||
3226 | |||
3227 | gAgent.resetView(!gFloaterTools->getVisible()); | ||
3228 | gFloaterTools->close(); | ||
3229 | |||
3230 | gViewerWindow->showCursor(); | ||
3231 | |||
3232 | // Switch back to basic toolset | ||
3233 | LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); | ||
3234 | } | 3212 | } |
3235 | 3213 | ||
3236 | class LLViewLookAtLastChatter : public view_listener_t | 3214 | class LLViewLookAtLastChatter : public view_listener_t |
@@ -4800,7 +4778,7 @@ class LLWorldCreateLandmark : public view_listener_t | |||
4800 | LLAssetType::AT_LANDMARK, | 4778 | LLAssetType::AT_LANDMARK, |
4801 | LLInventoryType::IT_LANDMARK, | 4779 | LLInventoryType::IT_LANDMARK, |
4802 | NOT_WEARABLE, PERM_ALL, | 4780 | NOT_WEARABLE, PERM_ALL, |
4803 | NULL); | 4781 | new LLCreateLandmarkCallback); |
4804 | return true; | 4782 | return true; |
4805 | } | 4783 | } |
4806 | }; | 4784 | }; |
@@ -5224,6 +5202,10 @@ class LLShowFloater : public view_listener_t | |||
5224 | { | 5202 | { |
5225 | LLFloaterMediaBrowser::toggle(); | 5203 | LLFloaterMediaBrowser::toggle(); |
5226 | } | 5204 | } |
5205 | else if (floater_name == "beacons") | ||
5206 | { | ||
5207 | LLFloaterBeacons::toggleInstance(LLSD()); | ||
5208 | } | ||
5227 | return true; | 5209 | return true; |
5228 | } | 5210 | } |
5229 | }; | 5211 | }; |
@@ -5239,6 +5221,10 @@ class LLFloaterVisible : public view_listener_t | |||
5239 | { | 5221 | { |
5240 | new_value = LLFloaterMyFriends::instanceVisible(0); | 5222 | new_value = LLFloaterMyFriends::instanceVisible(0); |
5241 | } | 5223 | } |
5224 | else if (floater_name == "communicate") | ||
5225 | { | ||
5226 | new_value = LLFloaterChatterBox::instanceVisible(); | ||
5227 | } | ||
5242 | else if (floater_name == "toolbar") | 5228 | else if (floater_name == "toolbar") |
5243 | { | 5229 | { |
5244 | new_value = LLToolBar::visible(NULL); | 5230 | new_value = LLToolBar::visible(NULL); |
@@ -5271,6 +5257,15 @@ class LLFloaterVisible : public view_listener_t | |||
5271 | { | 5257 | { |
5272 | new_value = LLFloaterActiveSpeakers::instanceVisible(LLSD()); | 5258 | new_value = LLFloaterActiveSpeakers::instanceVisible(LLSD()); |
5273 | } | 5259 | } |
5260 | else if (floater_name == "beacons") | ||
5261 | { | ||
5262 | new_value = LLFloaterBeacons::instanceVisible(LLSD()); | ||
5263 | } | ||
5264 | else if (floater_name == "inventory") | ||
5265 | { | ||
5266 | LLInventoryView* iv = LLInventoryView::getActiveInventory(); | ||
5267 | new_value = (NULL != iv && TRUE == iv->getVisible()); | ||
5268 | } | ||
5274 | gMenuHolder->findControl(control_name)->setValue(new_value); | 5269 | gMenuHolder->findControl(control_name)->setValue(new_value); |
5275 | return true; | 5270 | return true; |
5276 | } | 5271 | } |
@@ -5307,37 +5302,6 @@ class LLPromptShowURL : public view_listener_t | |||
5307 | } | 5302 | } |
5308 | }; | 5303 | }; |
5309 | 5304 | ||
5310 | void callback_show_file(S32 option, void* data) | ||
5311 | { | ||
5312 | std::string* filenamep = (std::string*)data; | ||
5313 | if (0 == option) | ||
5314 | { | ||
5315 | load_url_local_file(*filenamep); | ||
5316 | } | ||
5317 | delete filenamep; | ||
5318 | } | ||
5319 | |||
5320 | class LLPromptShowFile : public view_listener_t | ||
5321 | { | ||
5322 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
5323 | { | ||
5324 | std::string param = userdata.asString(); | ||
5325 | std::string::size_type offset = param.find(","); | ||
5326 | if (offset != param.npos) | ||
5327 | { | ||
5328 | std::string alert = param.substr(0, offset); | ||
5329 | std::string file = param.substr(offset+1); | ||
5330 | std::string* file_copy = new std::string(file); | ||
5331 | gViewerWindow->alertXml(alert, callback_show_file, file_copy); | ||
5332 | } | ||
5333 | else | ||
5334 | { | ||
5335 | llinfos << "PromptShowFile invalid parameters! Expecting \"ALERT,FILE\"." << llendl; | ||
5336 | } | ||
5337 | return true; | ||
5338 | } | ||
5339 | }; | ||
5340 | |||
5341 | class LLShowAgentProfile : public view_listener_t | 5305 | class LLShowAgentProfile : public view_listener_t |
5342 | { | 5306 | { |
5343 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 5307 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
@@ -5961,7 +5925,6 @@ namespace | |||
5961 | 5925 | ||
5962 | void queue_actions(LLFloaterScriptQueue* q, const std::string& noscriptmsg, const std::string& nomodmsg) | 5926 | void queue_actions(LLFloaterScriptQueue* q, const std::string& noscriptmsg, const std::string& nomodmsg) |
5963 | { | 5927 | { |
5964 | // Apply until an object fails | ||
5965 | QueueObjects func(q); | 5928 | QueueObjects func(q); |
5966 | LLSelectMgr *mgr = LLSelectMgr::getInstance(); | 5929 | LLSelectMgr *mgr = LLSelectMgr::getInstance(); |
5967 | LLObjectSelectionHandle selectHandle = mgr->getSelection(); | 5930 | LLObjectSelectionHandle selectHandle = mgr->getSelection(); |
@@ -5990,7 +5953,6 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& noscriptmsg, cons | |||
5990 | } | 5953 | } |
5991 | } | 5954 | } |
5992 | 5955 | ||
5993 | |||
5994 | class LLToolsSetBulkPerms : public view_listener_t | 5956 | class LLToolsSetBulkPerms : public view_listener_t |
5995 | { | 5957 | { |
5996 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 5958 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
@@ -6001,62 +5963,67 @@ class LLToolsSetBulkPerms : public view_listener_t | |||
6001 | } | 5963 | } |
6002 | }; | 5964 | }; |
6003 | 5965 | ||
5966 | void handle_compile_queue(std::string to_lang) | ||
5967 | { | ||
5968 | LLFloaterCompileQueue* queue; | ||
5969 | if (to_lang == "mono") | ||
5970 | { | ||
5971 | queue = LLFloaterCompileQueue::create(TRUE); | ||
5972 | } | ||
5973 | else | ||
5974 | { | ||
5975 | queue = LLFloaterCompileQueue::create(FALSE); | ||
5976 | } | ||
5977 | queue_actions(queue, "CannotRecompileSelectObjectsNoScripts", "CannotRecompileSelectObjectsNoPermission"); | ||
5978 | } | ||
5979 | |||
5980 | void handle_reset_selection(void) | ||
5981 | { | ||
5982 | LLFloaterResetQueue* queue = LLFloaterResetQueue::create(); | ||
5983 | queue_actions(queue, "CannotResetSelectObjectsNoScripts", "CannotResetSelectObjectsNoPermission"); | ||
5984 | } | ||
5985 | |||
5986 | void handle_set_run_selection(void) | ||
5987 | { | ||
5988 | LLFloaterRunQueue* queue = LLFloaterRunQueue::create(); | ||
5989 | queue_actions(queue, "CannotSetRunningSelectObjectsNoScripts", "CannotSerRunningSelectObjectsNoPermission"); | ||
5990 | } | ||
5991 | |||
5992 | void handle_set_not_run_selection(void) | ||
5993 | { | ||
5994 | LLFloaterNotRunQueue* queue = LLFloaterNotRunQueue::create(); | ||
5995 | queue_actions(queue, "CannotSetRunningNotSelectObjectsNoScripts", "CannotSerRunningNotSelectObjectsNoPermission"); | ||
5996 | } | ||
6004 | 5997 | ||
6005 | class LLToolsSelectedScriptAction : public view_listener_t | 5998 | class LLToolsSelectedScriptAction : public view_listener_t |
6006 | { | 5999 | { |
6007 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 6000 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
6008 | { | 6001 | { |
6009 | std::string action = userdata.asString(); | 6002 | std::string action = userdata.asString(); |
6010 | LLFloaterScriptQueue* queue = NULL; | ||
6011 | if (action == "compile mono") | 6003 | if (action == "compile mono") |
6012 | { | 6004 | { |
6013 | queue = LLFloaterCompileQueue::create(TRUE); | 6005 | handle_compile_queue("mono"); |
6014 | } | 6006 | } |
6015 | if (action == "compile lsl") | 6007 | if (action == "compile lsl") |
6016 | { | 6008 | { |
6017 | queue = LLFloaterCompileQueue::create(FALSE); | 6009 | handle_compile_queue("lsl"); |
6018 | } | 6010 | } |
6019 | else if (action == "reset") | 6011 | else if (action == "reset") |
6020 | { | 6012 | { |
6021 | queue = LLFloaterResetQueue::create(); | 6013 | handle_reset_selection(); |
6022 | } | 6014 | } |
6023 | else if (action == "start") | 6015 | else if (action == "start") |
6024 | { | 6016 | { |
6025 | queue = LLFloaterRunQueue::create(); | 6017 | handle_set_run_selection(); |
6026 | } | 6018 | } |
6027 | else if (action == "stop") | 6019 | else if (action == "stop") |
6028 | { | 6020 | { |
6029 | queue = LLFloaterNotRunQueue::create(); | 6021 | handle_set_not_run_selection(); |
6030 | } | 6022 | } |
6031 | if (!queue) | ||
6032 | { | ||
6033 | return true; | ||
6034 | } | ||
6035 | |||
6036 | queue_actions(queue, "CannotRecompileSelectObjectsNoScripts", "CannotRecompileSelectObjectsNoPermission"); | ||
6037 | |||
6038 | return true; | 6023 | return true; |
6039 | } | 6024 | } |
6040 | }; | 6025 | }; |
6041 | 6026 | ||
6042 | void handle_reset_selection(void*) | ||
6043 | { | ||
6044 | LLFloaterResetQueue* queue = LLFloaterResetQueue::create(); | ||
6045 | queue_actions(queue, "CannotResetSelectObjectsNoScripts", "CannotResetSelectObjectsNoPermission"); | ||
6046 | } | ||
6047 | |||
6048 | void handle_set_run_selection(void*) | ||
6049 | { | ||
6050 | LLFloaterRunQueue* queue = LLFloaterRunQueue::create(); | ||
6051 | queue_actions(queue, "CannotSetRunningSelectObjectsNoScripts", "CannotSerRunningSelectObjectsNoPermission"); | ||
6052 | } | ||
6053 | |||
6054 | void handle_set_not_run_selection(void*) | ||
6055 | { | ||
6056 | LLFloaterNotRunQueue* queue = LLFloaterNotRunQueue::create(); | ||
6057 | queue_actions(queue, "CannotSetRunningNotSelectObjectsNoScripts", "CannotSerRunningNotSelectObjectsNoPermission"); | ||
6058 | } | ||
6059 | |||
6060 | void handle_selected_texture_info(void*) | 6027 | void handle_selected_texture_info(void*) |
6061 | { | 6028 | { |
6062 | for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin(); | 6029 | for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin(); |
@@ -6897,6 +6864,11 @@ void force_error_software_exception(void *) | |||
6897 | LLAppViewer::instance()->forceErrorSoftwareException(); | 6864 | LLAppViewer::instance()->forceErrorSoftwareException(); |
6898 | } | 6865 | } |
6899 | 6866 | ||
6867 | void force_error_driver_crash(void *) | ||
6868 | { | ||
6869 | LLAppViewer::instance()->forceErrorDriverCrash(); | ||
6870 | } | ||
6871 | |||
6900 | class LLToolsUseSelectionForGrid : public view_listener_t | 6872 | class LLToolsUseSelectionForGrid : public view_listener_t |
6901 | { | 6873 | { |
6902 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 6874 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
@@ -7072,148 +7044,6 @@ class LLViewCheckHighlightTransparent : public view_listener_t | |||
7072 | } | 7044 | } |
7073 | }; | 7045 | }; |
7074 | 7046 | ||
7075 | class LLViewBeaconWidth : public view_listener_t | ||
7076 | { | ||
7077 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
7078 | { | ||
7079 | std::string width = userdata.asString(); | ||
7080 | if(width == "1") | ||
7081 | { | ||
7082 | gSavedSettings.setS32("DebugBeaconLineWidth", 1); | ||
7083 | } | ||
7084 | else if(width == "4") | ||
7085 | { | ||
7086 | gSavedSettings.setS32("DebugBeaconLineWidth", 4); | ||
7087 | } | ||
7088 | else if(width == "16") | ||
7089 | { | ||
7090 | gSavedSettings.setS32("DebugBeaconLineWidth", 16); | ||
7091 | } | ||
7092 | else if(width == "32") | ||
7093 | { | ||
7094 | gSavedSettings.setS32("DebugBeaconLineWidth", 32); | ||
7095 | } | ||
7096 | |||
7097 | return true; | ||
7098 | } | ||
7099 | }; | ||
7100 | |||
7101 | |||
7102 | class LLViewToggleBeacon : public view_listener_t | ||
7103 | { | ||
7104 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
7105 | { | ||
7106 | std::string beacon = userdata.asString(); | ||
7107 | if (beacon == "scriptsbeacon") | ||
7108 | { | ||
7109 | LLPipeline::toggleRenderScriptedBeacons(NULL); | ||
7110 | gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) ); | ||
7111 | // toggle the other one off if it's on | ||
7112 | if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL)) | ||
7113 | { | ||
7114 | LLPipeline::toggleRenderScriptedTouchBeacons(NULL); | ||
7115 | gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) ); | ||
7116 | } | ||
7117 | } | ||
7118 | else if (beacon == "physicalbeacon") | ||
7119 | { | ||
7120 | LLPipeline::toggleRenderPhysicalBeacons(NULL); | ||
7121 | gSavedSettings.setBOOL( "physicalbeacon", LLPipeline::getRenderPhysicalBeacons(NULL) ); | ||
7122 | } | ||
7123 | else if (beacon == "soundsbeacon") | ||
7124 | { | ||
7125 | LLPipeline::toggleRenderSoundBeacons(NULL); | ||
7126 | gSavedSettings.setBOOL( "soundsbeacon", LLPipeline::getRenderSoundBeacons(NULL) ); | ||
7127 | } | ||
7128 | else if (beacon == "particlesbeacon") | ||
7129 | { | ||
7130 | LLPipeline::toggleRenderParticleBeacons(NULL); | ||
7131 | gSavedSettings.setBOOL( "particlesbeacon", LLPipeline::getRenderParticleBeacons(NULL) ); | ||
7132 | } | ||
7133 | else if (beacon == "scripttouchbeacon") | ||
7134 | { | ||
7135 | LLPipeline::toggleRenderScriptedTouchBeacons(NULL); | ||
7136 | gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) ); | ||
7137 | // toggle the other one off if it's on | ||
7138 | if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL)) | ||
7139 | { | ||
7140 | LLPipeline::toggleRenderScriptedBeacons(NULL); | ||
7141 | gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) ); | ||
7142 | } | ||
7143 | } | ||
7144 | else if (beacon == "renderbeacons") | ||
7145 | { | ||
7146 | LLPipeline::toggleRenderBeacons(NULL); | ||
7147 | gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) ); | ||
7148 | // toggle the other one on if it's not | ||
7149 | if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL)) | ||
7150 | { | ||
7151 | LLPipeline::toggleRenderHighlights(NULL); | ||
7152 | gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) ); | ||
7153 | } | ||
7154 | } | ||
7155 | else if (beacon == "renderhighlights") | ||
7156 | { | ||
7157 | LLPipeline::toggleRenderHighlights(NULL); | ||
7158 | gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) ); | ||
7159 | // toggle the other one on if it's not | ||
7160 | if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL)) | ||
7161 | { | ||
7162 | LLPipeline::toggleRenderBeacons(NULL); | ||
7163 | gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) ); | ||
7164 | } | ||
7165 | } | ||
7166 | |||
7167 | return true; | ||
7168 | } | ||
7169 | }; | ||
7170 | |||
7171 | class LLViewCheckBeaconEnabled : public view_listener_t | ||
7172 | { | ||
7173 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
7174 | { | ||
7175 | std::string beacon = userdata["data"].asString(); | ||
7176 | bool new_value = false; | ||
7177 | if (beacon == "scriptsbeacon") | ||
7178 | { | ||
7179 | new_value = gSavedSettings.getBOOL( "scriptsbeacon"); | ||
7180 | LLPipeline::setRenderScriptedBeacons(new_value); | ||
7181 | } | ||
7182 | else if (beacon == "physicalbeacon") | ||
7183 | { | ||
7184 | new_value = gSavedSettings.getBOOL( "physicalbeacon"); | ||
7185 | LLPipeline::setRenderPhysicalBeacons(new_value); | ||
7186 | } | ||
7187 | else if (beacon == "soundsbeacon") | ||
7188 | { | ||
7189 | new_value = gSavedSettings.getBOOL( "soundsbeacon"); | ||
7190 | LLPipeline::setRenderSoundBeacons(new_value); | ||
7191 | } | ||
7192 | else if (beacon == "particlesbeacon") | ||
7193 | { | ||
7194 | new_value = gSavedSettings.getBOOL( "particlesbeacon"); | ||
7195 | LLPipeline::setRenderParticleBeacons(new_value); | ||
7196 | } | ||
7197 | else if (beacon == "scripttouchbeacon") | ||
7198 | { | ||
7199 | new_value = gSavedSettings.getBOOL( "scripttouchbeacon"); | ||
7200 | LLPipeline::setRenderScriptedTouchBeacons(new_value); | ||
7201 | } | ||
7202 | else if (beacon == "renderbeacons") | ||
7203 | { | ||
7204 | new_value = gSavedSettings.getBOOL( "renderbeacons"); | ||
7205 | LLPipeline::setRenderBeacons(new_value); | ||
7206 | } | ||
7207 | else if (beacon == "renderhighlights") | ||
7208 | { | ||
7209 | new_value = gSavedSettings.getBOOL( "renderhighlights"); | ||
7210 | LLPipeline::setRenderHighlights(new_value); | ||
7211 | } | ||
7212 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | ||
7213 | return true; | ||
7214 | } | ||
7215 | }; | ||
7216 | |||
7217 | class LLViewToggleRenderType : public view_listener_t | 7047 | class LLViewToggleRenderType : public view_listener_t |
7218 | { | 7048 | { |
7219 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 7049 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
@@ -7590,7 +7420,6 @@ class LLAdvancedCheckConsole : public view_listener_t | |||
7590 | 7420 | ||
7591 | 7421 | ||
7592 | 7422 | ||
7593 | |||
7594 | ////////////////////////// | 7423 | ////////////////////////// |
7595 | // DUMP INFO TO CONSOLE // | 7424 | // DUMP INFO TO CONSOLE // |
7596 | ////////////////////////// | 7425 | ////////////////////////// |
@@ -7845,10 +7674,6 @@ U32 feature_from_string(std::string feature) | |||
7845 | { | 7674 | { |
7846 | return LLPipeline::RENDER_DEBUG_FEATURE_FOG; | 7675 | return LLPipeline::RENDER_DEBUG_FEATURE_FOG; |
7847 | } | 7676 | } |
7848 | else if ("palette" == feature) | ||
7849 | { | ||
7850 | return LLPipeline::RENDER_DEBUG_FEATURE_PALETTE; | ||
7851 | } | ||
7852 | else if ("fr info" == feature) | 7677 | else if ("fr info" == feature) |
7853 | { | 7678 | { |
7854 | return LLPipeline::RENDER_DEBUG_FEATURE_FR_INFO; | 7679 | return LLPipeline::RENDER_DEBUG_FEATURE_FR_INFO; |
@@ -8314,33 +8139,6 @@ class LLAdvancedToggleEditableUI : public view_listener_t | |||
8314 | 8139 | ||
8315 | 8140 | ||
8316 | 8141 | ||
8317 | ////////////////////// | ||
8318 | // ASYNC KEYSTROKES // | ||
8319 | ////////////////////// | ||
8320 | |||
8321 | |||
8322 | class LLAdvancedToggleAsyncKeystrokes : public view_listener_t | ||
8323 | { | ||
8324 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8325 | { | ||
8326 | gHandleKeysAsync = !(gHandleKeysAsync); | ||
8327 | return true; | ||
8328 | } | ||
8329 | }; | ||
8330 | |||
8331 | class LLAdvancedCheckAsyncKeystrokes : public view_listener_t | ||
8332 | { | ||
8333 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8334 | { | ||
8335 | bool new_value = gHandleKeysAsync; | ||
8336 | std::string control_name = userdata["control"].asString(); | ||
8337 | gMenuHolder->findControl(control_name)->setValue(new_value); | ||
8338 | return true; | ||
8339 | } | ||
8340 | }; | ||
8341 | |||
8342 | |||
8343 | |||
8344 | ///////////////////// | 8142 | ///////////////////// |
8345 | // DUMP SELECT MGR // | 8143 | // DUMP SELECT MGR // |
8346 | ///////////////////// | 8144 | ///////////////////// |
@@ -9712,8 +9510,6 @@ void initialize_menus() | |||
9712 | addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter"); | 9510 | addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter"); |
9713 | addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips"); | 9511 | addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips"); |
9714 | addMenu(new LLViewHighlightTransparent(), "View.HighlightTransparent"); | 9512 | addMenu(new LLViewHighlightTransparent(), "View.HighlightTransparent"); |
9715 | addMenu(new LLViewToggleBeacon(), "View.ToggleBeacon"); | ||
9716 | addMenu(new LLViewBeaconWidth(), "View.BeaconWidth"); | ||
9717 | addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType"); | 9513 | addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType"); |
9718 | addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments"); | 9514 | addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments"); |
9719 | addMenu(new LLViewZoomOut(), "View.ZoomOut"); | 9515 | addMenu(new LLViewZoomOut(), "View.ZoomOut"); |
@@ -9728,7 +9524,6 @@ void initialize_menus() | |||
9728 | addMenu(new LLViewCheckJoystickFlycam(), "View.CheckJoystickFlycam"); | 9524 | addMenu(new LLViewCheckJoystickFlycam(), "View.CheckJoystickFlycam"); |
9729 | addMenu(new LLViewCheckShowHoverTips(), "View.CheckShowHoverTips"); | 9525 | addMenu(new LLViewCheckShowHoverTips(), "View.CheckShowHoverTips"); |
9730 | addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); | 9526 | addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); |
9731 | addMenu(new LLViewCheckBeaconEnabled(), "View.CheckBeaconEnabled"); | ||
9732 | addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); | 9527 | addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); |
9733 | addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); | 9528 | addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); |
9734 | 9529 | ||
@@ -9867,7 +9662,6 @@ void initialize_menus() | |||
9867 | // Generic actions | 9662 | // Generic actions |
9868 | addMenu(new LLShowFloater(), "ShowFloater"); | 9663 | addMenu(new LLShowFloater(), "ShowFloater"); |
9869 | addMenu(new LLPromptShowURL(), "PromptShowURL"); | 9664 | addMenu(new LLPromptShowURL(), "PromptShowURL"); |
9870 | addMenu(new LLPromptShowFile(), "PromptShowFile"); | ||
9871 | addMenu(new LLShowAgentProfile(), "ShowAgentProfile"); | 9665 | addMenu(new LLShowAgentProfile(), "ShowAgentProfile"); |
9872 | addMenu(new LLShowAgentGroups(), "ShowAgentGroups"); | 9666 | addMenu(new LLShowAgentGroups(), "ShowAgentGroups"); |
9873 | addMenu(new LLToggleControl(), "ToggleControl"); | 9667 | addMenu(new LLToggleControl(), "ToggleControl"); |
@@ -9936,8 +9730,6 @@ void initialize_menus() | |||
9936 | addMenu(new LLAdvancedSLURLTest(), "Advanced.SLURLTest"); | 9730 | addMenu(new LLAdvancedSLURLTest(), "Advanced.SLURLTest"); |
9937 | addMenu(new LLAdvancedToggleEditableUI(), "Advanced.ToggleEditableUI"); | 9731 | addMenu(new LLAdvancedToggleEditableUI(), "Advanced.ToggleEditableUI"); |
9938 | //addMenu(new LLAdvancedCheckEditableUI(), "Advanced.CheckEditableUI"); | 9732 | //addMenu(new LLAdvancedCheckEditableUI(), "Advanced.CheckEditableUI"); |
9939 | addMenu(new LLAdvancedToggleAsyncKeystrokes(), "Advanced.ToggleAsyncKeystrokes"); | ||
9940 | addMenu(new LLAdvancedCheckAsyncKeystrokes(), "Advanced.CheckAsyncKeystrokes"); | ||
9941 | addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr"); | 9733 | addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr"); |
9942 | addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory"); | 9734 | addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory"); |
9943 | addMenu(new LLAdvancedDumpFocusHolder(), "Advanced.DumpFocusHolder"); | 9735 | addMenu(new LLAdvancedDumpFocusHolder(), "Advanced.DumpFocusHolder"); |