summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2017-06-09 19:09:49 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-06-12 13:02:33 +0200
commit90e83ba599cfe4872d9adfc6b4984b03e635f757 (patch)
tree672e9208657f310b9c7852585772e666e900c371
parent57ae8834c8313354477117b65d87c86407f6bf82 (diff)
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 <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx9
1 files changed, 5 insertions, 4 deletions
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)