From c6108f0fadd54a60c8bbeecb3f3604073a934c73 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 15 Jan 2010 11:07:37 +0000 Subject: EXT-4125: Regexes hurt my head! Updated the regex to match a free URL in plain text with no http: protocol. This now explicitly does not match e-mail addresses, such as test@lindenlab.com (yay negative lookbehind regexes). It additionally matches URLs with a port or path after it, e.g., secondlife.com/status. I've added a bunch more unit tests to asset positive and negative matches for this regex, because no human can do this in their head. --- indra/llui/llurlentry.cpp | 2 +- indra/llui/tests/llurlentry_test.cpp | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 1b6dd1b264..4927e57a52 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -204,7 +204,7 @@ LLUrlEntryHTTPNoProtocol::LLUrlEntryHTTPNoProtocol() mPattern = boost::regex("(" "\\bwww\\.\\S+\\.\\S+" // i.e. www.FOO.BAR "|" // or - "\\b[^ \\t\\n\\r\\f\\v:/]+\\.(?:com|net|edu|org)[^[:space:][:alnum:]]*\\>" // i.e. FOO.net + "(? Date: Fri, 15 Jan 2010 12:37:56 +0000 Subject: EXT-4233: Display "?" button on torn-off floaters. This involved tracking the torn-off state of a floater, which we apparently weren't doing before. Also, making sure that we update the title bar buttons when the floater changes torn-off state. --- indra/llui/llfloater.cpp | 6 ++++-- indra/llui/llfloater.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index a17e306325..980cd2abd7 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -233,6 +233,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mAutoFocus(TRUE), // automatically take focus when opened mCanDock(false), mDocked(false), + mTornOff(false), mHasBeenDraggedWhileMinimized(FALSE), mPreviousMinimizedBottom(0), mPreviousMinimizedLeft(0) @@ -1456,6 +1457,7 @@ void LLFloater::onClickTearOff(LLFloater* self) } self->setTornOff(false); } + self->updateButtons(); } // static @@ -1748,8 +1750,8 @@ void LLFloater::updateButtons() if (i == BUTTON_HELP) { // don't show the help button if the floater is minimized - // or if it is a tear-off hosted floater - if (isMinimized() || mButtonsEnabled[BUTTON_TEAR_OFF]) + // or if it is a docked tear-off floater + if (isMinimized() || (mButtonsEnabled[BUTTON_TEAR_OFF] && ! mTornOff)) { enabled = false; } diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index daf558de24..f70495c0f0 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -256,7 +256,7 @@ public: bool isDocked() const { return mDocked; } virtual void setDocked(bool docked, bool pop_on_undock = true); - virtual void setTornOff(bool torn_off) {} + virtual void setTornOff(bool torn_off) { mTornOff = torn_off; } // Return a closeable floater, if any, given the current focus. static LLFloater* getClosableFloaterFromFocus(); @@ -387,6 +387,7 @@ private: bool mCanDock; bool mDocked; + bool mTornOff; static LLMultiFloater* sHostp; static BOOL sQuitting; -- cgit v1.2.3 From 5c09d482a47a8894ebebc9d3c8053b25a280f58e Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 15 Jan 2010 18:01:31 +0000 Subject: EXT-4148 EXT-4230: Lots of help ID updates. Updated the logic of the help ID detection to search sub-panels before searching active tabs. For some reason, certain tabs are still visible and active even though they are not being displayed on screen. I also removed a bunch of help IDs for button panels that just confuse things. Also went through all of the side panel tabs and added new help IDs where appropriate. These are: profile_classified_info profile_edit_classified profile_pick_info profile_edit_pick my_inventory_tab recent_inventory_tab --- indra/llui/lluictrl.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index f016c0af89..3ade46d367 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -868,14 +868,6 @@ bool LLUICtrl::findHelpTopic(std::string& help_topic_out) if (panel) { - // does the panel have an active tab with a help topic? - LLPanel *tab = panel->childGetVisibleTabWithHelp(); - if (tab) - { - help_topic_out = tab->getHelpTopic(); - return true; // success (tab) - } - // does the panel have a sub-panel with a help topic? LLPanel *subpanel = panel->childGetVisiblePanelWithHelp(); if (subpanel) @@ -884,6 +876,14 @@ bool LLUICtrl::findHelpTopic(std::string& help_topic_out) return true; // success (subpanel) } + // does the panel have an active tab with a help topic? + LLPanel *tab = panel->childGetVisibleTabWithHelp(); + if (tab) + { + help_topic_out = tab->getHelpTopic(); + return true; // success (tab) + } + // otherwise, does the panel have a help topic itself? if (!panel->getHelpTopic().empty()) { -- cgit v1.2.3 From 7efc0fbb4fd912d59a38a4d5653f1dc12c3876b1 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 15 Jan 2010 12:41:51 -0800 Subject: EXT-4383 Replace ">" glyph in cascading menus with a proper triangle patch by josh, reviewed by me --- indra/llui/llmenugl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 21f3f15739..c172a2b714 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -99,7 +99,7 @@ const S32 TEAROFF_SEPARATOR_HEIGHT_PIXELS = 10; const S32 MENU_ITEM_PADDING = 4; const std::string BOOLEAN_TRUE_PREFIX( "\xE2\x9C\x94" ); // U+2714 HEAVY CHECK MARK -const std::string BRANCH_SUFFIX( ">" ); +const std::string BRANCH_SUFFIX( "\xE2\x96\xB6" ); // U+25B6 BLACK RIGHT-POINTING TRIANGLE const std::string ARROW_UP ("^^^^^^^"); const std::string ARROW_DOWN("vvvvvvv"); -- cgit v1.2.3 From cf2beaeea6d4ccd8a0a0448660ddd120aeed5823 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 15 Jan 2010 13:16:58 -0800 Subject: EXT-4380 - LLTextEditor: line_spacing.multiple option doesn't work well with "widgeted" text partial fix reviewed by Leyla --- indra/llui/lltextbase.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 5ebf49c488..17aecaf32f 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -346,7 +346,8 @@ void LLTextBase::drawSelectionBackground() S32 segment_line_start = segmentp->getStart() + segment_offset; S32 segment_line_end = llmin(segmentp->getEnd(), line_iter->mDocIndexEnd); - S32 segment_width, segment_height; + S32 segment_width = 0; + S32 segment_height = 0; // if selection after beginning of segment if(selection_left >= segment_line_start) @@ -433,7 +434,8 @@ void LLTextBase::drawCursor() if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode() && !hasSelection()) { - S32 segment_width, segment_height; + S32 segment_width = 0; + S32 segment_height = 0; segmentp->getDimensions(mCursorPos - segmentp->getStart(), 1, segment_width, segment_height); S32 width = llmax(CURSOR_THICKNESS, segment_width); cursor_rect.mRight = cursor_rect.mLeft + width; @@ -2443,10 +2445,12 @@ void LLNormalTextSegment::setToolTip(const std::string& tooltip) bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { - height = mFontHeight; + height = 0; + width = 0; bool force_newline = false; if (num_chars > 0) { + height = mFontHeight; LLWString text = mEditor.getWText(); // if last character is a newline, then return true, forcing line break llwchar last_char = text[mStart + first_char + num_chars - 1]; @@ -2461,10 +2465,6 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars); } } - else - { - width = 0; - } LLUIImagePtr image = mStyle->getImage(); if( image.notNull()) -- cgit v1.2.3 From e8cbd586a91e8bd787fa42e28ece62ca3affc75b Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Mon, 18 Jan 2010 17:10:11 +0200 Subject: Fixed normal bug EXT-4379 (Scroller doesn't follow the cursor if cursor is being moved by keyboard arrow buttons) --HG-- branch : product-engine --- indra/llui/llflatlistview.cpp | 9 +-------- indra/llui/llscrollcontainer.cpp | 5 +++++ 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 9cfc67af14..3694ecd4f4 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -711,19 +711,12 @@ void LLFlatListView::selectLastItem () void LLFlatListView::ensureSelectedVisible() { - LLRect visible_rc = getVisibleContentRect(); LLRect selected_rc = getLastSelectedItemRect(); - if ( !visible_rc.contains (selected_rc) ) + if ( selected_rc.isValid() ) { - // But scroll in Items panel coordinates scrollToShowRect(selected_rc); } - - // In case we are in accordion tab notify parent to show selected rectangle - LLRect screen_rc; - localRectToScreen(selected_rc, &screen_rc); - notifyParent(LLSD().with("scrollToShowRect",screen_rc.getValue())); } diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index a5e47e8547..94465a67ce 100644 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -668,6 +668,11 @@ void LLScrollContainer::scrollToShowRect(const LLRect& rect, const LLRect& const // propagate scroll to document updateScroll(); + + // In case we are in accordion tab notify parent to show selected rectangle + LLRect screen_rc; + localRectToScreen(rect_to_constrain, &screen_rc); + notifyParent(LLSD().with("scrollToShowRect",screen_rc.getValue())); } void LLScrollContainer::pageUp(S32 overlap) -- cgit v1.2.3