diff options
author | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) |
commit | cfbdb43d2cadd40aa87338d41548e4bf89e146e6 (patch) | |
tree | 18d94153a302445196fc0c18586abf44a1ce4a38 /Swift/Controllers/UIInterfaces/ChatListWindow.h | |
parent | 1d545a4a7fb877f021508094b88c1f17b30d8b4e (diff) | |
download | swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.zip swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.tar.bz2 |
Convert tabs to 4 spaces for all source files
Removed trailing spaces and whitespace on empty lines
in the process.
Changed CheckTabs.py tool to disallow hard tabs in source
files.
Test-Information:
Manually checked 30 random files that the conversion worked
as expected.
Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
Diffstat (limited to 'Swift/Controllers/UIInterfaces/ChatListWindow.h')
-rw-r--r-- | Swift/Controllers/UIInterfaces/ChatListWindow.h | 154 |
1 files changed, 77 insertions, 77 deletions
diff --git a/Swift/Controllers/UIInterfaces/ChatListWindow.h b/Swift/Controllers/UIInterfaces/ChatListWindow.h index 8b5036b..a94e14e 100644 --- a/Swift/Controllers/UIInterfaces/ChatListWindow.h +++ b/Swift/Controllers/UIInterfaces/ChatListWindow.h @@ -19,83 +19,83 @@ #include <Swiften/MUC/MUCBookmark.h> namespace Swift { - class ChatListWindow { - public: - class Chat { - public: - Chat() : statusType(StatusShow::None), isMUC(false), unreadCount(0), isPrivateMessage(false) {} - Chat(const JID& jid, const std::string& chatName, const std::string& activity, int unreadCount, StatusShow::Type statusType, const boost::filesystem::path& avatarPath, bool isMUC, bool isPrivateMessage = false, const std::string& nick = "", const boost::optional<std::string> password = boost::optional<std::string>()) - : jid(jid), chatName(chatName), activity(activity), statusType(statusType), isMUC(isMUC), nick(nick), password(password), unreadCount(unreadCount), avatarPath(avatarPath), isPrivateMessage(isPrivateMessage) {} - /** Assume that nicks and other transient features aren't important for equality */ - bool operator==(const Chat& other) const { - if (impromptuJIDs.empty()) { - return jid.toBare() == other.jid.toBare() - && isMUC == other.isMUC; - } else { /* compare the chat occupant lists */ - typedef std::map<std::string, JID> JIDMap; - foreach (const JIDMap::value_type& jid, impromptuJIDs) { - bool found = false; - foreach (const JIDMap::value_type& otherJID, other.impromptuJIDs) { - if (jid.second.toBare() == otherJID.second.toBare()) { - found = true; - break; - } - } - if (!found) { - return false; - } - } - return true; - } - } - void setUnreadCount(int unread) { - unreadCount = unread; - } - void setStatusType(StatusShow::Type type) { - statusType = type; - } - void setAvatarPath(const boost::filesystem::path& path) { - avatarPath = path; - } - std::string getImpromptuTitle() const { - typedef std::pair<std::string, JID> StringJIDPair; - std::string title; - foreach(StringJIDPair pair, impromptuJIDs) { - if (title.empty()) { - title += pair.first; - } else { - title += ", " + pair.first; - } - } - return title; - } - JID jid; - std::string chatName; - std::string activity; - StatusShow::Type statusType; - bool isMUC; - std::string nick; - boost::optional<std::string> password; - int unreadCount; - boost::filesystem::path avatarPath; - std::map<std::string, JID> impromptuJIDs; - bool isPrivateMessage; - }; - virtual ~ChatListWindow(); + class ChatListWindow { + public: + class Chat { + public: + Chat() : statusType(StatusShow::None), isMUC(false), unreadCount(0), isPrivateMessage(false) {} + Chat(const JID& jid, const std::string& chatName, const std::string& activity, int unreadCount, StatusShow::Type statusType, const boost::filesystem::path& avatarPath, bool isMUC, bool isPrivateMessage = false, const std::string& nick = "", const boost::optional<std::string> password = boost::optional<std::string>()) + : jid(jid), chatName(chatName), activity(activity), statusType(statusType), isMUC(isMUC), nick(nick), password(password), unreadCount(unreadCount), avatarPath(avatarPath), isPrivateMessage(isPrivateMessage) {} + /** Assume that nicks and other transient features aren't important for equality */ + bool operator==(const Chat& other) const { + if (impromptuJIDs.empty()) { + return jid.toBare() == other.jid.toBare() + && isMUC == other.isMUC; + } else { /* compare the chat occupant lists */ + typedef std::map<std::string, JID> JIDMap; + foreach (const JIDMap::value_type& jid, impromptuJIDs) { + bool found = false; + foreach (const JIDMap::value_type& otherJID, other.impromptuJIDs) { + if (jid.second.toBare() == otherJID.second.toBare()) { + found = true; + break; + } + } + if (!found) { + return false; + } + } + return true; + } + } + void setUnreadCount(int unread) { + unreadCount = unread; + } + void setStatusType(StatusShow::Type type) { + statusType = type; + } + void setAvatarPath(const boost::filesystem::path& path) { + avatarPath = path; + } + std::string getImpromptuTitle() const { + typedef std::pair<std::string, JID> StringJIDPair; + std::string title; + foreach(StringJIDPair pair, impromptuJIDs) { + if (title.empty()) { + title += pair.first; + } else { + title += ", " + pair.first; + } + } + return title; + } + JID jid; + std::string chatName; + std::string activity; + StatusShow::Type statusType; + bool isMUC; + std::string nick; + boost::optional<std::string> password; + int unreadCount; + boost::filesystem::path avatarPath; + std::map<std::string, JID> impromptuJIDs; + bool isPrivateMessage; + }; + virtual ~ChatListWindow(); - virtual void setBookmarksEnabled(bool enabled) = 0; - virtual void addMUCBookmark(const MUCBookmark& bookmark) = 0; - virtual void addWhiteboardSession(const ChatListWindow::Chat& chat) = 0; - virtual void removeWhiteboardSession(const JID& jid) = 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; - virtual void setOnline(bool isOnline) = 0; + virtual void setBookmarksEnabled(bool enabled) = 0; + virtual void addMUCBookmark(const MUCBookmark& bookmark) = 0; + virtual void addWhiteboardSession(const ChatListWindow::Chat& chat) = 0; + virtual void removeWhiteboardSession(const JID& jid) = 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; + virtual void setOnline(bool isOnline) = 0; - boost::signal<void (const MUCBookmark&)> onMUCBookmarkActivated; - boost::signal<void (const Chat&)> onRecentActivated; - boost::signal<void (const JID&)> onWhiteboardActivated; - boost::signal<void ()> onClearRecentsRequested; - }; + boost::signal<void (const MUCBookmark&)> onMUCBookmarkActivated; + boost::signal<void (const Chat&)> onRecentActivated; + boost::signal<void (const JID&)> onWhiteboardActivated; + boost::signal<void ()> onClearRecentsRequested; + }; } |