cui/source/options/optinet2.cxx | 7 +++++-- include/svtools/restartdialog.hxx | 5 ++++- svtools/source/dialogs/restartdialog.cxx | 3 +++ svtools/uiconfig/ui/restartdialog.ui | 15 +++++++++++++++ 4 files changed, 27 insertions(+), 3 deletions(-)
New commits: commit 2fce97c51ceb15c7722ed828b2cc0ea4b21c8c95 Author: irem <iremsend...@gmail.com> Date: Sun May 1 15:28:53 2016 +0300 tdf#99211 Use the restart dialog for notifications about restart Change-Id: I2093e99d7b377285f6b3248a90072f0dea12f732 Reviewed-on: https://gerrit.libreoffice.org/24556 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 092f355..be551b5 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -91,6 +91,9 @@ #include "certpath.hxx" #include "tsaurls.hxx" +#include <svtools/restartdialog.hxx> +#include <comphelper/solarmutex.hxx> + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::sfx2; @@ -804,8 +807,8 @@ IMPL_LINK_NOARG_TYPED(SvxSecurityTabPage, CertPathPBHdl, Button*, void) if (nRet == RET_OK && sOrig != mpCertPathDlg->getDirectory()) { - ScopedVclPtrInstance< MessageDialog > aWarnBox(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO); - aWarnBox->Execute(); + SolarMutexGuard aGuard; + svtools::executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, svtools::RESTART_REASON_ADDING_PATH); } } diff --git a/include/svtools/restartdialog.hxx b/include/svtools/restartdialog.hxx index d90ec4d..78f29b9 100644 --- a/include/svtools/restartdialog.hxx +++ b/include/svtools/restartdialog.hxx @@ -35,9 +35,12 @@ enum RestartReason { RESTART_REASON_MAILMERGE_INSTALL, // "For the mail merge to work properly, // %PRODUCTNAME must be restarted." - RESTART_REASON_LANGUAGE_CHANGE + RESTART_REASON_LANGUAGE_CHANGE, // "For the updated language settings to take effect, // %PRODUCTNAME must be restarted." + RESTART_REASON_ADDING_PATH + // "For the added path to take effect, + // %PRODUCTNAME must be restarted." }; // Must be called with the solar mutex locked: diff --git a/svtools/source/dialogs/restartdialog.cxx b/svtools/source/dialogs/restartdialog.cxx index 3b9df0f..99c0fd8 100644 --- a/svtools/source/dialogs/restartdialog.cxx +++ b/svtools/source/dialogs/restartdialog.cxx @@ -46,6 +46,9 @@ public: case svtools::RESTART_REASON_LANGUAGE_CHANGE: get(reason_, "reason_language_change"); break; + case svtools::RESTART_REASON_ADDING_PATH: + get(reason_, "reason_adding_path"); + break; default: assert(false); // this cannot happen } diff --git a/svtools/uiconfig/ui/restartdialog.ui b/svtools/uiconfig/ui/restartdialog.ui index 2dc71d7..0d94b81 100644 --- a/svtools/uiconfig/ui/restartdialog.ui +++ b/svtools/uiconfig/ui/restartdialog.ui @@ -136,6 +136,21 @@ </packing> </child> <child> + <object class="GtkLabel" id="reason_adding_path"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">For the added path to take effect, %PRODUCTNAME must be restarted.</property> + <property name="wrap">True</property> + <property name="max_width_chars">50</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> <object class="GtkLabel" id="label"> <property name="visible">True</property> <property name="can_focus">False</property>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits