Page 1 of 1

Shortcuts in catalog file instead of prefs file?

Posted: Wed Jul 02, 2008 10:20 am
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? :?

Posted: Sun Jul 20, 2008 6:17 pm
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.

Posted: Mon Jul 21, 2008 2:32 pm
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

Posted: Mon Jul 21, 2008 2:55 pm
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.

Posted: Mon Jul 21, 2008 4:34 pm
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..