Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: eranon on January 12, 2014, 02:47:33 pm

Title: Compiler toolbar width
Post by: eranon on January 12, 2014, 02:47:33 pm
Hello,

Is it possible to increase the width of the compiler toolbar ?

I have some long target titles (for example "GCC x86 Release wx300 - VERBOSE") which are not visible in full in the combo box and can be easily mingled with some others starting identically (for example "GCC x86 Release wx300 - PRELOADED").

--
EDIT : I succeeded to enlarge the toolbar playing with the CompilerToolbar options (bestw and minw values) in default.conf, but it doesn't change the combox-box width inside the toolbar.
Title: Re: Compiler toolbar width
Post by: stahta01 on January 12, 2014, 07:34:03 pm
Try doing this. I forgot where the compilergcc xrc are located; but, IIRC you can just edit then and the next time CB is started the size would be larger.

Tim S.

Code
Index: src/plugins/compilergcc/resources/compiler_toolbar.xrc
===================================================================
--- src/plugins/compilergcc/resources/compiler_toolbar.xrc (revision 9567)
+++ src/plugins/compilergcc/resources/compiler_toolbar.xrc (working copy)
@@ -29,7 +29,7 @@
     </object>
     <object class="wxChoice" name="idToolTarget">
       <content/>
-   <size>136,-1</size>
+   <size>200,-1</size>
       <tooltip>Build target</tooltip>
       <longhelp>Select the current build target</longhelp>
     </object>
Index: src/plugins/compilergcc/resources/compiler_toolbar_16x16.xrc
===================================================================
--- src/plugins/compilergcc/resources/compiler_toolbar_16x16.xrc (revision 9567)
+++ src/plugins/compilergcc/resources/compiler_toolbar_16x16.xrc (working copy)
@@ -29,7 +29,7 @@
     </object>
     <object class="wxChoice" name="idToolTarget">
       <content/>
-      <size>136,-1</size>
+      <size>200,-1</size>
       <tooltip>Build target</tooltip>
       <longhelp>Select the current build target</longhelp>
     </object>
Title: Re: Compiler toolbar width
Post by: eranon on January 13, 2014, 12:48:13 am
Thanks, Stahta. I can't try just now, but I'll do it asap...
Title: Re: Compiler toolbar width
Post by: oBFusCATed on January 13, 2014, 01:06:58 am
The best option would be if we can add an option, so every user can set this up himself.
Unfortunately we can't make this size-automatically, because it will mess the layout of the toolbars.
Title: Re: Compiler toolbar width
Post by: eranon on January 13, 2014, 01:35:12 am
@stahta : I finally found possibility to try and it works (modified the XRC as you said, resetted default.conf to let C::B autocomputes the best size around the combo-box, then rebuilt the workspace and ran update.bat to renew output). Thanks again. Quite more comfortable now :)

@obfuscated : so, maybe just a free field in which user would be warned that any change is made under his own responsibility... Or a kind of INI like file gathering all these kind of customizations which would be outside of the standard (e.g. the way it was done with a software like Eudora under Windows : a lot of advanced options in the .ini file and most only modifiable by hand).
Title: Re: Compiler toolbar width
Post by: oBFusCATed on January 13, 2014, 01:46:52 am
Why would you want to put it hidden?
Somewhere in the options is good enough I think...
Title: Re: Compiler toolbar width
Post by: eranon on January 13, 2014, 02:43:10 pm
By hand is not hidden, Obfuscated, but it exempts to implement an exposition in the UI (so, quicker to implement) for options that some only will use.
Title: Re: Compiler toolbar width
Post by: Jenna on January 13, 2014, 03:41:09 pm
By hand is not hidden, Obfuscated, but it exempts to implement an exposition in the UI (so, quicker to implement) for options that some only will use.
Code::Blocks does not have an ini-style conf-file, but an xml-file (usually default.conf). Tweaking such files by hand is really dangerous and can lead to crashes.
Title: Re: Compiler toolbar width
Post by: eranon on January 13, 2014, 05:36:49 pm
I know the current conf is saved in XML format, Jens. The idea was just to ad a kind of "extra_conf.ini"... But it's just an idea. I'm not a C::B dev, but a user one.