From 61316403aa7cd430d4bffac8ae517e5563598898 Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Fri, 14 May 2010 13:03:44 +0300 Subject: EXT-7221 FIXED Now the 'Get More >>' link exists exactly before the 'View All >>' link in the Gestures list - Added new setting GesturesMarketplaceURL in settings.xml to represent URL which points to the Gesture's Marketplace. - Added mGetMoreItemIndex instance variable (similar to mViewAllItemIndex which was already there). - Added mGetMoreItemIndex handling in the LLGestureComboList::onCommitGesture() (again, similar to mViewAllItemIndex). - Added new string in strings.xml with name GetMoreGestures to represent Gesture's list item. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/386/ --HG-- branch : product-engine --- indra/newview/llnearbychatbar.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'indra/newview/llnearbychatbar.cpp') diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 1507b7d324..bd504906d5 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -79,6 +79,7 @@ LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p) : LLUICtrl(p) , mLabel(p.label) , mViewAllItemIndex(0) + , mGetMoreItemIndex(0) { LLButton::Params button_params = p.combo_button; button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT); @@ -260,9 +261,12 @@ void LLGestureComboList::refreshGestures() sortByName(); - // store index followed by the last added Gesture and add View All item at bottom - mViewAllItemIndex = idx; - + // store indices for Get More and View All items (idx is the index followed by the last added Gesture) + mGetMoreItemIndex = idx; + mViewAllItemIndex = idx + 1; + + // add Get More and View All items at the bottom + mList->addSimpleElement(LLTrans::getString("GetMoreGestures"), ADD_BOTTOM, LLSD(mGetMoreItemIndex)); mList->addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex)); // Insert label after sorting, at top, with separator below it @@ -318,6 +322,12 @@ void LLGestureComboList::onCommitGesture() return; } + if (mGetMoreItemIndex == index) + { + LLWeb::loadURLExternal(gSavedSettings.getString("GesturesMarketplaceURL")); + return; + } + LLMultiGesture* gesture = mGestures.at(index); if(gesture) { -- cgit v1.2.3 From 56e88c6b2e656a28b25154e27c05e7ced65d90a8 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Thu, 20 May 2010 10:49:15 +0300 Subject: EXT-7367 FIX - eat sroll wheel above gesture popup list reviwed by Mike Antipov at https://codereview.productengine.com/secondlife/r/411 --HG-- branch : product-engine --- indra/newview/llnearbychatbar.cpp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'indra/newview/llnearbychatbar.cpp') diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index bd504906d5..7a525596a0 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -69,6 +69,25 @@ static LLChatTypeTrigger sChatTypeTriggers[] = { { "/shout" , CHAT_TYPE_SHOUT} }; +//ext-7367 +//Problem: gesture list control (actually LLScrollListCtrl) didn't actually process mouse wheel message. +// introduce new gesture list subclass to "eat" mouse wheel messages (and probably some other messages) +class LLGestureScrollListCtrl: public LLScrollListCtrl +{ +protected: + friend class LLUICtrlFactory; + LLGestureScrollListCtrl(const LLScrollListCtrl::Params& params) + :LLScrollListCtrl(params) + { + } +public: + BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) + { + LLScrollListCtrl::handleScrollWheel( x, y, clicks ); + return TRUE; + } +}; + LLGestureComboList::Params::Params() : combo_button("combo_button"), combo_list("combo_list") @@ -90,13 +109,14 @@ LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p) addChild(mButton); - LLScrollListCtrl::Params params = p.combo_list; + LLGestureScrollListCtrl::Params params(p.combo_list); + params.name("GestureComboList"); params.commit_callback.function(boost::bind(&LLGestureComboList::onItemSelected, this, _2)); params.visible(false); params.commit_on_keyboard_movement(false); - mList = LLUICtrlFactory::create(params); + mList = LLUICtrlFactory::create(params); addChild(mList); //****************************Gesture Part********************************/ -- cgit v1.2.3 From 265f77747f9ae7719c338bd9b3e76ba59b130b68 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Thu, 20 May 2010 16:55:06 +0300 Subject: EXT-6598 FIX Handle tooltip message for separator reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/417/ --HG-- branch : product-engine --- indra/newview/llnearbychatbar.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview/llnearbychatbar.cpp') diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 7a525596a0..680ed35fa2 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -70,7 +70,7 @@ static LLChatTypeTrigger sChatTypeTriggers[] = { }; //ext-7367 -//Problem: gesture list control (actually LLScrollListCtrl) didn't actually process mouse wheel message. +//Problem: gesture list control (actually LLScrollListCtrl) didn't actually process mouse wheel message. // introduce new gesture list subclass to "eat" mouse wheel messages (and probably some other messages) class LLGestureScrollListCtrl: public LLScrollListCtrl { @@ -86,6 +86,14 @@ public: LLScrollListCtrl::handleScrollWheel( x, y, clicks ); return TRUE; } + //See EXT-6598 + //Mouse hover over separator will result in not processing tooltip message + //So eat this message + BOOL handleToolTip(S32 x, S32 y, MASK mask) + { + LLScrollListCtrl::handleToolTip( x, y, mask ); + return TRUE; + } }; LLGestureComboList::Params::Params() -- cgit v1.2.3 From 4a4cdd3775114346c6bc7c7a368d412fd78911d5 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 1 Jun 2010 09:50:56 +0300 Subject: EXT-7268 FIXED Disabled local chat edit field for offline mode. reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/454 --HG-- branch : product-engine --- indra/newview/llnearbychatbar.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llnearbychatbar.cpp') diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 680ed35fa2..46f531fdd9 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -34,6 +34,7 @@ #include "message.h" +#include "llappviewer.h" #include "llfloaterreg.h" #include "lltrans.h" @@ -388,6 +389,7 @@ BOOL LLNearbyChatBar::postBuild() mChatBox->setCommitCallback(boost::bind(&LLNearbyChatBar::onChatBoxCommit, this)); mChatBox->setKeystrokeCallback(&onChatBoxKeystroke, this); mChatBox->setFocusLostCallback(boost::bind(&onChatBoxFocusLost, _1, this)); + mChatBox->setFocusReceivedCallback(boost::bind(&LLNearbyChatBar::onChatBoxFocusReceived, this)); mChatBox->setIgnoreArrowKeys( FALSE ); mChatBox->setCommitOnFocusLost( FALSE ); @@ -545,6 +547,11 @@ void LLNearbyChatBar::onChatBoxFocusLost(LLFocusableElement* caller, void* userd gAgent.stopTyping(); } +void LLNearbyChatBar::onChatBoxFocusReceived() +{ + mChatBox->setEnabled(!gDisconnected); +} + EChatType LLNearbyChatBar::processChatTypeTriggers(EChatType type, std::string &str) { U32 length = str.length(); -- cgit v1.2.3