← Back to team overview

kicad-developers team mailing list archive

Re: Component table improvements

 

Le 08/05/2017 à 05:29, Oliver Walters a écrit :
> JP,
> 
> I was expecting this response :)
> 
> I was happy to acquiesce initially on this style change as it was only my preference over yours, but
> reading through the responses of a lot of people on the original thread, I believe that the
> usability of simple OK and CANCEL buttons is not what people (not just myself) expect.
> 
> a) Lots of people calling for an "Apply changes" button. This means "apply changes now, but keep
> editing".
> b) The "Discard changes" button is very useful, and is also different from "Apply changes and close"
> c) In the context of the component table, "OK" and "Cancel" are somewhat obtuse.
> d) An "OK" button performs the same actions as "Apply changes", then "Close"
> e) A "Cancel" button performs the same actions as "Discard changes" then "Close"
> 
> If I revert to using the wxStdDialogButtonSizer, there will be 4 buttons which perform confusing
> combinations of the same actions!
> 
> I think that "Apply Changes" "Revert changes" and "Close" are sufficient and have the benefit of
> accurately describing what they do.
> 
> I propose that I catch the ESCAPE_KEY event and this performs the same action as pressing the
> "Close" button (asks for confirmation if there are unsaved changes, otherwise closes). 
> 
> Would this be acceptable?
> 
> Kind regards
> Oliver


AFAIK, the ESC key issue is due to the fact there is no wxID_CANCEL event id attached to a button in
the dialog.
(the wxStdDialogButtonSizer fixes this issue just because it uses wxID_CANCEL for the Cancel button)

Just using wxID_CANCEL for the close button should fix this issue.
Try it.

> 
> On Sun, May 7, 2017 at 9:00 PM, jp charras <jp.charras@xxxxxxxxxx <mailto:jp.charras@xxxxxxxxxx>> wrote:
> 
>     Le 06/05/2017 à 07:35, Oliver Walters a écrit :
>     > After feedback on the original thread
>     (https://lists.launchpad.net/kicad-developers/msg29057.html
>     <https://lists.launchpad.net/kicad-developers/msg29057.html>)
>     >
>     > I have made some further improvements to the component table:
>     >
>     > a) Add values from template fields where no value exists
>     > b) Allow users to specify which fields are used for sorting (default = all fields)
>     > c) Add an "Apply changes" button which updates components accordingly
>     > d) UI improvements
>     >
>     > Please find patches attached.
> 
>     Thanks, Oliver for all this very good work.
> 
>     But your last patch is partially a regression:
>     the ESC key does not work anymore.
> 
>     I suggest you to use the wxStdDialogButtonSizer container to manage OK, Cancel, Apply buttons (they
>     are all standard buttons).
>     This wxStdDialogButtonSizer container has many advantages for multi-platform applications (for
>     instance look and fell).
> 
>     "Revert Changes" button must be managed outside this container.
> 
>     >From my point of view, confirmation when the dialog is closed should not occur when clicking  OK or
>     Cancel button, only ESC key.
> 
>     However I am not sure if it is easy to manage ESC key and Cancel button with different options.
> 
>     --
>     Jean-Pierre CHARRAS
> 
>     _______________________________________________
>     Mailing list: https://launchpad.net/~kicad-developers <https://launchpad.net/%7Ekicad-developers>
>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     Unsubscribe : https://launchpad.net/~kicad-developers <https://launchpad.net/%7Ekicad-developers>
>     More help   : https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>
> 
> 


-- 
Jean-Pierre CHARRAS


Follow ups

References