Request for review: 7144063: [macosx] Swing JMenu mnemonic doesn't work; hint misleading; cross symbol typed

Alexander Zuev alexander.zuev at
Fri Feb 24 14:35:30 PST 2012

Actually no. The version number always separated with dots, the problem was that to compare the version to 1.7 it was that previously we cut the portion of the version string and turned it into a double using atof() function. In Russian locale atof assumes digital delimiter is comma and hence only the integer part was converted. Plus once version hits 1.10 we'll have another problem with that approach - 1.10 will be reported as pre-Lion because 1.1 is lesser than 1.7. Fix converts version string to integer cutting the major/minor versions and gluing them together. So 10.10 will be 1010 and that is way more than 107- problem gone.

With best regards,
Alexander Zuev

25.02.2012, в 2:20, Artem Ananiev <artem.ananiev at> написал(а):

> On 2/24/2012 5:19 AM, Alexander Zuev wrote:
>> Hello,
>> the new version of webrev can be found here:
>> It also includes the fix for "push-to-enter feature not working on
>> Russian locale (and any other locale which has decimal delimeter other
>> than '.')" - thanks Leonid for crafting the solution.
> What I see is that for the Russia locale, getOSXMajorVersion() will now always return 0 as you only check for "." as the third character. Hence, condifion "getOSXMajorVersion() < 107" will always be true.
> Thanks,
> Artem
>> Please consider reviewing this fix if possible.
>> With best regards,
>> Alexander Zuev
>> On 2/17/12 22:09, Leonid Romanov wrote:
>>> Well, I've investigated this issue a bit. To begin with,
>>> getOSXMajorVersion() doesn't work with Russian locale. Basically, this
>>> function converts OS version represented as a string, for example,
>>> "10.7", into a double value. The reason why it fails with Russian
>>> locale is because Russian locale uses "," as a decimal separator.
>>> On 17.02.2012, at 21:47, Leonid Romanov wrote:
>>>> Another thing to note is that we autorepeat pressed key even when
>>>> press-and-hold popup is being displayed. This not how it works in
>>>> native apps: if you press and hold a key in TextEdit, you'll
>>>> immediately get press-and-hold popup
>>>> and there won't be any autorepeats.
>>>> On 17.02.2012, at 21:28, Scott Kovatch wrote:
>>>>> I haven't applied your patch, but I noticed this too. Looks like we
>>>>> need another bug for that.
>>>>> The right arrow 'works' in that the cursor gets moved ahead one
>>>>> character, but then the input method immediately deletes the
>>>>> character and replaces it with the new candidate character.
>>>>> -- Scott
>>>>> On Feb 17, 2012, at 8:55 AM, Alexander Zuev wrote:
>>>>>> Thanks Leonid,
>>>>>> with this option it works - kind of strange - but the same way with
>>>>>> or without my fix. It is possible to
>>>>>> select variant from popup using mouse and numbers and with arrows -
>>>>>> that's a little bit different
>>>>>> story - for some reason left arrow (but not right one) being also
>>>>>> translated to the TextArea so cursor
>>>>>> starts moving and we will have that letter inserted in the wrong
>>>>>> place.
>>>>>> However this is not being affected by my fix - it works the same
>>>>>> way with or without it.
>>>>>> With best regards,
>>>>>> Alex
>>>>>> On 2/17/12 16:13, Leonid Romanov wrote:
>>>>>>> Try this in terminal window:
>>>>>>> defaults write -g ApplePressAndHoldEnabled -bool true
>>>>>>> On 17.02.2012, at 17:54, Alexander Zuev wrote:
>>>>>>>> On 2/16/12 19:15, Mike Swingler wrote:
>>>>>>>>> One more to try: "press-and-hold" in Lion: if you hold down the
>>>>>>>>> "e" key, and then use the mouse, arrow keys, or number keys to
>>>>>>>>> select the variant.
>>>>>>>> Looks like i need a step-by-step instruction here - i were unable
>>>>>>>> to do it in TextEdit app on 10.7.3 machine with any language that
>>>>>>>> has variants of 'e' letter. Once i hold down the e it starts
>>>>>>>> autorepeating. Moving mouse or using arrow keys do not help much.
>>>>>>>> Any option i have to turn on for that?
>>>>>>>> With best regards,
>>>>>>>> Alex

More information about the macosx-port-dev mailing list