diff options
Diffstat (limited to 'src/bondwizard.cpp')
-rw-r--r-- | src/bondwizard.cpp | 20 |
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 */ |