1) that the generic one might need improvements because such issues could arise for any other use of it too.
It is hard to do in general case. You can not "fix the multi-button dialog" but you can design a "yet another, better generic dialog"
Bad news:If programmer thinks he "just needs buttons" - then you can not replace it without rethinking the user actions flow. IOW, you just can not fix it in LCL.
Like in the example of this DWARF dialog, the "Cancel" buton, what should it do???
1) Run the application for now, but show the warning again on the next run?
2) Run the application and show the dialog never again. You were warned, now you know what you do.
3) Cancel the compilation and do not run the applicaiton.
All the interpretation are valid. I do not think then automatic conversion to "ragiogroup + OK/Cancel buttons duo" is possible without re-thinking user story.
IOW, the existing generic dialog probably better left what it is.
Now,
good news. Cheer up, Microsoft already thought it out for you! Microsoft introduced generic "Task Dialogs" in Windows Vista.
The dialogs were not ideal for every use case (generic dialogs can hardly be), but they were good enough and they quickly became familiar to desktop users.
Then Delphi programmers started making implementations for them for pre-Vista Windows soon, so they would not have to compile different code for XP and Vista.
One of the team who did this was French mORMot project
(shamelessly kissing up and promoting).
Later they disagreed with Delphi/LLVM direction and chosen FPC as their future base.
And NewPascal fork, just teasing :-)So, see the screenshots here from the 2011 -
https://synopse.info/forum/viewtopic.php?pid=2770#p2770And i think those dialogs do work in FPC/LCL today.
At least i do see
{$IfDef FPC} in
d:\fpcupdeluxe\ccr\mORMot\SynTaskDialog.pas ...but not in mORMot2 library yet, so maybe they extracted it into a separate UI-only package, or will do later.And even putting radio buttons on, translators need to look at how long the text will be.
Works both way. Shortening text without making it incomprehensible is not always possible.
What if the only way to squeeze text into small button would be making it terse cleaw meaningless for all users but most seasoned?
There is a reason why commercial vendors like Windows and Delphi did not go GetText way but instead made translation libraries capable of re-arranging window layout.
3) If it were to be changed, then there are other options to consider: ListBox, ComboBox.
- Buttons have the "one click" advantage
Bound to the question should it be "show once" or "show every run".
If only once - it is the opposite, it is advantage of forcing user to pay attention by requiring two clicks.
- Others allow a preselection
....which effectively mean there is no "click twice" penalty, after the first time.
The first time the dialog is shown - the radiogroup should have no selection, so the useris unable to click-through without actually thinking and making decision.
If the dialog would get shown away - the last choice is preselected, so the only thing left is to hit ENTER key.
----
I'm of the opiniong that ideally the "[ x ] Don't show again" checkbox is called for here. But this opens more questions:
1) to save the choice in the project options file? or to start afresh when Lazarus is restarted or closed and re-oened the project?
2) i the used set the "don't show again" check and then regeretted it - the Project Option should provide to undo it in the Debugger section.
3) what about switching target architectures or debugger back-ends? The content of this dialog is said to be dependent upon both compiler target and chosen debugger back-end. Basically, it is the intersection between what compiler can emit for the target, and what debugger engine can consume. So, if i, for example, made a choice while working with FpDebug, and the switched to GNUDebug - how should Lazarus determine if to show this dialog now or not ? Maybe then the Project Options dialog should be able to immediately trigger this dialog when saving options with new debugger back-end ?
Then, the radio group can have two negative options.
=====================
(*) Debug Format 1
(*) Debug Format 2
(*) Debug Format 3
.....empty space, visual cue between positive and negative choices
(*) Run without debugger now, ask me again next time
(*) Run without debugger always, don't ask again
[ OK ] [ Cancel ]
=============
You can not avoid having Cancel button, because there is Esc key, Alt+F4 key and [ X ] button in the window caption bar.
So, the third negative option "cancel thecompilation" can not be had in the radiogroup.