[Merged] Ticket #4664 - Sketcher (and other WBs) tooltips have hard-coded hotkey hints

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Petrikas
Posts: 122
Joined: Sat Dec 05, 2020 8:05 pm

Re: Ticket #4664 - Sketcher (and other WBs) tooltips have hard-coded hotkey hints

Post by Petrikas »

Great work you guys! Thank you so much for your time and skills.

I'm seeing many people reporting that the hard-coded hotkeys have been fixed. They absolutely might have been fixed, I'm mainly working with Realthunder's build, which still have the hardcoded shortcuts, in Sketcher, for example.

I assumed that's a main branch problem, I might have been wrong, or things got fixed in the meanwhile.

Either way, my apologies.

P.S. I'm so happy that you guys are working on the UI. The tooltips will be great help to me (and hopefully everyone). Hope to do some thorough testing this weekend (tooltips + themes)
I sometimes make FreeCAD Tutorials | VertUI | MidnightUI
User avatar
chennes
Veteran
Posts: 3883
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Ticket #4664 - Sketcher (and other WBs) tooltips have hard-coded hotkey hints

Post by chennes »

Petrikas wrote: Wed Aug 25, 2021 9:43 pm I'm seeing many people reporting that the hard-coded hotkeys have been fixed. They absolutely might have been fixed, I'm mainly working with Realthunder's build, which still have the hardcoded shortcuts, in Sketcher, for example.
They were sort of fixed - they weren't so much "hard coded" in the sense that they were not actually explicitly in the tooltip, someone did write the code to try to pull the correct accelerator into the tooltip. But that code was running only when the commands were created, not when they were updated by the code that was reading the preferences file. So half of the fix was already there, this PR is just a matter of making sure to recompute the tooltips when the accelerators are loaded, or changed manually.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: Ticket #4664 - Sketcher (and other WBs) tooltips have hard-coded hotkey hints

Post by balrobs »

chennes wrote: Wed Aug 25, 2021 7:28 pm OK, this should fix it, no retranslation required:
https://github.com/FreeCAD/FreeCAD/pull/4995
Hi Chris,
wow, that was really a quick fix :shock:
I can confirm it resolves the tooltip style issue.
Doing some more testing I discovered another one:
  • when I use the "assign"-button or the "clear"-button of the "Tools/Customize/Keyboard"-dialog everything is fine.
  • but when I use the "reset"-button and the "reset all"-button shortcuts update only in the menu-text and not in the tooltip-text. For this a FreeCAD restart is required.
Thanks for your efforts!
User avatar
chennes
Veteran
Posts: 3883
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Ticket #4664 - Sketcher (and other WBs) tooltips have hard-coded hotkey hints

Post by chennes »

balrobs wrote: Thu Aug 26, 2021 6:15 am Doing some more testing I discovered another one:
  • when I use the "assign"-button or the "clear"-button of the "Tools/Customize/Keyboard"-dialog everything is fine.
  • but when I use the "reset"-button and the "reset all"-button shortcuts update only in the menu-text and not in the tooltip-text. For this a FreeCAD restart is required.
OK, I've pushed an addendum to that PR that addresses that bug -- the old code wasn't attempting to recreate the tooltips at all in those two cases, so I just added calls to the new recreate() function.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4664 - Sketcher (and other WBs) tooltips have hard-coded hotkey hints

Post by Kunda1 »

The question is now, if we pull the trigger on this PR...are the tooltip translations b0rked or can we circumvent the issue somehow? (can we modify the .ts files before upping them in to crowdin so that the changes are already made ? (or is that a useless move?)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
chennes
Veteran
Posts: 3883
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Ticket #4664 - Sketcher (and other WBs) tooltips have hard-coded hotkey hints

Post by chennes »

This does not affect the translations at all, it should pull in the correct ts info automatically.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4664 - Sketcher (and other WBs) tooltips have hard-coded hotkey hints

Post by Kunda1 »

Great!!!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: Ticket #4664 - Sketcher (and other WBs) tooltips have hard-coded hotkey hints

Post by balrobs »

chennes wrote: Thu Aug 26, 2021 2:06 pm OK, I've pushed an addendum to that PR that addresses that bug
FWICS now everthing works perfectly! :D
Due to heros like you Chris FreeCAD is getting better an better ...
Thanks again for your so important contribution!
User avatar
chennes
Veteran
Posts: 3883
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Ticket #4664 - Sketcher (and other WBs) tooltips have hard-coded hotkey hints

Post by chennes »

...and it's merged. Thanks everyone for testing.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Merged] Ticket #4664 - Sketcher (and other WBs) tooltips have hard-coded hotkey hints

Post by Kunda1 »

Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply