diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-21 11:33:12 +0100 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-21 11:33:12 +0100 |
| commit | 6985ed5c799dc10a1afe14fee6338a0243191753 (patch) | |
| tree | 4711416a05284462f71436cf3e07a979660533cb /indra/llui/llflatlistview.cpp | |
| parent | 50b4783ad317b82791273c2d3b6e4260f7a5e77e (diff) | |
| parent | 3d313630009366261ab99527fdd6eb7bb5eb5d3c (diff) | |
merge from viewer-trunk
Diffstat (limited to 'indra/llui/llflatlistview.cpp')
| -rw-r--r-- | indra/llui/llflatlistview.cpp | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 82f054c4b7..990bf5cd22 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -1,10 +1,10 @@ /** * @file llflatlistview.cpp - * @brief LLFlatListView base class + * @brief LLFlatListView base class and extension to support messages for several cases of an empty list. * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2009, Linden Research, Inc. + * Copyright (c) 2009-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -1122,4 +1122,38 @@ void LLFlatListView::detachItems(std::vector<LLPanel*>& detached_items) } } + +/************************************************************************/ +/* LLFlatListViewEx implementation */ +/************************************************************************/ +LLFlatListViewEx::Params::Params() +: no_items_msg("no_items_msg") +, no_filtered_items_msg("no_filtered_items_msg") +{ + +} + +LLFlatListViewEx::LLFlatListViewEx(const Params& p) +: LLFlatListView(p) +, mNoFilteredItemsMsg(p.no_filtered_items_msg) +, mNoItemsMsg(p.no_items_msg) +{ + +} + +void LLFlatListViewEx::updateNoItemsMessage(bool items_filtered) +{ + if (items_filtered) + { + // items were filtered + setNoItemsCommentText(mNoFilteredItemsMsg); + } + else + { + // list does not contain any items at all + setNoItemsCommentText(mNoItemsMsg); + } + +} + //EOF |
