[master] c9bee9b - Fix fluid output for international languages

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] c9bee9b - Fix fluid output for international languages "Albrecht Schlosser" 03:17 Sep 16 top right image
 
commit c9bee9ba8068bb11a61ff4a8ee64d01abce79b4a
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Wed Sep 16 12:14:22 2020 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Wed Sep 16 12:15:54 2020 +0200

    Fix fluid output for international languages
    
    The fluid version and other values in .fl files are written as float
    values which means that locale settings apply since we enabled the
    locale with "setlocale()".
    
    Update the "rebuild" target in fluid and src folders to update
    the fluid (.fl) files and related {.cxx|.h} files.

 fluid/Makefile  | 28 ++++++++++++++--------------
 fluid/fluid.cxx |  4 +++-
 src/Makefile    | 10 ++++++++++
 3 files changed, 27 insertions(+), 15 deletions(-)

diff --git fluid/Makefile fluid/Makefile
index 6c14695..2823e5f 100644
--- fluid/Makefile
+++ fluid/Makefile
@@ -1,7 +1,7 @@
 #
-# FLUID makefile for the Fast Light Tool Kit (FLTK).
+# FLUID Makefile for the Fast Light Tool Kit (FLTK).
 #
-# Copyright 1998-2017 by Bill Spitzak and others.
+# Copyright 1998-2020 by Bill Spitzak and others.
 #
 # This library is free software. Distribution and use rights are outlined in
 # the file "COPYING" which should have been included with this file.  If this
@@ -120,16 +120,16 @@ uninstall-linux:
 uninstall-osx:
 	$(RM) -r $(DESTDIR)/Applications/fluid.app
 
-
-#
 # Note: The rebuild target can only be used if you have the original .fl
-#       files.  This is normally only used by the FLTK maintainers...
-#
-
-rebuild:
-	./fluid -u -c about_panel.fl
-	./fluid -u -c alignment_panel.fl
-	./fluid -u -c function_panel.fl
-	./fluid -u -c print_panel.fl
-	./fluid -u -c template_panel.fl
-	./fluid -u -c widget_panel.fl
+#	files. This is normally only used by the FLTK maintainers...
+#	It *must* be executed *after* fluid has been built and
+#	fluid must be rebuilt if any {.fl|.cxx|.h} files were changed.
+
+rebuild: fluid$(EXEEXT)
+	echo 'Rebuilding fluid (.fl) and .cxx/.h files from .fl files ...'
+	./fluid$(EXEEXT) -u -c about_panel.fl
+	./fluid$(EXEEXT) -u -c alignment_panel.fl
+	./fluid$(EXEEXT) -u -c function_panel.fl
+	./fluid$(EXEEXT) -u -c print_panel.fl
+	./fluid$(EXEEXT) -u -c template_panel.fl
+	./fluid$(EXEEXT) -u -c widget_panel.fl
diff --git fluid/fluid.cxx fluid/fluid.cxx
index dcea17e..1f7e277 100644
--- fluid/fluid.cxx
+++ fluid/fluid.cxx
@@ -1750,7 +1750,9 @@ static void sigint(SIGARG) {
 int main(int argc,char **argv) {
   int i = 1;
 
-  setlocale(LC_ALL, "");    // enable multilanguage errors in file chooser
+  setlocale(LC_ALL, "");      // enable multilanguage errors in file chooser
+  setlocale(LC_NUMERIC, "C"); // make sure numeric values are written correctly
+
   if (!Fl::args(argc,argv,i,arg) || i < argc-1) {
     static const char *msg =
       "usage: %s <switches> name.fl\n"
diff --git src/Makefile src/Makefile
index c1409a5..c2577c0 100644
--- src/Makefile
+++ src/Makefile
@@ -582,6 +582,16 @@ mgwfltknox_images-$(FL_DSO_VERSION).dll: $(IMGLIBNAME) mgwfltknox-$(FL_DSO_VERSI
 		-L. -lfltk -Wl,--exclude-libs -Wl,libfltk_png.a \
 			$(IMAGELIBS) $(LDLIBS)
 
+# Note: The rebuild target can only be used if you have the original .fl
+#	files. This is normally only used by the FLTK maintainers...
+#	It *must* be executed *after* fluid has been built and
+#	the libs must be rebuilt if any {.fl|.cxx|.h} files were changed.
+
+rebuild:
+	echo 'Rebuilding fluid (.fl) and .cxx/.h files from .fl files ...'
+	../fluid/fluid$(EXEEXT) -u -c Fl_File_Chooser.fl
+	../fluid/fluid$(EXEEXT) -u -c Fl_Help_Dialog.fl
+
 clean:
 	-$(RM)	*.o xutf8/*.o *.dll.a core.* *~ *.bak *.bck
 	-$(RM)	drivers/Cocoa/*.o
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2020 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.