[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mon, 7 Jan 2002 18:06:19 +0000 (GMT)
I've been playing with translating applications (messages inside the gui
included) ... the 'Windows' menu posed a problem ... the cleanest solution
I could find was to remove all code dependent on the title of the
'Windows' menu from the gui library (to give an idea of the problems, the
gui library might be translating 'Windows' in a certain way, and the
application might be translating 'Windows' in a different way ... (because
they are reading translations from different strings files) causing a huge
complication, also considering that the application might be setting the
windows menu before or after setting the main menu and might be attaching
the windows menu somewhere before or after setting it as windows menu ...
all this using an arbitrary name which we might not even know if we are
translating it in a different way ... better just drop it all and keep it
This is not as bad as it looks, but some applications might need to be
updated to work in this way.
Basically, the gui library is no longer doing anything to automatically
create or figure out which is the Windows menu.
Applications can create the Windows menu, put it wherever they want,
translate it or not et cetera, without the gui library messing what they
But they are always required to call [NSApplication -setWindowsMenu:] to
tell the gui library which is their windows menu. The gui library will
use that one as the windows menu, and this is all.
So - any application which does not call [NSApplication -setWindowsMenu:]
should be modified to do so, otherwise the Windows menu will no longer
As a good news, translation of the Windows menu should now work perfectly.
- Windows menu,
Nicola Pero <=