From 9828faf565d0146739495cb14270c400c9249c8d Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 7 Aug 2009 23:41:29 +0000 Subject: Command: Merging from https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0/indra, revision 1245 to https://svn.aws.productengine.com/secondlife/pe/stable-1/indra, revision 1246 into P:\svn\viewer-2-0\latest\indra, ignoring ancestry * EXT-277 - Modifications to the Location Bar Context Menu * EXT-252 - /whisper, /shout * EXT-254 - IM chiclet counter * EXT-267 - 'Status' drop-down menu doesn't drop in the Side tray / Me panel * EXT-298 - Update Places Panel Spec to reflect latest Create Landmark format * EXT-278 - Input Field History should display human readable names * EXT-317 - Avatar profile isn't opened in the sidetray as Profile Info panel when selecting an avatar in the search * Changes to notification tips * Changes to movement and camera controls * Side Tray functionality additions and code cleanup --- indra/newview/lllocationinputctrl.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/lllocationinputctrl.cpp') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 3880ea91eb..a20296a122 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -234,6 +234,13 @@ BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* // Let the buttons show their tooltips. if (LLUICtrl::handleToolTip(x, y, msg, sticky_rect_screen) && !msg.empty()) { + LLLocationHistory* lh = LLLocationHistory::getInstance(); + const std::string tooltip = lh->getToolTip(msg); + + if (!tooltip.empty()) { + msg = tooltip; + } + return TRUE; } @@ -347,9 +354,6 @@ void LLLocationInputCtrl::onInfoButtonClicked() void LLLocationInputCtrl::onAddLandmarkButtonClicked() { LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); - - // Floater "Add Landmark" functionality moved to Side Tray - //LLFloaterReg::showInstance("add_landmark"); } void LLLocationInputCtrl::onAgentParcelChange() -- cgit v1.2.3 From caa367e5d435a70647c56460741a52b14f41ec9e Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Tue, 11 Aug 2009 06:37:35 +0000 Subject: svn merge -r 129543-130091 skinning-19 -> viewer-2.0.0-3 EXT-172 - adding non-unicode support for group name line_editor EXT-310 text was squished, moved things around so there was was more space between text blocks. EXT-313 "me" panel EXT-314 changed out arrow character for arrow art, added arrow art to textures.xml EXT-315 replaced word "mute" with "block" EXT-322 moved Use Chat Bubbles text box from _chat.xml to _advanced.xml EXT-323 killed some two items EXT-324 and EXT-322 removed small avatar names checkbox and added show chat bubbled checkbox EXT-330 Sidetray filter - text overlaps search icon inside textbox EXT-261 I18N: Labels in /character/avatar_lad.xml are not localizable EXT-392 Rearranged floater_inventory_items_properties.xml to match spec DEV-35897 Filters in sidebar remain active even after user has changed/closed tab DEV-36886 I18N: hardcoded currency format in panel_status_bar.xml/status/buycurrency DEV-36987 - Pressed states needed for widgets DEV-36795 Remove slurl tooltip from navigation bar location box DEV-37184 Move "Block List" out of topmenu and make a button in Prefs > Privacy --- indra/newview/lllocationinputctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lllocationinputctrl.cpp') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index a20296a122..7986d7c861 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -245,7 +245,7 @@ BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* } // Cursor is above the text entry. - msg = LLUI::sShowXUINames ? getShowNamesToolTip() : gAgent.getSLURL(); + msg = LLUI::sShowXUINames ? getShowNamesToolTip() : ""; if (mTextEntry && sticky_rect_screen) { *sticky_rect_screen = mTextEntry->calcScreenRect(); -- cgit v1.2.3 From 0bf4b5f2222ffb8171be094613363427f3b8470a Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Wed, 12 Aug 2009 01:12:27 +0000 Subject: merge https://svn.aws.productengine.com/secondlife/export-from-ll@1277 https://svn.aws.productengine.com/secondlife/pe/stable-1@1297 -> viewer-2-0 Fixes: EXT 208 EXT 366 EXT-211 EXT-245 EXT-246 EXT-278 EXT-279 EXT-280 EXT-298 EXT-301 EXT-304 EXT-311 EXT-317 EXT-318 EXT-319 EXT-339 EXT-343 EXT-344 EXT-346 EXT-349 EXT-350 EXT-351 EXT-354 EXT-355 EXT-358 EXT-360 EXT-362 EXT-369 EXT-372 EXT-374 EXT-381 EXT-382 EXT-383 EXT-395 EXT-396 EXT-412 Other changes: Movement & Caemra controls work Profile and Me panel refactoring Notification refactoring --- indra/newview/lllocationinputctrl.cpp | 64 +++++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 17 deletions(-) (limited to 'indra/newview/lllocationinputctrl.cpp') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 7986d7c861..e2dc7d69a1 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -55,7 +55,7 @@ #include "llviewerinventory.h" #include "llviewerparcelmgr.h" #include "llviewercontrol.h" - +#include "llurllineeditorctrl.h" //============================================================================ /* * "ADD LANDMARK" BUTTON UPDATING LOGIC @@ -163,12 +163,38 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mInfoBtn(NULL), mAddLandmarkBtn(NULL) { + // Lets replace default LLLineEditor with LLLocationLineEditor + // to make needed escaping while copying and cutting url + this->removeChild(mTextEntry); + delete mTextEntry; + + // Can't access old mTextEntry fields as they are protected, so lets build new params + // That is C&P from LLComboBox::createLineEditor function + static LLUICachedControl drop_shadow_button ("DropShadowButton", 0); + S32 arrow_width = mArrowImage ? mArrowImage->getWidth() : 0; + LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0); + text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * drop_shadow_button; + + LLLineEditor::Params params = p.combo_editor; + params.rect(text_entry_rect); + params.default_text(LLStringUtil::null); + params.max_length_bytes(p.max_chars); + params.commit_callback.function(boost::bind(&LLComboBox::onTextCommit, this, _2)); + params.keystroke_callback(boost::bind(&LLComboBox::onTextEntry, this, _1)); + params.focus_lost_callback(NULL); + params.handle_edit_keys_directly(true); + params.commit_on_focus_lost(false); + params.follows.flags(FOLLOWS_ALL); + mTextEntry = LLUICtrlFactory::create(params); + this->addChild(mTextEntry); + // LLLineEditor is replaced with LLLocationLineEditor + // "Place information" button. LLButton::Params info_params = p.info_button; mInfoBtn = LLUICtrlFactory::create(info_params); mInfoBtn->setClickedCallback(boost::bind(&LLLocationInputCtrl::onInfoButtonClicked, this)); addChild(mInfoBtn); - + // "Add landmark" button. LLButton::Params al_params = p.add_landmark_button; if (p.add_landmark_image_enabled()) @@ -187,6 +213,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) addChild(mAddLandmarkBtn); setPrearrangeCallback(boost::bind(&LLLocationInputCtrl::onLocationPrearrange, this, _2)); + getTextEntry()->setMouseUpCallback(boost::bind(&LLLocationInputCtrl::onTextEditorMouseUp, this, _2,_3,_4)); updateWidgetlayout(); @@ -234,24 +261,20 @@ BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* // Let the buttons show their tooltips. if (LLUICtrl::handleToolTip(x, y, msg, sticky_rect_screen) && !msg.empty()) { - LLLocationHistory* lh = LLLocationHistory::getInstance(); - const std::string tooltip = lh->getToolTip(msg); + if (mList->getRect().pointInRect(x, y)) { + LLLocationHistory* lh = LLLocationHistory::getInstance(); + const std::string tooltip = lh->getToolTip(msg); - if (!tooltip.empty()) { - msg = tooltip; + if (!tooltip.empty()) { + msg = tooltip; + } } return TRUE; } - // Cursor is above the text entry. msg = LLUI::sShowXUINames ? getShowNamesToolTip() : ""; - if (mTextEntry && sticky_rect_screen) - { - *sticky_rect_screen = mTextEntry->calcScreenRect(); - } - - return TRUE; + return mTextEntry->getRect().pointInRect(x, y); } BOOL LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask) @@ -328,19 +351,19 @@ void LLLocationInputCtrl::handleLoginComplete() void LLLocationInputCtrl::onFocusReceived() { prearrangeList(); - setText(gAgent.getSLURL()); - if (mTextEntry) - mTextEntry->endSelection(); // we don't want handleMouseUp() to "finish" the selection } void LLLocationInputCtrl::onFocusLost() { LLUICtrl::onFocusLost(); refreshLocation(); + if(mTextEntry->hasSelection()){ + mTextEntry->deselect(); + } } void LLLocationInputCtrl::draw(){ - if(!hasFocus()){ + if(!hasFocus() && gSavedSettings.getBOOL("ShowCoordinatesOption")){ refreshLocation(); } LLComboBox::draw(); @@ -378,6 +401,13 @@ void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data) rebuildLocationHistory(filter); mList->mouseOverHighlightNthItem(-1); // Clear highlight on the last selected item. } +void LLLocationInputCtrl::onTextEditorMouseUp(S32 x, S32 y, MASK mask) +{ + if (!mTextEntry->hasSelection()) { + setText(gAgent.getUnescapedSLURL()); + mTextEntry->selectAll(); + } +} void LLLocationInputCtrl::refresh() { -- cgit v1.2.3