From 1412e4f6671fed1641a0fa4372971aea9ab0bd2f Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 23 Dec 2009 11:58:04 +0200 Subject: Fix for normal bug EXT-3041 - Picks accordion doesn't fit to content. --HG-- branch : product-engine --- indra/llui/llflatlistview.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 26e84a6fe1..a488b00854 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -124,6 +124,8 @@ public: /** Returns full rect of child panel */ const LLRect& getItemsRect() const; + LLRect getRequiredRect() { return getItemsRect(); } + /** Returns distance between items */ const S32 getItemsPad() { return mItemPad; } -- cgit v1.2.3 From 6c48bb9f2df743eb85a91da040d33f0816721aa3 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Wed, 23 Dec 2009 16:51:21 +0200 Subject: =?UTF-8?q?fixed=20EXT-3425=20=E2=80=9CUndocked=20floaters=20focus?= =?UTF-8?q?=20issue=E2=80=9D,=20made=20focus=20be=20passed=20to=20game=20a?= =?UTF-8?q?rea=20in=20case=20floater=20can't=20hold=20focus;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/llui/llfloater.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index d7a692ec9b..845203b420 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2148,6 +2148,11 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) if (give_focus && !gFocusMgr.childHasKeyboardFocus(child)) { child->setFocus(TRUE); + // floater did not take focus, so relinquish focus to world + if (!child->hasFocus()) + { + gFocusMgr.setKeyboardFocus(NULL); + } } } -- cgit v1.2.3 From 170719096ae6f249e7ac0ab7ad368cbaf24115f5 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Wed, 23 Dec 2009 17:01:02 +0200 Subject: Fixed low bug EXT-3007 (Viewer stalls while resetting filter in teleport history) --HG-- branch : product-engine --- indra/llui/llflatlistview.cpp | 88 +++++++++++++++++++++++++++++++++++++++++-- indra/llui/llflatlistview.h | 11 +++++- 2 files changed, 95 insertions(+), 4 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 7b7a3139a4..3754d155cf 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -66,7 +66,7 @@ const LLRect& LLFlatListView::getItemsRect() const return mItemsPanel->getRect(); } -bool LLFlatListView::addItem(LLPanel * item, const LLSD& value /*= LLUUID::null*/, EAddPosition pos /*= ADD_BOTTOM*/) +bool LLFlatListView::addItem(LLPanel * item, const LLSD& value /*= LLUUID::null*/, EAddPosition pos /*= ADD_BOTTOM*/,bool rearrange /*= true*/) { if (!item) return false; if (value.isUndefined()) return false; @@ -97,8 +97,11 @@ bool LLFlatListView::addItem(LLPanel * item, const LLSD& value /*= LLUUID::null* // Children don't accept the focus item->setTabStop(false); - rearrangeItems(); - notifyParentItemsRectChanged(); + if (rearrange) + { + rearrangeItems(); + notifyParentItemsRectChanged(); + } return true; } @@ -980,7 +983,86 @@ S32 LLFlatListView::notify(const LLSD& info) return 1; } } + else if (info.has("rearrange")) + { + rearrangeItems(); + notifyParentItemsRectChanged(); + return 1; + } return 0; } +void LLFlatListView::detachItems(std::vector& detached_items) +{ + LLSD action; + action.with("detach", LLSD()); + // Clear detached_items list + detached_items.clear(); + // Go through items and detach valid items, remove them from items panel + // and add to detached_items. + for (pairs_iterator_t + iter = mItemPairs.begin(), + iter_end = mItemPairs.end(); + iter != iter_end; ++iter) + { + LLPanel* pItem = (*iter)->first; + if (1 == pItem->notify(action)) + { + selectItemPair((*iter), false); + mItemsPanel->removeChild(pItem); + detached_items.push_back(pItem); + } + } + if (!detached_items.empty()) + { + // Some items were detached, clean ourself from unusable memory + if (detached_items.size() == mItemPairs.size()) + { + // This way will be faster if all items were disconnected + for (pairs_iterator_t + iter = mItemPairs.begin(), + iter_end = mItemPairs.end(); + iter != iter_end; ++iter) + { + (*iter)->first = NULL; + delete *iter; + } + mItemPairs.clear(); + // Also set items panel height to zero. + // Reshape it to allow reshaping of non-item children. + LLRect rc = mItemsPanel->getRect(); + rc.mBottom = rc.mTop; + mItemsPanel->reshape(rc.getWidth(), rc.getHeight()); + mItemsPanel->setRect(rc); + setNoItemsCommentVisible(true); + } + else + { + for (std::vector::const_iterator + detached_iter = detached_items.begin(), + detached_iter_end = detached_items.end(); + detached_iter != detached_iter_end; ++detached_iter) + { + LLPanel* pDetachedItem = *detached_iter; + for (pairs_iterator_t + iter = mItemPairs.begin(), + iter_end = mItemPairs.end(); + iter != iter_end; ++iter) + { + item_pair_t* item_pair = *iter; + if (item_pair->first == pDetachedItem) + { + mItemPairs.erase(iter); + item_pair->first = NULL; + delete item_pair; + break; + } + } + } + rearrangeItems(); + } + notifyParentItemsRectChanged(); + } +} + //EOF diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index a488b00854..5999e79f61 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -133,7 +133,7 @@ public: * Adds and item and LLSD value associated with it to the list at specified position * @return true if the item was added, false otherwise */ - virtual bool addItem(LLPanel * item, const LLSD& value = LLUUID::null, EAddPosition pos = ADD_BOTTOM); + virtual bool addItem(LLPanel * item, const LLSD& value = LLUUID::null, EAddPosition pos = ADD_BOTTOM, bool rearrange = true); /** * Insert item_to_add along with associated value to the list right after the after_item. @@ -270,6 +270,15 @@ public: /** Removes all items from the list */ virtual void clear(); + /** + * Removes all items that can be detached from the list but doesn't destroy + * them, caller responsible to manage items after they are detached. + * Detachable item should accept "detach" action via notify() method, + * where it disconnect all callbacks, does other valuable routines and + * return 1. + */ + void detachItems(std::vector& detached_items); + /** * Set comparator to use for future sorts. * -- cgit v1.2.3 From 46948d9fcc9149c3c416167f166aff6ce8fa88d5 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 23 Dec 2009 20:00:48 +0200 Subject: Work on normal task EXT-3636 (Code Improvements: Voice control panels - Make Voice states and fade timeout xml driven) -- made Avatar Item Voice States xml driven. Added fake xml panel file with one textbox per style. Style of the appropriate textbox is applied to avatar item's name -- It was necessary to change visibility of the LLTExtBase::getDefaultStyle() to public. --HG-- branch : product-engine --- indra/llui/lltextbase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index c91578b637..038b9eaa62 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -184,6 +184,7 @@ public: bool scrolledToEnd(); const LLFontGL* getDefaultFont() const { return mDefaultFont; } + LLStyle::Params getDefaultStyle(); public: // Fired when a URL link is clicked @@ -256,7 +257,6 @@ protected: LLTextBase(const Params &p); virtual ~LLTextBase(); void initFromParams(const Params& p); - LLStyle::Params getDefaultStyle(); virtual void onValueChange(S32 start, S32 end); // draw methods -- cgit v1.2.3 From 0312156258f962108ce485c4be95992555b09b32 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Fri, 25 Dec 2009 13:53:11 +0200 Subject: Fixed low bug EXT-3294 - Toasts bunch up in the channel when big docked IM window is opened. --HG-- branch : product-engine --- indra/llui/lldockablefloater.cpp | 1 + indra/llui/lldockablefloater.h | 10 ++++++++++ 2 files changed, 11 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index 63faf44f9d..6a5b475134 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -54,6 +54,7 @@ void LLDockableFloater::init(LLDockableFloater* thiz) LLDockableFloater::LLDockableFloater(LLDockControl* dockControl, const LLSD& key, const Params& params) : LLFloater(key, params), mDockControl(dockControl), mUniqueDocking(true) + , mOverlapsScreenChannel(false) { init(this); } diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index 2c339f4a3f..2c0a484cc8 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -85,6 +85,14 @@ public: LLDockControl* getDockControl(); + /** + * Returns true if screen channel should consider floater's size when drawing toasts. + * + * By default returns false. + */ + virtual bool overlapsScreenChannel() { return mOverlapsScreenChannel && getVisible() && isDocked(); } + virtual void setOverlapsScreenChannel(bool overlaps) { mOverlapsScreenChannel = overlaps; } + private: /** * Provides unique of dockable floater. @@ -105,6 +113,8 @@ private: * non exclusively. */ bool mUniqueDocking; + + bool mOverlapsScreenChannel; }; #endif /* LL_DOCKABLEFLOATER_H */ -- cgit v1.2.3 From dafd9e269f8f743f2168e015c8efccedc662bba0 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Fri, 25 Dec 2009 17:18:51 +0200 Subject: Fixed a memory leak in ContextMenu (EXT-3563). --HG-- branch : product-engine --- indra/llui/llmenugl.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 202ed04fbc..60ef01074b 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3610,6 +3610,11 @@ public: LLContextMenuBranch(const Params&); + virtual ~LLContextMenuBranch() + { + delete mBranch; + } + // called to rebuild the draw label virtual void buildDrawLabel( void ); -- cgit v1.2.3 From 5383fb70c3a3b4abd1262825a5323cce5fb1a1e0 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Sat, 26 Dec 2009 12:04:55 +0200 Subject: =?UTF-8?q?Implemented=20EXT-1627=20=E2=80=9CNearby=20Chat=20windo?= =?UTF-8?q?w=20behavior=20needs=20clarification=E2=80=9D,=20made=20non-uni?= =?UTF-8?q?que=20docked=20floaters=20docks=20without=20dock=20tongue;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/llui/lldockablefloater.h | 11 +++++++++++ indra/llui/lldockcontrol.cpp | 26 ++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index 2c0a484cc8..ae4f99e205 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -50,6 +50,16 @@ public: LOG_CLASS(LLDockableFloater); LLDockableFloater(LLDockControl* dockControl, const LLSD& key, const Params& params = getDefaultParams()); + + /** + * Constructor. + * @param dockControl a pointer to the doc control instance + * @param uniqueDocking - a flag defines is docking should work as tab(at one + * moment only one docked floater can be shown), also this flag defines is dock + * tongue should be used. + * @params key a floater key. + * @params params a floater parameters + */ LLDockableFloater(LLDockControl* dockControl, bool uniqueDocking, const LLSD& key, const Params& params = getDefaultParams()); virtual ~LLDockableFloater(); @@ -93,6 +103,7 @@ public: virtual bool overlapsScreenChannel() { return mOverlapsScreenChannel && getVisible() && isDocked(); } virtual void setOverlapsScreenChannel(bool overlaps) { mOverlapsScreenChannel = overlaps; } + bool getUniqueDocking() { return mUniqueDocking; } private: /** * Provides unique of dockable floater. diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp index 456a2925a3..1c3c8449c5 100644 --- a/indra/llui/lldockcontrol.cpp +++ b/indra/llui/lldockcontrol.cpp @@ -182,6 +182,14 @@ void LLDockControl::moveDockable() LLRect rootRect; mGetAllowedRectCallback(rootRect); + bool unique_docking = false; + LLDockableFloater* dockable_floater = + dynamic_cast (mDockableFloater); + if (dockable_floater != NULL) + { + unique_docking = dockable_floater->getUniqueDocking(); + } + LLRect dockableRect = mDockableFloater->calcScreenRect(); S32 x = 0; S32 y = 0; @@ -208,7 +216,13 @@ void LLDockControl::moveDockable() case TOP: x = dockRect.getCenterX() - dockableRect.getWidth() / 2; - y = dockRect.mTop + mDockTongue->getHeight() + dockableRect.getHeight(); + y = dockRect.mTop + dockableRect.getHeight(); + // unique docking used with dock tongue, so add tongue height o the Y coordinate + if (unique_docking) + { + y += mDockTongue->getHeight(); + } + // check is dockable inside root view rect if (x < rootRect.mLeft) { @@ -273,7 +287,15 @@ void LLDockControl::forceRecalculatePosition() void LLDockControl::drawToungue() { - if (mEnabled) + bool unique_docking = false; + LLDockableFloater* dockable_floater = + dynamic_cast (mDockableFloater); + if (dockable_floater != NULL) + { + unique_docking = dockable_floater->getUniqueDocking(); + } + + if (mEnabled && unique_docking) { mDockTongue->draw(mDockTongueX, mDockTongueY); } -- cgit v1.2.3