diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-01-13 23:17:52 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-01-16 09:11:36 +0000 |
commit | 29b13a24cf5f0e6e58641d4a55cdfa03c83b68ac (patch) | |
tree | d4bfa6713ac0f73656de503638184266c821788e /svx | |
parent | 3db1ce30ab235ad22aed71c22e4f6f52b7b88829 (diff) |
SafeModeDialog: restart in normal mode instead of quitting
Change-Id: I546629656ada6c7a8a15b4dc77a042e1f1106924
Reviewed-on: https://gerrit.libreoffice.org/33059
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/SafeModeDialog.cxx | 21 | ||||
-rw-r--r-- | svx/source/dialog/SafeModeDialog.hxx | 2 | ||||
-rw-r--r-- | svx/uiconfig/ui/safemodedialog.ui | 6 |
3 files changed, 16 insertions, 13 deletions
diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx index abc2215a5633..d8b41899cdb4 100644 --- a/svx/source/dialog/SafeModeDialog.cxx +++ b/svx/source/dialog/SafeModeDialog.cxx @@ -37,8 +37,8 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent) : Dialog(pParent, "SafeModeDialog", "svx/ui/safemodedialog.ui"), mpBtnContinue(), - mpBtnQuit(), mpBtnRestart(), + mpBtnApply(), mpBoxRestore(), mpBoxConfigure(), @@ -63,8 +63,8 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent) maBackupFileHelper() { get(mpBtnContinue, "btn_continue"); - get(mpBtnQuit, "btn_quit"); get(mpBtnRestart, "btn_restart"); + get(mpBtnApply, "btn_apply"); get(mpBoxRestore, "group_restore"); get(mpBoxConfigure, "group_configure"); @@ -96,8 +96,8 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent) mpRadioReset->SetClickHdl(LINK(this, SafeModeDialog, RadioBtnHdl)); mpBtnContinue->SetClickHdl(LINK(this, SafeModeDialog, DialogBtnHdl)); - mpBtnQuit->SetClickHdl(LINK(this, SafeModeDialog, DialogBtnHdl)); mpBtnRestart->SetClickHdl(LINK(this, SafeModeDialog, DialogBtnHdl)); + mpBtnApply->SetClickHdl(LINK(this, SafeModeDialog, DialogBtnHdl)); mpCBCheckProfilesafeConfig->SetToggleHdl(LINK(this, SafeModeDialog, CheckBoxHdl)); mpCBCheckProfilesafeExtensions->SetToggleHdl(LINK(this, SafeModeDialog, CheckBoxHdl)); @@ -112,7 +112,7 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent) mpBtnCreateZip->SetClickHdl(LINK(this, SafeModeDialog, CreateZipBtnHdl)); // Disable restart btn until some checkbox is active - mpBtnRestart->Disable(); + mpBtnApply->Disable(); // Check the first radio button and call its handler, // it'll disable the relevant parts @@ -145,8 +145,8 @@ void SafeModeDialog::dispose() mpBoxReset.clear(); mpBtnContinue.clear(); - mpBtnQuit.clear(); mpBtnRestart.clear(); + mpBtnApply.clear(); mpCBCheckProfilesafeConfig.clear(); mpCBCheckProfilesafeExtensions.clear(); @@ -318,12 +318,15 @@ IMPL_LINK(SafeModeDialog, DialogBtnHdl, Button*, pBtn, void) { Close(); } - else if (pBtn == mpBtnQuit.get()) + else if (pBtn == mpBtnRestart.get()) { + sfx2::SafeMode::putRestartFlag(); Close(); - Application::Quit(); + uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); + css::task::OfficeRestartManager::get(xContext)->requestRestart( + css::uno::Reference< css::task::XInteractionHandler >()); } - else if (pBtn == mpBtnRestart.get()) + else if (pBtn == mpBtnApply.get()) { sfx2::SafeMode::putRestartFlag(); Close(); @@ -394,7 +397,7 @@ IMPL_LINK(SafeModeDialog, CheckBoxHdl, CheckBox&, /*pCheckBox*/, void) mpCBResetCustomizations->IsChecked() || mpCBResetWholeUserProfile->IsChecked()); - mpBtnRestart->Enable(bEnable); + mpBtnApply->Enable(bEnable); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/SafeModeDialog.hxx b/svx/source/dialog/SafeModeDialog.hxx index aebbb8edfcb4..b70265de2c30 100644 --- a/svx/source/dialog/SafeModeDialog.hxx +++ b/svx/source/dialog/SafeModeDialog.hxx @@ -34,8 +34,8 @@ public: private: VclPtr<Button> mpBtnContinue; - VclPtr<Button> mpBtnQuit; VclPtr<Button> mpBtnRestart; + VclPtr<Button> mpBtnApply; VclPtr<VclBox> mpBoxRestore; VclPtr<VclBox> mpBoxConfigure; diff --git a/svx/uiconfig/ui/safemodedialog.ui b/svx/uiconfig/ui/safemodedialog.ui index 01ae66be54d8..cb86c621d67e 100644 --- a/svx/uiconfig/ui/safemodedialog.ui +++ b/svx/uiconfig/ui/safemodedialog.ui @@ -48,8 +48,8 @@ </packing> </child> <child> - <object class="GtkButton" id="btn_quit"> - <property name="label" translatable="yes">_Quit</property> + <object class="GtkButton" id="btn_restart"> + <property name="label" translatable="yes">_Restart in Normal Mode</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -62,7 +62,7 @@ </packing> </child> <child> - <object class="GtkButton" id="btn_restart"> + <object class="GtkButton" id="btn_apply"> <property name="label" translatable="yes">_Apply Changes and Restart</property> <property name="visible">True</property> <property name="can_focus">True</property> |