From dbaffcee8670af6f571356c43d26357237fcd616 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 20 May 2012 02:21:04 -0500 Subject: GUI nearly complete, still need to add backend bonding commands --- src/bondwizard.cpp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'src/bondwizard.cpp') diff --git a/src/bondwizard.cpp b/src/bondwizard.cpp index eeddfa6..03ca5a6 100644 --- a/src/bondwizard.cpp +++ b/src/bondwizard.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include @@ -77,6 +78,9 @@ BondWizard::BondWizard(LDAPRealmConfigList *realmlist, LDAPConfig *ldapconfig, T realmpage->txtUIDOffset->setValue(5000); realmpage->txtGIDOffset->setValue(5000); + // Other setup + finishpage->ldapAdminRealm->setEnabled(false); + setFinishEnabled(TQWizard::page(2), true); setPosition(); @@ -112,6 +116,8 @@ void BondWizard::next() { if (!m_realmList->contains(realm.name)) { m_realmList->insert(realm.name, realm); m_ldapConfig->save(); + finishpage->ldapAdminRealm->setText(realm.name); + m_finalRealm = realm; TQWizard::next(); } else { @@ -119,6 +125,7 @@ void BondWizard::next() { } } if (currentPage()==finishpage) { + backButton()->setEnabled(false); finishButton()->setFocus(); } } @@ -141,7 +148,13 @@ bool BondWizard::askClose(){ text = i18n("

Are you sure you want to quit the LDAP Bonding Wizard?

" "

If yes, click Quit and all changes will be lost." "
If not, click Cancel to return and finish your setup.

"); - } else { + } + else if (currentPage()==finishpage) { + text = i18n("

Are you sure you want to quit the LDAP Bonding Wizard?

" + "

If yes, click Quit and the new realm will remain deactivated pending bonding." + "
If not, click Cancel to return and finish your setup.

"); + } + else { text = i18n("

Are you sure you want to quit the LDAP Bonding Wizard?

" "

If not, click Cancel to return and finish bonding.

"); } @@ -174,7 +187,14 @@ void BondWizard::closeEvent(TQCloseEvent* e){ /** maybe call a dialog that the wizard has finished. */ void BondWizard::accept(){ - done(0); + // Try to bond + if (m_ldapConfig->bondRealm(m_finalRealm, finishpage->ldapAdminUsername->text(), finishpage->ldapAdminPassword->password(), finishpage->ldapAdminRealm->text()) == 0) { + done(0); + } + else { + KMessageBox::error(this, i18n("Unable to bond to realm!

RAJA ERRORSTR"), i18n("Unable to Bond to Realm")); + // RAJA FIXME + } } /** calls all save functions after resetting all features/ OS/ theme selections to Trinity default */ -- cgit v1.2.1