diff --git a/indra/newview/jcfloaterareasearch.cpp b/indra/newview/jcfloaterareasearch.cpp
index 8479b9a3b..b566fd174 100644
--- a/indra/newview/jcfloaterareasearch.cpp
+++ b/indra/newview/jcfloaterareasearch.cpp
@@ -144,6 +144,14 @@ void JCFloaterAreaSearch::toggle()
}
}
+// static
+BOOL JCFloaterAreaSearch::visible()
+{
+ if (sInstance)
+ return sInstance->getVisible();
+ return FALSE;
+}
+
// static
void JCFloaterAreaSearch::onDoubleClick(void *userdata)
{
diff --git a/indra/newview/jcfloaterareasearch.h b/indra/newview/jcfloaterareasearch.h
index 5c9233362..c96d328d5 100644
--- a/indra/newview/jcfloaterareasearch.h
+++ b/indra/newview/jcfloaterareasearch.h
@@ -60,6 +60,7 @@ public:
static void results();
static void toggle();
+ static BOOL visible();
static JCFloaterAreaSearch* getInstance() { return sInstance; }
static void processObjectPropertiesFamily(LLMessageSystem* msg, void** user_data);
diff --git a/indra/newview/llfloaterblacklist.cpp b/indra/newview/llfloaterblacklist.cpp
index 44e03ed16..0f5098e16 100644
--- a/indra/newview/llfloaterblacklist.cpp
+++ b/indra/newview/llfloaterblacklist.cpp
@@ -43,6 +43,25 @@ void LLFloaterBlacklist::show()
sInstance->open();
}
}
+// static
+void LLFloaterBlacklist::toggle()
+{
+ if (sInstance && sInstance->getVisible())
+ {
+ delete sInstance;
+ }
+ else
+ {
+ show();
+ }
+}
+// static
+BOOL LLFloaterBlacklist::visible()
+{
+ if (sInstance && sInstance->getVisible())
+ return TRUE;
+ return FALSE;
+}
BOOL LLFloaterBlacklist::postBuild()
{
childSetAction("add_btn", onClickAdd, this);
diff --git a/indra/newview/llfloaterblacklist.h b/indra/newview/llfloaterblacklist.h
index 6851e1a1e..9b5c4171f 100644
--- a/indra/newview/llfloaterblacklist.h
+++ b/indra/newview/llfloaterblacklist.h
@@ -11,6 +11,8 @@ public:
LLFloaterBlacklist();
~LLFloaterBlacklist();
static void show();
+ static void toggle();
+ static BOOL visible();
BOOL postBuild();
void refresh();
static LLFloaterBlacklist* getInstance() { return sInstance; };
diff --git a/indra/newview/llfloaterexploresounds.cpp b/indra/newview/llfloaterexploresounds.cpp
index 4ce0cf111..0e3934e2f 100644
--- a/indra/newview/llfloaterexploresounds.cpp
+++ b/indra/newview/llfloaterexploresounds.cpp
@@ -68,6 +68,13 @@ void LLFloaterExploreSounds::toggle()
else LLFloaterExploreSounds::sInstance = new LLFloaterExploreSounds();
}
+BOOL LLFloaterExploreSounds::visible()
+{
+ if (LLFloaterExploreSounds::sInstance)
+ return TRUE;
+ return FALSE;
+}
+
void LLFloaterExploreSounds::close(bool app_quitting)
{
LLFloater::close(app_quitting);
diff --git a/indra/newview/llfloaterexploresounds.h b/indra/newview/llfloaterexploresounds.h
index 4bdcae820..7bb7ae1c5 100644
--- a/indra/newview/llfloaterexploresounds.h
+++ b/indra/newview/llfloaterexploresounds.h
@@ -36,6 +36,7 @@ public:
static LLFloaterExploreSounds* sInstance;
static void toggle();
+ static BOOL visible();
};
#endif
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 4d9dcd13e..2801ad6b5 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -358,7 +358,6 @@ void handle_singleton_toggle(void *)
//
void handle_fake_away_status(void*);
-void handle_area_search(void*);
// for pose stand
LLUUID current_pose = LLUUID::null;
@@ -404,13 +403,8 @@ BOOL handle_check_pose(void* userdata) {
}
-void handle_force_ground_sit(void*);
void handle_hide_typing_notification(void*);
-void handle_close_all_notifications(void*);
void handle_open_message_log(void*);
-void handle_edit_ao(void*);
-void handle_sounds_explorer(void*);
-void handle_blacklist(void*);
//
void handle_reset_view();
@@ -706,32 +700,6 @@ void init_menus()
// TomY TODO convert these two
LLMenuGL*menu;
- menu = new LLMenuGL("Singularity");
- menu->setCanTearOff(TRUE);
- menu->addChild(new LLMenuItemCallGL( "Close All Dialogs",
- &handle_close_all_notifications, NULL, NULL, 'D', MASK_CONTROL | MASK_ALT | MASK_SHIFT));
- menu->addSeparator();
- menu->addChild(new LLMenuItemCallGL( "Fake Away Status", &handle_fake_away_status, NULL));
- menu->addChild(new LLMenuItemCallGL( "Force Ground Sit", &handle_force_ground_sit, NULL));
-
- menu->addSeparator();
- menu->addChild(new LLMenuItemCallGL( "Animation Override...",
- &handle_edit_ao, NULL));
- menu->addChild(new LLMenuItemCheckGL( "Nimble",
- &menu_toggle_control,
- NULL,
- &menu_check_control,
- (void*)"Nimble"));
- menu->addSeparator();
- menu->addChild(new LLMenuItemCallGL( "Object Area Search", &handle_area_search, NULL));
-
- menu->addChild(new LLMenuItemCallGL( "Sound Explorer",
- &handle_sounds_explorer, NULL));
- menu->addChild(new LLMenuItemCallGL( "Asset Blacklist",
- &handle_blacklist, NULL));
- menu->addChild(new LLMenuItemCheckGL( "Streaming Audio Display",
- &handle_ticker_toggle, &handle_ticker_enabled, &handle_singleton_check, NULL ));
-
//
// Add in the pose stand -------------------------------------------
/*LLMenuGL* sub = new LLMenuGL("Pose Stand...");
@@ -746,12 +714,6 @@ void init_menus()
sub->addChild(new LLMenuItemCallGL( "Stop Pose Stand", &handle_pose_stand_stop, NULL));
// ------------------------------------------------------*/
- menu->addChild(new LLMenuItemCheckGL("Pose Stand",&handle_toggle_pose, NULL, &handle_check_pose, NULL));
-
- //these should always be last in a sub menu
- menu->createJumpKeys();
- gMenuBarView->addChild( menu );
-
menu = new LLMenuGL(CLIENT_MENU_NAME);
menu->setCanTearOff(TRUE);
init_client_menu(menu);
@@ -1588,7 +1550,7 @@ void init_debug_avatar_menu(LLMenuGL* menu)
(void*)LLPipeline::RENDER_DEBUG_ATTACHMENT_BYTES));
menu->addChild(new LLMenuItemToggleGL( "Debug Rotation", &LLVOAvatar::sDebugAvatarRotation));
menu->addChild(new LLMenuItemCallGL("Dump Attachments", handle_dump_attachments));
- menu->addChild(new LLMenuItemCallGL("Rebake Textures", handle_rebake_textures, NULL, NULL, 'R', MASK_ALT | MASK_CONTROL ));
+ menu->addChild(new LLMenuItemCallGL("Rebake Textures", handle_rebake_textures));
#ifndef LL_RELEASE_FOR_DOWNLOAD
menu->addChild(new LLMenuItemCallGL("Debug Avatar Textures", handle_debug_avatar_textures, NULL, NULL, 'A', MASK_SHIFT|MASK_CONTROL|MASK_ALT));
menu->addChild(new LLMenuItemCallGL("Dump Local Textures", handle_dump_avatar_local_textures, NULL, NULL, 'M', MASK_SHIFT|MASK_ALT ));
@@ -3739,37 +3701,6 @@ void handle_open_message_log(void*)
LLFloaterMessageLog::show();
}
-void handle_edit_ao(void*)
-{
- LLFloaterAO::show(NULL);
-}
-
-void handle_sounds_explorer(void*)
-{
- LLFloaterExploreSounds::toggle();
-}
-
-void handle_blacklist(void*)
-{
- LLFloaterBlacklist::show();
-}
-
-void handle_close_all_notifications(void*)
-{
- LLView::child_list_t child_list(*(gNotifyBoxView->getChildList()));
- for(LLView::child_list_iter_t iter = child_list.begin();
- iter != child_list.end();
- iter++)
- {
- gNotifyBoxView->removeChild(*iter);
- }
-}
-
-void handle_area_search(void*)
-{
- JCFloaterAreaSearch::toggle();
-}
-
void handle_fake_away_status(void*)
{
bool fake_away = gSavedSettings.getBOOL("FakeAway");
@@ -3777,21 +3708,6 @@ void handle_fake_away_status(void*)
gSavedSettings.setBOOL("FakeAway", !fake_away);
}
-void handle_force_ground_sit(void*)
-{
- if (isAgentAvatarValid())
- {
- if (!gAgentAvatarp->isSitting())
- {
- gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
- }
- else
- {
- gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
- }
- }
-}
-
//
/*
@@ -6704,6 +6620,18 @@ class LLFloaterVisible : public view_listener_t
{
new_value = LLFloaterPathfindingCharacters::instanceVisible(LLSD());
}
+ else if (floater_name == "object_area_search")
+ {
+ new_value = JCFloaterAreaSearch::visible();
+ }
+ else if (floater_name == "sound_explorer")
+ {
+ new_value = LLFloaterExploreSounds::visible();
+ }
+ else if (floater_name == "asset_blacklist")
+ {
+ new_value = LLFloaterBlacklist::visible();
+ }
gMenuHolder->findControl(control_name)->setValue(new_value);
return true;
}
@@ -9269,6 +9197,192 @@ class LLWorldDayCycle : public view_listener_t
}
};
+
+class SinguCloseAllDialogs : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLView::child_list_t child_list(*(gNotifyBoxView->getChildList()));
+ for(LLView::child_list_iter_t iter = child_list.begin();
+ iter != child_list.end();
+ iter++)
+ {
+ gNotifyBoxView->removeChild(*iter);
+ }
+ return true;
+ }
+};
+
+class SinguForceGroundSit : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ if (isAgentAvatarValid())
+ {
+ if (!gAgentAvatarp->isSitting())
+ {
+ gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
+ }
+ else
+ {
+ gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
+ }
+ }
+ return true;
+ }
+};
+
+class SinguAnimationOverride : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLFloaterAO::show(NULL);
+
+ return true;
+ }
+};
+
+class SinguNimble : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ BOOL checked = gSavedSettings.getBOOL("Nimble");
+ gSavedSettings.setBOOL("Nimble", !checked);
+
+ return true;
+ }
+};
+
+class SinguCheckNimble : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ BOOL checked = gSavedSettings.getBOOL("Nimble");
+ gMenuHolder->findControl(userdata["control"].asString())->setValue(checked);
+
+ return true;
+ }
+};
+
+class SinguObjectAreaSearch : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ JCFloaterAreaSearch::toggle();
+
+ return true;
+ }
+};
+
+class SinguSoundExplorer : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLFloaterExploreSounds::toggle();
+
+ return true;
+ }
+};
+
+class SinguAssetBlacklist : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLFloaterBlacklist::toggle();
+
+ return true;
+ }
+};
+
+class SinguStreamingAudioDisplay : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ handle_ticker_toggle(NULL);
+
+ return true;
+ }
+};
+
+class SinguCheckStreamingAudioDisplay : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ bool checked = handle_singleton_check(NULL);
+ gMenuHolder->findControl(userdata["control"].asString())->setValue(checked);
+
+ return true;
+ }
+};
+
+class SinguEnableStreamingAudioDisplay : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ return handle_ticker_enabled(NULL);
+ }
+};
+
+class SinguPoseStand : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ handle_toggle_pose(NULL);
+
+ return true;
+ }
+};
+
+class SinguCheckPoseStand : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ bool checked = handle_check_pose(NULL);
+ gMenuHolder->findControl(userdata["control"].asString())->setValue(checked);
+ return true;
+ }
+};
+
+class SinguRebake : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ handle_rebake_textures(NULL);
+ return true;
+ }
+};
+
+class SinguDebugConsole : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ handle_singleton_toggle(NULL);
+ return true;
+ }
+};
+
+class SinguCheckDebugConsole : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ bool checked = handle_singleton_check(NULL);
+ gMenuHolder->findControl(userdata["control"].asString())->setValue(checked);
+ return true;
+ }
+};
+
+class SinguVisibleDebugConsole : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ bool visible = !(gAgent.getRegion()->getCapability("SimConsoleAsync").empty());
+ LLView* item = gMenuBarView->getChildView("Region Debug Console", true, false);
+ item->setVisible(visible);
+
+ return true;
+ }
+};
+
void addMenu(view_listener_t *menu, const std::string& name)
{
sMenus.push_back(menu);
@@ -9544,6 +9658,26 @@ void initialize_menus()
addMenu(new LLEditableSelected(), "EditableSelected");
addMenu(new LLEditableSelectedMono(), "EditableSelectedMono");
+ // Singularity menu
+ addMenu(new SinguCloseAllDialogs(), "CloseAllDialogs");
+ // ---- Fake away handled elsewhere
+ addMenu(new SinguForceGroundSit(), "ForceGroundSit");
+ addMenu(new SinguAnimationOverride(), "AnimationOverride");
+ addMenu(new SinguNimble(), "Nimble");
+ addMenu(new SinguCheckNimble(), "CheckNimble");
+ addMenu(new SinguObjectAreaSearch(), "ObjectAreaSearch");
+ addMenu(new SinguSoundExplorer(), "SoundExplorer");
+ addMenu(new SinguAssetBlacklist(), "AssetBlacklist");
+ addMenu(new SinguStreamingAudioDisplay(), "StreamingAudioDisplay");
+ addMenu(new SinguEnableStreamingAudioDisplay(), "EnableStreamingAudioDisplay");
+ addMenu(new SinguCheckStreamingAudioDisplay(), "CheckStreamingAudioDisplay");
+ addMenu(new SinguPoseStand(), "PoseStand");
+ addMenu(new SinguCheckPoseStand(), "CheckPoseStand");
+ addMenu(new SinguRebake(), "Rebake");
+ addMenu(new SinguDebugConsole(), "RegionDebugConsole");
+ addMenu(new SinguCheckDebugConsole(), "CheckRegionDebugConsole");
+ addMenu(new SinguVisibleDebugConsole(), "VisibleRegionDebugConsole");
+
// [RLVa:KB] - Checked: 2010-01-18 (RLVa-1.1.0m) | Added: RLVa-1.1.0m | OK
if (rlv_handler_t::isEnabled())
{
diff --git a/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/indra/newview/skins/default/xui/en-us/menu_viewer.xml
index 988513a4b..2cea2929f 100644
--- a/indra/newview/skins/default/xui/en-us/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en-us/menu_viewer.xml
@@ -979,4 +979,75 @@
+