From 902c415595387f361db81d61589e56e5404172ae Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 23 Feb 2010 18:49:06 +0000 Subject: gah, more dos line-endings in PE diffs. --- indra/llui/llscrolllistctrl.h | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'indra/llui/llscrolllistctrl.h') diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index bfff85315d..1983891649 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -74,31 +74,31 @@ public: // *TODO: Add callbacks to Params typedef boost::function callback_t; - template struct maximum - { - typedef T result_type; - - template - T operator()(InputIterator first, InputIterator last) const - { - // If there are no slots to call, just return the - // default-constructed value - if(first == last ) return T(); - T max_value = *first++; - while (first != last) { - if (max_value < *first) - max_value = *first; - ++first; - } - - return max_value; - } - }; + template struct maximum + { + typedef T result_type; + + template + T operator()(InputIterator first, InputIterator last) const + { + // If there are no slots to call, just return the + // default-constructed value + if(first == last ) return T(); + T max_value = *first++; + while (first != last) { + if (max_value < *first) + max_value = *first; + ++first; + } + + return max_value; + } + }; //typedef boost::signals2::signal> sort_signal_t; //typedef boost::signals2::signal sort_signal_t; - typedef boost::signals2::signal> sort_signal_t; + typedef boost::signals2::signal > sort_signal_t; struct Params : public LLInitParam::Block { -- cgit v1.2.3 From a8165dfe59771962963e8a807b129c04a74f6d59 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Tue, 23 Feb 2010 18:05:00 +0200 Subject: fix for normal EXT-5598 Group member status list is sorted by name instead of date --HG-- branch : product-engine --- indra/llui/llscrolllistctrl.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'indra/llui/llscrolllistctrl.h') diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index d2d2379328..bfff85315d 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -73,6 +73,32 @@ public: // *TODO: Add callbacks to Params typedef boost::function callback_t; + + template struct maximum + { + typedef T result_type; + + template + T operator()(InputIterator first, InputIterator last) const + { + // If there are no slots to call, just return the + // default-constructed value + if(first == last ) return T(); + T max_value = *first++; + while (first != last) { + if (max_value < *first) + max_value = *first; + ++first; + } + + return max_value; + } + }; + + + //typedef boost::signals2::signal> sort_signal_t; + //typedef boost::signals2::signal sort_signal_t; + typedef boost::signals2::signal> sort_signal_t; struct Params : public LLInitParam::Block { @@ -362,6 +388,13 @@ public: void setNeedsSort(bool val = true) { mSorted = !val; } void dirtyColumns(); // some operation has potentially affected column layout or ordering + boost::signals2::connection setSortCallback(sort_signal_t::slot_type cb ) + { + if (!mSortCallback) mSortCallback = new sort_signal_t(); + return mSortCallback->connect(cb); + } + + protected: // "Full" interface: use this when you're creating a list that has one or more of the following: // * contains icons @@ -474,6 +507,8 @@ private: typedef std::pair sort_column_t; std::vector mSortColumns; + + sort_signal_t* mSortCallback; }; // end class LLScrollListCtrl #endif // LL_SCROLLLISTCTRL_H -- cgit v1.2.3 From 1bd720eefbd37fc123bf8d24f1134c0cb6d00b82 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Tue, 23 Feb 2010 18:45:51 +0200 Subject: cleanup and fix build --HG-- branch : product-engine --- indra/llui/llscrolllistctrl.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/llui/llscrolllistctrl.h') diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index bfff85315d..50999993b5 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -96,9 +96,7 @@ public: }; - //typedef boost::signals2::signal> sort_signal_t; - //typedef boost::signals2::signal sort_signal_t; - typedef boost::signals2::signal> sort_signal_t; + typedef boost::signals2::signal > sort_signal_t; struct Params : public LLInitParam::Block { -- cgit v1.2.3