summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-05-02 09:19:23 (GMT)
committerSwift Review <review@swift.im>2014-07-09 09:03:34 (GMT)
commitacac7962ba04c083377f62f4265ecc754176f74e (patch)
treefa2db718854d10c76e81fc54b0b1f2b33a12963f /Swift/Controllers/MainController.cpp
parent8ab7ca17fdde8f8fb62a0c574478aa2c4c01a9bc (diff)
downloadswift-contrib-acac7962ba04c083377f62f4265ecc754176f74e.zip
swift-contrib-acac7962ba04c083377f62f4265ecc754176f74e.tar.bz2
Refactor AdHoc forms.
Test-Information: Check that forms still open properly and can be submitted and canceled. Check that error message is displayed if disconnected when a form is open. Change-Id: I23e35730b0decdfb5cf0592fc7234bf4643b6127
Diffstat (limited to 'Swift/Controllers/MainController.cpp')
-rw-r--r--Swift/Controllers/MainController.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index f16f8ad..79b7502 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -416,19 +416,19 @@ void MainController::handleConnected() {
rosterController_->getWindow()->setStreamEncryptionStatus(client_->isStreamEncrypted());
profileController_->setAvailable(true);
contactEditController_->setAvailable(true);
/* Send presence later to catch all the incoming presences. */
sendPresence(statusTracker_->getNextPresence());
/* Enable chats last of all, so rejoining MUCs has the right sent presence */
assert(chatsManager_);
chatsManager_->setOnline(true);
-
+ adHocManager_->setOnline(true);
}
void MainController::handleEventQueueLengthChange(int count) {
dock_->setNumberOfPendingMessages(count);
}
void MainController::reconnectAfterError() {
if (reconnectTimer_) {
reconnectTimer_->stop();
@@ -596,18 +596,21 @@ void MainController::performLoginFromCachedCredentials() {
clientOptions.forgetPassword = eagle;
clientOptions.useTLS = eagle ? ClientOptions::RequireTLS : clientOptions_.useTLS;
client_->connect(clientOptions);
}
void MainController::handleDisconnected(const boost::optional<ClientError>& error) {
if (rosterController_) {
rosterController_->getWindow()->setStreamEncryptionStatus(false);
}
+ if (adHocManager_) {
+ adHocManager_->setOnline(false);
+ }
if (settings_->getSetting(SettingConstants::FORGET_PASSWORDS)) {
purgeCachedCredentials();
}
if (quitRequested_) {
resetClient();
loginWindow_->quit();
}
else if (error) {
std::string message;