diff options
author | Richard Maudsley <richard.maudsley@isode.com> | 2014-05-02 15:57:31 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2014-05-26 19:33:36 (GMT) |
commit | bf3739c75fcb312a99608488c8741e2ffc15ca1e (patch) | |
tree | 0eb8697735f82bc33e2e8e59770f7ecfe4bbc8ac /Swift/QtUI/QtChatWindow.cpp | |
parent | d9bd353dc90008bd8d723630ec9c037a3c1f5ad2 (diff) | |
download | swift-contrib-bf3739c75fcb312a99608488c8741e2ffc15ca1e.zip swift-contrib-bf3739c75fcb312a99608488c8741e2ffc15ca1e.tar.bz2 |
Allow bookmarking of MUCs from cog menu.
Change-Id: I55f696c98598ec9bfd1ac13a2abd3c1ee2b1e9fa
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index d3cce6d..f58c11b 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -47,4 +47,5 @@ #include <Swift/QtUI/Roster/QtOccupantListWidget.h> +#include <Swift/QtUI/QtAddBookmarkWindow.h> #include <Swift/QtUI/QtPlainChatView.h> #include <Swift/QtUI/QtSettingsProvider.h> @@ -628,4 +629,6 @@ void QtChatWindow::handleActionButtonClicked() { } + QAction* bookmark = contextMenu.addAction(tr("Add boomark...")); + QAction* result = contextMenu.exec(QCursor::pos()); if (result == NULL) { @@ -669,4 +672,6 @@ void QtChatWindow::handleActionButtonClicked() { else if (result == unblock) { onUnblockUserRequest(); + } else if (result == bookmark) { + onBookmarkRequest(); } } @@ -693,4 +698,9 @@ void QtChatWindow::setCanInitiateImpromptuChats(bool supportsImpromptu) { } +void QtChatWindow::showBookmarkWindow(const MUCBookmark& bookmark) { + QtAddBookmarkWindow* window = new QtAddBookmarkWindow(eventStream_, bookmark); + window->show(); +} + void QtChatWindow::showRoomConfigurationForm(Form::ref form) { if (mucConfigurationWindow_) { |