Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

size of "add include path dialog"

<< < (2/2)

killerbot:
this is now back as it was before thanks to the changes Jens made :-)

For the "add include path" dialog, I would still suggest :

- to make the size bigger (it is still a small dialog)
- have it re-sizable

What do you think ?

ollydbg:
Great job, Jens.
@killerbot, I think the old revision(before revision10260), the add include path dialog is also quite small, right?
See the image shot below:

I also see a CodeBlocks error message box, which is similar as BlueHazzard's post said: Re: The 19 June 2015 build (10341) is out..

I'm using wx2.8.12 under WindowsXP.

Also, I see commit10394, it has the diff file:

--- Code: ---363159f1df8772cc374d00fa8923277d13ac488d
 src/plugins/scriptedwizard/resources/plugins/wizard.xrc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/plugins/scriptedwizard/resources/plugins/wizard.xrc b/src/plugins/scriptedwizard/resources/plugins/wizard.xrc
index ef24d27..6bca053 100644
--- a/src/plugins/scriptedwizard/resources/plugins/wizard.xrc
+++ b/src/plugins/scriptedwizard/resources/plugins/wizard.xrc
@@ -96,6 +96,7 @@
                             <style>wxTE_MULTILINE</style>
                         </object>
                         <flag>wxEXPAND</flag>
+                        <minsize>240,128</minsize>
                     </object>
                 </object>
                 <flag>wxALL|wxEXPAND</flag>
@@ -135,7 +136,7 @@
                         <object class="wxStaticText" name="ID_STATICTEXT3">
                             <label>Plugin type:</label>
                         </object>
-                        <flag></flag>
+                        <flag />
                     </object>
                     <object class="sizeritem">
                         <object class="wxComboBox" name="cmbPluginType">
@@ -148,7 +149,7 @@
                             <selection>1</selection>
                             <style>wxCB_READONLY</style>
                         </object>
-                        <flag></flag>
+                        <flag />
                     </object>
                 </object>
                 <flag>wxALL|wxEXPAND</flag>

--- End code ---
Is that correct? for the flag field?

About the flag issue, I search the wx 2.8.12 source
There is a function which adds style

--- Code: ---void wxXmlResourceHandler::AddStyle(const wxString& name, int value)
{
    m_styleNames.Add(name);
    m_styleValues.Add(value);
}

--- End code ---
And a macro to do this:

--- Code: ---#define XRC_ADD_STYLE(style) AddStyle(wxT(#style), style)

--- End code ---


You can see all other align styles were added in wxWidgets-2.8.12\src\xrc\xh_sizer.cpp

--- Code: ---     XRC_ADD_STYLE(wxALIGN_CENTER);
     XRC_ADD_STYLE(wxALIGN_CENTRE);
     XRC_ADD_STYLE(wxALIGN_LEFT);
     XRC_ADD_STYLE(wxALIGN_TOP);
     XRC_ADD_STYLE(wxALIGN_RIGHT);
     XRC_ADD_STYLE(wxALIGN_BOTTOM);

--- End code ---
But you have never see

--- Code: ---XRC_ADD_STYLE(wxALIGN_NOT);

--- End code ---

Thus:

--- Code: ---int wxXmlResourceHandler::GetStyle(const wxString& param, int defaults)
{
    wxString s = GetParamValue(param);

    if (!s) return defaults;

    wxStringTokenizer tkn(s, wxT("| \t\n"), wxTOKEN_STRTOK);
    int style = 0;
    int index;
    wxString fl;
    while (tkn.HasMoreTokens())
    {
        fl = tkn.GetNextToken();
        index = m_styleNames.Index(fl);
        if (index != wxNOT_FOUND)
            style |= m_styleValues[index];
        else
            wxLogError(_("Unknown style flag ") + fl);
    }
    return style;
}

--- End code ---

killerbot:
yes in the past it was also rather small, so my proposal is to enlarge it, unless there are objections ?

Jenna:
I will fix the "wxALIGN_NOT" issue later this day.

Navigation

[0] Message Index

[*] Previous page

Go to full version