summaryrefslogtreecommitdiff
path: root/fluid/Fl_Menu_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_Menu_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_Menu_Type.cxx')
-rw-r--r--fluid/Fl_Menu_Type.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/Fl_Menu_Type.cxx
index eb34a55c4..2bb881b2d 100644
--- a/fluid/Fl_Menu_Type.cxx
+++ b/fluid/Fl_Menu_Type.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Menu_Type.cxx,v 1.16.2.7 2000/04/25 01:57:49 mike Exp $"
+// "$Id: Fl_Menu_Type.cxx,v 1.16.2.8 2000/05/16 12:26:03 mike Exp $"
//
// Menu item code for the Fast Light Tool Kit (FLTK).
//
@@ -9,7 +9,7 @@
// This file also contains code to make Fl_Menu_Button, Fl_Menu_Bar,
// etc widgets.
//
-// 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
@@ -47,7 +47,6 @@ Fl_Menu_Item menu_item_type_menu[] = {
extern int reading_file;
extern int force_parent;
-extern int msgnum;
extern int i18n_type;
extern const char* i18n_include;
extern const char* i18n_function;
@@ -228,7 +227,7 @@ void Fl_Menu_Item_Type::write_item() {
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;
@@ -463,5 +462,5 @@ void shortcut_in_cb(Shortcut_Button* i, void* v) {
}
//
-// End of "$Id: Fl_Menu_Type.cxx,v 1.16.2.7 2000/04/25 01:57:49 mike Exp $".
+// End of "$Id: Fl_Menu_Type.cxx,v 1.16.2.8 2000/05/16 12:26:03 mike Exp $".
//