← Back to team overview

kicad-developers team mailing list archive

kicad-stable vs wxWidgets 3.x

 

I am wondering if the attached patch could be applied to the stable branch. The reason is currently it does not compile with wxWidgets 3.x at all or wxWidgets 2.x that are built without '--with-gnomeprint' or '--with-gtkprint'. There are no wonders inside, just a few backported changes from the product branch.

Regards,
Orson
=== modified file 'common/basicframe.cpp'
--- old/common/basicframe.cpp	2013-01-12 18:32:24.908999000 +0100
+++ new/common/basicframe.cpp	2014-02-10 08:59:50.362256003 +0100
@@ -458,8 +458,18 @@ void EDA_BASE_FRAME::AddHelpVersionInfoM
 static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE()
 {
     return
-    " (" __WX_BO_UNICODE __ABI_VERSION __BO_COMPILER __WX_BO_STL
-    __WX_BO_WXWIN_COMPAT_2_6 __WX_BO_WXWIN_COMPAT_2_8 ")"
+#ifdef __WXDEBUG__
+    " (debug,"
+#else
+    " (release,"
+#endif
+    __WX_BO_UNICODE __ABI_VERSION __BO_COMPILER __WX_BO_STL
+
+#if !wxCHECK_VERSION( 3, 0, 0 )
+    __WX_BO_WXWIN_COMPAT_2_6
+#endif
+
+    __WX_BO_WXWIN_COMPAT_2_8 ")"
     ;
 }
 
@@ -468,7 +478,11 @@ static inline const char* KICAD_BUILD_OP
 static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE()
 {
     return
-    " (" __WX_BO_DEBUG ","
+#ifdef __WXDEBUG__
+    " (debug,"
+#else
+    " (release,"
+#endif
     __WX_BO_UNICODE __ABI_VERSION __BO_COMPILER __WX_BO_STL
     __WX_BO_WXWIN_COMPAT_2_4 __WX_BO_WXWIN_COMPAT_2_6 ")"
     ;
=== modified file 'common/common.cpp'
--- old/common/common.cpp	2013-03-30 13:54:49.367000000 +0100
+++ new/common/common.cpp	2014-02-10 08:48:11.698929316 +0100
@@ -40,6 +40,16 @@
 
 #include <wx/process.h>
 
+// Show warning if wxWidgets Gnome or GTK printing was not configured.
+// Since wxWidgets 3.0, this is no more needed (build in printing works!)
+#if defined( __WXGTK__ )
+    #if !wxCHECK_VERSION( 3, 0, 0 )
+    #   if !wxUSE_LIBGNOMEPRINT && !wxUSE_GTKPRINT && !SWIG
+    #       warning "You must use '--with-gnomeprint' or '--with-gtkprint' in your wx library configuration for full print capabilities."
+    #   endif
+    #endif
+#endif
+
 /**
  * Global variables definitions.
  *
=== modified file 'common/edaappl.cpp'
--- old/common/edaappl.cpp	2013-01-30 17:15:45.082000000 +0100
+++ new/common/edaappl.cpp	2014-02-10 08:30:18.555606190 +0100
@@ -451,7 +451,7 @@ bool EDA_APP::SetBinDir()
 
     // Linux and Unix
 #elif defined(__UNIX__)
-    m_BinDir = wxStandardPaths().GetExecutablePath();
+    m_BinDir = wxStandardPaths::Get().GetExecutablePath();
 #else
     m_BinDir = argv[0];
 #endif // __UNIX__
=== modified file 'include/common.h'
--- old/include/common.h	2013-03-30 13:54:49.367000000 +0100
+++ new/include/common.h	2014-02-10 08:48:03.118929397 +0100
@@ -42,16 +42,6 @@
 #include <convert_to_biu.h>
 #include <colors.h>
 
-#if !wxUSE_PRINTING_ARCHITECTURE && !SWIG
-#   error "You must use '--enable-printarch' in your wx library configuration."
-#endif
-
-#if defined( __WXGTK__ )
-#   if !wxUSE_LIBGNOMEPRINT && !wxUSE_GTKPRINT && !SWIG
-#       error "You must use '--with-gnomeprint' or '--with-gtkprint' in your wx library configuration."
-#   endif
-#endif
-
 
 class wxAboutDialogInfo;
 
=== modified file 'pcbnew/footprint_wizard_frame.cpp'
--- old/pcbnew/footprint_wizard_frame.cpp	2013-01-12 18:32:24.908999000 +0100
+++ new/pcbnew/footprint_wizard_frame.cpp	2014-02-10 08:37:33.975602049 +0100
@@ -77,9 +77,19 @@ BEGIN_EVENT_TABLE( FOOTPRINT_WIZARD_FRAM
     EVT_TOOL( ID_FOOTPRINT_WIZARD_SHOW_3D_VIEW,
               FOOTPRINT_WIZARD_FRAME::Show3D_Frame )
 
-    /* listbox events */
+    // listbox events
     EVT_LISTBOX( ID_FOOTPRINT_WIZARD_PAGE_LIST, FOOTPRINT_WIZARD_FRAME::ClickOnPageList )
-    EVT_GRID_CMD_CELL_CHANGE( ID_FOOTPRINT_WIZARD_PARAMETER_LIST, FOOTPRINT_WIZARD_FRAME::ParametersUpdated )
+
+    #if wxCHECK_VERSION( 3, 0, 0 )
+    EVT_GRID_CMD_CELL_CHANGED( ID_FOOTPRINT_WIZARD_PARAMETER_LIST,
+                              FOOTPRINT_WIZARD_FRAME::ParametersUpdated )
+    #else
+    EVT_GRID_CMD_CELL_CHANGE( ID_FOOTPRINT_WIZARD_PARAMETER_LIST,
+                              FOOTPRINT_WIZARD_FRAME::ParametersUpdated )
+    #endif
+
+    EVT_GRID_CMD_EDITOR_HIDDEN( ID_FOOTPRINT_WIZARD_PARAMETER_LIST,
+                                FOOTPRINT_WIZARD_FRAME::ParametersUpdated )
 
     EVT_MENU( ID_SET_RELATIVE_OFFSET, FOOTPRINT_WIZARD_FRAME::OnSetRelativeOffset )
 END_EVENT_TABLE()

Follow ups