Undo FS-specific changes to LLPanelBlockedList that aren't needed anymore due to FSPanelBlockList

Thu, 11 Dec 2014 13:33:06 +0100

author
Ansariel
date
Thu, 11 Dec 2014 13:33:06 +0100
changeset 43052
88af26453015
parent 43051
f4430bbf5430
child 43053
dd80385c8079

Undo FS-specific changes to LLPanelBlockedList that aren't needed anymore due to FSPanelBlockList

indra/newview/llpanelblockedlist.cpp file | annotate | diff | revisions
indra/newview/llpanelblockedlist.h file | annotate | diff | revisions
     1.1 --- a/indra/newview/llpanelblockedlist.cpp	Thu Dec 11 13:26:56 2014 +0100
     1.2 +++ b/indra/newview/llpanelblockedlist.cpp	Thu Dec 11 13:33:06 2014 +0100
     1.3 @@ -80,10 +80,6 @@
     1.4  {
     1.5  	mBlockedList = getChild<LLBlockList>("blocked");
     1.6  	mBlockedList->setCommitOnSelectionChange(TRUE);
     1.7 -	// <FS:Ansariel> Performance tweak
     1.8 -	mBlockedList->setCommitCallback(boost::bind(&LLPanelBlockedList::onSelectionChanged, this));
     1.9 -	// <FS:Ansariel> Blocklist multi selection
    1.10 -	mBlockedList->setAllowMultipleSelection(true);
    1.11      this->setVisibleCallback(boost::bind(&LLPanelBlockedList::removePicker, this));
    1.12  
    1.13  	switch (gSavedSettings.getU32("BlockPeopleSortOrder"))
    1.14 @@ -110,16 +106,12 @@
    1.15  	getChild<LLButton>("unblock_btn")->setCommitCallback(boost::bind(&LLPanelBlockedList::unblockItem, this));
    1.16  	getChild<LLFilterEditor>("blocked_filter_input")->setCommitCallback(boost::bind(&LLPanelBlockedList::onFilterEdit, this, _2));
    1.17  
    1.18 -	// <FS:Ansariel> Performance tweak
    1.19 -	onSelectionChanged();
    1.20 -
    1.21  	return LLPanel::postBuild();
    1.22  }
    1.23  
    1.24  void LLPanelBlockedList::draw()
    1.25  {
    1.26 -	// <FS:Ansariel> Performance tweak
    1.27 -	//updateButtons();
    1.28 +	updateButtons();
    1.29  	LLPanel::draw();
    1.30  }
    1.31  
    1.32 @@ -133,8 +125,6 @@
    1.33  
    1.34  void LLPanelBlockedList::selectBlocked(const LLUUID& mute_id)
    1.35  {
    1.36 -	// <FS:Ansariel> Clear selection first before selecting new
    1.37 -	mBlockedList->resetSelection();
    1.38  	mBlockedList->selectItemByUUID(mute_id);
    1.39  }
    1.40  
    1.41 @@ -160,27 +150,12 @@
    1.42  
    1.43  void LLPanelBlockedList::unblockItem()
    1.44  {
    1.45 -	// <FS:Ansariel> Blocklist multi selection
    1.46 -	//LLBlockedListItem* item = mBlockedList->getBlockedItem();
    1.47 -	//if (item)
    1.48 -	//{
    1.49 -	//	LLMute mute(item->getUUID(), item->getName());
    1.50 -	//	LLMuteList::instance().remove(mute);
    1.51 -	//}
    1.52 -
    1.53 -	std::vector<LLPanel*> panels;
    1.54 -	mBlockedList->getSelectedItems(panels);
    1.55 -	for (std::vector<LLPanel*>::iterator it = panels.begin(); it != panels.end(); ++it)
    1.56 +	LLBlockedListItem* item = mBlockedList->getBlockedItem();
    1.57 +	if (item)
    1.58  	{
    1.59 -		LLBlockedListItem* item = dynamic_cast<LLBlockedListItem*>(*it);
    1.60 -		if (item)
    1.61 -		{
    1.62 -			LLMute mute(item->getUUID(), item->getName());
    1.63 -			LLMuteList::getInstance()->remove(mute);
    1.64 -		}
    1.65 +		LLMute mute(item->getUUID(), item->getName());
    1.66 +		LLMuteList::instance().remove(mute);
    1.67  	}
    1.68 -	onSelectionChanged();
    1.69 -	// </FS:Ansariel>
    1.70  }
    1.71  
    1.72  void LLPanelBlockedList::onCustomAction(const LLSD& userdata)
    1.73 @@ -255,13 +230,6 @@
    1.74  	mBlockedList->setNameFilter(filter);
    1.75  }
    1.76  
    1.77 -// <FS:Ansariel> Performance tweak
    1.78 -void LLPanelBlockedList::onSelectionChanged()
    1.79 -{
    1.80 -	updateButtons();
    1.81 -}
    1.82 -// </FS:Ansariel>
    1.83 -
    1.84  void LLPanelBlockedList::callbackBlockPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names)
    1.85  {
    1.86  	if (names.empty() || ids.empty()) return;
     2.1 --- a/indra/newview/llpanelblockedlist.h	Thu Dec 11 13:26:56 2014 +0100
     2.2 +++ b/indra/newview/llpanelblockedlist.h	Thu Dec 11 13:33:06 2014 +0100
     2.3 @@ -72,9 +72,6 @@
     2.4  	void blockObjectByName();
     2.5  	void onFilterEdit(const std::string& search_string);
     2.6  
     2.7 -	// <FS:Ansariel> Performance tweak
     2.8 -	void onSelectionChanged();
     2.9 -
    2.10  	// List commnads
    2.11  	void onCustomAction(const LLSD& userdata);
    2.12  	BOOL isActionChecked(const LLSD& userdata);

mercurial