Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On 01/24/2013 12:50 PM, Caolán McNamara wrote:
Quite a while ago we added code to add mnemonic's to "ok"/"cancel"
buttons if the translation/english didn't have them
http://cgit.freedesktop.org/libreoffice/core/commit/?id=58f16ff09672f3e37156d0fc5e79e310b2c49c08
but...
// Windows (apparently) has some magic auto-accelerator evil around
// ok / cancel so add this only for Unix

do you remember what the evilness was ?

On Windows, the OK and Cancel buttons automatically get highlighted and are mapped to Enter and ESC buttons without us settings accelerators. In fact, Windows apps don't add accelerators to OK and Cancel buttons at all, and adding them would make the buttons look weird on Windows.

I ask because the catch is that adding accelerators to e.g. CJK/Indic
strings gives something that can't be pressed on a keyboard (gaze in awe
at the MnemonicGenerator::CreateMnemonic code for the dance when adding
auto-mnemonics to avoid that problem). And the usual thing is e.g.
translators append ascii " (~O)" to the end of the CJK string for OK.

Yup.  I was also aware of this, especially for the Japanese UI.

The obvious solution would seem to just change our English "OK" "Cancel"
button source strings to a simple "~OK"/"~Cancel" which lets us remove
the problematic code and shift the selection of a suitable mnemonic back
to the translations.

But that would put the underscore under the letter O in OK (and C in Cancel) for the English UI which is not what we want for Windows.

I remember the "solution" OOo had employed back in the days were not to add accelerators to OK and Cancel, which were Okay (no pun intended) on Windows but looked weird and was less convenient on Linux.

--
Kohei Yoshida, LibreOffice hacker, Calc

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.