diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-02-26 14:34:03 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-02-26 14:34:03 (GMT) |
commit | e4807335c4e38dc2f047d400641c65448854b062 (patch) | |
tree | 1fa0dba9152e41b40e3c5794fd9ab993b9348230 /Swift/Controllers/Chat | |
parent | 3ea985154d59de3a3994c43d9b3dd36d089cfe2c (diff) | |
download | swift-e4807335c4e38dc2f047d400641c65448854b062.zip swift-e4807335c4e38dc2f047d400641c65448854b062.tar.bz2 |
Add "Edit details" section to Add User widget.
Resolves: #618
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r-- | Swift/Controllers/Chat/UserSearchController.cpp | 5 | ||||
-rw-r--r-- | Swift/Controllers/Chat/UserSearchController.h | 4 |
2 files changed, 6 insertions, 3 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())); diff --git a/Swift/Controllers/Chat/UserSearchController.h b/Swift/Controllers/Chat/UserSearchController.h index 69795fb..071ec33 100644 --- a/Swift/Controllers/Chat/UserSearchController.h +++ b/Swift/Controllers/Chat/UserSearchController.h @@ -25,6 +25,7 @@ namespace Swift { class UserSearchWindowFactory; class IQRouter; class DiscoServiceWalker; + class RosterController; class UserSearchResult { public: @@ -39,7 +40,7 @@ namespace Swift { class UserSearchController { public: enum Type {AddContact, StartChat}; - UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, UserSearchWindowFactory* userSearchWindowFactory, IQRouter* iqRouter); + UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, UserSearchWindowFactory* userSearchWindowFactory, IQRouter* iqRouter, RosterController* rosterController); ~UserSearchController(); private: @@ -58,6 +59,7 @@ namespace Swift { UIEventStream* uiEventStream_; UserSearchWindowFactory* factory_; IQRouter* iqRouter_; + RosterController* rosterController_; UserSearchWindow* window_; DiscoServiceWalker* discoWalker_; }; |