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

Ansariel 2014-12-11 13:33:06 +01:00
parent e685b22be8
commit bb6761859b
2 changed files with 5 additions and 40 deletions

View File

@ -80,10 +80,6 @@ BOOL LLPanelBlockedList::postBuild()
{
mBlockedList = getChild<LLBlockList>("blocked");
mBlockedList->setCommitOnSelectionChange(TRUE);
// <FS:Ansariel> Performance tweak
mBlockedList->setCommitCallback(boost::bind(&LLPanelBlockedList::onSelectionChanged, this));
// <FS:Ansariel> Blocklist multi selection
mBlockedList->setAllowMultipleSelection(true);
this->setVisibleCallback(boost::bind(&LLPanelBlockedList::removePicker, this));
switch (gSavedSettings.getU32("BlockPeopleSortOrder"))
@ -110,16 +106,12 @@ BOOL LLPanelBlockedList::postBuild()
getChild<LLButton>("unblock_btn")->setCommitCallback(boost::bind(&LLPanelBlockedList::unblockItem, this));
getChild<LLFilterEditor>("blocked_filter_input")->setCommitCallback(boost::bind(&LLPanelBlockedList::onFilterEdit, this, _2));
// <FS:Ansariel> Performance tweak
onSelectionChanged();
return LLPanel::postBuild();
}
void LLPanelBlockedList::draw()
{
// <FS:Ansariel> Performance tweak
//updateButtons();
updateButtons();
LLPanel::draw();
}
@ -133,8 +125,6 @@ void LLPanelBlockedList::onOpen(const LLSD& key)
void LLPanelBlockedList::selectBlocked(const LLUUID& mute_id)
{
// <FS:Ansariel> Clear selection first before selecting new
mBlockedList->resetSelection();
mBlockedList->selectItemByUUID(mute_id);
}
@ -160,27 +150,12 @@ void LLPanelBlockedList::updateButtons()
void LLPanelBlockedList::unblockItem()
{
// <FS:Ansariel> Blocklist multi selection
//LLBlockedListItem* item = mBlockedList->getBlockedItem();
//if (item)
//{
// LLMute mute(item->getUUID(), item->getName());
// LLMuteList::instance().remove(mute);
//}
std::vector<LLPanel*> panels;
mBlockedList->getSelectedItems(panels);
for (std::vector<LLPanel*>::iterator it = panels.begin(); it != panels.end(); ++it)
LLBlockedListItem* item = mBlockedList->getBlockedItem();
if (item)
{
LLBlockedListItem* item = dynamic_cast<LLBlockedListItem*>(*it);
if (item)
{
LLMute mute(item->getUUID(), item->getName());
LLMuteList::getInstance()->remove(mute);
}
LLMute mute(item->getUUID(), item->getName());
LLMuteList::instance().remove(mute);
}
onSelectionChanged();
// </FS:Ansariel>
}
void LLPanelBlockedList::onCustomAction(const LLSD& userdata)
@ -255,13 +230,6 @@ void LLPanelBlockedList::onFilterEdit(const std::string& search_string)
mBlockedList->setNameFilter(filter);
}
// <FS:Ansariel> Performance tweak
void LLPanelBlockedList::onSelectionChanged()
{
updateButtons();
}
// </FS:Ansariel>
void LLPanelBlockedList::callbackBlockPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names)
{
if (names.empty() || ids.empty()) return;

View File

@ -72,9 +72,6 @@ private:
void blockObjectByName();
void onFilterEdit(const std::string& search_string);
// <FS:Ansariel> Performance tweak
void onSelectionChanged();
// List commnads
void onCustomAction(const LLSD& userdata);
BOOL isActionChecked(const LLSD& userdata);