[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - svx/source svx/uiconfig

Katarina Behrens Katarina.Behrens at cib.de
Thu Feb 16 10:42:04 UTC 2017


 svx/source/dialog/SafeModeDialog.cxx |   21 ++++++++++++---------
 svx/source/dialog/SafeModeDialog.hxx |    2 +-
 svx/uiconfig/ui/safemodedialog.ui    |    6 +++---
 3 files changed, 16 insertions(+), 13 deletions(-)

New commits:
commit 2b60861a84b3e28cc110110e762fba5d6fbc43dd
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Fri Jan 13 23:17:52 2017 +0100

    Resolves: tdf#105229 restart in normal mode instead of quitting
    
    Change-Id: I546629656ada6c7a8a15b4dc77a042e1f1106924
    Reviewed-on: https://gerrit.libreoffice.org/33059
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    Tested-by: Katarina Behrens <Katarina.Behrens at cib.de>
    (cherry picked from commit 29b13a24cf5f0e6e58641d4a55cdfa03c83b68ac)
    Reviewed-on: https://gerrit.libreoffice.org/34096
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx
index b77b83f..51de548 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 disable the other parts
     mpRadioRestore->Check();
@@ -146,8 +146,8 @@ void SafeModeDialog::dispose()
     mpBoxReset.clear();
 
     mpBtnContinue.clear();
-    mpBtnQuit.clear();
     mpBtnRestart.clear();
+    mpBtnApply.clear();
 
     mpCBCheckProfilesafeConfig.clear();
     mpCBCheckProfilesafeExtensions.clear();
@@ -319,12 +319,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();
@@ -395,7 +398,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 aebbb8e..b70265d 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 01ae66b..cb86c62 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>


More information about the Libreoffice-commits mailing list