Shortcuts in catalog file instead of prefs file?

Working on new editor enhancements?
Character
Enthusiast
Enthusiast
Posts: 337
Joined: Mon Aug 07, 2006 3:51 pm
Location: Netherlands

Shortcuts in catalog file instead of prefs file?

Post by Character »

Hi people,

I started recently to make a Dutch version of the PureBasic GUI (Editor.catalog),
but found out that the key shortcuts are stored in the PureBasic.prefs file stored
in your Windows profile.
The problem now, is that you cannot store the key combinations per language
this way. Whenever I change a key shortcut, it changes for all languages.
When the keyboard shortcuts are stored in the catalog file, you can use different
combinations per language. This way you can adapt a specific alt-shortcut to the
strange words some languages have. Now it becomes a bit a puzzle to make it fit.

I realize that it is not really important for most users because when you stick to
default English, everything is fine. A fully localized catalog would be great though.

Or did I overlook something? :?
Cessante causa cessat effectus
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

The Alt+Key works with the underlined letter in the menu or on the gadget. So Alt+F opens the file menu if the F is underlined. Underline it by changing "File" to "&File" in the catalog file.
Character
Enthusiast
Enthusiast
Posts: 337
Joined: Mon Aug 07, 2006 3:51 pm
Location: Netherlands

Post by Character »

That's right.
But.... when a specific [alt+key] already is reserved in the *.prefs file you cannot use it.
Especially when you want to design a perfect alt-layout it forces you to make it a bit unlogic.
When these shortcuts are stored in the catalog file, they are specifically connected to a language thus offer more flexibility.

Code: Select all

;PureBasic.prefs

[Shortcuts]
New = 131150
Open = 131151
Save = 131155
SaveAs = 0
SaveAll = 0
Close = 131159
CloseAll = 0
SortSources = 0
Preferences = 0
Quit = 0
Undo = 131162
Redo = 131161
Cut = 131160
Copy = 131139
Paste = 131158
InsertComment = 131138
RemoveComment = 262210 ; --> this is [ALT+B] in every language 

;Editor.catalog

[MenuTitle]
File     = &Bestand ; --> this one will not work due to setting above
Edit     = Be&werken
Compiler = &Compiler
Debugger = &Debugger
Tools    = &Extra
Help     = &Help
Cessante causa cessat effectus
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

It is my opinion that having Alt+Key shortcuts in the prefs file by default is a huge mistake because it creates that problem. I already reported it, but it seems like the team doesn't agree with us or just found it not worthwhile changing.
Character
Enthusiast
Enthusiast
Posts: 337
Joined: Mon Aug 07, 2006 3:51 pm
Location: Netherlands

Post by Character »

Trond wrote:I already reported it, but it seems like the team doesn't agree with us or just found it not worthwhile changing.
Thanks a lot for the effort Trond. It's not a disaster though.
Would have been nice if PureBasic can be localized completely.
Now it is a bit halfway..
Cessante causa cessat effectus
Post Reply