summaryrefslogtreecommitdiff
path: root/fluid/Fl_Widget_Type.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2000-05-16 12:26:07 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2000-05-16 12:26:07 +0000
commit74198871a67e9ca1bdc46fc9b57ac4b09649eddf (patch)
treed8abdfa9be21febda997d3c88b08e919729acce3 /fluid/Fl_Widget_Type.cxx
parent3f177d70dee93b576efb7807107dd66302ca5de4 (diff)
I18N didn't work right for menus - the messages numbers were wrong.
Added new "msgnum()" method to Fl_Type to handle computing the message number on the fly. Now initialize nl_catd and locale settings directly in the static variables so that menu labels are correctly looked up. This hack shouldn't be necessary in 2.0... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1124 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Widget_Type.cxx')
-rw-r--r--fluid/Fl_Widget_Type.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx
index b6cef1c73..b79512ecd 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/Fl_Widget_Type.cxx
@@ -1,9 +1,9 @@
//
-// "$Id: Fl_Widget_Type.cxx,v 1.15.2.12 2000/04/25 01:57:49 mike Exp $"
+// "$Id: Fl_Widget_Type.cxx,v 1.15.2.13 2000/05/16 12:26:03 mike Exp $"
//
// Widget type code for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-1999 by Bill Spitzak and others.
+// Copyright 1998-2000 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
@@ -46,7 +46,6 @@ extern int reading_file;
int force_parent;
extern int gridx;
extern int gridy;
-extern int msgnum;
extern int i18n_type;
extern const char* i18n_include;
extern const char* i18n_function;
@@ -1351,7 +1350,7 @@ void Fl_Widget_Type::write_code1() {
break;
case 2 : /* POSIX catgets */
write_c("catgets(%s,%s,%d,", i18n_file[0] ? i18n_file : "_catalog",
- i18n_set, msgnum ++);
+ i18n_set, msgnum());
write_cstring(label());
write_c(")");
break;
@@ -1769,5 +1768,5 @@ int Fl_Widget_Type::read_fdesign(const char* name, const char* value) {
}
//
-// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.12 2000/04/25 01:57:49 mike Exp $".
+// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.13 2000/05/16 12:26:03 mike Exp $".
//