diff options
Diffstat (limited to 'indra/llui')
-rwxr-xr-x | indra/llui/llbutton.cpp | 2 | ||||
-rwxr-xr-x | indra/llui/llcommandmanager.cpp | 4 | ||||
-rwxr-xr-x | indra/llui/llcommandmanager.h | 7 | ||||
-rwxr-xr-x | indra/llui/llscrolllistctrl.cpp | 4 | ||||
-rwxr-xr-x | indra/llui/lltabcontainer.cpp | 23 | ||||
-rwxr-xr-x | indra/llui/lltabcontainer.h | 11 | ||||
-rwxr-xr-x | indra/llui/lltextbase.cpp | 10 | ||||
-rwxr-xr-x | indra/llui/lltextbase.h | 14 | ||||
-rwxr-xr-x | indra/llui/lltoolbar.cpp | 2 | ||||
-rwxr-xr-x | indra/llui/llurlaction.cpp | 12 | ||||
-rwxr-xr-x | indra/llui/llurlaction.h | 8 | ||||
-rwxr-xr-x | indra/llui/llurlentry.cpp | 6 |
12 files changed, 21 insertions, 82 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 50ac511d18..3cfe5ac57f 100755 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -641,7 +641,7 @@ void LLButton::draw() bool use_glow_effect = FALSE; LLColor4 highlighting_color = LLColor4::white; - LLColor4 glow_color; + LLColor4 glow_color = LLColor4::white; LLRender::eBlendType glow_type = LLRender::BT_ADD_WITH_ALPHA; LLUIImage* imagep = NULL; diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index 49cfb2255e..625fb8e870 100755 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -50,8 +50,6 @@ const LLCommandId LLCommandId::null = LLCommandId("null command"); LLCommand::Params::Params() : available_in_toybox("available_in_toybox", false) , icon("icon") - , hover_icon_unselected("hover_icon_unselected") - , hover_icon_selected("hover_icon_selected") , label_ref("label_ref") , name("name") , tooltip_ref("tooltip_ref") @@ -73,8 +71,6 @@ LLCommand::LLCommand(const LLCommand::Params& p) : mIdentifier(p.name) , mAvailableInToybox(p.available_in_toybox) , mIcon(p.icon) - , mHoverIconUnselected(p.hover_icon_unselected) - , mHoverIconSelected(p.hover_icon_selected) , mLabelRef(p.label_ref) , mName(p.name) , mTooltipRef(p.tooltip_ref) diff --git a/indra/llui/llcommandmanager.h b/indra/llui/llcommandmanager.h index 9f276f712d..ff5a8a3257 100755 --- a/indra/llui/llcommandmanager.h +++ b/indra/llui/llcommandmanager.h @@ -96,9 +96,6 @@ public: Mandatory<std::string> name; Mandatory<std::string> tooltip_ref; - Optional<std::string> hover_icon_selected; - Optional<std::string> hover_icon_unselected; - Mandatory<std::string> execute_function; Optional<LLSD> execute_parameters; @@ -127,8 +124,6 @@ public: const std::string& labelRef() const { return mLabelRef; } const std::string& name() const { return mName; } const std::string& tooltipRef() const { return mTooltipRef; } - const std::string& hoverIconUnselected() const {return mHoverIconUnselected; } - const std::string& hoverIconSelected() const {return mHoverIconSelected; } const std::string& executeFunctionName() const { return mExecuteFunction; } const LLSD& executeParameters() const { return mExecuteParameters; } @@ -155,8 +150,6 @@ private: std::string mLabelRef; std::string mName; std::string mTooltipRef; - std::string mHoverIconUnselected; - std::string mHoverIconSelected; std::string mExecuteFunction; LLSD mExecuteParameters; diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index d290413f7a..594e1e150b 100755 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1855,9 +1855,7 @@ void LLScrollListCtrl::showNameDetails(std::string id, bool is_group) // open the resident's details or the group details std::string sltype = is_group ? "group" : "agent"; std::string slurl = "secondlife:///app/" + sltype + "/" + id + "/about"; - LLUrlAction::clickAction(slurl); - // MAINT-535 reversion test - //LLUrlAction::clickAction(slurl, true); + LLUrlAction::clickAction(slurl, true); } void LLScrollListCtrl::copyNameToClipboard(std::string id, bool is_group) diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 6fd2bb1b36..76ba53ec32 100755 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -193,15 +193,12 @@ LLTabContainer::TabParams::TabParams() : tab_top_image_unselected("tab_top_image_unselected"), tab_top_image_selected("tab_top_image_selected"), tab_top_image_flash("tab_top_image_flash"), - tab_top_image_hovered("tab_top_image_hovered"), tab_bottom_image_unselected("tab_bottom_image_unselected"), tab_bottom_image_selected("tab_bottom_image_selected"), tab_bottom_image_flash("tab_bottom_image_flash"), - tab_bottom_image_hovered("tab_bottom_image_hovered"), tab_left_image_unselected("tab_left_image_unselected"), tab_left_image_selected("tab_left_image_selected"), - tab_left_image_flash("tab_left_image_flash"), - tab_left_image_hovered("tab_left_image_hovered") + tab_left_image_flash("tab_left_image_flash") {} LLTabContainer::Params::Params() @@ -221,8 +218,7 @@ LLTabContainer::Params::Params() open_tabs_on_drag_and_drop("open_tabs_on_drag_and_drop", false), tab_icon_ctrl_pad("tab_icon_ctrl_pad", 0), use_ellipses("use_ellipses"), - font_halign("halign"), - use_highlighting_on_hover("use_highlighting_on_hover",false) + font_halign("halign") {} LLTabContainer::LLTabContainer(const LLTabContainer::Params& p) @@ -258,8 +254,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p) mCustomIconCtrlUsed(p.use_custom_icon_ctrl), mOpenTabsOnDragAndDrop(p.open_tabs_on_drag_and_drop), mTabIconCtrlPad(p.tab_icon_ctrl_pad), - mUseTabEllipses(p.use_ellipses), - mUseHighlightingOnHover(p.use_highlighting_on_hover) + mUseTabEllipses(p.use_ellipses) { static LLUICachedControl<S32> tabcntr_vert_tab_min_width ("UITabCntrVertTabMinWidth", 0); @@ -908,30 +903,18 @@ void LLTabContainer::update_images(LLTabTuple* tuple, TabParams params, LLTabCon tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_top_image_unselected)); tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_top_image_selected)); tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_top_image_flash)); - if(mUseHighlightingOnHover) - { - tuple->mButton->setImageHoverUnselected(static_cast<LLUIImage*>(params.tab_top_image_hovered)); - } } else if (pos == LLTabContainer::BOTTOM) { tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_bottom_image_unselected)); tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_bottom_image_selected)); tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_bottom_image_flash)); - if(mUseHighlightingOnHover) - { - tuple->mButton->setImageHoverUnselected(static_cast<LLUIImage*>(params.tab_bottom_image_hovered)); - } } else if (pos == LLTabContainer::LEFT) { tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_left_image_unselected)); tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_left_image_selected)); tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_left_image_flash)); - if(mUseHighlightingOnHover) - { - tuple->mButton->setImageHoverUnselected(static_cast<LLUIImage*>(params.tab_left_image_hovered)); - } } } } diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index 7e7d4ac6e6..57862fc626 100755 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -62,15 +62,12 @@ public: Optional<LLUIImage*> tab_top_image_unselected, tab_top_image_selected, tab_top_image_flash, - tab_top_image_hovered, tab_bottom_image_unselected, tab_bottom_image_selected, tab_bottom_image_flash, - tab_bottom_image_hovered, tab_left_image_unselected, tab_left_image_selected, - tab_left_image_flash, - tab_left_image_hovered; + tab_left_image_flash; TabParams(); }; @@ -117,11 +114,6 @@ public: */ Optional<S32> tab_icon_ctrl_pad; - /** - * This variable is used to found out should we highlight tab button on hover - */ - Optional<bool> use_highlighting_on_hover; - Params(); }; @@ -315,7 +307,6 @@ private: bool mOpenTabsOnDragAndDrop; S32 mTabIconCtrlPad; bool mUseTabEllipses; - bool mUseHighlightingOnHover; }; #endif // LL_TABCONTAINER_H diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index b51053ca4c..4144a42fd6 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -167,8 +167,7 @@ LLTextBase::Params::Params() max_text_length("max_length", 255), font_shadow("font_shadow"), wrap("wrap"), - // MAINT-535 reversion test - // trusted_content("trusted_content", true), + trusted_content("trusted_content", true), use_ellipses("use_ellipses", false), parse_urls("parse_urls", false), parse_highlights("parse_highlights", false) @@ -213,8 +212,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mLineSpacingPixels(p.line_spacing.pixels), mClip(p.clip), mClipPartial(p.clip_partial && !p.allow_scroll), - // MAINT-535 reversion test - // mTrustedContent(p.trusted_content), + mTrustedContent(p.trusted_content), mTrackEnd( p.track_end ), mScrollIndex(-1), mSelectionStart( 0 ), @@ -3168,9 +3166,7 @@ BOOL LLNormalTextSegment::handleMouseUp(S32 x, S32 y, MASK mask) // Only process the click if it's actually in this segment, not to the right of the end-of-line. if(mEditor.getSegmentAtLocalPos(x, y, false) == this) { - LLUrlAction::clickAction(getStyle()->getLinkHREF()); - // MAINT-535 reversion test - // LLUrlAction::clickAction(getStyle()->getLinkHREF(), mEditor.isContentTrusted()); + LLUrlAction::clickAction(getStyle()->getLinkHREF(), mEditor.isContentTrusted()); return TRUE; } } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 515e4d4257..3603f55c3f 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -291,11 +291,9 @@ public: parse_urls, parse_highlights, clip, - clip_partial; - // MAINT-535 reversion test - // clip_partial, - // trusted_content; - + clip_partial, + trusted_content; + Optional<S32> v_pad, h_pad; @@ -364,8 +362,7 @@ public: bool getWordWrap() { return mWordWrap; } bool getUseEllipses() { return mUseEllipses; } bool truncate(); // returns true of truncation occurred - // MAINT-535 reversion test - //bool isContentTrusted() {return mTrustedContent;} + bool isContentTrusted() {return mTrustedContent;} // TODO: move into LLTextSegment? void createUrlContextMenu(S32 x, S32 y, const std::string &url); // create a popup context menu for the given Url @@ -639,8 +636,7 @@ protected: bool mBGVisible; // render background? bool mClip; // clip text to widget rect bool mClipPartial; // false if we show lines that are partially inside bounding rect - // MAINT-535 reversion test - //bool mTrustedContent; // if false, does not allow to execute SURL links from this editor + bool mTrustedContent; // if false, does not allow to execute SURL links from this editor bool mPlainText; // didn't use Image or Icon segments bool mAutoIndent; S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index e692d9847a..ee82e0403b 100755 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -930,8 +930,6 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id) button_p.label = LLTrans::getString(commandp->labelRef()); button_p.tool_tip = LLTrans::getString(commandp->tooltipRef()); button_p.image_overlay = LLUI::getUIImage(commandp->icon()); - button_p.image_hover_unselected = LLUI::getUIImage(commandp->hoverIconUnselected()); - button_p.image_hover_selected = LLUI::getUIImage(commandp->hoverIconSelected()); button_p.button_flash_enable = commandp->isFlashingAllowed(); button_p.overwriteFrom(mButtonParams[mButtonType]); LLToolBarButton* button = LLUICtrlFactory::create<LLToolBarButton>(button_p); diff --git a/indra/llui/llurlaction.cpp b/indra/llui/llurlaction.cpp index e392a88b6a..12537d9dd1 100755 --- a/indra/llui/llurlaction.cpp +++ b/indra/llui/llurlaction.cpp @@ -87,20 +87,14 @@ void LLUrlAction::executeSLURL(std::string url) { if (sExecuteSLURLCallback) { - sExecuteSLURLCallback(url); - // MAINT-535 reversion test - //sExecuteSLURLCallback(url ,true); + sExecuteSLURLCallback(url ,true); } } -// MAINT-535 reversion test -//void LLUrlAction::clickAction(std::string url, bool trusted_content) -void LLUrlAction::clickAction(std::string url) +void LLUrlAction::clickAction(std::string url, bool trusted_content) { // Try to handle as SLURL first, then http Url - // MAINT-535 reversion test - // if ( (sExecuteSLURLCallback) && !sExecuteSLURLCallback(url, trusted_content) ) - if ( (sExecuteSLURLCallback) && !sExecuteSLURLCallback(url) ) + if ( (sExecuteSLURLCallback) && !sExecuteSLURLCallback(url, trusted_content) ) { if (sOpenURLCallback) { diff --git a/indra/llui/llurlaction.h b/indra/llui/llurlaction.h index 407be9a756..5f3626490c 100755 --- a/indra/llui/llurlaction.h +++ b/indra/llui/llurlaction.h @@ -66,9 +66,7 @@ public: static void showLocationOnMap(std::string url); /// perform the appropriate action for left-clicking on a Url - static void clickAction(std::string url); - // MAINT-535 reversion test - //static void clickAction(std::string url, bool trusted_content); + static void clickAction(std::string url, bool trusted_content); /// copy the label for a Url to the clipboard static void copyLabelToClipboard(std::string url); @@ -88,9 +86,7 @@ public: /// specify the callbacks to enable this class's functionality typedef boost::function<void (const std::string&)> url_callback_t; - typedef boost::function<bool(const std::string& url)> execute_url_callback_t; - // MAINT-535 reversion test - //typedef boost::function<bool(const std::string& url, bool trusted_content)> execute_url_callback_t; + typedef boost::function<bool(const std::string& url, bool trusted_content)> execute_url_callback_t; static void setOpenURLCallback(url_callback_t cb); static void setOpenURLInternalCallback(url_callback_t cb); diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 2d28ac41b2..840f67968d 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1067,10 +1067,8 @@ LLUrlEntrySLLabel::LLUrlEntrySLLabel() std::string LLUrlEntrySLLabel::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { - // MAINT-535 reversion test - // std::string label = getLabelFromWikiLink(url); - // return (!LLUrlRegistry::instance().hasUrl(label)) ? label : getUrl(url); - return getLabelFromWikiLink(url); + std::string label = getLabelFromWikiLink(url); + return (!LLUrlRegistry::instance().hasUrl(label)) ? label : getUrl(url); } std::string LLUrlEntrySLLabel::getUrl(const std::string &string) const |