diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-10-12 13:35:52 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-10-12 15:28:53 +0200 |
commit | a9b56780cec06ca9545b2ba554e405fe061fed57 (patch) | |
tree | cac256becfe770757c9772abd90d01f0ff8dac81 /svx | |
parent | 9e30dcd46d2ad31be6a9dcafaa6505e8301b8694 (diff) |
SafeModeDialog: Enable restart button only for active selections
Change-Id: Ic5c9d1a0001e8324aa007c3f7bc0e58e13afbbbf
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/SafeModeDialog.cxx | 13 | ||||
-rw-r--r-- | svx/source/dialog/SafeModeDialog.hxx | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx index 46e9d2f96f63..1da58a00d44b 100644 --- a/svx/source/dialog/SafeModeDialog.cxx +++ b/svx/source/dialog/SafeModeDialog.cxx @@ -35,6 +35,13 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent): mpBtnContinue->SetClickHdl(LINK(this, SafeModeDialog, BtnHdl)); mpBtnQuit->SetClickHdl(LINK(this, SafeModeDialog, BtnHdl)); mpBtnRestart->SetClickHdl(LINK(this, SafeModeDialog, BtnHdl)); + + mpCBCustomizations->SetToggleHdl(LINK(this, SafeModeDialog, CheckBoxHdl)); + mpCBExtensions->SetToggleHdl(LINK(this, SafeModeDialog, CheckBoxHdl)); + mpCBFull->SetToggleHdl(LINK(this, SafeModeDialog, CheckBoxHdl)); + + // Disable restart btn until some checkbox is active + mpBtnRestart->Disable(); } SafeModeDialog::~SafeModeDialog() @@ -94,4 +101,10 @@ IMPL_LINK(SafeModeDialog, BtnHdl, Button*, pBtn, void) } } +IMPL_LINK(SafeModeDialog, CheckBoxHdl, CheckBox&, /*pCheckBox*/, void) +{ + bool bEnable = mpCBCustomizations->IsChecked() || mpCBExtensions->IsChecked() || mpCBFull->IsChecked(); + mpBtnRestart->Enable(bEnable); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/SafeModeDialog.hxx b/svx/source/dialog/SafeModeDialog.hxx index 44e6b1869cac..dd0036ef7e19 100644 --- a/svx/source/dialog/SafeModeDialog.hxx +++ b/svx/source/dialog/SafeModeDialog.hxx @@ -41,6 +41,7 @@ private: static void terminateOffice(); static void applyChanges(); + DECL_LINK(CheckBoxHdl, CheckBox&, void); DECL_LINK(BtnHdl, Button*, void); }; |