diff --git a/doc/ChangeLog b/doc/ChangeLog index babb42e44..619246e7f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,5 +1,11 @@ 2008-10-02 Vadim Kurland + * instDialog.cpp (instDialog::finishInstall): fixed bug #2125604: + "Cancel button does not kill the installer". Cancel button of the + installer wizard in fact kills background process. Second issue + raised in this bug report is that "Finish" button was always + enabled. This is now fixed. + * PolicyCompiler_PrintRule.cpp (PrintRule::_printTarget): fixed bug #2141911: "no ULOG for ip6tables". ULOG target has not been implemented for ip6tables yet, so the compiler should fall back to diff --git a/src/gui/fakeWizard.cpp b/src/gui/fakeWizard.cpp index 432c65a5c..0aabc9620 100644 --- a/src/gui/fakeWizard.cpp +++ b/src/gui/fakeWizard.cpp @@ -101,12 +101,7 @@ void FakeWizard::setFinishEnabled(const int page, const bool enabled) if (page >= m_pageCount) return; finishEnabled[page] = enabled; if (page == currentPage()) - { - if (enabled) - finishButton->show(); - else - finishButton->hide(); - } + finishButton->setEnabled(enabled); } void FakeWizard::setTitle(const int page, const QString title) @@ -145,15 +140,11 @@ void FakeWizard::showPage(const int page) { if (page >= m_pageCount) return; - if (finishEnabled[page]) - finishButton->show(); - else - finishButton->hide(); - - nextButton->setEnabled( nextEnabled[page] && + nextButton->setEnabled(nextEnabled[page] && (nextRelevant(page) > -1) ); - backButton->setEnabled( backEnabled[page] && + backButton->setEnabled(backEnabled[page] && (previousRelevant(page) > -1) ); + finishButton->setEnabled(finishEnabled[page]); if (titleLabel) { diff --git a/src/gui/instDialog.cpp b/src/gui/instDialog.cpp index 4cef414f6..6be1ab56a 100644 --- a/src/gui/instDialog.cpp +++ b/src/gui/instDialog.cpp @@ -129,7 +129,8 @@ instDialog::instDialog(QWidget* p, m_dialog->fwWorkList->setSortingEnabled(true); - setFinishEnabled(pageCount()-1, true); + for (int page=0; page < pageCount(); page++) + setFinishEnabled(page, false); lastPage=-1; reqFirewalls = reqFirewalls_; @@ -564,8 +565,10 @@ void instDialog::showPage(const int page) if (fwbdebug) qDebug("instDialog::showPage"); int p = page; + if (fwbdebug) - qDebug(QString("to page: %1 from page: %2").arg(p).arg(lastPage).toAscii().constData()); + qDebug(QString("to page: %1 from page: %2"). + arg(p).arg(lastPage).toAscii().constData()); switch (p) { @@ -632,7 +635,6 @@ void instDialog::showPage(const int page) } setBackEnabled(2,false); setNextEnabled(2, false); - setFinishEnabled(2, true); if (compileFlag && operation==BATCH_INSTALL) { fillInstallOpList(); @@ -2030,7 +2032,7 @@ void instDialog::finishInstall(bool success) if (fwbdebug) qDebug("instDialog::finishInstall done"); setNextEnabled(1, false); - setFinishEnabled(1, true); + setFinishEnabled(currentPage(), true); } void instDialog::restartSession() @@ -2166,7 +2168,7 @@ void instDialog::processExited(int res) } currentSaveButton->setEnabled(true); if (operation==BATCH_COMPILE) - setFinishEnabled(1, true); + setFinishEnabled(currentPage(), true); else setNextEnabled(1, true); @@ -2460,8 +2462,6 @@ void instDialog::installSelected() setTitle(1, tr("Installing firewalls")); setNextEnabled(1, false); - setNextEnabled(1, false); - setFinishEnabled(1, true); m_dialog->saveMCLogButton->setEnabled(true); bool fPix=false,fCustInst=true;