diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-03-02 15:38:42 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-03-03 10:09:18 (GMT) |
commit | 97b8727635a73197fac4f5edb8a1122733933db4 (patch) | |
tree | c26ff6e831dfb5b9e9ff05015be1d4d14e702572 /src/gui/kernel/qt_cocoa_helpers_mac.mm | |
parent | 94da62be34187a41be87339463ad09bf65e34ea1 (diff) | |
download | Qt-97b8727635a73197fac4f5edb8a1122733933db4.zip Qt-97b8727635a73197fac4f5edb8a1122733933db4.tar.gz Qt-97b8727635a73197fac4f5edb8a1122733933db4.tar.bz2 |
Application menu is not translated in Mac OS X Cocoa
The application menu is loaded from the qt_menu.nib which only has
English strings. These will now be translated using Qt's own translation
mechanism. Every time a new translator is installed, the menu will now
try to get the new string. Modification of qt_xx.ts files are done in a
different patch.
Task-number: QTBUG-4463
Reviewed-by: MortenS
Diffstat (limited to 'src/gui/kernel/qt_cocoa_helpers_mac.mm')
-rw-r--r-- | src/gui/kernel/qt_cocoa_helpers_mac.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 19bae5a..4f4aec0 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1386,4 +1386,12 @@ QMacCocoaAutoReleasePool::~QMacCocoaAutoReleasePool() [(NSAutoreleasePool*)pool release]; } +void qt_mac_post_retranslateAppMenu() +{ +#ifdef QT_MAC_USE_COCOA + QMacCocoaAutoReleasePool pool; + qt_cocoaPostMessage([NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)], @selector(qtTranslateApplicationMenu)); +#endif +} + QT_END_NAMESPACE |