summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-04-29 02:38:39 +0100
committerAimee Linden <aimee@lindenlab.com>2010-04-29 02:38:39 +0100
commitb90ece0936149a69b1176adc4ae2508c61e34fd7 (patch)
tree4295b0d766fd6cc80afccac4b689134741b5bb0e /indra/llui
parent46897efc3efade25feaaa1dc67bc131c35202d12 (diff)
parent8c3feea2a2f3bcb648f712f63ea9c4dab8aaa0c3 (diff)
Merge
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llflatlistview.cpp9
-rw-r--r--indra/llui/llflatlistview.h6
-rw-r--r--indra/llui/llloadingindicator.cpp6
-rw-r--r--indra/llui/llspinctrl.cpp5
-rw-r--r--indra/llui/llspinctrl.h1
5 files changed, 18 insertions, 9 deletions
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index e0b2244654..ec247b25c3 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -1147,12 +1147,17 @@ LLFlatListViewEx::LLFlatListViewEx(const Params& p)
}
-void LLFlatListViewEx::updateNoItemsMessage(bool items_filtered)
+void LLFlatListViewEx::updateNoItemsMessage(const std::string& filter_string)
{
+ bool items_filtered = !filter_string.empty();
if (items_filtered)
{
// items were filtered
- setNoItemsCommentText(mNoFilteredItemsMsg);
+ LLStringUtil::format_map_t args;
+ args["[SEARCH_TERM]"] = LLURI::escape(filter_string);
+ std::string text = mNoFilteredItemsMsg;
+ LLStringUtil::format(text, args);
+ setNoItemsCommentText(text);
}
else
{
diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h
index f7d094f7e7..4f718ab0dc 100644
--- a/indra/llui/llflatlistview.h
+++ b/indra/llui/llflatlistview.h
@@ -470,10 +470,10 @@ protected:
/**
* Applies a message for empty list depend on passed argument.
*
- * @param items_filtered - if true message for filtered items will be set, otherwise for
- * completely empty list.
+ * @param filter_string - if is not empty, message for filtered items will be set, otherwise for
+ * completely empty list. Value of filter string will be passed as search_term in SLURL.
*/
- void updateNoItemsMessage(bool items_filtered);
+ void updateNoItemsMessage(const std::string& filter_string);
private:
std::string mNoFilteredItemsMsg;
diff --git a/indra/llui/llloadingindicator.cpp b/indra/llui/llloadingindicator.cpp
index 8dec6ea9df..f8b029e19c 100644
--- a/indra/llui/llloadingindicator.cpp
+++ b/indra/llui/llloadingindicator.cpp
@@ -78,10 +78,8 @@ void LLLoadingIndicator::Data::initSingleton()
LLPointer<LLUIImage> LLLoadingIndicator::Data::getNextImage(S8& idx) const
{
- // Actually selects previous image because
- // current images seem to be in wrong order;
- // performs array bounds checking.
- idx = idx > 0 ? llmin(NIMAGES-1, idx-1) : NIMAGES-1;
+ // Calculate next index, performing array bounds checking.
+ idx = (idx >= NIMAGES || idx < 0) ? 0 : (idx + 1) % NIMAGES;
return mImages[idx];
}
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index 491cd7b6f3..b47f21ed8a 100644
--- a/indra/llui/llspinctrl.cpp
+++ b/indra/llui/llspinctrl.cpp
@@ -457,3 +457,8 @@ BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
return FALSE;
}
+BOOL LLSpinCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
+{
+ // just treat a double click as a second click
+ return handleMouseDown(x, y, mask);
+}
diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h
index 00d6f86f83..06201255d2 100644
--- a/indra/llui/llspinctrl.h
+++ b/indra/llui/llspinctrl.h
@@ -94,6 +94,7 @@ public:
virtual BOOL handleScrollWheel(S32 x,S32 y,S32 clicks);
virtual BOOL handleKeyHere(KEY key, MASK mask);
+ virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
void onEditorCommit(const LLSD& data);
static void onEditorGainFocus(LLFocusableElement* caller, void *userdata);