diff options
| author | Richard Maudsley <richard.maudsley@isode.com> | 2014-03-24 09:53:37 (GMT) |
|---|---|---|
| committer | Swift Review <review@swift.im> | 2014-04-02 11:45:22 (GMT) |
| commit | 1a35178bcad7c30e50a19e4017d021fb0485ccf0 (patch) | |
| tree | 3d52cee147d6c3f70866a1b5a4c4ae942bb3d48b /Swift/QtUI/UserSearch/QtUserSearchWindow.cpp | |
| parent | c9275affd040ee1ca7c1d599b28df3b363bef888 (diff) | |
| download | swift-contrib-1a35178bcad7c30e50a19e4017d021fb0485ccf0.zip swift-contrib-1a35178bcad7c30e50a19e4017d021fb0485ccf0.tar.bz2 | |
Automatically moving user into the chat list when you select from the population drop-down.
Change-Id: I69b44e0e1dda2fa513d2d867ed10e5a8046ff0e9
Diffstat (limited to 'Swift/QtUI/UserSearch/QtUserSearchWindow.cpp')
| -rw-r--r-- | Swift/QtUI/UserSearch/QtUserSearchWindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp index d06fa19..c0c7972 100644 --- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp +++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp @@ -4,18 +4,19 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ #include "Swift/QtUI/UserSearch/QtUserSearchWindow.h" #include <QItemDelegate> #include <QModelIndex> #include <QWizardPage> #include <QMovie> +#include <boost/bind.hpp> #include <boost/smart_ptr/make_shared.hpp> #include <Swiften/Base/foreach.h> #include <Swift/Controllers/UIEvents/UIEventStream.h> #include <Swift/Controllers/UIEvents/RequestChatUIEvent.h> #include <Swift/Controllers/UIEvents/AddContactUIEvent.h> #include <Swift/Controllers/UIEvents/CreateImpromptuMUCUIEvent.h> #include <Swift/Controllers/UIEvents/InviteToMUCUIEvent.h> #include <Swift/QtUI/UserSearch/UserSearchModel.h> @@ -438,18 +439,19 @@ void QtUserSearchWindow::setFirstPage(QString title) { #if QT_VERSION >= 0x040700 firstPage_->jid_->setPlaceholderText(tr("alice@wonderland.lit")); #endif firstPage_->service_->setEnabled(false); setPage(1, firstPage_); } else { firstMultiJIDPage_ = new QtUserSearchFirstMultiJIDPage(type_, title.isEmpty() ? firstMultiJIDPage_->title() : title, settings_); connect(firstMultiJIDPage_->addContactButton_, SIGNAL(clicked()), this, SLOT(addContact())); connect(firstMultiJIDPage_->jid_, SIGNAL(textEdited(QString)), this, SLOT(handleContactSuggestionRequested(QString))); + firstMultiJIDPage_->jid_->onUserSelected.connect(boost::bind(&QtUserSearchWindow::addSearchedJIDToList, this, _1)); connect(firstMultiJIDPage_->addViaSearchButton_, SIGNAL(clicked()), this, SLOT(handleAddViaSearch())); connect(firstMultiJIDPage_->contactList_, SIGNAL(onListChanged(std::vector<Contact>)), this, SLOT(handleListChanged(std::vector<Contact>))); connect(firstMultiJIDPage_->contactList_, SIGNAL(onJIDsAdded(std::vector<JID>)), this, SLOT(handleJIDsAdded(std::vector<JID>))); setPage(1, firstMultiJIDPage_); } } void QtUserSearchWindow::setSecondPage() { if (page(2) != 0) { |
Swift