Commit 92972880 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files
parents 6ef2f232 15b3b4ef
......@@ -35,10 +35,10 @@ namespace ll
{
class SearchableControl
{
mutable bool mIsHighlighed;
mutable bool mIsHighlighted;
public:
SearchableControl()
: mIsHighlighed( false )
: mIsHighlighted( false )
{ }
virtual ~SearchableControl() = default;
......@@ -50,11 +50,11 @@ namespace ll
void setHighlighted( bool aVal ) const
{
mIsHighlighed = aVal;
mIsHighlighted = aVal;
onSetHighlight( );
}
bool getHighlighted( ) const
{ return mIsHighlighed; }
{ return mIsHighlighted; }
std::string getSearchText() const
{ return _getSearchText(); }
......
......@@ -3082,18 +3082,18 @@ void LLFloaterPreference::disableUnavailableSettings()
void LLFloaterPreference::onUpdateFilterTerm(bool force)
{
LLWString seachValue = utf8str_to_wstring( mFilterEdit->getValue() );
LLWStringUtil::toLower( seachValue );
LLWString searchValue = utf8str_to_wstring( mFilterEdit->getValue() );
LLWStringUtil::toLower( searchValue );
if( !mSearchData || (mSearchData->mLastFilter == seachValue && !force))
if( !mSearchData || (mSearchData->mLastFilter == searchValue && !force))
return;
mSearchData->mLastFilter = seachValue;
mSearchData->mLastFilter = searchValue;
if( !mSearchData->mRootTab )
return;
mSearchData->mRootTab->hightlightAndHide( seachValue );
mSearchData->mRootTab->highlightAndHide( searchValue );
LLTabContainer *pRoot = getChild< LLTabContainer >( "pref core" );
if( pRoot )
pRoot->selectFirstTab();
......
......@@ -38,7 +38,7 @@ void ll::prefs::SearchableItem::setNotHighlighted()
mCtrl->setHighlighted( false );
}
bool ll::prefs::SearchableItem::hightlightAndHide( LLWString const &aFilter )
bool ll::prefs::SearchableItem::highlightAndHide( LLWString const &aFilter )
{
if( mCtrl->getHighlighted() )
return true;
......@@ -65,38 +65,33 @@ bool ll::prefs::SearchableItem::hightlightAndHide( LLWString const &aFilter )
ll::prefs::PanelData::~PanelData()
{}
bool ll::prefs::PanelData::hightlightAndHide( LLWString const &aFilter )
bool ll::prefs::PanelData::highlightAndHide( LLWString const &aFilter )
{
for (auto& itr : mChildren)
itr->setNotHighlighted( );
if (aFilter.empty())
{
return true;
}
itr->setNotHighlighted();
bool bVisible(false);
bool bVisible(mChildren.size() == 0 && aFilter.empty());
for (auto& itr : mChildren)
bVisible |= itr->hightlightAndHide( aFilter );
bVisible |= itr->highlightAndHide(aFilter);
for (auto& itr : mChildPanel)
bVisible |= itr->hightlightAndHide( aFilter );
bVisible |= itr->highlightAndHide(aFilter);
return bVisible;
}
bool ll::prefs::TabContainerData::hightlightAndHide( LLWString const &aFilter )
bool ll::prefs::TabContainerData::highlightAndHide( LLWString const &aFilter )
{
for (auto& itr : mChildren)
itr->setNotHighlighted( );
bool bVisible(false);
for (auto& itr : mChildren)
bVisible |= itr->hightlightAndHide( aFilter );
bVisible |= itr->highlightAndHide( aFilter );
for (auto& itr : mChildPanel)
{
bool bPanelVisible = itr->hightlightAndHide( aFilter );
bool bPanelVisible = itr->highlightAndHide( aFilter );
if(itr->mPanel )
mTabContainer->setTabVisibility(itr->mPanel, bPanelVisible );
bVisible |= bPanelVisible;
......@@ -125,7 +120,7 @@ void ll::statusbar::SearchableItem::setNotHighlighted( )
}
}
bool ll::statusbar::SearchableItem::hightlightAndHide(LLWString const &aFilter, bool hide)
bool ll::statusbar::SearchableItem::highlightAndHide(LLWString const &aFilter, bool hide)
{
if ((mMenu && !mMenu->getVisible() && !mWasHiddenBySearch) || dynamic_cast<LLMenuItemTearOffGL*>(mMenu))
return false;
......@@ -149,7 +144,7 @@ bool ll::statusbar::SearchableItem::hightlightAndHide(LLWString const &aFilter,
bool bVisible(false);
for (auto& itr : mChildren)
bVisible |= itr->hightlightAndHide(aFilter, !bHighlighted);
bVisible |= itr->highlightAndHide(aFilter, !bHighlighted);
if (mCtrl && !bVisible && !bHighlighted)
{
......
......@@ -60,7 +60,7 @@ namespace ll
virtual ~SearchableItem();
void setNotHighlighted();
virtual bool hightlightAndHide( LLWString const &aFilter );
virtual bool highlightAndHide( LLWString const &aFilter );
};
struct PanelData
......@@ -73,13 +73,13 @@ namespace ll
virtual ~PanelData();
virtual bool hightlightAndHide( LLWString const &aFilter );
virtual bool highlightAndHide( LLWString const &aFilter );
};
struct TabContainerData: public PanelData
{
LLTabContainer *mTabContainer;
virtual bool hightlightAndHide( LLWString const &aFilter );
virtual bool highlightAndHide( LLWString const &aFilter );
};
struct SearchData
......@@ -107,7 +107,7 @@ namespace ll
SearchableItem();
void setNotHighlighted( );
bool hightlightAndHide( LLWString const &aFilter, bool hide = true );
bool highlightAndHide( LLWString const &aFilter, bool hide = true );
};
struct SearchData
......
......@@ -706,7 +706,7 @@ void LLStatusBar::onUpdateFilterTerm()
mSearchData->mLastFilter = searchValue;
mSearchData->mRootMenu->hightlightAndHide( searchValue );
mSearchData->mRootMenu->highlightAndHide( searchValue );
gMenuBarView->needsArrange();
}
......
......@@ -2219,8 +2219,7 @@ void send_do_not_disturb_message(LLMessageSystem* msg, const LLUUID& from_id, co
std::string my_name;
LLAgentUI::buildFullname(my_name);
std::string name;
msg->getStringFast(_PREHASH_MessageBlock, _PREHASH_FromAgentName, name);
name = LLCacheName::cleanFullName(name);
gCacheName->getFullName(from_id, name);
std::string response = gSavedPerAccountSettings.getString("DoNotDisturbModeResponse");
pack_instant_message(
msg,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment