Discussion:
wxwidgets on Ubuntu 13.10 ignores labels on standard/stock menu items (ID_NEW, ID_OPEN, and others)
p***@gmail.com
2014-02-07 19:15:32 UTC
Permalink
Hi All,

I ran into a very strange issue. One of the users complained that some of
the menu items in my application are not translated and indeed the tests
confirmed that wxwidgets running on Ubuntu 13.10 completely ignores the
label I set on "standard" menu items, like wxID_NEW, wxID_OPEN, wxID_EXIT,
and so on. I simply get some default value, like New, Open, and Quit, no
matter what I set the labels to. All the accelerators are gone from the
menu items as well (none of them is present on either stock or non-stock
menu items).

Exactly the same code runs without issues on Ubuntu 12.04 and Ubuntu 10.04
(as well as Windows and OSX). I also checked some other flavors (Fedora)
and they don't show this issue either.

The closest ticket I found is this
(http://trac.wxwidgets.org/ticket/14344), although it only talks about
accelerators from stock items being used when shouldn't and in my case it's
the labels and accelerators.

What's even stranger is that if I specify the label as "&New1\tCtrl-P",
then it shows as if it's specified as "&New", but Ctrl-P shortcut still
works (as well as Ctrl-N). It looks like it's only displayed incorrectly
and only for stock items.

Any idea what may be going on and how to fix this? What are the reasons for
me to keep using "standard" IDs instead of my own? This is all running
2.9.5; I'll be checking the trunk version shortly.

Paul.
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
p***@gmail.com
2014-02-07 21:50:09 UTC
Permalink
I just tested on the latest wxwidgets trunk (3.1 with GTK2) and the result
is the same.

You can see the issue easily with the menu sample: it does
fileMenu->Append(Menu_File_Quit, wxT("E&xit\tAlt-X"), wxT("Quit menu
sample")), but the menu shows "Quit" instead of "Exit", even though Alt-X
works.

If I replace "Menu_File_Quit = wxID_EXIT" with "Menu_File_Quit = 99",
everything works.

I created http://trac.wxwidgets.org/ticket/15958 to track this issue.

Paul
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...