summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2015-01-30 15:36:00 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2015-01-30 15:36:00 +0200
commitcccdd1fb397240fda99663b403e00b2582c202ba (patch)
treedf59513302ac4dcd4812ccdc65731bc7b53687b3
parent38000f8f18cc4b46c243edcc372b2cfa89cf3bb8 (diff)
MAINT-4853 FIXED Pressing the ENTER key when entering a location into the Type a location field, doesn't log you in
-rwxr-xr-xindra/llui/llcombobox.cpp5
-rwxr-xr-xindra/llui/llcombobox.h6
-rwxr-xr-xindra/newview/llpanellogin.cpp2
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_login.xml2
4 files changed, 13 insertions, 2 deletions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index 56be52f69a..b32aea5ffa 100755
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -788,6 +788,11 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask)
// since the dropdown button eats the key
if (key == KEY_RETURN)
{
+ if (mask == MASK_NONE)
+ {
+ mOnReturnSignal(this, getValue());
+ }
+
// don't show list and don't eat key input when committing
// free-form text entry with RETURN since user already knows
// what they are trying to select
diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h
index 67393504e7..c9b1212b70 100755
--- a/indra/llui/llcombobox.h
+++ b/indra/llui/llcombobox.h
@@ -199,6 +199,11 @@ public:
void setTextEntryCallback( commit_callback_t cb ) { mTextEntryCallback = cb; }
void setTextChangedCallback( commit_callback_t cb ) { mTextChangedCallback = cb; }
+ /**
+ * Connects callback to signal called when Return key is pressed.
+ */
+ boost::signals2::connection setReturnCallback( const commit_signal_t::slot_type& cb ) { return mOnReturnSignal.connect(cb); }
+
void setButtonVisible(BOOL visible);
void onButtonMouseDown();
@@ -231,6 +236,7 @@ private:
commit_callback_t mTextChangedCallback;
commit_callback_t mSelectionCallback;
boost::signals2::connection mTopLostSignalConnection;
+ commit_signal_t mOnReturnSignal;
S32 mLastSelectedIndex;
};
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index b181ea217b..a6a7150ae7 100755
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -210,7 +210,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
LLComboBox* favorites_combo = getChild<LLComboBox>("start_location_combo");
updateLocationSelectorsVisibility(); // separate so that it can be called from preferences
- favorites_combo->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, this));
+ favorites_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, this));
favorites_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onLocationSLURL, this));
LLComboBox* server_choice_combo = getChild<LLComboBox>("server_combo");
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 204d812250..183ae2e824 100755
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -85,7 +85,7 @@
label="My favorite places"
height="32"
max_chars="128"
- combo_editor.font="SansSerifMedium"
+ combo_editor.font="SansSerifLarge"
left_pad="15"
bottom_delta="0"
name="start_location_combo"