Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: stahta01 on March 22, 2007, 01:05:53 am

Title: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: stahta01 on March 22, 2007, 01:05:53 am
Byo:

Do you plan on applying my patch?
[ Patch #1903 ] wxSmith patch for wxW28 and wxPropertyGrid 1.2.x
  https://developer.berlios.de/patch/?func=detailpatch&patch_id=1903&group_id=5358

Do you want me to split the patch into smaller patches?
If split, how do you want me to split the patch? wx28 and wxPropertyGrid 1.2.x?

Tim S
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: stahta01 on March 22, 2007, 08:48:49 am
Found that only one file in wxSmith is left to be patched in order to use wxPropertyGrid 1.2.x; this is NOT counting build files patched by Berlios Patch 1912 "Patch CB Build Files to use wxPropertyGrid 1.2.6"
https://developer.berlios.de/patch/?func=detailpatch&patch_id=1912&group_id=5358
(WXMAKINGLIB_PROPGRID-unix.patch)

Tim S

Code
Index: src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp (revision 3692)
+++ src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp (working copy)
@@ -128,7 +128,11 @@
         wxSYS_COLOUR_MENUBAR
     };

+#if defined(wxPG_VERSION) && wxPG_VERSION > 1099
+    WX_PG_IMPLEMENT_PROPERTY_CLASS(wxsMyColourProperty,wxEnumProperty,wxColourPropertyValue,const wxColourPropertyValue&,Choice)
+#else
     WX_PG_IMPLEMENT_PROPERTY_CLASS(wxsMyColourProperty,wxColourPropertyValue,const wxColourPropertyValue&,Choice)
+#endif

     wxsMyColourPropertyClass::wxsMyColourPropertyClass( const wxString& label, const wxString& name,
         const wxColourPropertyValue& value )
@@ -181,7 +185,11 @@
                 (int)m_value.m_colour.Red(),(int)m_value.m_colour.Green(),(int)m_value.m_colour.Blue());
             return temp;
         }
+#if defined(wxPG_VERSION) && wxPG_VERSION > 1099
+        return m_choices.GetLabel(m_index);
+#else
         return m_constants->GetLabel(m_index);
+#endif
     }

     wxSize wxsMyColourPropertyClass::GetImageSize() const
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: byo on March 23, 2007, 05:19:34 pm
Byo:

Do you plan on applying my patch?
[ Patch #1903 ] wxSmith patch for wxW28 and wxPropertyGrid 1.2.x
  https://developer.berlios.de/patch/?func=detailpatch&patch_id=1903&group_id=5358

Do you want me to split the patch into smaller patches?
If split, how do you want me to split the patch? wx28 and wxPropertyGrid 1.2.x?

Tim S

Yup, I'd like to switch into newer wxPropertyGrid, probably do it this evening :) Have you tested if wxSmith works fine with new wxPG ?

BYO
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: byo on March 23, 2007, 08:49:12 pm
I've got one question: In patch for compatibility with wx2.8 you've commented some styles inside wxSmith like:
Code
    //   WXS_ST(wxNO_3D)

What was the purpose ? Does it make problem to compile using wx 2.8 ? Coz even if style is not yet supported but the older version remains, it can still be used inside XRC files with old name so excluding such styles may lead to incompatibility problems.

BYO
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: stahta01 on March 23, 2007, 09:25:20 pm
I've got one question: In patch for compatibility with wx2.8 you've commented some styles inside wxSmith like:
Code
    //   WXS_ST(wxNO_3D)

What was the purpose ? Does it make problem to compile using wx 2.8 ? Coz even if style is not yet supported but the older version remains, it can still be used inside XRC files with old name so excluding such styles may lead to incompatibility problems.

BYO

It has a problem with 2.8 with 2.6 compatible mode turned off, wxNO_3D does nothing under 2.6.

from wx/toplevel.h
Code
// deprecated versions defined for compatibility reasons
#define wxRESIZE_BOX            wxMAXIMIZE_BOX
#define wxTHICK_FRAME           wxRESIZE_BORDER

// obsolete styles, unused any more
#define wxDIALOG_MODAL          0
#define wxDIALOG_MODELESS       0
#define wxNO_3D                 0
#define wxUSER_COLOURS          0
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: stahta01 on March 23, 2007, 09:30:34 pm
Yup, I'd like to switch into newer wxPropertyGrid, probably do it this evening :) Have you tested if wxSmith works fine with new wxPG ?

BYO

I have done minor testing and it worked after turning off wxModule; I do NOT use wxSmith so I do NOT know enough to test it very well. The define of wxPG_USE_WXMODULE=0 turns off wxModule during the compile of wxPropertyGrid.

Tim S
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: stahta01 on March 23, 2007, 10:27:53 pm
I have updated Berlios Patch 1912 "Patch CB Build Files to use wxPropertyGrid 1.2.6"
https://developer.berlios.de/patch/?func=detailpatch&patch_id=1912&group_id=5358
(WXMAKINGLIB_PROPGRID-unix.patch)

for Linux build issues, it now hopefully does the needed defines.

Tim S
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: byo on March 23, 2007, 11:46:03 pm
Patches applied along with new wxPropertyGrid version :)

Thanks for your work :D

BYO
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: afb on March 24, 2007, 12:24:47 am
I ran into some issues due to the wxPG_COMPATIBILITY_1_0_0 flag not being set...
(i.e. it was missing things like wxRECURSE and wxPGConstants, for example)

EDIT: bootstrapping made it pick up the added defines now, all good

The new propgrid also seems to have a few wx includes missing from the headers:
Code
Index: src/include/propgrid/include/wx/propgrid/propdev.h
===================================================================
--- src/include/propgrid/include/wx/propgrid/propdev.h (revision 3754)
+++ src/include/propgrid/include/wx/propgrid/propdev.h (arbetskopia)
@@ -18,6 +18,7 @@
     #error "propdev.h must be included *before* advprops.h"
 #endif
 
+#include <wx/textctrl.h>
 
 class WXDLLIMPEXP_PG wxArrayEditorDialog;
 
Index: src/include/propgrid/include/wx/propgrid/propgrid.h
===================================================================
--- src/include/propgrid/include/wx/propgrid/propgrid.h (revision 3754)
+++ src/include/propgrid/include/wx/propgrid/propgrid.h (arbetskopia)
@@ -17,6 +17,7 @@
 #endif
 
 #include <wx/dynarray.h>
+#include <wx/dcclient.h>
 #include <wx/hashmap.h>
 #include <wx/variant.h>
 #include <wx/tooltip.h>
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: byo on March 24, 2007, 01:04:54 am
Jay, it's really painfull for me to make wxPropGrid working  :?

Sorry for breaking linux build. I'm just trying to figure out what's wrong (it compiles fine on windows) and I'm getting little bit frustrated. Anybody knows what packages should be installed on ubuntu edgy to get full development version of GTK 2 ? (Even though I've installed reauired *.dev packges, I still don't have files like gtk-config).

And those missing headers is a standard thing in wxPG, including proper files may be real challange. That's big minus for wxPG.

BYO
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: afb on March 24, 2007, 01:16:27 am
When I said "all good", I think that I meant: "but it missed all the subdirectories".  :lol:
Had to copy the AM_CPPFLAGS = -DWXMAKINGLIB_PROPGRID -DwxPG_COMPATIBILITY_1_0_0 down
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: byo on March 24, 2007, 01:40:12 am
Yup, I've already done it, i'll commit when i'll manage to successfully compile C::B

EDIT: Ok, I've compiled C::B on linux using make, changes committed. So it's time to go sleep, I'm really tired.
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: rjmyst3 on March 24, 2007, 02:05:52 am
Jay, it's really painfull for me to make wxPropGrid working  :?

Sorry for breaking linux build. I'm just trying to figure out what's wrong (it compiles fine on windows) and I'm getting little bit frustrated. Anybody knows what packages should be installed on ubuntu edgy to get full development version of GTK 2 ? (Even though I've installed reauired *.dev packges, I still don't have files like gtk-config).

And those missing headers is a standard thing in wxPG, including proper files may be real challange. That's big minus for wxPG.

BYO

the package you need is libgtk2.0-dev.
the backtick expression we use in the compiler settings is 'pkg-config gtk+-2.0 --cflags'
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: stahta01 on March 24, 2007, 02:47:36 am
When I said "all good", I think that I meant: "but it missed all the subdirectories".  :lol:
Had to copy the AM_CPPFLAGS = -DWXMAKINGLIB_PROPGRID -DwxPG_COMPATIBILITY_1_0_0 down

Sorry about this, I never used make to build C::B so I never knew that I needed to add AM_CPPFLAGS to the sub MakeFiles.am also.

Tim S
Title: Re: wxSmith and patch 1903 for wxW28 and wxPropertyGrid 1.2.x
Post by: byo on March 24, 2007, 10:29:51 am
the package you need is libgtk2.0-dev.
the backtick expression we use in the compiler settings is 'pkg-config gtk+-2.0 --cflags'

I have this package installed, but I didn't know that it's invoked turough `pkg-config`. Thanks for help :)

Regards

  BYO