Just beginning with the menu plugin. I saved the original menu in settings\menu.json, then added "config_menus_from" : "menu.json", and "config_menus_on_start" : true, to settings\user.json. Without making any changes to the menu, I restarted CudaText. Now, the menus are the same (of course, since no changes were made), except now none of the menus show the associated hotkeys (I'm taking about the keyboard shortcuts assigned by F9, not the underlined letters in the menu, which are still there.)!
A little experimentation shows that anytime "config_menus_on_start" : true, is in settings\user.json, the menus won't show any hotkeys. Hopefully there is some way to get this to work?
One other tiny issue is this: when "config_menus_on_start" : true, is not in settings/user.json, so the original built-in menus are being used, then the View menu shows the two lines "--- Current tab properties ---" and "--- Global properites ---", which are greyed out. But with "config_menus_on_start" : true, in settings\user.json, those lines are not there. In menu.json, there are the lines {"cap":"--- Current tab properties ---", "cmd":"0"} and ,{"cap":"--- Global properties ---", "cmd":"0"}; if I change the "cmd":"0" to "cmd":"" (remove the 0, leaving an empty string), then those two line reappear in the View menu, but they are not greyed out. If I replace the 0 with anything else in the quote, such as a space, the two lines again disappear. Not of great consequence, just letting you know.
plugin Configure Menu
-
- Posts: 2323
- Joined: 25.08.2021 18:15
-
- Posts: 2323
- Joined: 25.08.2021 18:15
Hi Alexey, not too concerned with the "--- NNNNN ---" lines, that's no problem.
The hotkeys in menus is important to me, since I often refer to the menu when I have forgotten the shortcut for a function. BUT, if fixing it would cause something else to break, then don't do that. If that is the case, I will simply use the default menus, so that the shortcuts are shown. But if it can be fixed, it would really be very nice!
The hotkeys in menus is important to me, since I often refer to the menu when I have forgotten the shortcut for a function. BUT, if fixing it would cause something else to break, then don't do that. If that is the case, I will simply use the default menus, so that the shortcuts are shown. But if it can be fixed, it would really be very nice!
@ qwerky — the issues you found with a customized View menu are not the only problems. I had various other problems, one of them was the menu showing wrong (default) hotkeys, after I had changed them to my custom hotkeys.
Since hotkeys in menus are important to you, and I understand that, you could try to add them manually, as part of your captions.
Since hotkeys in menus are important to you, and I understand that, you could try to add them manually, as part of your captions.
@Stefan, thanks for the reply; sorry to hear about your additional difficulties with the menu hotkeys. Were you able to work around the other problems? If so (what were the solutions?), then your idea of adding the hotkeys as part of the captions is great. Will see what Alexey has to say--if fixing the issue would cause too many other problems, then yours might be the best solution.
-
- Posts: 2323
- Joined: 25.08.2021 18:15
With the menu hotkeys I had one problem only: not all of them would reflect the actual hotkeys in effect, which was very confusing. The additional difficulties I mentioned, had to do with others aspects of customizing — or rather, trying to customize — the main menu.qwerky wrote:@Stefan... sorry to hear about your additional difficulties with the menu hotkeys.
Trying to keep it short:qwerky wrote:Were you able to work around the other problems? If so (what were the solutions?)
Config Menu let's you customize 2 different UI-components:
1) the right mouse context menu (at the very end of your userenu.json)
2) the top main menu
1) works as expected
2) has a life of its own. It leaves out things (like the "--- NNNNN ---" lines you mentioned), but insists on keeping other parts, no matter how often you delete or rename them in your usermenu.json
My solution:
I load MyMenu.json on startup, but mainly for 1), to have my own flavor of context menu. No complaints, fully functional.
In lieu of the main top menu, I use Config Toolbar instead. It has all that is necessary to fully replace the main menu. And that's just what I do. Main menu hidden, replaced by my custom TB with dropdowns and fly-outs.
One last pill to swallow:
You can style the Toolbar itself, with icons and colors, but not its dropdowns. They will look like your standard Windows menus. Alexey was very helpful in trying to find an alternative, but at this time, Lazarus does not have anything up the sleeve.
It's not just the missing theme colors on the dropdowns, but also the ease of operation. You have to click each and every time. The dropdowns won't open on mouse down, and you cannot simply hover-dangle from branch to branch. It takes full-fledged mouse clicks.
Which is why I am currently experimenting with a third option. But that's another evening-filling bedtime story I rather keep for another day. Knock knock — you still awake there, in front of the screen?

@Stefan, yes still here; thanks for the detailed reply. It is sad, because your "2) the main top menu" is the part which I really wish to customize. The context menu is of much less concern to me.
The lines that I mentioned being left out, are not a concern, but I am concerned about what other things that you found get left out?
And, which things does it insist on keeping in? Would that be the Macro menu and Plugin menu, and the Open recent under the File menu? I.e. those are the things which the documentation says can't be changed? If those are the only things, then I'm okay with that, but are there other things?
Your solution with the custom toolbar is excellent if it works for you. But you see, I am much more keyboard oriented than mouse oriented, and so I never even have the toolbar visible, hence my concern for visible keyboard shortcuts, etc. So, I am very much interested in what other things I might run into, that you mentioned as being left out or forced in.
And, let us see what Alexey has to say about correcting those issues.
The lines that I mentioned being left out, are not a concern, but I am concerned about what other things that you found get left out?
And, which things does it insist on keeping in? Would that be the Macro menu and Plugin menu, and the Open recent under the File menu? I.e. those are the things which the documentation says can't be changed? If those are the only things, then I'm okay with that, but are there other things?
Your solution with the custom toolbar is excellent if it works for you. But you see, I am much more keyboard oriented than mouse oriented, and so I never even have the toolbar visible, hence my concern for visible keyboard shortcuts, etc. So, I am very much interested in what other things I might run into, that you mentioned as being left out or forced in.
And, let us see what Alexey has to say about correcting those issues.