Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

show compiler flags switches in checklistbox text

<< < (2/2)

tiwag:
you can use this patch, which shows compileroptions if available - otherwise linkeroptions in the [].

sdk/compileroptions.cpp patch

--- Code: ---Index: src/sdk/compileroptions.cpp
===================================================================
RCS file: /cvsroot/codeblocks/codeblocks/src/sdk/compileroptions.cpp,v
retrieving revision 1.3
diff -u -r1.3 compileroptions.cpp
--- src/sdk/compileroptions.cpp 19 May 2005 13:16:16 -0000  1.3
+++ src/sdk/compileroptions.cpp 4 Aug 2005 18:18:46 -0000
@@ -79,7 +79,15 @@
    if (name.IsEmpty() || (option.IsEmpty() && additionalLibs.IsEmpty()))
        return;
    CompOption* coption = new CompOption;
-   coption->name = name;
+   
+   wxString listboxname = name +wxT("  [");
+   if (option.IsEmpty())
+        listboxname += additionalLibs;
+    else
+        listboxname += option;
+    listboxname += wxT("]");
+
+   coption->name = listboxname;
    coption->option = option;
    coption->additionalLibs = additionalLibs;
    coption->enabled = false;
--- End code ---

rickg22:
tiwag: How about this: (it may be a little more complicated)

Why not make the list have columns like the compiler messages? The first
column would be the checkbox, the second would be the flag, and the third would
be the description :)

Can you do it?

tiwag:

--- Quote from: rickg22 on August 04, 2005, 08:36:52 pm ---tiwag: How about this: (it may be a little more complicated)

Why not make the list have columns like the compiler messages? The first
column would be the checkbox, the second would be the flag, and the third would
be the description :)

Can you do it?

--- End quote ---

Hi rick ! good suggestion
my first attempt to improve this dialog was also to show   1.) checkbox  2.) switch  3.) descriptive text

but it looks ugly, because some switches are really long, like [-pedantic-error]  or [-Wfatal-errors] and
almost all of the processor spefic switches like [-march=pentium-mmx]
and others are totally short [-s] [-g] and so on

hence i decided, it looks much better to append the [switch] after the descriptive text as it is now.

Navigation

[0] Message Index

[*] Previous page

Go to full version