diff options
-rw-r--r-- | cui/source/options/optinet2.cxx | 7 | ||||
-rw-r--r-- | include/svtools/restartdialog.hxx | 5 | ||||
-rw-r--r-- | svtools/source/dialogs/restartdialog.cxx | 3 | ||||
-rw-r--r-- | svtools/uiconfig/ui/restartdialog.ui | 15 |
4 files changed, 27 insertions, 3 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 092f35513be4..be551b5116f7 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 d90ec4ddd9bc..78f29b9f8f0c 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 3b9df0ff3ee7..99c0fd865af8 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 2dc71d79eadf..0d94b81cfa59 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> |