diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-07-07 20:29:10 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-07-07 20:29:10 (GMT) |
commit | 3ef9dabfc62cb3daf0b88543a5d65d31e8eb5977 (patch) | |
tree | 980de61384d9cb924d130eedb051245f02434776 /Swift/Controllers/UIInterfaces | |
parent | ebda58fd30c7a4aec8f04e3751de869579b71cac (diff) | |
download | swift-3ef9dabfc62cb3daf0b88543a5d65d31e8eb5977.zip swift-3ef9dabfc62cb3daf0b88543a5d65d31e8eb5977.tar.bz2 |
Add setUnreadCount to ChatListView
Resolves: #904
Diffstat (limited to 'Swift/Controllers/UIInterfaces')
-rw-r--r-- | Swift/Controllers/UIInterfaces/ChatListWindow.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Swift/Controllers/UIInterfaces/ChatListWindow.h b/Swift/Controllers/UIInterfaces/ChatListWindow.h index ce75ae8..477de04 100644 --- a/Swift/Controllers/UIInterfaces/ChatListWindow.h +++ b/Swift/Controllers/UIInterfaces/ChatListWindow.h @@ -17,14 +17,22 @@ namespace Swift { public: class Chat { public: - Chat(const JID& jid, const std::string& chatName, const std::string& activity, bool isMUC, const std::string& nick = "") : jid(jid), chatName(chatName), activity(activity), isMUC(isMUC), nick(nick) {} - /** Assume that nicks aren't important for equality */ - bool operator==(const Chat& other) const {return jid.toBare() == other.jid.toBare() && isMUC == other.isMUC;}; + Chat(const JID& jid, const std::string& chatName, const std::string& activity, int unreadCount, bool isMUC, const std::string& nick = "") + : jid(jid), chatName(chatName), activity(activity), isMUC(isMUC), nick(nick), unreadCount(unreadCount) {} + /** Assume that nicks and other transient features aren't important for equality */ + bool operator==(const Chat& other) const { + return jid.toBare() == other.jid.toBare() + && isMUC == other.isMUC; + }; + void setUnreadCount(int unread) { + unreadCount = unread; + } JID jid; std::string chatName; std::string activity; bool isMUC; std::string nick; + int unreadCount; }; virtual ~ChatListWindow(); @@ -32,6 +40,7 @@ namespace Swift { virtual void addMUCBookmark(const MUCBookmark& bookmark) = 0; virtual void removeMUCBookmark(const MUCBookmark& bookmark) = 0; virtual void setRecents(const std::list<Chat>& recents) = 0; + virtual void setUnreadCount(int unread) = 0; virtual void clearBookmarks() = 0; boost::signal<void (const MUCBookmark&)> onMUCBookmarkActivated; |