summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-03-28 13:25:13 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-03-28 13:25:35 (GMT)
commita59af6c6daa72dd491189335cf2d255a788eb0f6 (patch)
treea09c9b67e6ba5ea0ac87ab06a0b9836d61571a3e /Swiften/MUC
parent625d6a9f18c2377cdc3180e74b773ce3cbb2dcba (diff)
downloadswift-a59af6c6daa72dd491189335cf2d255a788eb0f6.zip
swift-a59af6c6daa72dd491189335cf2d255a788eb0f6.tar.bz2
Chat list in the gui (mostly non-functional).
Diffstat (limited to 'Swiften/MUC')
-rw-r--r--Swiften/MUC/MUCBookmarkManager.cpp2
-rw-r--r--Swiften/MUC/MUCBookmarkManager.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/Swiften/MUC/MUCBookmarkManager.cpp b/Swiften/MUC/MUCBookmarkManager.cpp
index f789300..f9295e2 100644
--- a/Swiften/MUC/MUCBookmarkManager.cpp
+++ b/Swiften/MUC/MUCBookmarkManager.cpp
@@ -11,6 +11,7 @@ MUCBookmarkManager::MUCBookmarkManager(IQRouter* iqRouter) {
void MUCBookmarkManager::addBookmark(boost::shared_ptr<MUCBookmark> bookmark) {
bookmarks_.push_back(bookmark);
flush();
+ onBookmarkAdded(bookmark);
}
@@ -19,6 +20,7 @@ void MUCBookmarkManager::removeBookmark(boost::shared_ptr<MUCBookmark> bookmark)
for (it = bookmarks_.begin(); it != bookmarks_.end(); it++) {
if ((*it).get() == bookmark.get()) {
bookmarks_.erase(it);
+ onBookmarkRemoved(bookmark);
return;
}
}
diff --git a/Swiften/MUC/MUCBookmarkManager.h b/Swiften/MUC/MUCBookmarkManager.h
index e1f8708..ade2e3e 100644
--- a/Swiften/MUC/MUCBookmarkManager.h
+++ b/Swiften/MUC/MUCBookmarkManager.h
@@ -18,7 +18,8 @@ namespace Swift {
void flush();
/** Returns pointers to the bookmarks. These can be edited, and then flush()ed.*/
const std::vector<boost::shared_ptr<MUCBookmark> >& getBookmarks();
- boost::signal<void ()> onBookmarksChanged;
+ boost::signal<void (boost::shared_ptr<MUCBookmark>)> onBookmarkAdded;
+ boost::signal<void (boost::shared_ptr<MUCBookmark>)> onBookmarkRemoved;
private:
std::vector<boost::shared_ptr<MUCBookmark> > bookmarks_;