include/svtools/restartdialog.hxx | 3 +++ svtools/source/dialogs/restartdialog.cxx | 3 +++ svtools/uiconfig/ui/restartdialog.ui | 17 ++++++++++++++++- sw/source/ui/config/optcomp.cxx | 8 ++++++++ 4 files changed, 30 insertions(+), 1 deletion(-)
New commits: commit ca5e771e165038592505b2c378c743405ce45e27 Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Sat Feb 16 17:05:34 2019 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sun Feb 17 11:03:52 2019 +0100 MSForms: Show restart dialog when MS compatible Forms menu setting is changed Reviewed-on: https://gerrit.libreoffice.org/67906 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> (cherry picked from commit 54b2615e0d209f815b3d503523fd4c517dc6b5cd) Change-Id: Icb98dac73dea5f5cb18e1ca34e37e9d9bf84782e Reviewed-on: https://gerrit.libreoffice.org/67921 Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> diff --git a/include/svtools/restartdialog.hxx b/include/svtools/restartdialog.hxx index 996bdc010085..eb543c14fe8e 100644 --- a/include/svtools/restartdialog.hxx +++ b/include/svtools/restartdialog.hxx @@ -54,6 +54,9 @@ enum RestartReason { // "For the extension to work properly, // %PRODUCTNAME must be restarted." RESTART_REASON_OPENGL, + // For restructuring the Forms menu, + // %PRODUCTNAME must be restarted: + RESTART_REASON_MSCOMPATIBLE_FORMS_MENU, // No particular reason RESTART_REASON_NONE }; diff --git a/svtools/source/dialogs/restartdialog.cxx b/svtools/source/dialogs/restartdialog.cxx index fc8e6e30bcf6..ecccbb0131a9 100644 --- a/svtools/source/dialogs/restartdialog.cxx +++ b/svtools/source/dialogs/restartdialog.cxx @@ -64,6 +64,9 @@ public: case svtools::RESTART_REASON_OPENGL: get(reason_, "reason_opengl"); break; + case svtools::RESTART_REASON_MSCOMPATIBLE_FORMS_MENU: + get(reason_, "reason_mscompatible_formsmenu"); + break; default: assert(false); // this cannot happen } diff --git a/svtools/uiconfig/ui/restartdialog.ui b/svtools/uiconfig/ui/restartdialog.ui index 70a7853acd04..8967591b73b3 100644 --- a/svtools/uiconfig/ui/restartdialog.ui +++ b/svtools/uiconfig/ui/restartdialog.ui @@ -226,6 +226,21 @@ </packing> </child> <child> + <object class="GtkLabel" id="reason_mscompatible_formsmenu"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="label" translatable="yes" context="restartdialog|reason_mscompatible_formsmenu">For restructuring the Forms menu, %PRODUCTNAME must be restarted.</property> + <property name="wrap">True</property> + <property name="max_width_chars">50</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">11</property> + </packing> + </child> + <child> <object class="GtkLabel" id="label"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -236,7 +251,7 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">11</property> + <property name="position">12</property> </packing> </child> </object> diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index 3d8bfcb1030c..7909fb22f90c 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -35,6 +35,8 @@ #include <svtools/treelistentry.hxx> #include <IDocumentSettingAccess.hxx> #include <vector> +#include <svtools/restartdialog.hxx> +#include <comphelper/processfactory.hxx> using namespace ::com::sun::star::beans; using namespace ::com::sun::star::document; @@ -458,6 +460,12 @@ bool SwCompatibilityOptPage::FillItemSet( SfxItemSet* ) m_aViewConfigItem.SetMSOCompatibleFormsMenu(bNewMSFormsMenuOption); m_bSavedMSFormsMenuOption = bNewMSFormsMenuOption; bModified = true; + + // Show a message about that the option needs a restart to be applied + { + svtools::executeRestartDialog(comphelper::getProcessComponentContext(), + nullptr, svtools::RESTART_REASON_MSCOMPATIBLE_FORMS_MENU); + } } return bModified; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits