summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llsearchcombobox.cpp17
-rw-r--r--indra/newview/llsearchcombobox.h2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/search_editor.xml4
3 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp
index ab5536a12d..33efae50ae 100644
--- a/indra/newview/llsearchcombobox.cpp
+++ b/indra/newview/llsearchcombobox.cpp
@@ -187,6 +187,23 @@ void LLSearchComboBox::clearHistory()
setTextEntry(LLStringUtil::null);
}
+BOOL LLSearchComboBox::handleKeyHere(KEY key,MASK mask )
+{
+ if(mTextEntry->hasFocus() && MASK_NONE == mask && KEY_DOWN == key)
+ {
+ S32 first = 0;
+ S32 size = 0;
+
+ // get entered text (without auto-complete part)
+ mTextEntry->getSelectionRange(&first, &size);
+ std::string search_query = mTextEntry->getText();
+ search_query.erase(first, size);
+
+ onSearchPrearrange(search_query);
+ }
+ return LLComboBox::handleKeyHere(key, mask);
+}
+
LLSearchHistoryBuilder::LLSearchHistoryBuilder(LLSearchComboBox* combo_box, const std::string& filter)
: mComboBox(combo_box)
, mFilter(filter)
diff --git a/indra/newview/llsearchcombobox.h b/indra/newview/llsearchcombobox.h
index 38f9a5a26b..c23ebc8923 100644
--- a/indra/newview/llsearchcombobox.h
+++ b/indra/newview/llsearchcombobox.h
@@ -63,6 +63,8 @@ public:
*/
void clearHistory();
+ /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
+
~LLSearchComboBox();
protected:
diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
index 15b23ea9b3..8643f919ec 100644
--- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<search_editor
+ clear_button_visible="false"
text_pad_left="4"
select_on_focus="true"
background_image="TextField_Search_Off"
@@ -12,4 +13,7 @@
height="13"
image_unselected="Search"
image_selected="Search" />
+ <clear_button label=""
+ image_unselected="Icon_Close_Foreground"
+ image_selected="Icon_Close_Press" />
</search_editor>