[Lazarus] Accents in IDE and my apps

Éderson Cássio ederson_cassio at yahoo.com.br
Mon Jul 8 03:22:45 CEST 2013


Em 07-07-2013 21:40, Éderson Cássio escreveu:
> Em 07-07-2013 15:54, Mattias Gaertner escreveu:
>> On Sun, 07 Jul 2013 15:22:53 -0300
>> Éderson Cássio <ederson_cassio at yahoo.com.br> wrote:
>>
>>> When I type accented letters in the IDE or in my forms, they appear
>>> duplicated: áá êê íí õõ üü ...
>>>
>>> Searching the bugtracker, I found
>>> this:http://bugs.freepascal.org/view.php?id=15688
>>>
>>> It seems to be a GTK2 problem, in the CheckDeadKey procedure
>>> (lcl/interfaces/gtk2/gtk2proc.inc).
>>>
>>> I tried to comment out such code and replace the call by a single call
>>> to gtk_im_context_filter_keypress. It solved the duplication problem 
>>> but
>>> I can't type an accent key (a dead key) in one control, and after type
>>> the letter in other control. It's not a big problem to me, but it's a
>>> pattern in applications behavior.
>>>
>>> Does anybody know how can I contact someone in the development  team 
>>> and
>>> talk about this? I'd like to help to improve the GTK2 support, but 
>>> I'm a
>>> newbie about this...
>> Looking at the bug thread it seems that there is no solution yet that
>> works on all systems, right?
>>
>>
>> Mattias
>>
>> -- 
>> _______________________________________________
>> Lazarus mailing list
>> Lazarus at lists.lazarus.freepascal.org
>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
> Hello, Mattias! I don't know... I have no problems with native win32 
> widgetset. Did anybody test GTK2 widgetset in Windows? Maybe I should 
> do it, just to see its behavior, although I won't neet it.
>
> -- 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Done, I have just tested GTK2 in Windows (XP). The letter duplication 
doesn't happen. If I type an accent (a dead key) in one control, and 
move the focus to other control, the first "loses" the accent. It's a 
good behavior (to me). I made the change in gtk2proc.inc and the 
behavior remains the same.

In Linux, with the original gtk2proc.inc, I have the letter duplication 
problem. Changing the gtk2 binding code, I can type accents fine. But, 
if I type a dead key in one control and move to other, the accent 
"stays" in the first control, waiting for the letter. I don't see it as 
a big problem.

The changes I made:
- Remove the CheckDeadKey procedure
- Replace its call by a: *gtk_im_context_filter_keypress(im_context, 
AEvent);**
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130707/b9c134cc/attachment-0003.html>


More information about the Lazarus mailing list