summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2020-07-14 11:34:18 -0700
committerGreg Ercolano <erco@seriss.com>2020-07-14 11:34:18 -0700
commit54425030774eb04b29c749ffa85d224c8bbfcc34 (patch)
treef6e8b0c9fd46f5bcf160de82d613e7799288e277 /test
parent58296c373a79ac404e86f8a4b20a5309db2f00de (diff)
parentda76085fe71d2271847f95f5aa0694a9373fbba0 (diff)
Merge branch 'issue-99a': add OS error messages to Fl_File_Chooser
Pulling in Greg & Albrecht's work on PR #99 and PR #103. This includes supporting operating system error messages in the user's local language, which took some extra effort.
Diffstat (limited to 'test')
-rw-r--r--test/file_chooser.cxx2
-rw-r--r--test/pixmap_browser.cxx3
2 files changed, 5 insertions, 0 deletions
diff --git a/test/file_chooser.cxx b/test/file_chooser.cxx
index 83b75bab9..2d72c7f6b 100644
--- a/test/file_chooser.cxx
+++ b/test/file_chooser.cxx
@@ -39,6 +39,7 @@
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Simple_Terminal.H>
#include <string.h>
+#include <locale.h> // setlocale()..
#define TERMINAL_HEIGHT 120
#define TERMINAL_GREEN "\033[32m"
@@ -92,6 +93,7 @@ main(int argc, // I - Number of command-line arguments
// Make the file chooser...
+ setlocale(LC_ALL, ""); // enable multilanguage errors in file chooser
Fl::scheme(NULL);
Fl_File_Icon::load_system_icons();
diff --git a/test/pixmap_browser.cxx b/test/pixmap_browser.cxx
index 4a80f3579..f625e585f 100644
--- a/test/pixmap_browser.cxx
+++ b/test/pixmap_browser.cxx
@@ -23,10 +23,12 @@
#include <FL/Fl_Printer.H>
#include <string.h>
#include <errno.h>
+#include <locale.h> // setlocale()..
#include <FL/Fl_File_Chooser.H>
#include <FL/fl_message.H>
#include <FL/Fl_SVG_File_Surface.H>
#include <FL/Fl_Native_File_Chooser.H>
+
Fl_Box *b;
Fl_Double_Window *w;
Fl_Shared_Image *img;
@@ -124,6 +126,7 @@ int arg(int, char **argv, int &i) {
int main(int argc, char **argv) {
int i = 1;
+ setlocale(LC_ALL, ""); // enable multilanguage errors in file chooser
fl_register_images();
Fl::args(argc,argv,i,arg);