#1 2013-06-13 11:20:55

uligerhardt
Member
Registered: 2011-03-08
Posts: 52

SynTaskDialog - Why no shortcuts for CommonButtons?

Hi ab,

I recently noticed that emulated SynTaskDialogs suppress the shortcuts for CommonButtons, i.e. the user can't press y to "click" he Yes button.

System provided dialog:
BafYstN.png

Emulated dialog:
06EYClQ.png

For reference please see Windows Explorer's deletion confirmation which has shortcuts:
1TFyn9C.png

I checked the SynTaskDialog source and noticed the explicit call to StripHotkey at the beginninig of AddButton and wondered why it is there?

Best regards,
Uli.

Offline

#2 2013-06-13 11:32:42

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,651
Website

Re: SynTaskDialog - Why no shortcuts for CommonButtons?

To avoid checking that the same shortcut is used several times (when adding custom buttons), I suspect, or something approaching?

Which enhancement do you propose?

Offline

#3 2013-06-13 14:14:02

uligerhardt
Member
Registered: 2011-03-08
Posts: 52

Re: SynTaskDialog - Why no shortcuts for CommonButtons?

The easiest solution from my perspective would be to just delete the call to StripHotkey in AddButton - or call it controlled by a flag - and have the translators avoid clashing shortcuts. They have to consider them anyway because NonNative might be false and the system dialog shows the CommonButton shortcuts.

Offline

#4 2013-06-14 08:13:57

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,651
Website

Re: SynTaskDialog - Why no shortcuts for CommonButtons?

Sounds right to me.

Now bottom buttons won't trim expected shortcut definition, in emulated mode.
See http://synopse.info/fossil/info/7870075dac

Thanks for the feedback.

Offline

#5 2013-06-14 10:15:19

uligerhardt
Member
Registered: 2011-03-08
Posts: 52

Re: SynTaskDialog - Why no shortcuts for CommonButtons?

Thank you!

One minor nitpick: AFAICS you could make "s" a const parameter now. :-)

Offline

Board footer

Powered by FluxBB