summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-02-11 11:25:42 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-02-11 11:25:42 (GMT)
commitb8a73b1d16afd4f3aa0e8e39447024ec541df4c8 (patch)
tree503acb56c355ac0cca5dc13d89a9e4a3804ab813 /Swift/Controllers/MainController.cpp
parent4dde3a55c46c95d89a7564738e132ad23bc946ee (diff)
downloadswift-b8a73b1d16afd4f3aa0e8e39447024ec541df4c8.zip
swift-b8a73b1d16afd4f3aa0e8e39447024ec541df4c8.tar.bz2
Allow deletion of items from login list.
Resolves: #711 Release-Notes: Highlighting an item in the login account list and pressing detele will now prompt you to remove the cached credentials for that account.
Diffstat (limited to 'Swift/Controllers/MainController.cpp')
-rw-r--r--Swift/Controllers/MainController.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index 98599bb..31a1d5a 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -137,6 +137,7 @@ MainController::MainController(
loginWindow_->selectUser(selectedLoginJID);
loginWindow_->setLoginAutomatically(loginAutomatically);
loginWindow_->onLoginRequest.connect(boost::bind(&MainController::handleLoginRequest, this, _1, _2, _3, _4, _5));
+ loginWindow_->onPurgeSavedLoginRequest.connect(boost::bind(&MainController::handlePurgeSavedLoginRequest, this, _1));
loginWindow_->onCancelLoginRequest.connect(boost::bind(&MainController::handleCancelLoginRequest, this));
loginWindow_->onQuitRequest.connect(boost::bind(&MainController::handleQuitRequest, this));
@@ -367,6 +368,11 @@ void MainController::handleLoginRequest(const String &username, const String &pa
performLoginFromCachedCredentials();
}
+void MainController::handlePurgeSavedLoginRequest(const String& username) {
+ settings_->removeProfile(username);
+ loginWindow_->removeAvailableAccount(username);
+}
+
void MainController::performLoginFromCachedCredentials() {
/* If we logged in with a bare JID, and we have a full bound JID, re-login with the
* bound JID to try and keep dynamically assigned resources */