From c58e152236abfc1c414eb6c64783334ca9555b58 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Feb 2010 14:29:43 -0500 Subject: EXT-4801 : hitting trash button for trashed items does not delete item EXT-4957 : add const correctness for LLFolderViewEventListener::isItemRemovable This checkin affects several files but is a lot less scary than it looks. It's mostly to add const correctness, and to rename isInTrash to isItemInTrash so that its naming is consistent with isItemRemovable/isItemMovable. The only functionality change is to disable the trash button when an item is already in the trash. --- indra/newview/llfolderview.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index c6135d3bc3..5c65b2c293 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1272,8 +1272,7 @@ BOOL LLFolderView::canCut() const const LLFolderViewItem* item = *selected_it; const LLFolderViewEventListener* listener = item->getListener(); - // *WARKAROUND: it is too many places where the "isItemRemovable" method should be changed with "const" modifier - if (!listener || !(const_cast(listener))->isItemRemovable()) + if (!listener || !listener->isItemRemovable()) { return FALSE; } -- cgit v1.2.3 From ddfc6efbeeda5d2b08888a7ae0f04df242326e26 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 5 Feb 2010 11:32:33 -0800 Subject: EXT-5025 - Tooltips block mouse clicks EXT-4547 [BSI] it is possible to highlight multiple layers of chat EXT-3844 Mouse wheel camera zoom is not reflected on View popup slider EXT-3103 Add an option to restrict entering non-ascii symbols in text editor. reviewed by Leyla --- indra/newview/llfolderview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index c6135d3bc3..90da0961e3 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -225,7 +225,7 @@ LLFolderView::LLFolderView(const Params& p) params.font(getLabelFontForStyle(LLFontGL::NORMAL)); params.max_length_bytes(DB_INV_ITEM_NAME_STR_LEN); params.commit_callback.function(boost::bind(&LLFolderView::commitRename, this, _2)); - params.prevalidate_callback(&LLLineEditor::prevalidateASCIIPrintableNoPipe); + params.prevalidate_callback(&LLTextValidate::validateASCIIPrintableNoPipe); params.commit_on_focus_lost(true); params.visible(false); mRenamer = LLUICtrlFactory::create (params); -- cgit v1.2.3 From e747e9a3da3166de88dea1af213a36694135b820 Mon Sep 17 00:00:00 2001 From: angela Date: Thu, 11 Feb 2010 22:27:49 +0800 Subject: EXT-4837 [NUX] When filter results in null state, provide a message suggesting the user try global search. --- indra/newview/llfolderview.cpp | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 57c7ba8e27..8dbdfff635 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -195,7 +195,8 @@ LLFolderView::LLFolderView(const Params& p) mCallbackRegistrar(NULL), mParentPanel(p.parent_panel), mUseEllipses(false), - mDraggingOverItem(NULL) + mDraggingOverItem(NULL), + mStatusTextBox(NULL) { LLRect rect = p.rect; LLRect new_rect(rect.mLeft, rect.mBottom + getRect().getHeight(), rect.mLeft + getRect().getWidth(), rect.mBottom); @@ -231,6 +232,18 @@ LLFolderView::LLFolderView(const Params& p) mRenamer = LLUICtrlFactory::create (params); addChild(mRenamer); + // Textbox + LLTextBox::Params text_p; + LLRect new_r(5, 13-50, 300, 0-50); + text_p.name(std::string(p.name)); + text_p.rect(new_r); + text_p.font(getLabelFontForStyle(mLabelStyle)); + text_p.visible(false); + text_p.allow_html(true); + mStatusTextBox = LLUICtrlFactory::create (text_p); + //addChild(mStatusTextBox); + + // make the popup menu available LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if (!menu) @@ -253,6 +266,7 @@ LLFolderView::~LLFolderView( void ) mScrollContainer = NULL; mRenameItem = NULL; mRenamer = NULL; + mStatusTextBox = NULL; if( gEditMenuHandler == this ) { @@ -874,7 +888,7 @@ void LLFolderView::draw() LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } - LLFontGL* font = getLabelFontForStyle(mLabelStyle); + //LLFontGL* font = getLabelFontForStyle(mLabelStyle); // if cursor has moved off of me during drag and drop // close all auto opened folders @@ -911,19 +925,23 @@ void LLFolderView::draw() || mFilter->getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS) { mStatusText.clear(); + mStatusTextBox->setVisible( FALSE ); } else { if (gInventory.backgroundFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration()) { mStatusText = LLTrans::getString("Searching"); - font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); + //font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } else { mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage()); - font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); + //font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } + mStatusTextBox->setValue(mStatusText); + mStatusTextBox->setVisible( TRUE ); + } LLFolderViewFolder::draw(); -- cgit v1.2.3 From 9ebd99d8ae5f1939a1fe48349820c7c6ed6c06a4 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Mon, 15 Feb 2010 20:57:34 +0200 Subject: Fixed low bug (EXT-5251) Status text isn't aligned to top in inventory SP - Changed status textbox rect in folder view. --HG-- branch : product-engine --- indra/newview/llfolderview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 8dbdfff635..3230402bdc 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -234,7 +234,7 @@ LLFolderView::LLFolderView(const Params& p) // Textbox LLTextBox::Params text_p; - LLRect new_r(5, 13-50, 300, 0-50); + LLRect new_r(5, 40, 300, 40-13); text_p.name(std::string(p.name)); text_p.rect(new_r); text_p.font(getLabelFontForStyle(mLabelStyle)); -- cgit v1.2.3 From ef21d64c84a7dd1382ac0da1f14c7707351373fa Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Mon, 15 Feb 2010 22:07:38 +0200 Subject: Fixed normal bug EXT-5328 (Focus is lost after LEFT arrow button has been pressed in Landmarks tab) --HG-- branch : product-engine --- indra/newview/llfolderview.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 3230402bdc..d053933dfb 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1625,7 +1625,11 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) LLFolderViewItem* parent_folder = last_selected->getParentFolder(); if (!last_selected->isOpen() && parent_folder && parent_folder->getParentFolder()) { - setSelection(parent_folder, FALSE, TRUE); + // Don't change selectin to hidden folder. See EXT-5328. + if (!parent_folder->getHidden()) + { + setSelection(parent_folder, FALSE, TRUE); + } } else { -- cgit v1.2.3 From cef352006cf46ceef8d0e2565d9adf44d9e093f1 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Tue, 16 Feb 2010 17:32:29 +0200 Subject: (EXT-5251) Status text isn't aligned to top in inventory SP. - Removed some magic numbers in status textbox positioning. --HG-- branch : product-engine --- indra/newview/llfolderview.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index d053933dfb..888ddbcbc7 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -222,7 +222,7 @@ LLFolderView::LLFolderView(const Params& p) // Escape is handled by reverting the rename, not commiting it (default behavior) LLLineEditor::Params params; params.name("ren"); - params.rect(getRect()); + params.rect(rect); params.font(getLabelFontForStyle(LLFontGL::NORMAL)); params.max_length_bytes(DB_INV_ITEM_NAME_STR_LEN); params.commit_callback.function(boost::bind(&LLFolderView::commitRename, this, _2)); @@ -234,13 +234,19 @@ LLFolderView::LLFolderView(const Params& p) // Textbox LLTextBox::Params text_p; - LLRect new_r(5, 40, 300, 40-13); - text_p.name(std::string(p.name)); + LLFontGL* font = getLabelFontForStyle(mLabelStyle); + LLRect new_r = LLRect(rect.mLeft + ICON_PAD, + rect.mTop - TEXT_PAD, + rect.mRight, + rect.mTop - TEXT_PAD - font->getLineHeight()); text_p.rect(new_r); - text_p.font(getLabelFontForStyle(mLabelStyle)); + text_p.name(std::string(p.name)); + text_p.font(font); text_p.visible(false); text_p.allow_html(true); mStatusTextBox = LLUICtrlFactory::create (text_p); + mStatusTextBox->setFollowsLeft(); + mStatusTextBox->setFollowsTop(); //addChild(mStatusTextBox); -- cgit v1.2.3 From eefdbced383333b75fbe6b2f338c6db74f68d018 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 16 Feb 2010 16:41:16 +0000 Subject: fix implicit cast in 2ea5dc26d479 / EXT-5251 --- indra/newview/llfolderview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 888ddbcbc7..68faaeaa0b 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -236,9 +236,9 @@ LLFolderView::LLFolderView(const Params& p) LLTextBox::Params text_p; LLFontGL* font = getLabelFontForStyle(mLabelStyle); LLRect new_r = LLRect(rect.mLeft + ICON_PAD, - rect.mTop - TEXT_PAD, - rect.mRight, - rect.mTop - TEXT_PAD - font->getLineHeight()); + rect.mTop - TEXT_PAD, + rect.mRight, + rect.mTop - TEXT_PAD - llfloor(font->getLineHeight())); text_p.rect(new_r); text_p.name(std::string(p.name)); text_p.font(font); -- cgit v1.2.3 From e341b84503f71e519d4d7f59117ebbe4210d4287 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Fri, 19 Feb 2010 15:09:20 +0200 Subject: fixed low bug EXT-5423 'Drag a landmark here ...' prompting is cropped in blank Favorites bar panel Cause: LLFolderView did NOT take into account size of status textbox during required height calculation Solution: Reserve size for textbox if the folderview does not have filtered items. --HG-- branch : product-engine --- indra/newview/llfolderview.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 68faaeaa0b..7d527fa98a 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -419,6 +419,11 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen S32 total_width = LEFT_PAD; S32 running_height = mDebugFilters ? llceil(LLFontGL::getFontMonospace()->getLineHeight()) : 0; S32 target_height = running_height; + if(!mHasVisibleChildren)// is there any filtered items ? + { + //Nope. We need to display status textbox, let's reserve some place for it + target_height += mStatusTextBox->getTextPixelHeight(); + } S32 parent_item_height = getRect().getHeight(); for (folders_t::iterator iter = mFolders.begin(); -- cgit v1.2.3