diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-05-14 15:02:21 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-05-14 15:02:21 -0400 |
commit | 6eeb8f8e97ae79f029f182235aee74324b85d967 (patch) | |
tree | 9a4370c93d43ca912dd6774e72ede579397e06b5 /indra/newview/llgrouplist.cpp | |
parent | 9e5fe84c9e6f6027878d70350c8f60e4c2be7e48 (diff) | |
parent | 09a1cb549d2128e5057d432a283f50679258e916 (diff) |
merge
Diffstat (limited to 'indra/newview/llgrouplist.cpp')
-rw-r--r-- | indra/newview/llgrouplist.cpp | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 8a056f836f..3224ac6d9b 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -40,12 +40,12 @@ #include "llmenugl.h" #include "lltextbox.h" #include "lltrans.h" +#include "lluitextutil.h" // newview #include "llagent.h" #include "llgroupactions.h" #include "llfloaterreg.h" -#include "lltextutil.h" #include "llviewercontrol.h" // for gSavedSettings #include "llviewermenu.h" // for gMenuHolder #include "llvoiceclient.h" @@ -71,18 +71,10 @@ public: static const LLGroupComparator GROUP_COMPARATOR; -LLGroupList::Params::Params() -: no_groups_msg("no_groups_msg") -, no_filtered_groups_msg("no_filtered_groups_msg") -{ - -} LLGroupList::LLGroupList(const Params& p) -: LLFlatListView(p) +: LLFlatListViewEx(p) , mDirty(true) // to force initial update - , mNoFilteredGroupsMsg(p.no_filtered_groups_msg) - , mNoGroupsMsg(p.no_groups_msg) { // Listen for agent group changes. gAgent.addListener(this, "new group"); @@ -139,9 +131,15 @@ BOOL LLGroupList::handleRightMouseDown(S32 x, S32 y, MASK mask) void LLGroupList::setNameFilter(const std::string& filter) { - if (mNameFilter != filter) + std::string filter_upper = filter; + LLStringUtil::toUpper(filter_upper); + if (mNameFilter != filter_upper) { - mNameFilter = filter; + mNameFilter = filter_upper; + + // set no items message depend on filter state + updateNoItemsMessage(filter); + setDirty(); } } @@ -159,18 +157,6 @@ void LLGroupList::refresh() LLUUID id; bool have_filter = !mNameFilter.empty(); - // set no items message depend on filter state & total count of groups - if (have_filter) - { - // groups were filtered - setNoItemsCommentText(mNoFilteredGroupsMsg); - } - else if (0 == count) - { - // user is not a member of any group - setNoItemsCommentText(mNoGroupsMsg); - } - clear(); for(S32 i = 0; i < count; ++i) @@ -287,7 +273,7 @@ bool LLGroupList::onContextMenuItemEnable(const LLSD& userdata) return gAgent.getGroupID() != selected_group_id; if (userdata.asString() == "call") - return real_group_selected && LLVoiceClient::voiceEnabled()&&gVoiceClient->voiceWorking(); + return real_group_selected && LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); return real_group_selected; } |