summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/options/optjava.cxx15
-rw-r--r--include/svtools/restartdialog.hxx11
-rw-r--r--svtools/source/dialogs/restartdialog.cxx9
-rw-r--r--svtools/uiconfig/ui/restartdialog.ui45
4 files changed, 73 insertions, 7 deletions
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 44f9ccf2e4e5..20a651b600c0 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -55,6 +55,9 @@
#define CLASSPATH_DELIMITER SAL_PATHSEPARATOR
+#include <svtools/restartdialog.hxx>
+#include <comphelper/solarmutex.hxx>
+
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::ucb;
using namespace ::com::sun::star::ui::dialogs;
@@ -329,8 +332,8 @@ IMPL_LINK_NOARG_TYPED(SvxJavaOptionsPage, ParameterHdl_Impl, Button*, void)
(void)eErr;
if ( bRunning )
{
- 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_ASSIGNING_JAVAPARAMETERS);
}
}
}
@@ -374,8 +377,8 @@ IMPL_LINK_NOARG_TYPED(SvxJavaOptionsPage, ClassPathHdl_Impl, Button*, void)
(void)eErr;
if ( bRunning )
{
- 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_ASSIGNING_FOLDERS);
}
}
}
@@ -650,8 +653,8 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* /*rCoreSet*/ )
SvtMiscOptions aMiscOpt;
aMiscOpt.SetExperimentalMode( m_pExperimentalCB->IsChecked() );
bModified = true;
- 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_EXP_FEATURES);
}
if ( m_pMacroCB->IsValueChangedFromSaved() )
diff --git a/include/svtools/restartdialog.hxx b/include/svtools/restartdialog.hxx
index 78f29b9f8f0c..e04f5f67cb84 100644
--- a/include/svtools/restartdialog.hxx
+++ b/include/svtools/restartdialog.hxx
@@ -38,9 +38,18 @@ enum RestartReason {
RESTART_REASON_LANGUAGE_CHANGE,
// "For the updated language settings to take effect,
// %PRODUCTNAME must be restarted."
- RESTART_REASON_ADDING_PATH
+ RESTART_REASON_ADDING_PATH,
// "For the added path to take effect,
// %PRODUCTNAME must be restarted."
+ RESTART_REASON_ASSIGNING_JAVAPARAMETERS,
+ // "For the assigned java parameters to take effect,
+ // %PRODUCTNAME must be restarted."
+ RESTART_REASON_ASSIGNING_FOLDERS,
+ // "For the assigned folders and archives to take effect,
+ // %PRODUCTNAME must be restarted."
+ RESTART_REASON_EXP_FEATURES
+ // "For the modified experimental features 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 99c0fd865af8..bc6c3f7309ac 100644
--- a/svtools/source/dialogs/restartdialog.cxx
+++ b/svtools/source/dialogs/restartdialog.cxx
@@ -49,6 +49,15 @@ public:
case svtools::RESTART_REASON_ADDING_PATH:
get(reason_, "reason_adding_path");
break;
+ case svtools::RESTART_REASON_ASSIGNING_JAVAPARAMETERS:
+ get(reason_, "reason_assigning_javaparameters");
+ break;
+ case svtools::RESTART_REASON_ASSIGNING_FOLDERS:
+ get(reason_, "reason_assigning_folders");
+ break;
+ case svtools::RESTART_REASON_EXP_FEATURES:
+ get(reason_,"reason_exp_features");
+ break;
default:
assert(false); // this cannot happen
}
diff --git a/svtools/uiconfig/ui/restartdialog.ui b/svtools/uiconfig/ui/restartdialog.ui
index 0d94b81cfa59..03584e66f09f 100644
--- a/svtools/uiconfig/ui/restartdialog.ui
+++ b/svtools/uiconfig/ui/restartdialog.ui
@@ -151,6 +151,51 @@
</packing>
</child>
<child>
+ <object class="GtkLabel" id="reason_assigning_javaparameters">
+ <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 assigned Java parameters 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">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="reason_assigning_folders">
+ <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 assigned folders and archives 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">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="reason_exp_features">
+ <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 modified experimental features 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">5</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="can_focus">False</property>