Kaydet (Commit) 7cf74a8e authored tarafından Caolán McNamara's avatar Caolán McNamara

convert STR_QUESTION_JAVADISABLED with custom buttons to .ui

Change-Id: I6f806f27232865ab871576e18a33fae08c20ed31
üst e932500e
......@@ -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
......
......@@ -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 \
......
......@@ -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" ;
......
......@@ -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 )
{
......
<?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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment