← Back to team overview

kicad-developers team mailing list archive

Re: Re: OK and Cancel and Apply buttons (was Re: Guides

 

Geoff Harland a écrit :

Thank you very much also for the tip on this matter; this is as good an example as any of additional (and very useful) information which is providedin this book, but which has not been provided with the documentation provided with wxWidgets (or at least not as far as I am currently aware). With hindsight, it is not at all surprising that wxWidgets does provide support for automatically positioning buttons within different (OS) versionsof an application; after all, it is supposed to be able to support being able to run the same application under different OSes. I have recently committed some files which update a dialog box used within Pcbnew, and another dialog box of a similar nature used within GerbView. Both of those dialogs now use a wxStdDialogButton Sizer object to contain their "OK" and "Cancel" buttons, meaning that the (layout) sequence of those buttons now depends upon which (OS) version of KiCad is compiled and subsequently used. (And no conditional statements are required within KiCad's source code to accomplish that outcome.) Hence given enough time, I believe that all of the dialog boxes used within KiCad could be updated in a similar manner. (For the time being, I have primarily been concentrating on updating dialog boxes which have not used sizers previously - but there are still assorted dialog boxes (which for themost part already use sizers) which also need attention for various other reasons, and which I will thus also work on as time permits.) It would be one thing to decide to not make the sequence of buttons OS version-dependantif to do so would require the provision of OS version-conditional code - but as wxWidgets actually does support this, I consider that that capability should be utilised.

I agree with the use of wxStdDialogButton Sizer object whenever it is possible.

In fact i believe :
1 - We must avoid an OS version-conditional code (more complex code, and difficult to handle under dialogblocks.)
2 - the button sequence itself is not very important,
but kicad must be self consistant (all kicad dialogs must be have the same button sequence).

Geoff, thanks for your help


--

Jean-Pierre CHARRAS

Maître de conférences
Directeur d'études 2ieme année.
Génie Electrique et Informatique Industrielle 2
Institut Universitaire de Technologie 1 de Grenoble
BP 67, 38402 St Martin d'Heres Cedex

Recherche :
GIPSA-LIS - INPG
46, Avenue Félix Viallet
38031 Grenoble cedex







References