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-bf3739c75fcb312a99608488c8741e2ffc15ca1e.zip swift-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 @@ -46,6 +46,7 @@ #include <SwifTools/TabComplete.h> #include <Swift/QtUI/Roster/QtOccupantListWidget.h> +#include <Swift/QtUI/QtAddBookmarkWindow.h> #include <Swift/QtUI/QtPlainChatView.h> #include <Swift/QtUI/QtSettingsProvider.h> #include <Swift/QtUI/QtScaledAvatarCache.h> @@ -627,6 +628,8 @@ void QtChatWindow::handleActionButtonClicked() { } } + QAction* bookmark = contextMenu.addAction(tr("Add boomark...")); + QAction* result = contextMenu.exec(QCursor::pos()); if (result == NULL) { /* Skip processing. Note that otherwise, because the actions could be null they could match */ @@ -668,6 +671,8 @@ void QtChatWindow::handleActionButtonClicked() { } else if (result == unblock) { onUnblockUserRequest(); + } else if (result == bookmark) { + onBookmarkRequest(); } } @@ -692,6 +697,11 @@ void QtChatWindow::setCanInitiateImpromptuChats(bool supportsImpromptu) { supportsImpromptuChat_ = supportsImpromptu; } +void QtChatWindow::showBookmarkWindow(const MUCBookmark& bookmark) { + QtAddBookmarkWindow* window = new QtAddBookmarkWindow(eventStream_, bookmark); + window->show(); +} + void QtChatWindow::showRoomConfigurationForm(Form::ref form) { if (mucConfigurationWindow_) { delete mucConfigurationWindow_.data(); |