On 13.07.2012, at 17:09, Roman Kantor wrote:
> I am not sure if it is a bug or something changed in fltk-1.3
>
> If I design window as a "widget" class in fluid, it generates a static menu
> like
>
> Fl_Menu_Item My_Window:menu_ctl[] = {
> {"&File", ... }
> }
>
> instead of
>
> Fl_Menu_Item My_Window:menu_ctl[] = {
> {_("&File"), ... }
> }
>
> as it used to in fltk-1.1 if _() was set as a gettext function. Is that a
> regression/bug or did something change in fltk-1.3?
> Also in fltk-1.3 there is newly an additional widget constructor generated
> which uses w() and h() and label from fluid entries, this constructor would
> be very
> useful, unfortunately it disregards internalization settings too...
> Shall I fill an STR?
Well, in C++ there is no predefined order in which static variables are
initialized. Both, MenuItems and i18n use static initialization. So it used to
be a hit-or-miss situation if menu items were internationalized or not. This is
why i18n for menu items must be done manually to be reliable (IIRC, we have
added a function for just that somewhere - but I don't know where anymore).
In FLTK 2 and soon in FLTK 3, Menu Items will be derived from Widgets and
initialized the same way as all widgets, making them fully compatible with i18n
(and many more FLTK features, removing the Fl_Menu_Item special case).
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk