Sun, 15 Apr 2018 01:36:15 -0700
Make statistics bar not revert on closing it and add not needing a restart to change the setting.
1.1 --- a/indra/newview/CMakeLists.txt Sat Apr 14 01:39:29 2018 -0700 1.2 +++ b/indra/newview/CMakeLists.txt Sun Apr 15 01:36:15 2018 -0700 1.3 @@ -163,6 +163,7 @@ 1.4 fsfloaterprofile.cpp 1.5 fsfloaterradar.cpp 1.6 fsfloatersearch.cpp 1.7 + fsfloaterstatistics.cpp 1.8 fsfloaterteleporthistory.cpp 1.9 fsfloatervoicecontrols.cpp 1.10 fsfloatervolumecontrols.cpp 1.11 @@ -913,6 +914,7 @@ 1.12 fsfloaterprofile.h 1.13 fsfloaterradar.h 1.14 fsfloatersearch.h 1.15 + fsfloaterstatistics.h 1.16 fsfloaterteleporthistory.h 1.17 fsfloatervoicecontrols.h 1.18 fsfloatervolumecontrols.h
2.1 --- a/indra/newview/app_settings/settings.xml Sat Apr 14 01:39:29 2018 -0700 2.2 +++ b/indra/newview/app_settings/settings.xml Sun Apr 15 01:36:15 2018 -0700 2.3 @@ -24627,7 +24627,7 @@ 2.4 <key>FSStatisticsNoFocus</key> 2.5 <map> 2.6 <key>Comment</key> 2.7 - <string>If enabled, the statistics bar will never gain focus (i.e. from closing another floater). Requires restart.</string> 2.8 + <string>If enabled, the statistics bar will never gain focus (i.e. from closing another floater).</string> 2.9 <key>Persist</key> 2.10 <integer>1</integer> 2.11 <key>Type</key>
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/indra/newview/fsfloaterstatistics.cpp Sun Apr 15 01:36:15 2018 -0700 3.3 @@ -0,0 +1,60 @@ 3.4 +/** 3.5 +* @file fsfloaterstatistics.cpp 3.6 +* @brief Floater for Statistics bar 3.7 +* 3.8 +* $LicenseInfo:firstyear=2012&license=fsviewerlgpl$ 3.9 +* Phoenix Firestorm Viewer Source Code 3.10 +* Copyright (C) 2018, Liny Odell 3.11 +* 3.12 +* This library is free software; you can redistribute it and/or 3.13 +* modify it under the terms of the GNU Lesser General Public 3.14 +* License as published by the Free Software Foundation; 3.15 +* version 2.1 of the License only. 3.16 +* 3.17 +* This library is distributed in the hope that it will be useful, 3.18 +* but WITHOUT ANY WARRANTY; without even the implied warranty of 3.19 +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3.20 +* Lesser General Public License for more details. 3.21 +* 3.22 +* You should have received a copy of the GNU Lesser General Public 3.23 +* License along with this library; if not, write to the Free Software 3.24 +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 3.25 +* 3.26 +* The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA 3.27 +* http://www.firestormviewer.org 3.28 +* $/LicenseInfo$ 3.29 +*/ 3.30 + 3.31 +#include "llviewerprecompiledheaders.h" 3.32 + 3.33 +#include "fsfloaterstatistics.h" 3.34 +#include "llviewercontrol.h" 3.35 + 3.36 + 3.37 + 3.38 +FSFloaterStatistics::FSFloaterStatistics(const LLSD& key) 3.39 + : LLFloater(key) 3.40 +{ 3.41 +} 3.42 + 3.43 +FSFloaterStatistics::~FSFloaterStatistics() 3.44 +{ 3.45 +} 3.46 + 3.47 +BOOL FSFloaterStatistics::postBuild() 3.48 +{ 3.49 + if (gSavedSettings.getBOOL("FSStatisticsNoFocus")) 3.50 + { 3.51 + setIsChrome(TRUE); 3.52 + } 3.53 + return TRUE; 3.54 +} 3.55 + 3.56 +void FSFloaterStatistics::onOpen(const LLSD& key) 3.57 +{ 3.58 + if (gSavedSettings.getBOOL("FSStatisticsNoFocus")) 3.59 + { 3.60 + setIsChrome(TRUE); 3.61 + setFocus(FALSE); 3.62 + } 3.63 +}
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/indra/newview/fsfloaterstatistics.h Sun Apr 15 01:36:15 2018 -0700 4.3 @@ -0,0 +1,44 @@ 4.4 +/** 4.5 +* @file fsfloaterstatistics.h 4.6 +* @brief Floater for Statistics bar 4.7 +* 4.8 +* $LicenseInfo:firstyear=2012&license=fsviewerlgpl$ 4.9 +* Phoenix Firestorm Viewer Source Code 4.10 +* Copyright (C) 2018, Liny Odell 4.11 +* 4.12 +* This library is free software; you can redistribute it and/or 4.13 +* modify it under the terms of the GNU Lesser General Public 4.14 +* License as published by the Free Software Foundation; 4.15 +* version 2.1 of the License only. 4.16 +* 4.17 +* This library is distributed in the hope that it will be useful, 4.18 +* but WITHOUT ANY WARRANTY; without even the implied warranty of 4.19 +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4.20 +* Lesser General Public License for more details. 4.21 +* 4.22 +* You should have received a copy of the GNU Lesser General Public 4.23 +* License along with this library; if not, write to the Free Software 4.24 +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 4.25 +* 4.26 +* The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA 4.27 +* http://www.firestormviewer.org 4.28 +* $/LicenseInfo$ 4.29 +*/ 4.30 + 4.31 +#ifndef FS_FLOATERSTATISTICS_H 4.32 +#define FS_FLOATERSTATISTICS_H 4.33 + 4.34 +#include "llfloater.h" 4.35 + 4.36 +class FSFloaterStatistics : public LLFloater 4.37 +{ 4.38 + 4.39 +public: 4.40 + FSFloaterStatistics(const LLSD& key); 4.41 + virtual ~FSFloaterStatistics(); 4.42 + 4.43 + /*virtual*/ void onOpen(const LLSD& key); 4.44 + /*virtual*/ BOOL postBuild(); 4.45 +}; 4.46 + 4.47 +#endif // FS_FLOATERSTATISTICS_H
5.1 --- a/indra/newview/llappviewer.cpp Sat Apr 14 01:39:29 2018 -0700 5.2 +++ b/indra/newview/llappviewer.cpp Sun Apr 15 01:36:15 2018 -0700 5.3 @@ -1162,19 +1162,6 @@ 5.4 initWindow(); 5.5 LL_INFOS("InitInfo") << "Window is initialized." << LL_ENDL ; 5.6 5.7 - 5.8 - 5.9 - // <FS:LO> Add ability for the statistics window to not be able to receive focus 5.10 - if (gSavedSettings.getBOOL("FSStatisticsNoFocus")) 5.11 - { 5.12 - LLFloater* stats = LLFloaterReg::getInstance("stats"); 5.13 - if (stats) 5.14 - { 5.15 - stats->setIsChrome(TRUE); 5.16 - } 5.17 - } 5.18 - // </FS:LO> 5.19 - 5.20 // initWindow also initializes the Feature List, so now we can initialize this global. 5.21 LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap"); 5.22
6.1 --- a/indra/newview/llviewercontrol.cpp Sat Apr 14 01:39:29 2018 -0700 6.2 +++ b/indra/newview/llviewercontrol.cpp Sun Apr 15 01:36:15 2018 -0700 6.3 @@ -950,6 +950,17 @@ 6.4 } 6.5 // </FS:Ansariel> 6.6 6.7 +// <FS:LO> Add ability for the statistics window to not be able to receive focus 6.8 +void handleFSStatisticsNoFocusChanged(const LLSD& newvalue) 6.9 +{ 6.10 + LLFloater* stats = LLFloaterReg::getInstance("stats"); 6.11 + if (stats) 6.12 + { 6.13 + stats->setIsChrome(newvalue.asBoolean()); 6.14 + } 6.15 +} 6.16 +// </FS:LO> 6.17 + 6.18 //////////////////////////////////////////////////////////////////////////// 6.19 6.20 void settings_setup_listeners() 6.21 @@ -1180,6 +1191,10 @@ 6.22 gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&handleNavbarSettingsChanged)); 6.23 gSavedSettings.getControl("ShowNavbarNavigationPanel")->getSignal()->connect(boost::bind(&handleNavbarSettingsChanged)); 6.24 // </FS:Ansariel> 6.25 + 6.26 + // <FS:LO> Add ability for the statistics window to not be able to receive focus 6.27 + gSavedSettings.getControl("FSStatisticsNoFocus")->getSignal()->connect(boost::bind(&handleFSStatisticsNoFocusChanged, _2)); 6.28 + // </FS:LO> 6.29 } 6.30 6.31 #if TEST_CACHED_CONTROL
7.1 --- a/indra/newview/llviewerfloaterreg.cpp Sat Apr 14 01:39:29 2018 -0700 7.2 +++ b/indra/newview/llviewerfloaterreg.cpp Sun Apr 15 01:36:15 2018 -0700 7.3 @@ -190,6 +190,7 @@ 7.4 #include "fsfloaterprofile.h" 7.5 #include "fsfloaterradar.h" 7.6 #include "fsfloatersearch.h" 7.7 +#include "fsfloaterstatistics.h" 7.8 #include "fsfloaterteleporthistory.h" 7.9 #include "fsfloatervoicecontrols.h" 7.10 #include "fsfloatervolumecontrols.h" 7.11 @@ -408,7 +409,10 @@ 7.12 LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater); 7.13 LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>); 7.14 LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundDevices>); 7.15 - LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>); 7.16 + // <FS:LO> Add ability for the statistics window to not be able to receive focus 7.17 + //LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>); 7.18 + LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterStatistics>); 7.19 + // </FS:LO 7.20 LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRunQueue>); 7.21 LLFloaterReg::add("scene_load_stats", "floater_scene_load_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSceneLoadStats>); 7.22 LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);