From 7a311a285fa390c6a2dd8f23909c7a23c65ecfc7 Mon Sep 17 00:00:00 2001 From: minerjr Date: Wed, 1 Jan 2025 07:44:47 -0400 Subject: [PATCH 1/2] [FIRE-35039] Add flag to show/hide the on-screen console Added new persist boolean to settings.xml called FSShowOnscreenConsole to enable/disable the drawing of the on-screen console. Updated menu_viewer.xml to have new check option under Comm called Show On-screen Console with a Shift+` shortcut key combo to toggle the new flag. Updated panel_preferences_chat.xml to also have a "Show on-screen console" check box tied to the new flag. Updated commans.xml Chat to have an extra check box linked to the FSShowOnscreenConsole to allow it to also change the new flag. Updated llviewmenu.cpp to include callback functions to check and set/toggle the new menu choice. --- indra/llui/llconsole.cpp | 11 +++++++ indra/newview/app_settings/commands.xml | 4 +++ indra/newview/app_settings/settings.xml | 13 ++++++++ indra/newview/llviewermenu.cpp | 32 +++++++++++++++++++ .../skins/default/xui/en/menu_viewer.xml | 11 +++++++ .../default/xui/en/panel_preferences_chat.xml | 16 +++++++++- 6 files changed, 86 insertions(+), 1 deletion(-) diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index 549aa6bb4e..82ff89e442 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -175,6 +175,17 @@ void LLConsole::draw() return; } + // [FIRE-35039] Add flag to show/hide the on-screen console + // Get the Show On-screen Console flag from the Comm menu + static LLCachedControl showOnscreenConsole(*LLUI::getInstance()->mSettingGroups["config"], "FSShowOnscreenConsole"); + // If the Show On-screen Console flag is disabled and the current console is the global console + // (Not a debug console), then don't try to draw + if (!showOnscreenConsole && this == gConsole) + { + return; + } + // [FIRE-35039] + // Session support if (!mSessionSupport) { diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 73740b0c6d..7708f9a0c9 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -46,6 +46,8 @@ is_running_function="Floater.IsOpen" is_running_parameters="build" /> + + + Value 0 + + FSShowOnscreenConsole + + Comment + Displays the on-screen console + Persist + 1 + Type + Boolean + Value + 1 + + FSAdvancedWorldmapRegionInfo Comment diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 52e3bf02f5..6e3e6b57e7 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7717,6 +7717,33 @@ class LLWorldSetDoNotDisturb : public view_listener_t } }; +// [FIRE-35039] Add flag to show/hide the on-screen console +// View Listener class to toggle the saved settings value FSShowOnscreenConsole +class LLCommSetShowOnscreenConsole : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + // Toggle the value to the opposite and just save the value back to the settings. + // This change will propagate to the other controls for this value + bool show_onscreen_console = !gSavedSettings.getBOOL("FSShowOnscreenConsole"); + gSavedSettings.setBOOL("FSShowOnscreenConsole", show_onscreen_console); + + return true; + } +}; + +// View Listener class to retrieve the saved settings value FSShowOnscreenConsole +class LLCommCheckShowOnscreenConsole : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + // Retrieve the Show On-screen Console flag and return it the the UI to update the state of the menu toggle. + bool show_onscreen_console = gSavedSettings.getBOOL("FSShowOnscreenConsole"); + return show_onscreen_console; + } +}; +// [FIRE-35039] + // [SJ - FIRE-2177 - Making Autorespons a simple Check in the menu again for clarity] class LLWorldGetBusy : public view_listener_t { @@ -12369,6 +12396,11 @@ void initialize_menus() // [FS communication UI] //enable.add("Conversation.IsConversationLoggingAllowed", boost::bind(&LLFloaterIMContainer::isConversationLoggingAllowed)); + // [FIRE-35039] Add flag to show/hide the on-screen console + // Add menu view listener to controll the FSShowOnscreenConsole value + view_listener_t::addMenu(new LLCommCheckShowOnscreenConsole(), "Comm.CheckShowOnscreenConsole"); // Add menu listener for "Show On-screen Console" check class + view_listener_t::addMenu(new LLCommSetShowOnscreenConsole(), "Comm.SetShowOnscreenConsole"); // Add menu listener for "Show On-screen Console" set class + // [FIRE-35039] enable.add("GridCheck", boost::bind(&checkIsGrid, _2)); // Opensim menu item visibility control enable.add("GridFeatureCheck", boost::bind(&isGridFeatureEnabled, _2)); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 86bd19c9eb..02cf8b3e44 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -926,6 +926,17 @@ function="SideTray.PanelPeopleTab" parameter="blocked_panel" /> + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index a6f6888f6b..078e26add0 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -88,6 +88,19 @@ width="60" /> + + + + Date: Wed, 1 Jan 2025 07:52:15 -0400 Subject: [PATCH 2/2] [FIRE-35039] - fixed up close tag in settings.xml missing JIRA number Added missing JIRA number to the settings.xml change close tag. --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d408adcf7d..764de1e2b9 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -20976,7 +20976,7 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 - + FSAdvancedWorldmapRegionInfo Comment