summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelteleporthistory.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2009-12-04 18:09:29 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2009-12-04 18:09:29 +0200
commit6d8fd3114349b9efa14d39fab5c77b886b6eda1b (patch)
tree183549b1a97ec96f74eae315e809dfa43b41b8e1 /indra/newview/llpanelteleporthistory.cpp
parent63096e40de74b6540a87773cc0449a8a12bafb5b (diff)
Implemented normal priority task EXT-2311 (Filter in side panels should highlight results).
Added missing highlighting to people/group lists and teleport history. Btw, the "none" group list entry now gets hidden when user types a filter. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llpanelteleporthistory.cpp')
-rw-r--r--indra/newview/llpanelteleporthistory.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 523487fa14..b3e8588efc 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -38,6 +38,8 @@
#include "llsidetray.h"
#include "llworldmap.h"
#include "llteleporthistorystorage.h"
+#include "lltextutil.h"
+
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
#include "llflatlistview.h"
@@ -57,7 +59,7 @@ static const std::string COLLAPSED_BY_USER = "collapsed_by_user";
class LLTeleportHistoryFlatItem : public LLPanel
{
public:
- LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string &region_name);
+ LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string &region_name, const std::string &hl);
virtual ~LLTeleportHistoryFlatItem() {};
virtual BOOL postBuild();
@@ -82,13 +84,15 @@ private:
S32 mIndex;
std::string mRegionName;
+ std::string mHighlight;
};
-LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string &region_name)
+LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string &region_name, const std::string &hl)
: LLPanel(),
mIndex(index),
mContextMenu(context_menu),
- mRegionName(region_name)
+ mRegionName(region_name),
+ mHighlight(hl)
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_teleport_history_item.xml");
}
@@ -96,8 +100,7 @@ LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistor
//virtual
BOOL LLTeleportHistoryFlatItem::postBuild()
{
- LLTextBox *region = getChild<LLTextBox>("region");
- region->setValue(mRegionName);
+ LLTextUtil::textboxSetHighlightedVal(getChild<LLTextBox>("region"), LLStyle::Params(), mRegionName, mHighlight);
mProfileBtn = getChild<LLButton>("profile_btn");
@@ -521,7 +524,7 @@ void LLTeleportHistoryPanel::refresh()
if (curr_flat_view)
{
- LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle);
+ LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle, mFilterSubString);
curr_flat_view->addItem(item);
if (mLastSelectedItemIndex == mCurrentItem)
@@ -568,7 +571,8 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index)
const LLTeleportHistoryStorage::slurl_list_t& history_items = mTeleportHistory->getItems();
LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(history_items.size(), // index will be decremented inside loop below
&mContextMenu,
- history_items[history_items.size() - 1].mTitle); // Most recent item, it was
+ history_items[history_items.size() - 1].mTitle, // Most recent item, it was
+ mFilterSubString);
// added instead of removed
fv->addItem(item, LLUUID::null, ADD_TOP);