Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-10

External tools keyboard shortcuts mess

7 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Giuliano Colla

I've noticed that changing the IDE language my keyboard shortcuts for external tools disappear.

A little investigations has revealed that shortcuts for external tools are stored in the configuration file and recovered with the localized name. Therefore, changing the language they're not found.

That's what looks like my editoroptions.xml file section, after switching from English to Italian, and back, redefining some shortcuts in the process:

Show quoted text 16 lines
<ExternalToolCount Value="3"/> <Item1 Name="External tool 0"> <KeyA Default="False" Key1="112" Shift1="2"/> </Item1> <Item2 Name="External tool 1"> <KeyA Default="False" Key1="115" Shift1="2"/> </Item2> <Item3 Name="Strumento esterno 0"> <KeyA Default="False" Key1="112" Shift1="2"/> </Item3> <Item4 Name="Strumento esterno 1"> <KeyA Default="False" Key1="115" Shift1="2"/> </Item4> <Item5 Name="Strumento esterno 2"> <KeyA Default="False" Key1="117" Shift1="2"/> </Item5>

("Strumento esterno" is the Italian localized for "External tool") A count of 3 with 5 items appears to me a bit messy. In my simpleminded point of view, using in the configuration the non localized name would get rid of this mess.

Is there a good reason which escapes me, or should I file the issue in the bugtracer?

Giuliano

Giuliano Colla Project planning question: when it's 90% done, are we halfway or not yet?

Reply by email

Mattias Gaertner
to Giuliano Colla
Show quoted text 6 lines
I've noticed that changing the IDE language my keyboard shortcuts for external tools disappear. A little investigations has revealed that shortcuts for external tools are stored in the configuration file and recovered with the localized name. Therefore, changing the language they're not found.

Fixed in trunk.

Please test.

Mattias

Reply by email

Giuliano Colla
to Mattias Gaertner

Il 04/10/2014 11:13, Mattias Gaertner ha scritto:

Fixed in trunk. Please test.

Tested. It works like a charm! :-)
Thanks Mattias.

Idle note.

I had met some years ago a similar issue on the Red Hat Network Configuration procedure, where localized strings where used when not appropriate for Wireless settings.

Not only Wireless setting didn't work, but this led also to a crash of the application. Once you had attempted to add a Wireless interface, you couldn't use Network Configuration any more, unless you manually deleted the configuration file and switched your Desktop language to English.

Being the procedure written in python I was able to fix it for me, and I entered an issue in their bugtracker (providing also my patch). The issue was quickly acknowledged, but it took them roughly two years to include my patch into a release. In the meantime I had to reintroduce my patch at each update.

Well, a quarter of an hour versus 2 years tells something about why, after all, we love Lazarus!

Giuliano

Giuliano Colla Project planning question: when it's 90% done, are we halfway or not yet?

Reply by email

Giuliano Colla
to Mattias Gaertner: On Sat, 04 Oct 2014 10:56:42 +0200 Fixed in trunk. Please test. Mattias

Il 04/10/2014 11:13, Mattias Gaertner ha scritto:

Show quoted text 12 lines
On Sat, 04 Oct 2014 10:56:42 +0200 Giuliano Colla wrote: > I've noticed that changing the IDE language my keyboard shortcuts for > external tools disappear. > > A little investigations has revealed that shortcuts for external tools > are stored in the configuration file and recovered with the localized > name. Therefore, changing the language they're not found. Fixed in trunk. Please test.

I'm afraid that there's still an issue: items are now stored properly, but they aren't *retrieved* properly.

To make sure, I've cleaned up my editoroptions.xml from stale entries, and now External tool shortcuts are there, but they're retrieved only if the IDE language is English. They don't show if I select Italian.

An extra quarter of an hour to fix?;-)

Giuliano

Giuliano Colla Project planning question: when it's 90% done, are we halfway or not yet?

Reply by email

Mattias Gaertner
to Giuliano Colla
Show quoted text 7 lines
[...] I'm afraid that there's still an issue: items are now stored properly, but they aren't *retrieved* properly. To make sure, I've cleaned up my editoroptions.xml from stale entries, and now External tool shortcuts are there, but they're retrieved only if the IDE language is English. They don't show if I select Italian.

Are you sure about the language difference?
I see the bug also happen with English. The editoroptions.xml was not saved. I fixed that.
But the shortcuts are sometimes not shown. I believe it is a lcl/gtk2 bug. I see some gtk warnings.

Mattias

Reply by email

Mattias Gaertner
to Mattias Gaertner
Show quoted text 16 lines
On Sat, 04 Oct 2014 13:25:15 +0200 Giuliano Colla wrote: >[...] > I'm afraid that there's still an issue: items are now stored properly, > but they aren't *retrieved* properly. > > To make sure, I've cleaned up my editoroptions.xml from stale entries, > and now External tool shortcuts are there, but they're retrieved only if > the IDE language is English. They don't show if I select Italian. Are you sure about the language difference? I see the bug also happen with English. The editoroptions.xml was not saved. I fixed that. But the shortcuts are sometimes not shown. I believe it is a lcl/gtk2 bug. I see some gtk warnings.

Fixed.

Mattias

Reply by email

Giuliano Colla
to Mattias Gaertner

Il 04/10/2014 14:12, Mattias Gaertner ha scritto:

On Sat, 4 Oct 2014 14:07:08 +0200 Mattias Gaertner wrote: > Fixed.

I've tested in all weird condition: insert a shortcut with IDE in French, switch to Spanish to verify that it's still there, then change to English, verify and then modify the shortcut, then switch to Italian, etc. etc.
Now everything appears to be Ok.

Thanks,

Giuliano

Giuliano Colla Project planning question: when it's 90% done, are we halfway or not yet?

Reply by email