diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-07-26 22:11:38 (GMT) |
|---|---|---|
| committer | Kevin Smith <kevin.smith@isode.com> | 2015-07-27 16:59:36 (GMT) |
| commit | 32dffa31b92ad29cc15cd6e6fe3cc4ef1b4ef23a (patch) | |
| tree | 83e444921b84fa86094553dfa256fa6f63038a0b /Swift | |
| parent | 744884d4ed76658880a3d25f6e6551ef92700a8f (diff) | |
| download | swift-32dffa31b92ad29cc15cd6e6fe3cc4ef1b4ef23a.zip swift-32dffa31b92ad29cc15cd6e6fe3cc4ef1b4ef23a.tar.bz2 | |
Remember directory services used when searching for users
Test-Information:
Tested by searching at some services and checked that they
are present in the combo box after a Swift restart.
Change-Id: Ia30d932f20447f44e458af3b32a38665872da025
Diffstat (limited to 'Swift')
| -rw-r--r-- | Swift/Controllers/Chat/UserSearchController.cpp | 60 | ||||
| -rw-r--r-- | Swift/Controllers/Chat/UserSearchController.h | 19 | ||||
| -rw-r--r-- | Swift/Controllers/MainController.cpp | 6 |
3 files changed, 67 insertions, 18 deletions
diff --git a/Swift/Controllers/Chat/UserSearchController.cpp b/Swift/Controllers/Chat/UserSearchController.cpp index 24f3724..ece897f 100644 --- a/Swift/Controllers/Chat/UserSearchController.cpp +++ b/Swift/Controllers/Chat/UserSearchController.cpp | |||
| @@ -1,43 +1,50 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2014 Isode Limited. | 2 | * Copyright (c) 2010-2015 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #include <Swift/Controllers/Chat/UserSearchController.h> | 7 | #include <Swift/Controllers/Chat/UserSearchController.h> |
| 8 | 8 | ||
| 9 | #include <boost/bind.hpp> | 9 | #include <boost/bind.hpp> |
| 10 | #include <boost/shared_ptr.hpp> | 10 | #include <boost/shared_ptr.hpp> |
| 11 | #include <boost/smart_ptr/make_shared.hpp> | 11 | #include <boost/smart_ptr/make_shared.hpp> |
| 12 | 12 | ||
| 13 | #include <Swiften/Avatars/AvatarManager.h> | ||
| 14 | #include <Swiften/Base/String.h> | ||
| 13 | #include <Swiften/Base/foreach.h> | 15 | #include <Swiften/Base/foreach.h> |
| 16 | #include <Swiften/Disco/DiscoServiceWalker.h> | ||
| 14 | #include <Swiften/Disco/GetDiscoInfoRequest.h> | 17 | #include <Swiften/Disco/GetDiscoInfoRequest.h> |
| 15 | #include <Swiften/Disco/GetDiscoItemsRequest.h> | 18 | #include <Swiften/Disco/GetDiscoItemsRequest.h> |
| 16 | #include <Swiften/Disco/DiscoServiceWalker.h> | ||
| 17 | #include <Swiften/VCards/VCardManager.h> | ||
| 18 | #include <Swiften/Presence/PresenceOracle.h> | 19 | #include <Swiften/Presence/PresenceOracle.h> |
| 19 | #include <Swiften/Avatars/AvatarManager.h> | 20 | #include <Swiften/VCards/VCardManager.h> |
| 21 | |||
| 20 | #include <Swift/Controllers/ContactEditController.h> | 22 | #include <Swift/Controllers/ContactEditController.h> |
| 23 | #include <Swift/Controllers/ContactSuggester.h> | ||
| 21 | #include <Swift/Controllers/Intl.h> | 24 | #include <Swift/Controllers/Intl.h> |
| 22 | #include <Swift/Controllers/UIEvents/UIEventStream.h> | 25 | #include <Swift/Controllers/ProfileSettingsProvider.h> |
| 23 | #include <Swift/Controllers/UIEvents/RequestChatWithUserDialogUIEvent.h> | 26 | #include <Swift/Controllers/Roster/RosterController.h> |
| 24 | #include <Swift/Controllers/UIEvents/RequestAddUserDialogUIEvent.h> | 27 | #include <Swift/Controllers/UIEvents/RequestAddUserDialogUIEvent.h> |
| 28 | #include <Swift/Controllers/UIEvents/RequestChatWithUserDialogUIEvent.h> | ||
| 25 | #include <Swift/Controllers/UIEvents/RequestInviteToMUCUIEvent.h> | 29 | #include <Swift/Controllers/UIEvents/RequestInviteToMUCUIEvent.h> |
| 30 | #include <Swift/Controllers/UIEvents/UIEventStream.h> | ||
| 26 | #include <Swift/Controllers/UIInterfaces/UserSearchWindow.h> | 31 | #include <Swift/Controllers/UIInterfaces/UserSearchWindow.h> |
| 27 | #include <Swift/Controllers/UIInterfaces/UserSearchWindowFactory.h> | 32 | #include <Swift/Controllers/UIInterfaces/UserSearchWindowFactory.h> |
| 28 | #include <Swift/Controllers/Roster/RosterController.h> | ||
| 29 | #include <Swift/Controllers/ContactSuggester.h> | ||
| 30 | 33 | ||
| 31 | namespace Swift { | 34 | namespace Swift { |
| 32 | UserSearchController::UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, VCardManager* vcardManager, UserSearchWindowFactory* factory, IQRouter* iqRouter, RosterController* rosterController, ContactSuggester* contactSuggester, AvatarManager* avatarManager, PresenceOracle* presenceOracle) : type_(type), jid_(jid), uiEventStream_(uiEventStream), vcardManager_(vcardManager), factory_(factory), iqRouter_(iqRouter), rosterController_(rosterController), contactSuggester_(contactSuggester), avatarManager_(avatarManager), presenceOracle_(presenceOracle) { | 35 | |
| 36 | static const std::string SEARCHED_DIRECTORIES = "searchedDirectories"; | ||
| 37 | |||
| 38 | UserSearchController::UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, VCardManager* vcardManager, UserSearchWindowFactory* factory, IQRouter* iqRouter, RosterController* rosterController, ContactSuggester* contactSuggester, AvatarManager* avatarManager, PresenceOracle* presenceOracle, ProfileSettingsProvider* settings) : type_(type), jid_(jid), uiEventStream_(uiEventStream), vcardManager_(vcardManager), factory_(factory), iqRouter_(iqRouter), rosterController_(rosterController), contactSuggester_(contactSuggester), avatarManager_(avatarManager), presenceOracle_(presenceOracle), settings_(settings) { | ||
| 33 | uiEventStream_->onUIEvent.connect(boost::bind(&UserSearchController::handleUIEvent, this, _1)); | 39 | uiEventStream_->onUIEvent.connect(boost::bind(&UserSearchController::handleUIEvent, this, _1)); |
| 34 | vcardManager_->onVCardChanged.connect(boost::bind(&UserSearchController::handleVCardChanged, this, _1, _2)); | 40 | vcardManager_->onVCardChanged.connect(boost::bind(&UserSearchController::handleVCardChanged, this, _1, _2)); |
| 35 | avatarManager_->onAvatarChanged.connect(boost::bind(&UserSearchController::handleAvatarChanged, this, _1)); | 41 | avatarManager_->onAvatarChanged.connect(boost::bind(&UserSearchController::handleAvatarChanged, this, _1)); |
| 36 | presenceOracle_->onPresenceChange.connect(boost::bind(&UserSearchController::handlePresenceChanged, this, _1)); | 42 | presenceOracle_->onPresenceChange.connect(boost::bind(&UserSearchController::handlePresenceChanged, this, _1)); |
| 37 | window_ = NULL; | 43 | window_ = NULL; |
| 38 | discoWalker_ = NULL; | 44 | discoWalker_ = NULL; |
| 45 | loadSavedDirectories(); | ||
| 39 | } | 46 | } |
| 40 | 47 | ||
| 41 | UserSearchController::~UserSearchController() { | 48 | UserSearchController::~UserSearchController() { |
| 42 | endDiscoWalker(); | 49 | endDiscoWalker(); |
| 43 | delete discoWalker_; | 50 | delete discoWalker_; |
| @@ -92,10 +99,11 @@ void UserSearchController::handleUIEvent(boost::shared_ptr<UIEvent> event) { | |||
| 92 | break; | 99 | break; |
| 93 | } | 100 | } |
| 94 | if (handle) { | 101 | if (handle) { |
| 95 | initializeUserWindow(); | 102 | initializeUserWindow(); |
| 96 | window_->show(); | 103 | window_->show(); |
| 104 | window_->addSavedServices(savedDirectories_); | ||
| 97 | if (addUserRequest) { | 105 | if (addUserRequest) { |
| 98 | const std::string& name = addUserRequest->getPredefinedName(); | 106 | const std::string& name = addUserRequest->getPredefinedName(); |
| 99 | const JID& jid = addUserRequest->getPredefinedJID(); | 107 | const JID& jid = addUserRequest->getPredefinedJID(); |
| 100 | if (!name.empty() && jid.isValid()) { | 108 | if (!name.empty() && jid.isValid()) { |
| 101 | window_->prepopulateJIDAndName(jid, name); | 109 | window_->prepopulateJIDAndName(jid, name); |
| @@ -157,10 +165,11 @@ void UserSearchController::handleFormResponse(boost::shared_ptr<SearchPayload> f | |||
| 157 | } | 165 | } |
| 158 | window_->setSearchFields(fields); | 166 | window_->setSearchFields(fields); |
| 159 | } | 167 | } |
| 160 | 168 | ||
| 161 | void UserSearchController::handleSearch(boost::shared_ptr<SearchPayload> fields, const JID& jid) { | 169 | void UserSearchController::handleSearch(boost::shared_ptr<SearchPayload> fields, const JID& jid) { |
| 170 | addToSavedDirectories(jid); | ||
| 162 | boost::shared_ptr<GenericRequest<SearchPayload> > searchRequest(new GenericRequest<SearchPayload>(IQ::Set, jid, fields, iqRouter_)); | 171 | boost::shared_ptr<GenericRequest<SearchPayload> > searchRequest(new GenericRequest<SearchPayload>(IQ::Set, jid, fields, iqRouter_)); |
| 163 | searchRequest->onResponse.connect(boost::bind(&UserSearchController::handleSearchResponse, this, _1, _2)); | 172 | searchRequest->onResponse.connect(boost::bind(&UserSearchController::handleSearchResponse, this, _1, _2)); |
| 164 | searchRequest->send(); | 173 | searchRequest->send(); |
| 165 | } | 174 | } |
| 166 | 175 | ||
| @@ -339,6 +348,39 @@ void UserSearchController::initializeUserWindow() { | |||
| 339 | window_->setSelectedService(JID(jid_.getDomain())); | 348 | window_->setSelectedService(JID(jid_.getDomain())); |
| 340 | window_->clear(); | 349 | window_->clear(); |
| 341 | } | 350 | } |
| 342 | } | 351 | } |
| 343 | 352 | ||
| 353 | void UserSearchController::loadSavedDirectories() { | ||
| 354 | savedDirectories_.clear(); | ||
| 355 | foreach (std::string stringItem, String::split(settings_->getStringSetting(SEARCHED_DIRECTORIES), '\n')) { | ||
| 356 | if(!stringItem.empty()) { | ||
| 357 | savedDirectories_.push_back(JID(stringItem)); | ||
| 358 | } | ||
| 359 | } | ||
| 360 | } | ||
| 361 | |||
| 362 | void UserSearchController::addToSavedDirectories(const JID& jid) { | ||
| 363 | if (!jid.isValid()) { | ||
| 364 | return; | ||
| 365 | } | ||
| 366 | |||
| 367 | savedDirectories_.erase(std::remove(savedDirectories_.begin(), savedDirectories_.end(), jid), savedDirectories_.end()); | ||
| 368 | savedDirectories_.insert(savedDirectories_.begin(), jid); | ||
| 369 | |||
| 370 | std::string collapsed; | ||
| 371 | int i = 0; | ||
| 372 | foreach (JID jidItem, savedDirectories_) { | ||
| 373 | if (i >= 15) { | ||
| 374 | break; | ||
| 375 | } | ||
| 376 | if (!collapsed.empty()) { | ||
| 377 | collapsed += "\n"; | ||
| 378 | } | ||
| 379 | collapsed += jidItem.toString(); | ||
| 380 | ++i; | ||
| 381 | } | ||
| 382 | settings_->storeString(SEARCHED_DIRECTORIES, collapsed); | ||
| 383 | window_->addSavedServices(savedDirectories_); | ||
| 384 | } | ||
| 385 | |||
| 344 | } | 386 | } |
diff --git a/Swift/Controllers/Chat/UserSearchController.h b/Swift/Controllers/Chat/UserSearchController.h index 3c45c04..0423a65 100644 --- a/Swift/Controllers/Chat/UserSearchController.h +++ b/Swift/Controllers/Chat/UserSearchController.h | |||
| @@ -1,29 +1,30 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2014 Isode Limited. | 2 | * Copyright (c) 2010-2015 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #pragma once | 7 | #pragma once |
| 8 | 8 | ||
| 9 | #include <boost/shared_ptr.hpp> | ||
| 10 | |||
| 11 | #include <map> | 9 | #include <map> |
| 12 | #include <vector> | ||
| 13 | #include <string> | 10 | #include <string> |
| 11 | #include <vector> | ||
| 12 | |||
| 13 | #include <boost/shared_ptr.hpp> | ||
| 14 | 14 | ||
| 15 | #include <Swift/Controllers/Contact.h> | ||
| 16 | #include <Swiften/Base/boost_bsignals.h> | 15 | #include <Swiften/Base/boost_bsignals.h> |
| 17 | #include <Swiften/Elements/DiscoInfo.h> | 16 | #include <Swiften/Elements/DiscoInfo.h> |
| 18 | #include <Swiften/Elements/DiscoItems.h> | 17 | #include <Swiften/Elements/DiscoItems.h> |
| 19 | #include <Swiften/Elements/ErrorPayload.h> | 18 | #include <Swiften/Elements/ErrorPayload.h> |
| 20 | #include <Swiften/Elements/Presence.h> | 19 | #include <Swiften/Elements/Presence.h> |
| 21 | #include <Swiften/Elements/SearchPayload.h> | 20 | #include <Swiften/Elements/SearchPayload.h> |
| 22 | #include <Swiften/Elements/VCard.h> | 21 | #include <Swiften/Elements/VCard.h> |
| 23 | #include <Swiften/JID/JID.h> | 22 | #include <Swiften/JID/JID.h> |
| 24 | 23 | ||
| 24 | #include <Swift/Controllers/Contact.h> | ||
| 25 | |||
| 25 | namespace Swift { | 26 | namespace Swift { |
| 26 | class UIEventStream; | 27 | class UIEventStream; |
| 27 | class UIEvent; | 28 | class UIEvent; |
| 28 | class UserSearchWindow; | 29 | class UserSearchWindow; |
| 29 | class UserSearchWindowFactory; | 30 | class UserSearchWindowFactory; |
| @@ -32,10 +33,11 @@ namespace Swift { | |||
| 32 | class RosterController; | 33 | class RosterController; |
| 33 | class VCardManager; | 34 | class VCardManager; |
| 34 | class ContactSuggester; | 35 | class ContactSuggester; |
| 35 | class AvatarManager; | 36 | class AvatarManager; |
| 36 | class PresenceOracle; | 37 | class PresenceOracle; |
| 38 | class ProfileSettingsProvider; | ||
| 37 | 39 | ||
| 38 | class UserSearchResult { | 40 | class UserSearchResult { |
| 39 | public: | 41 | public: |
| 40 | UserSearchResult(const JID& jid, const std::map<std::string, std::string>& fields) : jid_(jid), fields_(fields) {} | 42 | UserSearchResult(const JID& jid, const std::map<std::string, std::string>& fields) : jid_(jid), fields_(fields) {} |
| 41 | const JID& getJID() const {return jid_;} | 43 | const JID& getJID() const {return jid_;} |
| @@ -46,11 +48,11 @@ namespace Swift { | |||
| 46 | }; | 48 | }; |
| 47 | 49 | ||
| 48 | class UserSearchController { | 50 | class UserSearchController { |
| 49 | public: | 51 | public: |
| 50 | enum Type {AddContact, StartChat, InviteToChat}; | 52 | enum Type {AddContact, StartChat, InviteToChat}; |
| 51 | UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, VCardManager* vcardManager, UserSearchWindowFactory* userSearchWindowFactory, IQRouter* iqRouter, RosterController* rosterController, ContactSuggester* contactSuggester, AvatarManager* avatarManager, PresenceOracle* presenceOracle); | 53 | UserSearchController(Type type, const JID& jid, UIEventStream* uiEventStream, VCardManager* vcardManager, UserSearchWindowFactory* userSearchWindowFactory, IQRouter* iqRouter, RosterController* rosterController, ContactSuggester* contactSuggester, AvatarManager* avatarManager, PresenceOracle* presenceOracle, ProfileSettingsProvider* settings); |
| 52 | ~UserSearchController(); | 54 | ~UserSearchController(); |
| 53 | 55 | ||
| 54 | UserSearchWindow* getUserSearchWindow(); | 56 | UserSearchWindow* getUserSearchWindow(); |
| 55 | void setCanInitiateImpromptuMUC(bool supportsImpromptu); | 57 | void setCanInitiateImpromptuMUC(bool supportsImpromptu); |
| 56 | 58 | ||
| @@ -72,10 +74,13 @@ namespace Swift { | |||
| 72 | void handleJIDEditingFinished(const JID& jid); | 74 | void handleJIDEditingFinished(const JID& jid); |
| 73 | Contact::ref convertJIDtoContact(const JID& jid); | 75 | Contact::ref convertJIDtoContact(const JID& jid); |
| 74 | void endDiscoWalker(); | 76 | void endDiscoWalker(); |
| 75 | void initializeUserWindow(); | 77 | void initializeUserWindow(); |
| 76 | 78 | ||
| 79 | void loadSavedDirectories(); | ||
| 80 | void addToSavedDirectories(const JID& jid); | ||
| 81 | |||
| 77 | private: | 82 | private: |
| 78 | Type type_; | 83 | Type type_; |
| 79 | JID jid_; | 84 | JID jid_; |
| 80 | JID suggestionsJID_; | 85 | JID suggestionsJID_; |
| 81 | UIEventStream* uiEventStream_; | 86 | UIEventStream* uiEventStream_; |
| @@ -86,7 +91,9 @@ namespace Swift { | |||
| 86 | UserSearchWindow* window_; | 91 | UserSearchWindow* window_; |
| 87 | DiscoServiceWalker* discoWalker_; | 92 | DiscoServiceWalker* discoWalker_; |
| 88 | ContactSuggester* contactSuggester_; | 93 | ContactSuggester* contactSuggester_; |
| 89 | AvatarManager* avatarManager_; | 94 | AvatarManager* avatarManager_; |
| 90 | PresenceOracle* presenceOracle_; | 95 | PresenceOracle* presenceOracle_; |
| 96 | std::vector<JID> savedDirectories_; | ||
| 97 | ProfileSettingsProvider* settings_; | ||
| 91 | }; | 98 | }; |
| 92 | } | 99 | } |
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp index cdaa207..a0dde5b 100644 --- a/Swift/Controllers/MainController.cpp +++ b/Swift/Controllers/MainController.cpp | |||
| @@ -364,11 +364,11 @@ void MainController::handleConnected() { | |||
| 364 | client_->getVCardManager()->requestOwnVCard(); | 364 | client_->getVCardManager()->requestOwnVCard(); |
| 365 | 365 | ||
| 366 | contactSuggesterWithoutRoster_ = new ContactSuggester(); | 366 | contactSuggesterWithoutRoster_ = new ContactSuggester(); |
| 367 | contactSuggesterWithRoster_ = new ContactSuggester(); | 367 | contactSuggesterWithRoster_ = new ContactSuggester(); |
| 368 | 368 | ||
| 369 | userSearchControllerInvite_ = new UserSearchController(UserSearchController::InviteToChat, jid_, uiEventStream_, client_->getVCardManager(), uiFactory_, client_->getIQRouter(), rosterController_, contactSuggesterWithRoster_, client_->getAvatarManager(), client_->getPresenceOracle()); | 369 | userSearchControllerInvite_ = new UserSearchController(UserSearchController::InviteToChat, jid_, uiEventStream_, client_->getVCardManager(), uiFactory_, client_->getIQRouter(), rosterController_, contactSuggesterWithRoster_, client_->getAvatarManager(), client_->getPresenceOracle(), profileSettings_); |
| 370 | #ifdef SWIFT_EXPERIMENTAL_HISTORY | 370 | #ifdef SWIFT_EXPERIMENTAL_HISTORY |
| 371 | historyController_ = new HistoryController(storages_->getHistoryStorage()); | 371 | historyController_ = new HistoryController(storages_->getHistoryStorage()); |
| 372 | historyViewController_ = new HistoryViewController(jid_, uiEventStream_, historyController_, client_->getNickResolver(), client_->getAvatarManager(), client_->getPresenceOracle(), uiFactory_); | 372 | historyViewController_ = new HistoryViewController(jid_, uiEventStream_, historyController_, client_->getNickResolver(), client_->getAvatarManager(), client_->getPresenceOracle(), uiFactory_); |
| 373 | chatsManager_ = new ChatsManager(jid_, client_->getStanzaChannel(), client_->getIQRouter(), eventController_, uiFactory_, uiFactory_, client_->getNickResolver(), client_->getPresenceOracle(), client_->getPresenceSender(), uiEventStream_, uiFactory_, useDelayForLatency_, networkFactories_->getTimerFactory(), client_->getMUCRegistry(), client_->getEntityCapsProvider(), client_->getMUCManager(), uiFactory_, profileSettings_, ftOverview_, client_->getRoster(), !settings_->getSetting(SettingConstants::REMEMBER_RECENT_CHATS), settings_, historyController_, whiteboardManager_, highlightManager_, client_->getClientBlockListManager(), emoticons_, userSearchControllerInvite_, client_->getVCardManager()); | 373 | chatsManager_ = new ChatsManager(jid_, client_->getStanzaChannel(), client_->getIQRouter(), eventController_, uiFactory_, uiFactory_, client_->getNickResolver(), client_->getPresenceOracle(), client_->getPresenceSender(), uiEventStream_, uiFactory_, useDelayForLatency_, networkFactories_->getTimerFactory(), client_->getMUCRegistry(), client_->getEntityCapsProvider(), client_->getMUCManager(), uiFactory_, profileSettings_, ftOverview_, client_->getRoster(), !settings_->getSetting(SettingConstants::REMEMBER_RECENT_CHATS), settings_, historyController_, whiteboardManager_, highlightManager_, client_->getClientBlockListManager(), emoticons_, userSearchControllerInvite_, client_->getVCardManager()); |
| 374 | #else | 374 | #else |
| @@ -403,12 +403,12 @@ void MainController::handleConnected() { | |||
| 403 | #endif | 403 | #endif |
| 404 | discoInfo.addFeature(DiscoInfo::MessageDeliveryReceiptsFeature); | 404 | discoInfo.addFeature(DiscoInfo::MessageDeliveryReceiptsFeature); |
| 405 | client_->getDiscoManager()->setCapsNode(CLIENT_NODE); | 405 | client_->getDiscoManager()->setCapsNode(CLIENT_NODE); |
| 406 | client_->getDiscoManager()->setDiscoInfo(discoInfo); | 406 | client_->getDiscoManager()->setDiscoInfo(discoInfo); |
| 407 | 407 | ||
| 408 | userSearchControllerChat_ = new UserSearchController(UserSearchController::StartChat, jid_, uiEventStream_, client_->getVCardManager(), uiFactory_, client_->getIQRouter(), rosterController_, contactSuggesterWithRoster_, client_->getAvatarManager(), client_->getPresenceOracle()); | 408 | userSearchControllerChat_ = new UserSearchController(UserSearchController::StartChat, jid_, uiEventStream_, client_->getVCardManager(), uiFactory_, client_->getIQRouter(), rosterController_, contactSuggesterWithRoster_, client_->getAvatarManager(), client_->getPresenceOracle(), profileSettings_); |
| 409 | userSearchControllerAdd_ = new UserSearchController(UserSearchController::AddContact, jid_, uiEventStream_, client_->getVCardManager(), uiFactory_, client_->getIQRouter(), rosterController_, contactSuggesterWithoutRoster_, client_->getAvatarManager(), client_->getPresenceOracle()); | 409 | userSearchControllerAdd_ = new UserSearchController(UserSearchController::AddContact, jid_, uiEventStream_, client_->getVCardManager(), uiFactory_, client_->getIQRouter(), rosterController_, contactSuggesterWithoutRoster_, client_->getAvatarManager(), client_->getPresenceOracle(), profileSettings_); |
| 410 | adHocManager_ = new AdHocManager(JID(boundJID_.getDomain()), uiFactory_, client_->getIQRouter(), uiEventStream_, rosterController_->getWindow()); | 410 | adHocManager_ = new AdHocManager(JID(boundJID_.getDomain()), uiFactory_, client_->getIQRouter(), uiEventStream_, rosterController_->getWindow()); |
| 411 | 411 | ||
| 412 | chatsManager_->onImpromptuMUCServiceDiscovered.connect(boost::bind(&UserSearchController::setCanInitiateImpromptuMUC, userSearchControllerChat_, _1)); | 412 | chatsManager_->onImpromptuMUCServiceDiscovered.connect(boost::bind(&UserSearchController::setCanInitiateImpromptuMUC, userSearchControllerChat_, _1)); |
| 413 | } | 413 | } |
| 414 | loginWindow_->setIsLoggingIn(false); | 414 | loginWindow_->setIsLoggingIn(false); |
Swift