sw/source/ui/dbui/mmgreetingspage.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit ebab6db52928250fe98420e97d72d08e3b5c309e Author: Gabor Kelemen <kelem...@ubuntu.com> Date: Fri Jun 9 19:09:49 2017 +0200 tdf#103311 Conditionally disable Next button on MM Wizard page 4 The user has to set up either an address block on page 3 or a greeting on page 4 to be able to progress to page 5. The 5th page is already disabled if these are not enabled but the Next button on page 4 is always enabled. Now the Next button gets enabled/disabled if the 5th page is enabled/disabled by UpdateRoadmap(). Change-Id: If216d935ebebb3fc6a4e1488ec2dfc716db41c3e Reviewed-on: https://gerrit.libreoffice.org/38610 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> (cherry picked from commit 90e83ba599cfe4872d9adfc6b4984b03e635f757) Reviewed-on: https://gerrit.libreoffice.org/38700 Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index 569dcd977216..c3f01412e81a 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -99,7 +99,7 @@ IMPL_LINK_NOARG(SwGreetingsHandler, IndividualHdl_Impl, Button*, void) { m_rConfigItem.SetIndividualGreeting(bIndividual, false); m_pWizard->UpdateRoadmap(); - m_pWizard->enableButtons(WizardButtonFlags::NEXT, true); + m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_LAYOUTPAGE)); } UpdatePreview(); } @@ -118,7 +118,7 @@ IMPL_LINK(SwGreetingsHandler, GreetingHdl_Impl, Button*, pButton, void) if(m_bIsTabPage) { m_pWizard->UpdateRoadmap(); - m_pWizard->enableButtons(WizardButtonFlags::NEXT, true); + m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_LAYOUTPAGE)); } UpdatePreview(); } @@ -138,7 +138,7 @@ IMPL_LINK(SwMailMergeGreetingsPage, AssignHdl_Impl, Button*, pButton, void) { UpdatePreview(); m_pWizard->UpdateRoadmap(); - m_pWizard->enableButtons(WizardButtonFlags::NEXT, true); + m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_LAYOUTPAGE)); } } @@ -331,7 +331,7 @@ void SwMailMergeGreetingsPage::ActivatePage() m_pFemaleFieldCB->SaveValue(); UpdatePreview(); - m_pWizard->enableButtons(WizardButtonFlags::NEXT, true); + m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_LAYOUTPAGE)); } bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason ) @@ -376,6 +376,7 @@ IMPL_LINK(SwMailMergeGreetingsPage, ContainsHdl_Impl, Button*, pBox, void) m_pNextSetIB->Enable(bContainsGreeting); m_rConfigItem.SetGreetingLine(m_pGreetingLineCB->IsChecked(), false); m_pWizard->UpdateRoadmap(); + m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_LAYOUTPAGE)); } IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, Button*, pButton, void) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits