From d9ce3491e818d96f3dc0154e9e5d30228420483c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sat, 11 Dec 2010 12:07:51 +0100
Subject: Use bare JIDs as profile names.


diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index 018948b..c1d8682 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -359,8 +359,8 @@ void MainController::performLoginFromCachedCredentials() {
 		statusTracker_  = new StatusTracker();
 	}
 	if (!client_) {
-		storages_ = storagesFactory_->createStorages(jid_);
-		certificateStorage_ = certificateStorageFactory_->createCertificateStorage(jid_);
+		storages_ = storagesFactory_->createStorages(jid_.toBare());
+		certificateStorage_ = certificateStorageFactory_->createCertificateStorage(jid_.toBare());
 		certificateTrustChecker_ = new CertificateStorageTrustChecker(certificateStorage_);
 		client_ = new Swift::Client(eventLoop_, &networkFactories_, jid_, password_, storages_);
 		client_->setCertificateTrustChecker(certificateTrustChecker_);
@@ -440,7 +440,7 @@ void MainController::handleDisconnected(const boost::optional<ClientError>& erro
 			case ClientError::InvalidCAError:
 			case ClientError::InvalidServerIdentityError:
 				// FIXME: Popup a dialog
-				message = "Certificate error";
+				message = "Certificate error (" + boost::lexical_cast<std::string>(error->getType()) + ")";
 				// FIXME: Only do this if the user accepts the certificate
 				//certificateStorage_->addCertificate(certificateTrustChecker_->getLastCertificate());
 				break;
-- 
cgit v0.10.2-6-g49f6