summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfolderview.cpp4
-rw-r--r--indra/llui/llfolderview.h3
-rw-r--r--indra/llui/llfolderviewitem.cpp5
-rw-r--r--indra/llui/lltextutil.cpp20
-rw-r--r--indra/llui/lltextutil.h6
5 files changed, 35 insertions, 3 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 3282c5f726..8166ef6a07 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -1629,9 +1629,9 @@ void LLFolderView::update()
if (mNeedsAutoSelect)
{
LL_RECORD_BLOCK_TIME(FTM_AUTO_SELECT);
- // select new item only if a filtered item not currently selected
+ // select new item only if a filtered item not currently selected and there was a selection
LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back();
- if (!mAutoSelectOverride && (!selected_itemp || !selected_itemp->getViewModelItem()->potentiallyVisible()))
+ if (!mAutoSelectOverride && selected_itemp && !selected_itemp->getViewModelItem()->potentiallyVisible())
{
// these are named variables to get around gcc not binding non-const references to rvalues
// and functor application is inherently non-const to allow for stateful functors
diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h
index 114dd7bd2f..b5deefd653 100644
--- a/indra/llui/llfolderview.h
+++ b/indra/llui/llfolderview.h
@@ -242,6 +242,8 @@ public:
bool useLabelSuffix() { return mUseLabelSuffix; }
virtual void updateMenu();
+ void finishRenamingItem( void );
+
// Note: We may eventually have to move that method up the hierarchy to LLFolderViewItem.
LLHandle<LLFolderView> getHandle() const { return getDerivedHandle<LLFolderView>(); }
@@ -255,7 +257,6 @@ protected:
void commitRename( const LLSD& data );
void onRenamerLost();
- void finishRenamingItem( void );
void closeRenamer( void );
bool selectFirstItem();
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 3def0386e1..5eb5ca4f82 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -972,6 +972,11 @@ void LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder)
mIndentation = (getParentFolder())
? getParentFolder()->getIndentation() + mLocalIndentation
: 0;
+
+ if(isOpen() && folder->isOpen())
+ {
+ requestArrange();
+ }
}
static LLTrace::BlockTimerStatHandle FTM_ARRANGE("Arrange");
diff --git a/indra/llui/lltextutil.cpp b/indra/llui/lltextutil.cpp
index fff04b34f2..f6b2ee1dc0 100644
--- a/indra/llui/lltextutil.cpp
+++ b/indra/llui/lltextutil.cpp
@@ -56,6 +56,26 @@ void LLTextUtil::textboxSetHighlightedVal(LLTextBox *txtbox, const LLStyle::Para
txtbox->appendText(text.substr(hl_begin + hl_len), false, normal_style);
}
+void LLTextUtil::textboxSetGreyedVal(LLTextBox *txtbox, const LLStyle::Params& normal_style, const std::string& text, const std::string& greyed)
+{
+ static LLUIColor sGreyedTextColor = LLUIColorTable::instance().getColor("Gray", LLColor4::grey);
+
+ size_t greyed_begin = 0, greyed_len = greyed.size();
+
+ if (greyed_len == 0 || (greyed_begin = text.find(greyed)) == std::string::npos)
+ {
+ txtbox->setText(text, normal_style);
+ return;
+ }
+
+ LLStyle::Params greyed_style = normal_style;
+ greyed_style.color = sGreyedTextColor;
+ txtbox->setText(LLStringUtil::null); // clear text
+ txtbox->appendText(text.substr(0, greyed_begin), false, normal_style);
+ txtbox->appendText(text.substr(greyed_begin, greyed_len), false, greyed_style);
+ txtbox->appendText(text.substr(greyed_begin + greyed_len), false, normal_style);
+}
+
const std::string& LLTextUtil::formatPhoneNumber(const std::string& phone_str)
{
static const std::string PHONE_SEPARATOR = LLUI::sSettingGroups["config"]->getString("AvalinePhoneSeparator");
diff --git a/indra/llui/lltextutil.h b/indra/llui/lltextutil.h
index 1be81ffd62..a9c143e445 100644
--- a/indra/llui/lltextutil.h
+++ b/indra/llui/lltextutil.h
@@ -52,6 +52,12 @@ namespace LLTextUtil
const std::string& text,
const std::string& hl);
+ void textboxSetGreyedVal(
+ LLTextBox *txtbox,
+ const LLStyle::Params& normal_style,
+ const std::string& text,
+ const std::string& greyed);
+
/**
* Formats passed phone number to be more human readable.
*