diff options
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index 7c0a9d8..a413b4d 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -753,2 +753,3 @@ void QtChatWindow::handleActionButtonClicked() { QAction* invite = nullptr; + QAction* leave = nullptr; @@ -806,2 +807,6 @@ void QtChatWindow::handleActionButtonClicked() { break; + case ChatWindow::Leave: + leave = contextMenu.addAction(tr("Leave room")); + leave->setEnabled(isOnline_); + break; } @@ -857,2 +862,5 @@ void QtChatWindow::handleActionButtonClicked() { } + else if (result == leave) { + close(); + } else if (result == block) { @@ -890,10 +898,12 @@ void QtChatWindow::setCanInitiateImpromptuChats(bool supportsImpromptu) { void QtChatWindow::showBookmarkWindow(const MUCBookmark& bookmark) { - if (roomBookmarkState_ == RoomNotBookmarked) { - QtAddBookmarkWindow* window = new QtAddBookmarkWindow(eventStream_, bookmark); + if (roomBookmarkState_ != RoomNotBookmarked) { + QtEditBookmarkWindow* window = new QtEditBookmarkWindow(eventStream_, bookmark); window->show(); } +#ifndef NOT_YET else { - QtEditBookmarkWindow* window = new QtEditBookmarkWindow(eventStream_, bookmark); + QtAddBookmarkWindow* window = new QtAddBookmarkWindow(eventStream_, bookmark); window->show(); } +#endif // ! NOT_YET } |