Page 1 of 2
compiler options
Posted: Sat Jan 10, 2009 7:11 pm
by jfouche
Hi
I'm working on the compiler option as switches / checkboxes to make project settings easier for the user.
The user will be able to check options (-Wall, ...) directly, without knowing all compiler / linker options.
I would like to know what do you prefer ?
Actually, I created to more pages in the build settings : CompilerOptions and LinkerOptions.
We can add all compiler switches in thoses pages (switch and comments). Example : -Wall : Enable warning
In Project settings, we list all options found in the current compiler settings.
Moreover, I think I'm going to use the wxPropertyGrid control (which is part of wxWidgets trunk) for the project settings.
Is that OK for you ?
Re: compiler options
Posted: Sat Jan 10, 2009 7:39 pm
by eranif
jfouche wrote:I'm working on the compiler option as switches / checkboxes to make project settings easier for the user.
This is great
jfouche wrote:Actually, I created to more pages in the build settings : CompilerOptions and LinkerOptions.
We can add all compiler switches in thoses pages (switch and comments). Example : -Wall : Enable warning
In Project settings, we list all options found in the current compiler settings.
Moreover, I think I'm going to use the wxPropertyGrid control (which is part of wxWidgets trunk) for the project settings.
You need to put in mind that this should be per compiler ofc.
I suggest something like:
- New page per compiler 'Compiler options' / Linker Options (like
you suggested)
- In project settings, the button on the left to the 'Compiler Options' text should now open a dialog with list AND the output (see attachment)
same for linker options
Also:
When ticking entry in the check list box, the text control to the right should be updated.
Same goes for linker.
jfouche wrote:Moreover, I think I'm going to use the wxPropertyGrid control (which is part of wxWidgets trunk) for the project settings.
Since codelite is built against WX2.8.7 on Windows and 2.8.4 on Linux, and this is not going to be changed anytime soon, I prefer to use the simple wxCheclListBox (as I used in the attachment)
Eran
Re: compiler options
Posted: Sat Jan 10, 2009 8:06 pm
by jfouche
Hi Eran
Thanks for your point of view.
Of courses, I modified the Compiler class to add compiler / linker options.
I don't use wxWidgets trunk, but 2.8.9. I just use the 1.4.3 wxPropertyGrid.
Never mind, I will use wxCheckListBox as you suggested (maybe it will be a future implementation in a few month).
Re: compiler options
Posted: Sat Jan 10, 2009 9:07 pm
by sdolim
Eran,
Is there any possibility we could add the latest release of wxPropertyGrid's source code to the sdk directory like wxScintilla and wxsqlite3? I would also like to use it for an addition to the SymbolView plugin.
Scott
Re: compiler options
Posted: Sat Jan 10, 2009 10:06 pm
by eranif
The only reason I hate doing such things is the maintenance: editing the makefiles for Linux -> if you would willing to do it --> by all means go a head and add it
Eran
Re: compiler options
Posted: Sun Jan 11, 2009 11:10 pm
by jfouche
Here is a patch
It is not completly finished because :
- I think i can refactor a little bit my code
- it miss help informations for each switch
- I didn't provide build_settings.xml.default
Have a look, enjoy, and give me your feed back
Re: compiler options
Posted: Sun Jan 11, 2009 11:40 pm
by eranif
Some UI comments:
- The dialogs should retain their size & position (Just need to add single line the ctor & dtor (search the code for WindowAttrManager usage))
- There is no title in the 'options' dialog
- Some tooltips/static text will be nice
- All 'OK' buttons should have 'Default' checked in wxFormBuilder (this allows dismissing the dialog with 'enter' hit)
- Keep the 5 pixels border around the buttons and make them middle aligned (I might have missed 1 or 2 dialogs in codelite, but I think that most of the codelite dialogs places the button in the middle)
OR
I can wait for the complete patch and fix the UI after wards
In general nicely done, looks like you got your way around codelite, which is nice
Eran
Re: compiler options
Posted: Mon Jan 12, 2009 1:20 am
by jfouche
Thank you for your reply, Eran
Let me finish the request according to your remarks. This patch was just a first shot to have your impression about my try. Let's continue.
Maybe tomorrow evening...
Re: compiler options
Posted: Mon Jan 12, 2009 10:12 pm
by jfouche
eranif wrote:
- All 'OK' buttons should have 'Default' checked in wxFormBuilder (this allows dismissing the dialog with 'enter' hit)
What buttons are you talking about ? I use wxStdDialogButtonDialog and I don't see this option.
Re: compiler options
Posted: Mon Jan 12, 2009 11:15 pm
by eranif
jfouche wrote:What buttons are you talking about ?
The 'OK' 'Cancel' buttons.
If you create the buttons using wxBoxSizer with 2 buttons, you can set the OK button to 'Default' ( which allows dismissing the dialog when hitting enter, currently hitting enter on that dialog simply moves to next control or does nothing )
try replacing the wxStdbuttonSizer with what I suggested.
Eran