From 3dd2641818f9be3a6a38c8223658814644b06ce8 Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Fri, 8 Oct 2010 01:35:14 +0200 Subject: VWR-23239 FIXED memory leak in LLUIString --- indra/llui/lluistring.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h index 3f91856e26..1ecd9bab36 100644 --- a/indra/llui/lluistring.h +++ b/indra/llui/lluistring.h @@ -68,6 +68,8 @@ public: LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args); LLUIString(const std::string& instring) : mArgs(NULL) { assign(instring); } + ~LLUIString() { delete mArgs; } + void assign(const std::string& instring); LLUIString& operator=(const std::string& s) { assign(s); return *this; } -- cgit v1.2.3 From ea2005edf062b69e88261e2a824bdbb6e2b2db7d Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Fri, 8 Oct 2010 00:53:55 +0200 Subject: fixed indentation in lluistring.h --- indra/llui/lluistring.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h index 1ecd9bab36..6a3a9dba46 100644 --- a/indra/llui/lluistring.h +++ b/indra/llui/lluistring.h @@ -64,7 +64,7 @@ class LLUIString public: // These methods all perform appropriate argument substitution // and modify mOrig where appropriate - LLUIString() : mArgs(NULL), mNeedsResult(false), mNeedsWResult(false) {} + LLUIString() : mArgs(NULL), mNeedsResult(false), mNeedsWResult(false) {} LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args); LLUIString(const std::string& instring) : mArgs(NULL) { assign(instring); } @@ -89,14 +89,14 @@ public: void clear(); void clearArgs() { if (mArgs) mArgs->clear(); } - + // These utility functions are included for text editing. // They do not affect mOrig and do not perform argument substitution void truncate(S32 maxchars); void erase(S32 charidx, S32 len); void insert(S32 charidx, const LLWString& wchars); void replace(S32 charidx, llwchar wc); - + private: // something changed, requiring reformatting of strings void dirty(); @@ -108,7 +108,7 @@ private: void updateResult() const; void updateWResult() const; LLStringUtil::format_map_t& getArgs(); - + std::string mOrig; mutable std::string mResult; mutable LLWString mWResult; // for displaying -- cgit v1.2.3 From b66389df893d1e316a5aabc9523c3f46d6f4c6c8 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Wed, 3 Nov 2010 22:50:09 +0200 Subject: STORM-536 FIXED scrolling to collapsed accordion tab with keyboard arrows in Places SP->My Landmarks. - Fixed scrolling to selected item when a folder view receives selection inside an accordion tab while being out of visible scrolling area. - Fixed scrolling to collapsed accordion tab when it receives selection while being out of visible scrolling area. --- indra/llui/llaccordionctrltab.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 179b32098a..174dba28d0 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -837,8 +837,13 @@ void LLAccordionCtrlTab::showAndFocusHeader() LLRect screen_rc; LLRect selected_rc = header->getRect(); localRectToScreen(selected_rc, &screen_rc); - notifyParent(LLSD().with("scrollToShowRect",screen_rc.getValue())); + // This call to notifyParent() is intended to deliver "scrollToShowRect" command + // to the parent LLAccordionCtrl so by calling it from the direct parent of this + // accordion tab (assuming that the parent is an LLAccordionCtrl) the calls chain + // is shortened and messages from inside the collapsed tabs are avoided. + // See STORM-536. + getParent()->notifyParent(LLSD().with("scrollToShowRect",screen_rc.getValue())); } void LLAccordionCtrlTab::storeOpenCloseState() { -- cgit v1.2.3 From 904738c475bf325666f121b9f9db10e76ec49fcd Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Wed, 3 Nov 2010 22:52:53 +0200 Subject: STORM-536 ADDITIONAL FIX Replaced extra calls to getChild() with using a member pointer to LLAccordionCtrlTabHeader. --- indra/llui/llaccordionctrltab.cpp | 48 ++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 29 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 174dba28d0..9d49c1a831 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -456,8 +456,7 @@ BOOL LLAccordionCtrlTab::handleMouseDown(S32 x, S32 y, MASK mask) { if(y >= (getRect().getHeight() - HEADER_HEIGHT) ) { - LLAccordionCtrlTabHeader* header = getChild(DD_HEADER_NAME); - header->setFocus(true); + mHeader->setFocus(true); changeOpenClose(getDisplayChildren()); //reset stored state @@ -509,10 +508,9 @@ void LLAccordionCtrlTab::setAccordionView(LLView* panel) std::string LLAccordionCtrlTab::getTitle() const { - LLAccordionCtrlTabHeader* header = findChild(DD_HEADER_NAME); - if (header) + if (mHeader) { - return header->getTitle(); + return mHeader->getTitle(); } else { @@ -522,57 +520,51 @@ std::string LLAccordionCtrlTab::getTitle() const void LLAccordionCtrlTab::setTitle(const std::string& title, const std::string& hl) { - LLAccordionCtrlTabHeader* header = findChild(DD_HEADER_NAME); - if (header) + if (mHeader) { - header->setTitle(title, hl); + mHeader->setTitle(title, hl); } } void LLAccordionCtrlTab::setTitleFontStyle(std::string style) { - LLAccordionCtrlTabHeader* header = findChild(DD_HEADER_NAME); - if (header) + if (mHeader) { - header->setTitleFontStyle(style); + mHeader->setTitleFontStyle(style); } } void LLAccordionCtrlTab::setTitleColor(LLUIColor color) { - LLAccordionCtrlTabHeader* header = findChild(DD_HEADER_NAME); - if (header) + if (mHeader) { - header->setTitleColor(color); + mHeader->setTitleColor(color); } } boost::signals2::connection LLAccordionCtrlTab::setFocusReceivedCallback(const focus_signal_t::slot_type& cb) { - LLAccordionCtrlTabHeader* header = findChild(DD_HEADER_NAME); - if (header) + if (mHeader) { - return header->setFocusReceivedCallback(cb); + return mHeader->setFocusReceivedCallback(cb); } return boost::signals2::connection(); } boost::signals2::connection LLAccordionCtrlTab::setFocusLostCallback(const focus_signal_t::slot_type& cb) { - LLAccordionCtrlTabHeader* header = findChild(DD_HEADER_NAME); - if (header) + if (mHeader) { - return header->setFocusLostCallback(cb); + return mHeader->setFocusLostCallback(cb); } return boost::signals2::connection(); } void LLAccordionCtrlTab::setSelected(bool is_selected) { - LLAccordionCtrlTabHeader* header = findChild(DD_HEADER_NAME); - if (header) + if (mHeader) { - header->setSelected(is_selected); + mHeader->setSelected(is_selected); } } @@ -776,8 +768,7 @@ S32 LLAccordionCtrlTab::notify(const LLSD& info) BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent) { - LLAccordionCtrlTabHeader* header = getChild(DD_HEADER_NAME); - if( !header->hasFocus() ) + if( !mHeader->hasFocus() ) return LLUICtrl::handleKey(key, mask, called_from_parent); if ( (key == KEY_RETURN )&& mask == MASK_NONE) @@ -830,12 +821,11 @@ BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent) void LLAccordionCtrlTab::showAndFocusHeader() { - LLAccordionCtrlTabHeader* header = getChild(DD_HEADER_NAME); - header->setFocus(true); - header->setSelected(mSelectionEnabled); + mHeader->setFocus(true); + mHeader->setSelected(mSelectionEnabled); LLRect screen_rc; - LLRect selected_rc = header->getRect(); + LLRect selected_rc = mHeader->getRect(); localRectToScreen(selected_rc, &screen_rc); // This call to notifyParent() is intended to deliver "scrollToShowRect" command -- cgit v1.2.3 From 211e141444a260af553964ee964be3a7a3c5b37e Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Thu, 4 Nov 2010 16:16:18 +0200 Subject: STORM-450 FIXED Incorrect help contexts for Sidebar People tab - Added checking whether panel is in visible chain instead of just visibility checking --- indra/llui/llpanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index c8e56630f1..900e2c789e 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -904,7 +904,7 @@ LLPanel *LLPanel::childGetVisiblePanelWithHelp() child = *it; // do we have a panel with a help topic? LLPanel *panel = dynamic_cast(child); - if (panel && panel->getVisible() && !panel->getHelpTopic().empty()) + if (panel && panel->isInVisibleChain() && !panel->getHelpTopic().empty()) { return panel; } -- cgit v1.2.3 From bc7b6411d9148f918be3f781c55459d044288b6a Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Fri, 5 Nov 2010 18:39:26 -0400 Subject: SEC-784 --- indra/llui/llurlentry.cpp | 8 +++++++- indra/llui/llurlentry.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index f58c07754f..efb3f1a8be 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -209,7 +209,13 @@ LLUrlEntryHTTPLabel::LLUrlEntryHTTPLabel() std::string LLUrlEntryHTTPLabel::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { - return getLabelFromWikiLink(url); + std::string label = getLabelFromWikiLink(url); + return (!LLUrlRegistry::instance().hasUrl(label)) ? label : getUrl(url); +} + +std::string LLUrlEntryHTTPLabel::getTooltip(const std::string &string) const +{ + return getUrl(string); } std::string LLUrlEntryHTTPLabel::getUrl(const std::string &string) const diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index f6424c28b8..9b91c103ef 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -133,6 +133,7 @@ class LLUrlEntryHTTPLabel : public LLUrlEntryBase public: LLUrlEntryHTTPLabel(); /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); + /*virtual*/ std::string getTooltip(const std::string &string) const; /*virtual*/ std::string getUrl(const std::string &string) const; }; -- cgit v1.2.3 From 197f09f1ea7c634d619a3d87d65f6e929611c511 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 8 Nov 2010 15:40:27 -0800 Subject: EXP-421 FIX Notifications tab in Preferences not working properly reverted to old sense where ignore setting of notifications has meaning true=show false=ignore reviewed by Callum --- indra/llui/llnotifications.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index dd6c632d10..3dba2d2b83 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -64,7 +64,7 @@ LLNotificationForm::FormElementBase::FormElementBase() LLNotificationForm::FormIgnore::FormIgnore() : text("text"), control("control"), - invert_control("invert_control", true), + invert_control("invert_control", false), save_option("save_option", false) {} @@ -194,7 +194,7 @@ LLNotificationForm::LLNotificationForm() LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotificationForm::Params& p) : mIgnore(IGNORE_NO), - mInvertSetting(true) // ignore settings by default mean true=show, false=ignore + mInvertSetting(false) // ignore settings by default mean true=show, false=ignore { if (p.ignore.isProvided()) { -- cgit v1.2.3 From 8daea83c98d57e7c063bf9287b1e9c0cd720d337 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 8 Nov 2010 19:27:24 -0800 Subject: EXP-421 FIX Notifications tab in Preferences not working properly fixed logic so that ignore consistently means *don't show* the notification the ignore settings still store "show the notification if true" values --- indra/llui/llnotifications.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 3dba2d2b83..d6d3672784 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -219,7 +219,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica } else { - LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Ignore notification with this name", TRUE); + LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Show notification with this name", TRUE); mIgnoreSetting = LLUI::sSettingGroups["ignores"]->getControl(name); } } @@ -357,15 +357,15 @@ LLControlVariablePtr LLNotificationForm::getIgnoreSetting() bool LLNotificationForm::getIgnored() { - bool ignored = false; + bool show = false; if (mIgnore != LLNotificationForm::IGNORE_NO && mIgnoreSetting) { - ignored = mIgnoreSetting->getValue().asBoolean(); - if (mInvertSetting) ignored = !ignored; + show = mIgnoreSetting->getValue().asBoolean(); + if (mInvertSetting) show = !show; } - return ignored; + return !show; } void LLNotificationForm::setIgnored(bool ignored) @@ -373,7 +373,7 @@ void LLNotificationForm::setIgnored(bool ignored) if (mIgnoreSetting) { if (mInvertSetting) ignored = !ignored; - mIgnoreSetting->setValue(ignored); + mIgnoreSetting->setValue(!ignored); } } -- cgit v1.2.3 From 00bd5906a69d3b0723645c3252721d7d6a808b70 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Tue, 9 Nov 2010 18:54:00 +0200 Subject: STORM-535 FIXED PLEASE allow adjustable transparency of "Nearby Chat" window, Chat History and Chat "Toasts" in Viewer 2.0! - Added to the settings.xml values of transparency for active and inactive floaters - Added three members to the LLFloater. These members store current transparency of floater, transparency of active and inactive floaters. - Added callbacks that update transparency value of active and inactive floater. Also in these callbacks value of current floater transparency updated. - In panel preferences advanced added two spinners: transparency of active floaters and inactive ones. See screenshot. --- indra/llui/llfloater.cpp | 42 ++++++++++++++++++++++++++++++++++++------ indra/llui/llfloater.h | 8 ++++++++ 2 files changed, 44 insertions(+), 6 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index b758070419..34d8e9c500 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -61,6 +61,9 @@ // use this to control "jumping" behavior when Ctrl-Tabbing const S32 TABBED_FLOATER_OFFSET = 0; +// static +F32 LLFloater::sActiveFloaterTransparency = 0.0f; +F32 LLFloater::sInactiveFloaterTransparency = 0.0f; std::string LLFloater::sButtonNames[BUTTON_COUNT] = { @@ -200,6 +203,21 @@ void LLFloater::initClass() { sButtonToolTips[i] = LLTrans::getString( sButtonToolTipsIndex[i] ); } + + LLControlVariable* ctrl = LLUI::sSettingGroups["config"]->getControl("ActiveFloaterTransparency").get(); + if (ctrl) + { + ctrl->getSignal()->connect(boost::bind(&LLFloater::updateActiveFloaterTransparency)); + sActiveFloaterTransparency = LLUI::sSettingGroups["config"]->getF32("ActiveFloaterTransparency"); + } + + ctrl = LLUI::sSettingGroups["config"]->getControl("InactiveFloaterTransparency").get(); + if (ctrl) + { + ctrl->getSignal()->connect(boost::bind(&LLFloater::updateInactiveFloaterTransparency)); + sInactiveFloaterTransparency = LLUI::sSettingGroups["config"]->getF32("InactiveFloaterTransparency"); + } + } // defaults for floater param block pulled from widgets/floater.xml @@ -347,6 +365,18 @@ void LLFloater::layoutDragHandle() updateTitleButtons(); } +// static +void LLFloater::updateActiveFloaterTransparency() +{ + sActiveFloaterTransparency = LLUI::sSettingGroups["config"]->getF32("ActiveFloaterTransparency"); +} + +// static +void LLFloater::updateInactiveFloaterTransparency() +{ + sInactiveFloaterTransparency = LLUI::sSettingGroups["config"]->getF32("InactiveFloaterTransparency"); +} + void LLFloater::addResizeCtrls() { // Resize bars (sides) @@ -1622,7 +1652,8 @@ void LLFloater::onClickCloseBtn() // virtual void LLFloater::draw() { - F32 alpha = getDrawContext().mAlpha; + mCurrentTransparency = hasFocus() ? sActiveFloaterTransparency : sInactiveFloaterTransparency; + // draw background if( isBackgroundVisible() ) { @@ -1653,12 +1684,12 @@ void LLFloater::draw() if (image) { // We're using images for this floater's backgrounds - image->draw(getLocalRect(), overlay_color % alpha); + image->draw(getLocalRect(), overlay_color % mCurrentTransparency); } else { // We're not using images, use old-school flat colors - gl_rect_2d( left, top, right, bottom, color % alpha ); + gl_rect_2d( left, top, right, bottom, color % mCurrentTransparency ); // draw highlight on title bar to indicate focus. RDW if(hasFocus() @@ -1670,7 +1701,7 @@ void LLFloater::draw() const LLFontGL* font = LLFontGL::getFontSansSerif(); LLRect r = getRect(); gl_rect_2d_offset_local(0, r.getHeight(), r.getWidth(), r.getHeight() - (S32)font->getLineHeight() - 1, - titlebar_focus_color % alpha, 0, TRUE); + titlebar_focus_color % mCurrentTransparency, 0, TRUE); } } } @@ -1720,7 +1751,6 @@ void LLFloater::draw() void LLFloater::drawShadow(LLPanel* panel) { - F32 alpha = panel->getDrawContext().mAlpha; S32 left = LLPANEL_BORDER_WIDTH; S32 top = panel->getRect().getHeight() - LLPANEL_BORDER_WIDTH; S32 right = panel->getRect().getWidth() - LLPANEL_BORDER_WIDTH; @@ -1737,7 +1767,7 @@ void LLFloater::drawShadow(LLPanel* panel) shadow_color.mV[VALPHA] *= 0.5f; } gl_drop_shadow(left, top, right, bottom, - shadow_color % alpha, + shadow_color % mCurrentTransparency, llround(shadow_offset)); } diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 32d03f9f83..fa806bb632 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -341,6 +341,9 @@ private: void addDragHandle(); void layoutDragHandle(); // repair layout + static void updateActiveFloaterTransparency(); + static void updateInactiveFloaterTransparency(); + public: // Called when floater is opened, passes mKey // Public so external views or floaters can watch for this floater opening @@ -408,6 +411,11 @@ private: bool mDocked; bool mTornOff; + F32 mCurrentTransparency; + + static F32 sActiveFloaterTransparency; + static F32 sInactiveFloaterTransparency; + static LLMultiFloater* sHostp; static BOOL sQuitting; static std::string sButtonNames[BUTTON_COUNT]; -- cgit v1.2.3 From d7bca2b7b151969e45492e2ae244f50960fc4ddf Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 10 Nov 2010 11:38:55 -0800 Subject: EXP-428 FIXED Display of llDialog and some other dialogs that should not be suppressable is broken --- indra/llui/llnotifications.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index d6d3672784..a3df6a3ced 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -357,7 +357,7 @@ LLControlVariablePtr LLNotificationForm::getIgnoreSetting() bool LLNotificationForm::getIgnored() { - bool show = false; + bool show = true; if (mIgnore != LLNotificationForm::IGNORE_NO && mIgnoreSetting) { -- cgit v1.2.3 From 210c0f28e9a351890bb352d6b331708b2b2d75b4 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 10 Nov 2010 15:21:09 -0800 Subject: DN-203 [crashhunters] LLIMModel::LLIMSession::onAvatarNameCach --- indra/llui/llurlentry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 9b91c103ef..1a16056041 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -183,7 +183,7 @@ private: /// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/(completename|displayname|username) /// that displays various forms of user name /// This is a base class for the various implementations of name display -class LLUrlEntryAgentName : public LLUrlEntryBase +class LLUrlEntryAgentName : public LLUrlEntryBase, public boost::signals2::trackable { public: LLUrlEntryAgentName(); -- cgit v1.2.3