summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2010-02-11 22:27:49 +0800
committerangela <angela@lindenlab.com>2010-02-11 22:27:49 +0800
commite747e9a3da3166de88dea1af213a36694135b820 (patch)
tree4de56e323c182b1e739107cb360092db7ebf9c65 /indra
parent92ee1045f289cc2783b3e7e6f17e0682ced31560 (diff)
EXT-4837 [NUX] When filter results in null state, provide a message suggesting the user try global search.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfolderview.cpp26
-rw-r--r--indra/newview/llfolderview.h5
-rw-r--r--indra/newview/llinventorypanel.cpp1
-rw-r--r--indra/newview/llplacesinventorypanel.cpp1
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_people.xml2
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml2
7 files changed, 34 insertions, 11 deletions
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<LLLineEditor> (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<LLTextBox> (text_p);
+ //addChild(mStatusTextBox);
+
+
// make the popup menu available
LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("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();
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 56ebdfcf79..faf6a9cf23 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -62,6 +62,7 @@ class LLLineEditor;
class LLMenuGL;
class LLScrollContainer;
class LLUICtrl;
+class LLTextBox;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLFolderViewFunctor
@@ -327,7 +328,7 @@ protected:
LLUUID mSelectThisID; // if non null, select this item
- LLPanel* mParentPanel;
+ LLPanel* mParentPanel;
/**
* Is used to determine if we need to cut text In LLFolderViewItem to avoid horizontal scroll.
@@ -344,6 +345,8 @@ protected:
public:
static F32 sAutoOpenTime;
+ LLTextBox* mStatusTextBox;
+
};
bool sort_item_name(LLFolderViewItem* a, LLFolderViewItem* b);
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 467255d1a7..ca9b942629 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -143,6 +143,7 @@ BOOL LLInventoryPanel::postBuild()
addChild(mScroller);
mScroller->addChild(mFolders);
mFolders->setScrollContainer(mScroller);
+ mFolders->addChild(mFolders->mStatusTextBox);
}
// Set up the callbacks from the inventory we're viewing, and then build everything.
diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp
index 6c6eb7c719..f1e450a083 100644
--- a/indra/newview/llplacesinventorypanel.cpp
+++ b/indra/newview/llplacesinventorypanel.cpp
@@ -118,6 +118,7 @@ BOOL LLPlacesInventoryPanel::postBuild()
mScroller->addChild(mFolders);
mFolders->setScrollContainer(mScroller);
+ mFolders->addChild(mFolders->mStatusTextBox);
// cut subitems
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index 4030c7184a..c6a4233c9c 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -37,7 +37,7 @@ halign="center"
top_pad="4"
width="305">
<inventory_panel
- border="false"
+ border="false"
follows="all"
height="295"
label="MY INVENTORY"
@@ -48,7 +48,7 @@ halign="center"
top="16"
width="290" />
<inventory_panel
- border="false"
+ border="false"
follows="all"
height="295"
label="RECENT"
@@ -67,7 +67,7 @@ halign="center"
height="30"
layout="bottomleft"
left="0"
- visible="true"
+ visible="true"
name="bottom_panel"
width="330">
<button
@@ -118,7 +118,7 @@ halign="center"
mouse_opaque="false"
name="Inventory Menu"
top="0"
- visible="true"
+ visible="true"
width="290">
<menu
height="101"
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index 31ea54cf40..446bf0dc6e 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -236,7 +236,7 @@ If you're looking for people to hang out with, [secondlife:///app/worldmap try t
layout="topleft"
left="0"
name="group_list"
- no_filtered_groups_msg="No groups"
+ no_filtered_groups_msg="[secondlife:///app/search/groups Try fine the group in search?]"
no_groups_msg="[secondlife:///app/search/groups Try searching for some groups to join.]"
top="0"
width="313" />
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index a5dc14c69d..1a7821e014 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -1805,7 +1805,7 @@ Clears (deletes) the media and all params from the given face.
<string name="LeaveMouselook">Press ESC to return to World View</string>
<!-- inventory -->
- <string name="InventoryNoMatchingItems">No matching items found in inventory.</string>
+ <string name="InventoryNoMatchingItems">[secondlife:///app/search/groups No matching items found in inventory.Try "Search"?]</string>
<string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string>
<string name="InventoryNoTexture">
You do not have a copy of