summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelblockedlist.cpp
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-03-18 18:13:39 +0200
committerMike Antipov <mantipov@productengine.com>2010-03-18 18:13:39 +0200
commit155072934832baf42a0dd01f1d898ccad4782a11 (patch)
tree595380c57414879ae29ecd15987e61e19a838bb5 /indra/newview/llpanelblockedlist.cpp
parent095cd1b639a969686ff5b9fadfce6b90f038590e (diff)
Done normal task EXT-6290 ([TRUNCATION] Block List - type shown after name is truncated when the name is long. need 'en' xui rework)
* Changed the way blocked items are shown in the list. For now they are separated on two columns: Name & Type. If Name is too long it is shown truncated (with ...) * As result remove deprecated methods from LLMute to concatenate its name & type and to extract name & type from the such concatenated string. * reduce include dependence from llmutelist.h --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llpanelblockedlist.cpp')
-rw-r--r--indra/newview/llpanelblockedlist.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp
index 362657a458..a186bc926c 100644
--- a/indra/newview/llpanelblockedlist.cpp
+++ b/indra/newview/llpanelblockedlist.cpp
@@ -119,8 +119,13 @@ void LLPanelBlockedList::refreshBlockedList()
std::vector<LLMute>::iterator it;
for (it = mutes.begin(); it != mutes.end(); ++it)
{
- std::string display_name = it->getDisplayName();
- mBlockedList->addStringUUIDItem(display_name, it->mID, ADD_BOTTOM, TRUE);
+ LLScrollListItem::Params item_p;
+ item_p.enabled(TRUE);
+ item_p.value(it->mID); // link UUID of blocked item with ScrollListItem
+ item_p.columns.add().column("item_name").value(it->mName);//.type("text");
+ item_p.columns.add().column("item_type").value(it->getDisplayType());//.type("text").width(111);
+
+ mBlockedList->addRow(item_p, ADD_BOTTOM);
}
}
@@ -145,9 +150,7 @@ void LLPanelBlockedList::onRemoveBtnClick()
{
std::string name = mBlockedList->getSelectedItemLabel();
LLUUID id = mBlockedList->getStringUUIDSelectedItem();
- LLMute mute(id);
- mute.setFromDisplayName(name);
- // now mute.mName has the suffix trimmed off
+ LLMute mute(id, name);
S32 last_selected = mBlockedList->getFirstSelectedIndex();
if (LLMuteList::getInstance()->remove(mute))