summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-12-23 19:36:00 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-12-23 19:36:00 (GMT)
commit506d1621530a40d3e59f50f693587c3c4fd724f5 (patch)
treedfdd52d7b17ccfb372226192366bcb26d6bb6c0b /Swift/QtUI/QtMainWindow.cpp
parent135f55589ef230ab009e3b961895a6d3b12cdc87 (diff)
downloadswift-506d1621530a40d3e59f50f693587c3c4fd724f5.zip
swift-506d1621530a40d3e59f50f693587c3c4fd724f5.tar.bz2
Turn the 'Find other users' into seperate add/chat menu items with a wizard.
Diffstat (limited to 'Swift/QtUI/QtMainWindow.cpp')
-rw-r--r--Swift/QtUI/QtMainWindow.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp
index 6e53258..7a84c59 100644
--- a/Swift/QtUI/QtMainWindow.cpp
+++ b/Swift/QtUI/QtMainWindow.cpp
@@ -24,7 +24,8 @@
#include "QtSwiftUtil.h"
#include "QtTabWidget.h"
#include "Roster/QtTreeWidget.h"
-#include "Swift/Controllers/UIEvents/RequestUserSearchUIEvent.h"
+#include "Swift/Controllers/UIEvents/RequestAddUserDialogUIEvent.h"
+#include "Swift/Controllers/UIEvents/RequestChatWithUserDialogUIEvent.h"
#include "Swift/Controllers/UIEvents/RequestMUCSearchUIEvent.h"
#include "Swift/Controllers/UIEvents/JoinMUCUIEvent.h"
#include "Swift/Controllers/UIEvents/ToggleShowOfflineUIEvent.h"
@@ -84,9 +85,12 @@ QtMainWindow::QtMainWindow(QtSettingsProvider* settings, UIEventStream* uiEventS
QAction* joinMUCAction = new QAction("Join Room", this);
connect(joinMUCAction, SIGNAL(triggered()), SLOT(handleJoinMUCAction()));
actionsMenu->addAction(joinMUCAction);
- otherUserAction_ = new QAction("Find Other Contact", this);
- connect(otherUserAction_, SIGNAL(triggered(bool)), this, SLOT(handleOtherUserActionTriggered(bool)));
- actionsMenu->addAction(otherUserAction_);
+ addUserAction_ = new QAction("Add Contact", this);
+ connect(addUserAction_, SIGNAL(triggered(bool)), this, SLOT(handleAddUserActionTriggered(bool)));
+ actionsMenu->addAction(addUserAction_);
+ chatUserAction_ = new QAction("Start Chat", this);
+ connect(chatUserAction_, SIGNAL(triggered(bool)), this, SLOT(handleChatUserActionTriggered(bool)));
+ actionsMenu->addAction(chatUserAction_);
QAction* signOutAction = new QAction("Sign Out", this);
connect(signOutAction, SIGNAL(triggered()), SLOT(handleSignOutAction()));
actionsMenu->addAction(signOutAction);
@@ -123,8 +127,13 @@ void QtMainWindow::handleEventCountUpdated(int count) {
tabs_->setTabText(eventIndex, text);
}
-void QtMainWindow::handleOtherUserActionTriggered(bool /*checked*/) {
- boost::shared_ptr<UIEvent> event(new RequestUserSearchUIEvent());
+void QtMainWindow::handleAddUserActionTriggered(bool /*checked*/) {
+ boost::shared_ptr<UIEvent> event(new RequestAddUserDialogUIEvent());
+ uiEventStream_->send(event);
+}
+
+void QtMainWindow::handleChatUserActionTriggered(bool /*checked*/) {
+ boost::shared_ptr<UIEvent> event(new RequestChatWithUserDialogUIEvent());
uiEventStream_->send(event);
}