summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-26 14:34:03 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-26 14:34:03 (GMT)
commite4807335c4e38dc2f047d400641c65448854b062 (patch)
tree1fa0dba9152e41b40e3c5794fd9ab993b9348230 /Swift/Controllers/Chat/UserSearchController.cpp
parent3ea985154d59de3a3994c43d9b3dd36d089cfe2c (diff)
downloadswift-e4807335c4e38dc2f047d400641c65448854b062.zip
swift-e4807335c4e38dc2f047d400641c65448854b062.tar.bz2
Add "Edit details" section to Add User widget.
Resolves: #618
Diffstat (limited to 'Swift/Controllers/Chat/UserSearchController.cpp')
-rw-r--r--Swift/Controllers/Chat/UserSearchController.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Swift/Controllers/Chat/UserSearchController.cpp b/Swift/Controllers/Chat/UserSearchController.cpp
index 37059c2..b3403d7 100644
--- a/Swift/Controllers/Chat/UserSearchController.cpp
+++ b/Swift/Controllers/Chat/UserSearchController.cpp
@@ -18,9 +18,10 @@
#include <Swift/Controllers/UIEvents/RequestAddUserDialogUIEvent.h>
#include <Swift/Controllers/UIInterfaces/UserSearchWindow.h>
#include <Swift/Controllers/UIInterfaces/UserSearchWindowFactory.h>
+#include <Swift/Controllers/Roster/RosterController.h>
namespace Swift {
-UserSearchController::UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, UserSearchWindowFactory* factory, IQRouter* iqRouter) : type_(type), jid_(jid), uiEventStream_(uiEventStream), factory_(factory), iqRouter_(iqRouter) {
+UserSearchController::UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, UserSearchWindowFactory* factory, IQRouter* iqRouter, RosterController* rosterController) : type_(type), jid_(jid), uiEventStream_(uiEventStream), factory_(factory), iqRouter_(iqRouter), rosterController_(rosterController) {
uiEventStream_->onUIEvent.connect(boost::bind(&UserSearchController::handleUIEvent, this, _1));
window_ = NULL;
discoWalker_ = NULL;
@@ -50,7 +51,7 @@ void UserSearchController::handleUIEvent(boost::shared_ptr<UIEvent> event) {
}
if (handle) {
if (!window_) {
- window_ = factory_->createUserSearchWindow(type_ == AddContact ? UserSearchWindow::AddContact : UserSearchWindow::ChatToContact, uiEventStream_);
+ window_ = factory_->createUserSearchWindow(type_ == AddContact ? UserSearchWindow::AddContact : UserSearchWindow::ChatToContact, uiEventStream_, rosterController_->getGroups());
window_->onFormRequested.connect(boost::bind(&UserSearchController::handleFormRequested, this, _1));
window_->onSearchRequested.connect(boost::bind(&UserSearchController::handleSearch, this, _1, _2));
window_->setSelectedService(JID(jid_.getDomain()));