summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2002-07-30 16:33:35 +0000
committerPhilipp Lohmann <pl@openoffice.org>2002-07-30 16:33:35 +0000
commitd2ecc7ea328f588f2bf22e90e950dafac3e729c9 (patch)
treee1b810a32cb6393d69ea2d59f0bf1a1536148c10
parent174fdeb00358d0e4c2d94bf3407e605b7bfb032d (diff)
#101762# enable native accessibility error messages
-rw-r--r--vcl/prj/build.lst1
-rw-r--r--vcl/prj/d.lst1
-rw-r--r--vcl/source/src/btntext.src10
-rw-r--r--vcl/source/src/stdtext.src49
-rw-r--r--vcl/unx/source/app/salsys.cxx71
-rw-r--r--vcl/win/source/window/salframe.cxx10
6 files changed, 127 insertions, 15 deletions
diff --git a/vcl/prj/build.lst b/vcl/prj/build.lst
index 141c6d9ac86a..c9ddea1827d8 100644
--- a/vcl/prj/build.lst
+++ b/vcl/prj/build.lst
@@ -20,6 +20,7 @@ vc vcl\os2\source\src nmake - p vc__srcp vc_unot NULL
vc vcl\unx\source\app nmake - u vc__appu vc_unot NULL
vc vcl\unx\source\gdi nmake - u vc__gdiu vc_unot NULL
vc vcl\unx\source\gdi\getstyle nmake - u vc__gdus vc_unot NULL
+vc vcl\unx\source\gdi\native-msgbox nmake - u vc__gdun vc_unot NULL
vc vcl\unx\source\window nmake - u vc__winu vc_unot NULL
vc vcl\unx\source\src nmake - u vc__srcu vc_unot NULL
vc vcl\aqua\source\app nmake - u vc__appa vc_unot NULL
diff --git a/vcl/prj/d.lst b/vcl/prj/d.lst
index 23b6198181d5..d84eb750b0ed 100644
--- a/vcl/prj/d.lst
+++ b/vcl/prj/d.lst
@@ -14,6 +14,7 @@ mkdir: %_DEST%\ucr%_EXT%\vcl
..\%__SRC%\bin\vcl?????.dll %_DEST%\bin%_EXT%\vcl?????.dll
..\%__SRC%\bin\vcl?????.sym %_DEST%\bin%_EXT%\vcl?????.sym
..\%__SRC%\bin\getstyle-gnome %_DEST%\bin%_EXT%\getstyle-gnome
+..\%__SRC%\bin\msgbox-gnome %_DEST%\bin%_EXT%\msgbox-gnome
..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a
..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl
..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\*.so
diff --git a/vcl/source/src/btntext.src b/vcl/source/src/btntext.src
index 2cbd2c82193b..3fc1fec6be72 100644
--- a/vcl/source/src/btntext.src
+++ b/vcl/source/src/btntext.src
@@ -2,9 +2,9 @@
*
* $RCSfile: btntext.src,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: rt $ $Date: 2001-11-16 22:06:29 $
+ * last change: $Author: pl $ $Date: 2002-07-30 17:32:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -268,6 +268,12 @@ String SV_BUTTONTEXT_MORE
TEXT[ finnish ] = "~Lis??";
};
+String SV_BUTTONTEXT_IGNORE
+{
+ Text = "~Ignorieren";
+ Text [ English ] = "~Ignore";
+};
+
/* HelpTexte, die wir derzeit nicht mehr verwenden:
SV_BUTTONHELPTEXT_OK
{
diff --git a/vcl/source/src/stdtext.src b/vcl/source/src/stdtext.src
index 3f2151fca406..dfe2e44df2f9 100644
--- a/vcl/source/src/stdtext.src
+++ b/vcl/source/src/stdtext.src
@@ -2,9 +2,9 @@
*
* $RCSfile: stdtext.src,v $
*
- * $Revision: 1.23 $
+ * $Revision: 1.24 $
*
- * last change: $Author: rt $ $Date: 2001-11-16 22:08:29 $
+ * last change: $Author: pl $ $Date: 2002-07-30 17:32:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -118,15 +118,50 @@ String SV_STDTEXT_DONTWARNAGAIN
Text[ finnish ] = "Diesen Hinweis nicht mehr anzeigen.";
};
+String SV_ACCESSERROR_WRONG_VERSION
+{
+ Text = "Falsche Version";
+ Text [English] = "Wrong version";
+};
+String SV_ACCESSERROR_WRONG_VERSION_MSG
+{
+ Text = "%PRODUCTNAME %PRODUCTVERSION benötigt eine Java Access Bridge 1.03 oder höher. Bitte installieren Sie die aktuellste Java Access Bridge. Klicken Sie \"Ignorieren\" um %PRODUCTNAME %PRODUCTVERSION ohne Zugänglichkeitsunterstützung zu starten, oder klicken Sie \"Abbrechen\".";
+ Text [English] = "%PRODUCTNAME %PRODUCTVERSION requires a Java Access Bridge 1.03 or later version. Please install the latest Java Access Bridge. Click \"Ignore\" to start %PRODUCTNAME %PRODUCTVERSION without accessibility support, or click \"Cancel\".";
+};
+String SV_ACCESSERROR_MISSING_BRIDGE
+{
+ Text = "Keine Java Access Bridge";
+ Text [English] = "No Java Access Bridge";
+};
+String SV_ACCESSERROR_MISSING_BRIDGE_MSG
+{
+ Text = "Es wurde keine Java Access Bridge gefunden. Bitte installieren Sie eine Java Access Bridge. Klicken Sie \"Ignorieren\" um %PRODUCTNAME %PRODUCTVERSION ohne Zugänglichkeitsunterstützung zu starten, oder klicken Sie \"Abbrechen\".";
+ Text [English] = "No Java Access Bridge was found on your system. Please install a Java Access Bridge. Click \"Ignore\" to start %PRODUCTNAME %PRODUCTVERSION without accessibility support, or click \"Cancel\".";
+};
+String SV_ACCESSERROR_FAULTY_JAVA
+{
+ Text = "Fehlerhafte Java Installation";
+ Text [English] = "Faulty Java installation";
+};
+String SV_ACCESSERROR_FAULTY_JAVA_MSG
+{
+ Text = "%PRODUCTNAME %PRODUCTVERSION hat auf Ihrem System eine fehlerhafte Java Installation gefunden Bitte installieren Sie Java neu, oder führen Sie eine Reparatur durch. Klicken Sie \"Ignorieren\" um %PRODUCTNAME %PRODUCTVERSION ohne Zugänglichkeitsunterstützung zu starten, oder klicken Sie \"Abbrechen\".";
+ Text [English] = "%PRODUCTNAME %PRODUCTVERSION detected a faulty Java installation on your system. Please repair or renew your Java installation. Click \"Ignore\" to start %PRODUCTNAME %PRODUCTVERSION without accessibility support, or click \"Cancel\".";
+};
+String SV_ACCESSERROR_MISSING_JAVA
+{
+ Text = "Fehlende Java Installation";
+ Text [English] = "No Java Installation";
+};
-
-
-
-
-
+String SV_ACCESSERROR_MISSING_JAVA_MSG
+{
+ Text = "Es wurde keine Java Installation gefunden. Bitte installieren Sie eine Java Version. Klicken Sie \"Ignorieren\" um %PRODUCTNAME %PRODUCTVERSION ohne Zugänglichkeitsunterstützung zu starten, oder klicken Sie \"Abbrechen\" um den Start zu beenden.";
+ Text [English] = "No Java installation was found on your system. Please install a version of Java. Click \"Ignore\" to start %PRODUCTNAME %PRODUCTVERSION without accessibility support, or click \"Cancel\".";
+};
diff --git a/vcl/unx/source/app/salsys.cxx b/vcl/unx/source/app/salsys.cxx
index 1e134f02366c..32334ce65d3c 100644
--- a/vcl/unx/source/app/salsys.cxx
+++ b/vcl/unx/source/app/salsys.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: salsys.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: pl $ $Date: 2002-07-04 11:20:02 $
+ * last change: $Author: pl $ $Date: 2002-07-30 17:32:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,12 +62,12 @@
#include <salsys.hxx>
#include <stacktrace.hxx>
-#ifdef DEBUG
#include <stdio.h>
-#endif
#include <salunx.h>
#include <saldisp.hxx>
+#include <dtint.hxx>
+#include <msgbox.hxx>
// -----------------------------------------------------------------------
@@ -125,3 +125,66 @@ bool GetSalSystemDisplayInfo( System::DisplayInfo& rInfo )
}
return bSuccess;
}
+
+int ImplShowNativeDialog( const String& rTitle, const String& rMessage, const std::list< String >& rButtons, int nDefButton )
+{
+ int nRet = -1;
+
+ DtIntegrator* pIntegrator = DtIntegrator::CreateDtIntegrator( NULL );
+ if( pIntegrator->GetDtType() == DtGNOME )
+ {
+ ByteString aCmdLine( "msgbox-gnome ");
+ int nButton = 0;
+ for( std::list< String >::const_iterator it = rButtons.begin(); it != rButtons.end(); ++it )
+ {
+ if( nButton == nDefButton )
+ aCmdLine.Append( "-defaultbutton" );
+ else
+ aCmdLine.Append( "-button" );
+ nButton++;
+ aCmdLine.Append( " \"" );
+ aCmdLine.Append( ByteString( *it, RTL_TEXTENCODING_UTF8 ) );
+ aCmdLine.Append( "\" " );
+ }
+ aCmdLine.Append( " \"" );
+ aCmdLine.Append( ByteString( rTitle, RTL_TEXTENCODING_UTF8 ) );
+ aCmdLine.Append( "\" \"" );
+ aCmdLine.Append( ByteString( rMessage, RTL_TEXTENCODING_UTF8 ) );
+ aCmdLine.Append( "\" 2>/dev/null" );
+
+ FILE* fp = popen( aCmdLine.GetBuffer(), "r" );
+ if( fp )
+ {
+ ByteString aAnswer;
+ char buf[16];
+ while( fgets( buf, sizeof( buf ), fp ) )
+ {
+ aAnswer.Append( buf );
+ }
+ pclose( fp );
+ nRet = aAnswer.ToInt32();
+ }
+ }
+ else // default to a VCL dialogue since we do not have a native implementation
+ {
+ WarningBox aWarn( NULL, WB_STDWORK, rMessage );
+ aWarn.SetText( rTitle );
+ aWarn.Clear();
+
+ USHORT nButton = 0;
+ for( std::list< String >::const_iterator it = rButtons.begin(); it != rButtons.end(); ++it )
+ {
+ aWarn.AddButton( *it, nButton+1, nButton == (USHORT)nDefButton ? BUTTONDIALOG_DEFBUTTON : 0 );
+ nButton++;
+ }
+ aWarn.SetFocusButton( (USHORT)nDefButton+1 );
+
+ nRet = ((int)aWarn.Execute()) - 1;
+ }
+
+ // normalize behaviour, actually this should never happen
+ if( nRet < -1 || nRet >= rButtons.size() )
+ nRet = -1;
+
+ return nRet;
+}
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index ad4098c1c7d4..d82a6972be3b 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: salframe.cxx,v $
*
- * $Revision: 1.57 $
+ * $Revision: 1.58 $
*
- * last change: $Author: ssa $ $Date: 2002-07-16 09:01:34 $
+ * last change: $Author: pl $ $Date: 2002-07-30 17:33:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -4906,3 +4906,9 @@ bool GetSalSystemDisplayInfo( System::DisplayInfo& rInfo )
// -----------------------------------------------------------------------
+int ImplShowNativeDialog( const String& rTitle, const String& rMessage, const std::list< String >& rButtons, int nDefButton )
+{
+ return -1;
+}
+
+// -----------------------------------------------------------------------