summaryrefslogtreecommitdiffstats
path: root/src/bondwizard.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-15 23:50:57 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-15 23:50:57 -0600
commitb712cbc116db4676f5458e25fd69325d730188cc (patch)
treee90334e6c27cd110c5ed05e6edb101a9a2784ca7 /src/bondwizard.cpp
parentb4c09d072a95ec14e0e2bd0ae144df103d1738d6 (diff)
downloadkcmldap-b712cbc116db4676f5458e25fd69325d730188cc.tar.gz
kcmldap-b712cbc116db4676f5458e25fd69325d730188cc.zip
Minor GUI enhancements
Fix bonding problems
Diffstat (limited to 'src/bondwizard.cpp')
-rw-r--r--src/bondwizard.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/bondwizard.cpp b/src/bondwizard.cpp
index d9a36c2..cbf1586 100644
--- a/src/bondwizard.cpp
+++ b/src/bondwizard.cpp
@@ -94,6 +94,10 @@ void BondWizard::next() {
if (currentPage()==intropage) {
TQWizard::next();
realmpage->validateEntries();
+
+ // Focus the first entry field on the new wizard page
+ realmpage->txtRealmName->setFocus();
+ realmpage->txtRealmName->selectAll();
}
else if (currentPage()==realmpage) {
// Save realm information
@@ -119,6 +123,10 @@ void BondWizard::next() {
finishpage->ldapAdminRealm->setText(realm.name);
m_finalRealm = realm;
TQWizard::next();
+
+ // Focus the first entry field on the new wizard page
+ finishpage->ldapAdminUsername->setFocus();
+ finishpage->ldapAdminUsername->selectAll();
}
else {
KMessageBox::error(this, i18n("<qt><b>The specified realm is already known to this system.</b><p>If the realm name is correct, please exit the Wizard and select 'Re-Bond to Realm' in the LDAP configuration module.</qt>"), i18n("Duplicate Realm Entry Detected"));
@@ -126,7 +134,6 @@ void BondWizard::next() {
}
if (currentPage()==finishpage) {
backButton()->setEnabled(false);
- finishButton()->setFocus();
}
}
@@ -189,12 +196,23 @@ void BondWizard::closeEvent(TQCloseEvent* e){
void BondWizard::accept(){
// Try to bond
TQString errorString;
+ backButton()->setEnabled(false);
+ nextButton()->setEnabled(false);
+ finishButton()->setEnabled(false);
+ cancelButton()->setEnabled(false);
+ finishpage->setEnabled(false);
+
if (m_ldapConfig->bondRealm(m_finalRealm, finishpage->ldapAdminUsername->text(), finishpage->ldapAdminPassword->password(), finishpage->ldapAdminRealm->text(), &errorString) == 0) {
done(0);
}
else {
KMessageBox::error(this, i18n("<qt><b>Unable to bond to realm!</b><p>Details: %1</qt>").arg(errorString), i18n("Unable to Bond to Realm"));
}
+
+ finishpage->setEnabled(true);
+ backButton()->setEnabled(true);
+ finishButton()->setEnabled(true);
+ cancelButton()->setEnabled(true);
}
/** calls all save functions after resetting all features/ OS/ theme selections to Trinity default */