diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-08-20 14:28:10 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-08-20 14:28:10 (GMT) |
commit | 7e78cc2b173db39f12e92a929ad17b706877e33d (patch) | |
tree | fdebc18a100fe1d16e174262297dbd7a4016abe9 /Swiften/Roster/GroupRosterItem.h | |
parent | b3de442223a5b3281c159b34f047d715da8ca3c9 (diff) | |
download | swift-contrib-7e78cc2b173db39f12e92a929ad17b706877e33d.zip swift-contrib-7e78cc2b173db39f12e92a929ad17b706877e33d.tar.bz2 |
Don't include status in MUC roster sorting.
Resolves: #536
Diffstat (limited to 'Swiften/Roster/GroupRosterItem.h')
-rw-r--r-- | Swiften/Roster/GroupRosterItem.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Swiften/Roster/GroupRosterItem.h b/Swiften/Roster/GroupRosterItem.h index 096d053..67ced97 100644 --- a/Swiften/Roster/GroupRosterItem.h +++ b/Swiften/Roster/GroupRosterItem.h @@ -16,7 +16,7 @@ namespace Swift { class GroupRosterItem : public RosterItem { public: - GroupRosterItem(const String& name, GroupRosterItem* parent); + GroupRosterItem(const String& name, GroupRosterItem* parent, bool sortByStatus); virtual ~GroupRosterItem(); const std::vector<RosterItem*>& getChildren() const; const std::vector<RosterItem*>& getDisplayedChildren() const; @@ -25,7 +25,8 @@ class GroupRosterItem : public RosterItem { void removeAll(); void setDisplayed(RosterItem* item, bool displayed); boost::signal<void ()> onChildrenChanged; - static bool itemLessThan(const RosterItem* left, const RosterItem* right); + static bool itemLessThanWithStatus(const RosterItem* left, const RosterItem* right); + static bool itemLessThanWithoutStatus(const RosterItem* left, const RosterItem* right); void setExpanded(bool expanded); bool isExpanded() const; private: @@ -36,6 +37,7 @@ class GroupRosterItem : public RosterItem { bool expanded_; std::vector<RosterItem*> children_; std::vector<RosterItem*> displayedChildren_; + bool sortByStatus_; }; } |