diff options
-rw-r--r-- | include/svtools/svtools.hrc | 2 | ||||
-rw-r--r-- | svtools/UIConfig_svt.mk | 1 | ||||
-rw-r--r-- | svtools/source/java/javaerror.src | 12 | ||||
-rw-r--r-- | svtools/source/java/javainteractionhandler.cxx | 6 | ||||
-rw-r--r-- | svtools/uiconfig/ui/javadisableddialog.ui | 85 |
5 files changed, 89 insertions, 17 deletions
diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc index 2887e54688c2..c0af41357fb5 100644 --- a/include/svtools/svtools.hrc +++ b/include/svtools/svtools.hrc @@ -197,7 +197,6 @@ //String - Ids for Java errors, messages #define STR_SVT_JAVAERROR_START (STR_SVT_INDEXENTRY_END + 1) -#define STR_QUESTION_JAVADISABLED (STR_SVT_JAVAERROR_START+0) #define STR_ERROR_JVMCREATIONFAILED_TITLE (STR_SVT_JAVAERROR_START+1) #define STR_WARNING_JAVANOTFOUND (STR_SVT_JAVAERROR_START+2) #define STR_WARNING_INVALIDJAVASETTINGS (STR_SVT_JAVAERROR_START+3) @@ -263,7 +262,6 @@ #define RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX (RID_SVTOOLS_IMAGELIST_START + 3) // Java message boxes -#define QBX_JAVADISABLED (RID_SVTOOLS_START+20) #define WARNINGBOX_JAVANOTFOUND (RID_SVTOOLS_START+22) #define WARNINGBOX_INVALIDJAVASETTINGS (RID_SVTOOLS_START+23) // RID_SVTOOLS_START + 24 unused diff --git a/svtools/UIConfig_svt.mk b/svtools/UIConfig_svt.mk index 0c482cdc8815..dd6182e50125 100644 --- a/svtools/UIConfig_svt.mk +++ b/svtools/UIConfig_svt.mk @@ -13,6 +13,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svt,\ svtools/uiconfig/ui/addresstemplatedialog \ svtools/uiconfig/ui/graphicexport \ svtools/uiconfig/ui/GraphicExportOptionsDialog \ + svtools/uiconfig/ui/javadisableddialog \ svtools/uiconfig/ui/placeedit \ svtools/uiconfig/ui/printersetupdialog \ svtools/uiconfig/ui/querydeletedialog \ diff --git a/svtools/source/java/javaerror.src b/svtools/source/java/javaerror.src index 40d4194d5195..e5c17e945f2c 100644 --- a/svtools/source/java/javaerror.src +++ b/svtools/source/java/javaerror.src @@ -40,13 +40,6 @@ WarningBox WARNINGBOX_INVALIDJAVASETTINGS Message[ en-US ] ="The %PRODUCTNAME configuration has been changed. Under Tools - Options - %PRODUCTNAME - Advanced, select the Java runtime environment you want to have used by %PRODUCTNAME."; }; -QueryBox QBX_JAVADISABLED -{ - Buttons = WB_YES_NO_CANCEL ; - DefButton = WB_DEF_YES ; - Message[ en-US ] = "%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. However, use of a JRE has been disabled. Do you want to enable the use of a JRE now?"; -}; - String STR_ERROR_JVMCREATIONFAILED_MAC { Text[ en-US ] = "%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective. Please select another version or install a new JRE and select it under %PRODUCTNAME - Preferences - %PRODUCTNAME - Advanced."; @@ -67,11 +60,6 @@ String STR_WARNING_INVALIDJAVASETTINGS Text[ en-US ] = "Select JRE"; }; -String STR_QUESTION_JAVADISABLED -{ - Text[ en-US ] = "Enable JRE" ; -}; - String STR_ERROR_JVMCREATIONFAILED_TITLE { Text[ en-US ] = "JRE is Defective" ; diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx index beda63538dc4..36ab197f9bd7 100644 --- a/svtools/source/java/javainteractionhandler.cxx +++ b/svtools/source/java/javainteractionhandler.cxx @@ -29,8 +29,8 @@ #include <com/sun/star/java/RestartRequiredException.hpp> #include <comphelper/processfactory.hxx> #include <vcl/layout.hxx> -#include <vcl/svapp.hxx> #include <vcl/msgbox.hxx> +#include <vcl/svapp.hxx> #include <osl/mutex.hxx> #include <tools/rcid.h> #include <jvmfwk/framework.h> @@ -159,8 +159,8 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque SolarMutexGuard aSolarGuard; m_bJavaDisabled_Handled = true; // Java disabled. Give user a chance to enable Java inside Office. - QueryBox aQueryBox( NULL, SvtResId( QBX_JAVADISABLED ) ); - aQueryBox.SetText(SvtResId( STR_QUESTION_JAVADISABLED ).toString()); + MessageDialog aQueryBox(NULL, "JavaDisabledDialog", + "svt/ui/javadisableddialog.ui"); nResult = aQueryBox.Execute(); if ( nResult == RET_YES ) { diff --git a/svtools/uiconfig/ui/javadisableddialog.ui b/svtools/uiconfig/ui/javadisableddialog.ui new file mode 100644 index 000000000000..ade251b6fbbf --- /dev/null +++ b/svtools/uiconfig/ui/javadisableddialog.ui @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <object class="GtkMessageDialog" id="JavaDisabledDialog"> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="title" translatable="yes">Enable JRE?</property> + <property name="resizable">False</property> + <property name="type_hint">dialog</property> + <property name="skip_taskbar_hint">True</property> + <property name="message_type">question</property> + <property name="text" translatable="yes">%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. However, use of a JRE has been disabled. Do you want to enable the use of a JRE now?</property> + <child internal-child="vbox"> + <object class="GtkBox" id="messagedialog-vbox"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">24</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="messagedialog-action_area"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="no"> + <property name="label">gtk-no</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="yes"> + <property name="label">gtk-yes</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="3">no</action-widget> + <action-widget response="2">yes</action-widget> + <action-widget response="0">cancel</action-widget> + </action-widgets> + </object> +</interface> |