Refactor code for showing the blocklist and route everything through LLPanelBlockedList::showPanelAndSelect

Thu, 11 Dec 2014 13:26:56 +0100

author
Ansariel
date
Thu, 11 Dec 2014 13:26:56 +0100
changeset 43051
f4430bbf5430
parent 43050
c7b63a0a3966
child 43052
88af26453015

Refactor code for showing the blocklist and route everything through LLPanelBlockedList::showPanelAndSelect

indra/newview/fspanelblocklist.cpp file | annotate | diff | revisions
indra/newview/fspanelblocklist.h file | annotate | diff | revisions
indra/newview/fspanelradar.cpp file | annotate | diff | revisions
indra/newview/llfloaterpreference.cpp file | annotate | diff | revisions
indra/newview/llpanelblockedlist.cpp file | annotate | diff | revisions
indra/newview/llpanelblockedlist.h file | annotate | diff | revisions
     1.1 --- a/indra/newview/fspanelblocklist.cpp	Thu Dec 11 11:05:24 2014 +0100
     1.2 +++ b/indra/newview/fspanelblocklist.cpp	Thu Dec 11 13:26:56 2014 +0100
     1.3 @@ -125,6 +125,11 @@
     1.4  
     1.5  void FSPanelBlockList::showPanelAndSelect(const LLUUID& idToSelect)
     1.6  {
     1.7 +	if (gSavedSettings.getBOOL("FSDisableBlockListAutoOpen"))
     1.8 +	{
     1.9 +		return;
    1.10 +	}
    1.11 +
    1.12  	if (gSavedSettings.getBOOL("FSUseStandaloneBlocklistFloater"))
    1.13  	{
    1.14  		LLFloaterReg::showInstance("fs_blocklist", LLSD().with(BLOCKED_PARAM_NAME, idToSelect));
     2.1 --- a/indra/newview/fspanelblocklist.h	Thu Dec 11 11:05:24 2014 +0100
     2.2 +++ b/indra/newview/fspanelblocklist.h	Thu Dec 11 13:26:56 2014 +0100
     2.3 @@ -57,7 +57,7 @@
     2.4  	 *	@param idToSelect - LLUUID of blocked Resident or Object to be selected. 
     2.5  	 *			If it is LLUUID::null, nothing will be selected.
     2.6  	 */
     2.7 -	static void showPanelAndSelect(const LLUUID& idToSelect);
     2.8 +	static void showPanelAndSelect(const LLUUID& idToSelect = LLUUID::null);
     2.9  
    2.10  	// LLMuteListObserver callback interface implementation.
    2.11  	/* virtual */ void onChange() {	refreshBlockedList();}
     3.1 --- a/indra/newview/fspanelradar.cpp	Thu Dec 11 11:05:24 2014 +0100
     3.2 +++ b/indra/newview/fspanelradar.cpp	Thu Dec 11 13:26:56 2014 +0100
     3.3 @@ -43,6 +43,7 @@
     3.4  #include "llavataractions.h"
     3.5  #include "llfloatersidepanelcontainer.h"
     3.6  #include "llnetmap.h"
     3.7 +#include "llpanelblockedlist.h"
     3.8  #include "llviewercontrol.h"		// for gSavedSettings
     3.9  #include "llviewermenu.h"			// for gMenuHolder
    3.10  #include "rlvhandler.h"
    3.11 @@ -279,15 +280,7 @@
    3.12  
    3.13  	if (chosen_item == "panel_block_list_sidetray")
    3.14  	{
    3.15 -		if (gSavedSettings.getBOOL("FSUseStandaloneBlocklistFloater"))
    3.16 -		{
    3.17 -			LLFloaterReg::showInstance("fs_blocklist", LLSD());
    3.18 -		}
    3.19 -		else
    3.20 -		{
    3.21 -			LLFloaterSidePanelContainer::showPanel("people", "panel_people",
    3.22 -				LLSD().with("people_panel_tab_name", "blocked_panel"));
    3.23 -		}
    3.24 +		LLPanelBlockedList::showPanelAndSelect();
    3.25  	}
    3.26  }
    3.27  
     4.1 --- a/indra/newview/llfloaterpreference.cpp	Thu Dec 11 11:05:24 2014 +0100
     4.2 +++ b/indra/newview/llfloaterpreference.cpp	Thu Dec 11 13:26:56 2014 +0100
     4.3 @@ -123,6 +123,7 @@
     4.4  #include "lleventtimer.h"
     4.5  #include "lldiriterator.h"	// <Kadah> for populating the fonts combo
     4.6  #include "llline.h"
     4.7 +#include "llpanelblockedlist.h"
     4.8  #include "llpanelmaininventory.h"
     4.9  #include "llscrolllistctrl.h"
    4.10  #include "llspellcheck.h"
    4.11 @@ -2458,15 +2459,7 @@
    4.12  	// </FS:Ansariel> Optional standalone blocklist floater
    4.13  	//LLFloaterSidePanelContainer::showPanel("people", "panel_people",
    4.14  	//	LLSD().with("people_panel_tab_name", "blocked_panel"));
    4.15 -	if (gSavedSettings.getBOOL("FSUseStandaloneBlocklistFloater"))
    4.16 -	{
    4.17 -		LLFloaterReg::showInstance("fs_blocklist", LLSD());
    4.18 -	}
    4.19 -	else
    4.20 -	{
    4.21 -		LLFloaterSidePanelContainer::showPanel("people", "panel_people",
    4.22 -			LLSD().with("people_panel_tab_name", "blocked_panel"));
    4.23 -	}
    4.24 +	LLPanelBlockedList::showPanelAndSelect();
    4.25  	// </FS:Ansariel>
    4.26  }
    4.27  
     5.1 --- a/indra/newview/llpanelblockedlist.cpp	Thu Dec 11 11:05:24 2014 +0100
     5.2 +++ b/indra/newview/llpanelblockedlist.cpp	Thu Dec 11 13:26:56 2014 +0100
     5.3 @@ -48,6 +48,8 @@
     5.4  #include "llsidetraypanelcontainer.h"
     5.5  #include "llviewercontrol.h"
     5.6  
     5.7 +#include "fspanelblocklist.h"
     5.8 +
     5.9  static LLPanelInjector<LLPanelBlockedList> t_panel_blocked_list("panel_block_list_sidetray");
    5.10  
    5.11  //
    5.12 @@ -138,24 +140,10 @@
    5.13  
    5.14  void LLPanelBlockedList::showPanelAndSelect(const LLUUID& idToSelect)
    5.15  {
    5.16 -	// <FS:Ansariel> FIRE-572: Disable auto-open of blocklist
    5.17 -	if (gSavedSettings.getBOOL("FSDisableBlockListAutoOpen"))
    5.18 -	{
    5.19 -		return;
    5.20 -	}
    5.21 -
    5.22 -	// <FS:Ansariel> Optional standalone blocklist floater
    5.23 +	// <FS:Ansariel> Defer handling to our blocklist panel for convenience since it is replacing LL's version
    5.24  	//LLFloaterSidePanelContainer::showPanel("people", "panel_people",
    5.25  	//	LLSD().with("people_panel_tab_name", "blocked_panel").with(BLOCKED_PARAM_NAME, idToSelect));
    5.26 -	if (gSavedSettings.getBOOL("FSUseStandaloneBlocklistFloater"))
    5.27 -	{
    5.28 -		LLFloaterReg::showInstance("fs_blocklist", LLSD().with(BLOCKED_PARAM_NAME, idToSelect));
    5.29 -	}
    5.30 -	else
    5.31 -	{
    5.32 -		LLFloaterSidePanelContainer::showPanel("people", "panel_people",
    5.33 -			LLSD().with("people_panel_tab_name", "blocked_panel").with(BLOCKED_PARAM_NAME, idToSelect));
    5.34 -	}
    5.35 +	FSPanelBlockList::showPanelAndSelect(idToSelect);
    5.36  	// </FS:Ansariel>
    5.37  }
    5.38  
     6.1 --- a/indra/newview/llpanelblockedlist.h	Thu Dec 11 11:05:24 2014 +0100
     6.2 +++ b/indra/newview/llpanelblockedlist.h	Thu Dec 11 13:26:56 2014 +0100
     6.3 @@ -52,7 +52,9 @@
     6.4  	 *	@param idToSelect - LLUUID of blocked Resident or Object to be selected. 
     6.5  	 *			If it is LLUUID::null, nothing will be selected.
     6.6  	 */
     6.7 -	static void showPanelAndSelect(const LLUUID& idToSelect);
     6.8 +	// </FS:Ansariel> Optional standalone blocklist floater
     6.9 +	//static void showPanelAndSelect(const LLUUID& idToSelect);
    6.10 +	static void showPanelAndSelect(const LLUUID& idToSelect = LLUUID::null);
    6.11  	
    6.12  private:
    6.13  

mercurial