Patch #2262 2007-11-29 12:36

artoj

Handle resizing of 'Batch builds' settings correctly
Download
2262-Handle_resizin.patch (5.7 KB)
Category
Application::Bugfix
Status
Accepted
Close date
2007-12-12 14:32
Assigned to
 
Index: src/src/compilersettingsdlg.cpp
===================================================================
--- src/src/compilersettingsdlg.cpp    (revision 4685)
+++ src/src/compilersettingsdlg.cpp    (working copy)
@@ -76,6 +76,7 @@
     }
     wxCheckListBox* clb = XRCCTRL(*this, "chkBBPlugins", wxCheckListBox);
     clb->Clear();
+    clb->SetMinSize(wxSize(-1, 150));
     const PluginElementsArray& plugins = Manager::Get()->GetPluginManager()->GetPlugins();
     for (size_t i = 0; i < plugins.GetCount(); ++i)
     {
Index: src/src/resources/app_compiler_settings.xrc
===================================================================
--- src/src/resources/app_compiler_settings.xrc    (revision 4685)
+++ src/src/resources/app_compiler_settings.xrc    (working copy)
@@ -32,21 +32,25 @@
             <object class="wxPanel" name="tabBatchBuilds">
               <object class="wxBoxSizer">
                 <orient>wxVERTICAL</orient>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="">
-                    <label>Extra command-line arguments for batch-builds through shell extensions:</label>
-                  </object>
-                  <flag>wxLEFT|wxEXPAND</flag>
-                  <border>8</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtBatchBuildsCmdLine"/>
-                  <flag>wxLEFT|wxEXPAND</flag>
-                  <border>8</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="">
-                    <label>If you right-click a Code::Blocks project/workspace in explorer, you will see
+                  <object class="sizeritem">
+                    <option>0</option>
+                      <object class="wxBoxSizer">
+                        <orient>wxVERTICAL</orient>
+                        <object class="sizeritem">
+                          <object class="wxStaticText" name="">
+                            <label>Extra command-line arguments for batch-builds through shell extensions:</label>
+                          </object>
+                          <flag>wxLEFT|wxEXPAND</flag>
+                          <border>8</border>
+                        </object>
+                        <object class="sizeritem">
+                          <object class="wxTextCtrl" name="txtBatchBuildsCmdLine"/>
+                          <flag>wxLEFT|wxEXPAND</flag>
+                          <border>8</border>
+                        </object>
+                        <object class="sizeritem">
+                          <object class="wxStaticText" name="">
+                            <label>If you right-click a Code::Blocks project/workspace in explorer, you will see
 two extensions: &quot;Build&quot; and &quot;Rebuild (clean)&quot; (windows only).
 The arguments configured here, are used by those two extensions.
 You could specify, for example, a profile/personality to use for batch builds.
@@ -61,16 +65,20 @@
 --target: work only on &lt;target&gt; for &quot;Build&quot; or &quot;Rebuild (clean)&quot;
 --no-batch-window-close: do not auto-close log window when batch build is done
 --batch-build-notify: show message when batch build is done</label>
+                          </object>
+                          <flag>wxLEFT|wxEXPAND</flag>
+                          <border>8</border>
+                        </object>
+                      </object>
                   </object>
-                  <flag>wxLEFT|wxEXPAND</flag>
-                  <border>8</border>
-                </object>
                 <object class="sizeritem">
+                  <option>1</option>
                   <object class="wxStaticBoxSizer">
                     <label>Plugins to load in batch-build mode</label>
                     <orient>wxVERTICAL</orient>
                     <object class="sizeritem">
                       <object class="wxCheckListBox" name="chkBBPlugins">
+                        <style>wxLB_NEEDED_SB</style>
                         <content/>
                       </object>
                       <option>1</option>
@@ -89,18 +97,24 @@
                   <flag>wxTOP|wxBOTTOM|wxLEFT|wxGROW</flag>
                   <border>8</border>
                 </object>
-                <object class="spacer">
-                  <size>0,0</size>
-                  <option>1</option>
-                  <flag>wxGROW</flag>
-                </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText">
-                    <label>For more info on profiles/personalities, read the Code::Blocks WiKi at
+                  <option>0</option>
+                  <object class="wxBoxSizer">
+                    <orient>wxVERTICAL</orient>
+                    <object class="spacer">
+                      <size>0,0</size>
+                      <option>1</opti
download for full patch...
artoj 2007-11-29 12:40

The Batch Builds settings in Settings - Compiler and Debugger - Batch Builds doesn't currently resize correctly. As more and more plugins are used, the check list box ("Plugins to load in batch build mode") grows making the whole window larger. On my screen using resolution of 1024x768 the window is so large that I cannot view the OK and Cancel buttons.

This patch adds two new resizers to the window, adds a scrollbar and minimum size to the check list box. Using the new resizers, the top and bottom part of the window do not resize, only the check list box. By setting the minimum size the check list box won't shrink too much.

artoj 2007-11-29 17:58

I've updated the patch. The old one had the large text sections indented.

artoj 2007-11-29 18:01

*sigh* Another update, this time I hope everything is included.

mandrav 2007-12-12 14:32

Applied, thanks :).