← Back to team overview

kicad-developers team mailing list archive

[PATCH] Remove conditionally compiled wxWidgets 2.x code

 

Hi all,

As I mentioned in a previous email, I have been going through the code and
removing conditionally compiled code for the no longer supported pre-3.0
versions of wxWidgets. The attached patch (generated against r5636) gets
rid of all such checks I could find with grep (the only one left is in
common/draw_panel.cpp which is checking for wx 3.1).

Most of the checks used the wx macro; wxCHECK_VERSION(a, b, c) returns true
iff the version of wxWidgets >= a.b.c. A couple used the wxMAJOR_VERSION
and/or wxMINOR_VERSION to do the check.

In most cases this makes the removal straightforward -- find the #if, keep
any branch that evaluates true for wxWidgets >= 3, and throw away the other
one.

There is some slightly more complicated changes to common/gr_basic.cpp:

    -#if defined(__WXMAC__) && (wxMAC_USE_CORE_GRAPHICS || wxCHECK_VERSION(
2, 9, 0 ) )

can be reduced to

    #if defined(__WXMAC__)

since (a && (b || true)) == (a && true) == a. In one case in this file, I
was also able to combine two branches that had identical code.

In dialog_shim.h, removing the conditional compilation would hardcode
DIALOG_SHIM_SETFOCUS to 0. Instead, I ripped out the code (here and in
dialog_shim.cpp) that ran if it was set to 1.

This goes some way towards the roadmap milestone of getting rid of
wxWidgets 2-specific code [1]. There may still be some code that is written
to be backwards-compatible without needing conditional compilation -- I'm
going to have a bit of a hunt through for such code.

This patch also fixes bug 1210762 [2].

Regards,
Blair


[1]
http://ci.kicad-pcb.org/job/kicad-doxygen/ws/Documentation/doxygen/html/md_Documentation_development_road-map.html#wxwidgets3
[2] https://bugs.launchpad.net/kicad/+bug/1210762
=== modified file '3d-viewer/3d_frame.cpp'
--- 3d-viewer/3d_frame.cpp	2015-04-17 11:12:59 +0000
+++ 3d-viewer/3d_frame.cpp	2015-04-26 01:31:45 +0000
@@ -120,8 +120,7 @@
     ReCreateMainToolbar();
 
     // Make a EDA_3D_CANVAS
-    // Note: We try to use anti aliasing if the graphic card allows that,
-    // but only on wxWidgets >= 3.0.0 (this option does not exist on wxWidgets 2.8)
+    // Note: We try to use anti aliasing if the graphic card allows that.
     int attrs[] = { // This array should be 2*n+1
                     // Sadly wxwidgets / glx < 13 allowed
                     // a thing named "boolean attributes" that don't take a value.
@@ -137,15 +136,11 @@
                     // Normal attributes with values:
                     WX_GL_DEPTH_SIZE, 16,
                     WX_GL_STENCIL_SIZE, 1,
-#if wxCHECK_VERSION( 3, 0, 0 )
                     WX_GL_SAMPLE_BUFFERS, 1,    // Enable multisampling support (antialiasing).
                     WX_GL_SAMPLES, 0,           // Disable AA for the start.
-#endif
                     0 };                        // NULL termination
 
 
-#if wxCHECK_VERSION( 3, 0, 0 )
-
     // Check if the canvas supports multisampling.
     if( EDA_3D_CANVAS::IsDisplaySupported( attrs ) )
     {
@@ -182,7 +177,6 @@
             }
         }
     }
-#endif
 
     m_canvas = new EDA_3D_CANVAS( this, attrs );
 

=== modified file 'common/basicframe.cpp'
--- common/basicframe.cpp	2015-04-16 15:26:51 +0000
+++ common/basicframe.cpp	2015-04-26 02:21:09 +0000
@@ -520,42 +520,17 @@
     #define __BO_COMPILER ",unknown"
 #endif
 
-#if wxCHECK_VERSION( 2, 9, 0 )
-
-static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE()
-{
-    return
-#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 ")"
-    ;
-}
-
-#else
-
-static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE()
-{
-    return
-#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 ")"
-    ;
-}
-
-#endif
+static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE()
+{
+    return
+#ifdef __WXDEBUG__
+    " (debug,"
+#else
+    " (release,"
+#endif
+    __WX_BO_UNICODE __ABI_VERSION __BO_COMPILER __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_8 ")"
+    ;
+}
 
 void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent&  event )
 {

=== modified file 'common/class_layer_box_selector.cpp'
--- common/class_layer_box_selector.cpp	2015-03-14 11:50:39 +0000
+++ common/class_layer_box_selector.cpp	2015-05-02 06:51:10 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
+ * Copyright (C) 2014-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -57,12 +57,7 @@
     // Prepare Bitmap
     bmpDC.SelectObject( aLayerbmp );
     brush.SetColour( MakeColour( GetLayerColor( aLayer ) ) );
-
-#if wxCHECK_VERSION( 3, 0, 0 )
     brush.SetStyle( wxBRUSHSTYLE_SOLID );
-#else
-    brush.SetStyle( wxSOLID );
-#endif
 
     bmpDC.SetBrush( brush );
     bmpDC.DrawRectangle( 0, 0, aLayerbmp.GetWidth(), aLayerbmp.GetHeight() );

=== modified file 'common/common.cpp'
--- common/common.cpp	2015-03-03 10:50:50 +0000
+++ common/common.cpp	2015-04-26 02:22:13 +0000
@@ -297,13 +297,7 @@
 
 wxString FormatDateLong( const wxDateTime &aDate )
 {
-    // GetInfo was introduced only on wx 2.9; for portability reason an
-    // hardcoded format is used on wx 2.8
-#if wxCHECK_VERSION( 2, 9, 0 )
     return aDate.Format( wxLocale::GetInfo( wxLOCALE_LONG_DATE_FMT ) );
-#else
-    return aDate.Format( wxT("%d %b %Y") );
-#endif
 }
 
 
@@ -386,10 +380,6 @@
 
     cfgpath.AppendDir( wxT( "kicad" ) );
 
-#if !wxCHECK_VERSION( 2, 9, 0 )
-    #define wxS_DIR_DEFAULT  0777
-#endif
-
     if( !cfgpath.DirExists() )
     {
         cfgpath.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL );

=== modified file 'include/dialog_shim.h'
--- include/dialog_shim.h	2014-08-17 23:00:49 +0000
+++ include/dialog_shim.h	2015-05-02 05:56:03 +0000
@@ -5,7 +5,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
- * Copyright (C) 2012 KiCad Developers, see CHANGELOG.TXT for contributors.
+ * Copyright (C) 2012-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -29,25 +29,14 @@
 #include <hashtables.h>
 #include <kiway_player.h>
 
-#if wxMINOR_VERSION == 8 && defined(__WXGTK__)
- #define DLGSHIM_USE_SETFOCUS      1
-#else
- #define DLGSHIM_USE_SETFOCUS      0
-#endif
-
 class WDO_ENABLE_DISABLE;
 class EVENT_LOOP;
 
 // These macros are for DIALOG_SHIM only, NOT for KIWAY_PLAYER.  KIWAY_PLAYER
 // has its own support for quasi modal and its platform specific issues are different
 // than for a wxDialog.
-#if wxCHECK_VERSION( 3, 0, 0 )
- #define SHOWQUASIMODAL     ShowQuasiModal
- #define ENDQUASIMODAL      EndQuasiModal
-#else
- #define SHOWQUASIMODAL     ShowModal
- #define ENDQUASIMODAL      EndModal
-#endif
+#define SHOWQUASIMODAL     ShowQuasiModal
+#define ENDQUASIMODAL      EndQuasiModal
 
 
 /**
@@ -84,22 +73,12 @@
 
 protected:
 
-#if !wxCHECK_VERSION( 2, 9, 4 )
-    wxWindow* CheckIfCanBeUsedAsParent( wxWindow* parent ) const;
-    wxWindow* GetParentForModalDialog( wxWindow *parent, long style ) const;
-#endif
-
     std::string m_hash_key;     // alternate for class_map when classname re-used.
 
     // variables for quasi-modal behavior support, only used by a few derivatives.
     EVENT_LOOP*         m_qmodal_loop;      // points to nested event_loop, NULL means not qmodal and dismissed
     bool                m_qmodal_showing;
     WDO_ENABLE_DISABLE* m_qmodal_parent_disabler;
-
-#if DLGSHIM_USE_SETFOCUS
-private:
-    void    onInit( wxInitDialogEvent& aEvent );
-#endif
 };
 
 #endif  // DIALOG_SHIM_

=== modified file 'common/dialog_shim.cpp'
--- common/dialog_shim.cpp	2015-03-03 10:50:50 +0000
+++ common/dialog_shim.cpp	2015-05-02 05:56:15 +0000
@@ -3,7 +3,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
- * Copyright (C) 2012 KiCad Developers, see CHANGELOG.TXT for contributors.
+ * Copyright (C) 2012-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -68,10 +68,6 @@
 
     if( h )
         SetKiway( this, &h->Kiway() );
-
-#if DLGSHIM_USE_SETFOCUS
-    Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SHIM::onInit ) );
-#endif
 }
 
 
@@ -144,58 +140,6 @@
 }
 
 
-#if DLGSHIM_USE_SETFOCUS
-
-static bool findWindowRecursively( const wxWindowList& children, const wxWindow* wanted )
-{
-    for( wxWindowList::const_iterator it = children.begin();  it != children.end();  ++it )
-    {
-        const wxWindow* child = *it;
-
-        if( wanted == child )
-            return true;
-        else
-        {
-            if( findWindowRecursively( child->GetChildren(), wanted ) )
-                return true;
-        }
-    }
-
-    return false;
-}
-
-
-static bool findWindowRecursively( const wxWindow* topmost, const wxWindow* wanted )
-{
-    // wanted may be NULL and that is ok.
-
-    if( wanted == topmost )
-        return true;
-
-    return findWindowRecursively( topmost->GetChildren(), wanted );
-}
-
-
-/// Set the focus if it is not already set in a derived constructor to a specific control.
-void DIALOG_SHIM::onInit( wxInitDialogEvent& aEvent )
-{
-    wxWindow* focusWnd = wxWindow::FindFocus();
-
-    // If focusWnd is not already this window or a child of it, then SetFocus().
-    // Otherwise the derived class's constructor SetFocus() already to a specific
-    // child control.
-
-    if( !findWindowRecursively( this, focusWnd ) )
-    {
-        // Linux wxGTK needs this to allow the ESCAPE key to close a wxDialog window.
-        SetFocus();
-    }
-
-    aEvent.Skip();     // derived class's handler should be called too
-}
-#endif
-
-
 /*
     Quasi-Modal Mode Explained:
 
@@ -220,73 +164,6 @@
 */
 
 
-#if !wxCHECK_VERSION( 2, 9, 4 )
-wxWindow* DIALOG_SHIM::CheckIfCanBeUsedAsParent( wxWindow* parent ) const
-{
-    if ( !parent )
-        return NULL;
-
-    extern WXDLLIMPEXP_DATA_BASE(wxList) wxPendingDelete;
-
-    if ( wxPendingDelete.Member(parent) || parent->IsBeingDeleted() )
-    {
-        // this window is being deleted and we shouldn't create any children
-        // under it
-        return NULL;
-    }
-
-    if ( parent->GetExtraStyle() & wxWS_EX_TRANSIENT )
-    {
-        // this window is not being deleted yet but it's going to disappear
-        // soon so still don't parent this window under it
-        return NULL;
-    }
-
-    if ( !parent->IsShownOnScreen() )
-    {
-        // using hidden parent won't work correctly neither
-        return NULL;
-    }
-
-    // FIXME-VC6: this compiler requires an explicit const cast or it fails
-    //            with error C2446
-    if ( const_cast<const wxWindow *>(parent) == this )
-    {
-        // not sure if this can really happen but it doesn't hurt to guard
-        // against this clearly invalid situation
-        return NULL;
-    }
-
-    return parent;
-}
-
-
-wxWindow* DIALOG_SHIM::GetParentForModalDialog(wxWindow *parent, long style) const
-{
-    // creating a parent-less modal dialog will result (under e.g. wxGTK2)
-    // in an unfocused dialog, so try to find a valid parent for it unless we
-    // were explicitly asked not to
-    if ( style & wxDIALOG_NO_PARENT )
-        return NULL;
-
-    // first try the given parent
-    if ( parent )
-        parent = CheckIfCanBeUsedAsParent(wxGetTopLevelParent(parent));
-
-    // then the currently active window
-    if ( !parent )
-        parent = CheckIfCanBeUsedAsParent(
-                    wxGetTopLevelParent(wxGetActiveWindow()));
-
-    // and finally the application main window
-    if ( !parent )
-        parent = CheckIfCanBeUsedAsParent(wxTheApp->GetTopWindow());
-
-    return parent;
-}
-#endif
-
-
 /*
 /// wxEventLoopActivator but with a friend so it
 /// has access to m_evtLoopOld, and it does not SetActive() as that is
@@ -569,14 +446,11 @@
 
     if( m_qmodal_loop )
     {
-#if wxCHECK_VERSION( 2, 9, 4 )  // 2.9.4 is only approximate, might be 3, 0, 0.
         if( m_qmodal_loop->IsRunning() )
             m_qmodal_loop->Exit( 0 );
         else
             m_qmodal_loop->ScheduleExit( 0 );
-#else
-        m_qmodal_loop->Exit( 0 );
-#endif
+
         m_qmodal_loop = NULL;
     }
 

=== modified file 'common/displlst.cpp'
--- common/displlst.cpp	2014-11-19 14:22:47 +0000
+++ common/displlst.cpp	2015-04-26 02:42:18 +0000
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr
  * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
- * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -87,52 +87,8 @@
     }
 
     for( unsigned col = 0; col < aItemHeaders.Count();  ++col )
-    {
         m_listBox->SetColumnWidth( col, wxLIST_AUTOSIZE );
 
-#if !wxCHECK_VERSION( 2, 9, 0 )
-        // include the column header in the width decision, wx 2.8 forgets this:
-        wxListItem  col_info;
-
-        m_listBox->GetColumn( col, col_info );
-
-        wxString    header  = col_info.GetText();
-        int         headerz = GetTextSize( header, m_listBox ).x;
-
-        // A reasonable column header has about 14 pixels of whitespace
-        // in addition to the width of the text itself.
-        headerz += 14;
-
-        if( headerz > col_info.GetWidth() )
-        {
-            col_info.SetWidth( headerz );
-
-            m_listBox->SetColumn( col, col_info );
-        }
-#endif
-    }
-
-
-#if !wxCHECK_VERSION( 2, 9, 0 )
-    // wx 2.8.x has bug in wxListCtrl WRT honoring the omission of wxHSCROLL, at least
-    // on gtk2.  Fix by setting minimum width so horizontal wxListCtrl scrolling is
-    // not needed on 2.8.x because of minumum visible width setting:
-    {
-        int width = 0;
-
-        for( unsigned col = 0;  col < aItemHeaders.Count();  ++col )
-        {
-            width += m_listBox->GetColumnWidth( col ) + 2;
-        }
-
-        wxSize sz = m_listBox->GetSize();
-
-        sz.SetWidth( width );
-
-        m_listBox->SetMinSize( sz );
-    }
-#endif
-
     if( !!aSelection )
     {
         for( unsigned row = 0; row < m_itemsListCp->size(); ++row )

=== modified file 'common/draw_panel.cpp'
--- common/draw_panel.cpp	2015-04-03 20:38:24 +0000
+++ common/draw_panel.cpp	2015-05-02 05:54:07 +0000
@@ -413,14 +413,12 @@
 
     int dir = event.GetOrientation();   // wxHORIZONTAL or wxVERTICAL
 
-    // On windows and on wxWidgets >= 2.9.5 and < 3.1,
-    // there is a bug in mousewheel event which always generates 2 scroll events
-    // (should be the case only for the default mousewheel event)
-    // with id = wxEVT_SCROLLWIN_LINEUP or wxEVT_SCROLLWIN_LINEDOWN
-    // so we skip these events.
-    // Note they are here just in case, because they are not actually used
-    // in Kicad
-#if wxCHECK_VERSION( 3, 1, 0 ) || !wxCHECK_VERSION( 2, 9, 5 ) || !defined (__WINDOWS__)
+    // On Windows with wxWidgets < 3.1, there is a bug in the mousewheel events
+    // which always generates 2 scroll events (should be the case only for the
+    // default mousewheel event) with id = wxEVT_SCROLLWIN_LINEUP or
+    // wxEVT_SCROLLWIN_LINEDOWN so we skip these events.
+    // Note they are here just in case as they are not actually used in Kicad.
+#if wxCHECK_VERSION( 3, 1, 0 ) || !defined (__WINDOWS__)
     int maxX = unitsX - csizeX;
     int maxY = unitsY - csizeY;
 
@@ -930,11 +928,7 @@
     bool offCenterReq = event.ControlDown() && event.ShiftDown();
     offCenterReq = offCenterReq || m_enableZoomNoCenter;
 
-#if wxMAJOR_VERSION >= 2 && wxMINOR_VERSION >= 9
     int axis = event.GetWheelAxis();
-#else
-    const int axis = 0;
-#endif
 
     // This is a zoom in or out command
     if( event.GetWheelRotation() > 0 )

=== modified file 'common/draw_panel_gal.cpp'
--- common/draw_panel_gal.cpp	2015-04-30 08:46:03 +0000
+++ common/draw_panel_gal.cpp	2015-05-02 05:22:33 +0000
@@ -186,29 +186,17 @@
 {
     m_eventDispatcher = aEventDispatcher;
 
-#if wxCHECK_VERSION( 3, 0, 0 )
-    const wxEventType eventTypes[] = { wxEVT_TOOL };
-#else
-    const wxEventType eventTypes[] = { wxEVT_COMMAND_MENU_SELECTED, wxEVT_COMMAND_TOOL_CLICKED };
-#endif
-
     if( m_eventDispatcher )
     {
-        BOOST_FOREACH( wxEventType type, eventTypes )
-        {
-            m_parent->Connect( type, wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ),
-                               NULL, m_eventDispatcher );
-        }
+        m_parent->Connect( wxEVT_TOOL, wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ),
+                           NULL, m_eventDispatcher );
     }
     else
     {
-        BOOST_FOREACH( wxEventType type, eventTypes )
-        {
-            // While loop is used to be sure that all event handlers are removed.
-            while( m_parent->Disconnect( type,
-                                         wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ),
-                                         NULL, m_eventDispatcher ) );
-        }
+        // While loop is used to be sure that all event handlers are removed.
+        while( m_parent->Disconnect( wxEVT_TOOL,
+                                     wxCommandEventHandler( TOOL_DISPATCHER::DispatchWxCommand ),
+                                     NULL, m_eventDispatcher ) );
     }
 }
 

=== modified file 'common/gr_basic.cpp'
--- common/gr_basic.cpp	2015-03-25 17:27:17 +0000
+++ common/gr_basic.cpp	2015-04-26 03:13:27 +0000
@@ -255,15 +255,9 @@
         brush.SetColour( MakeColour( Color ) );
 
         if( fill )
-#if wxCHECK_VERSION( 3, 0, 0 )
             brush.SetStyle( wxBRUSHSTYLE_SOLID );
         else
             brush.SetStyle( wxBRUSHSTYLE_TRANSPARENT );
-#else
-            brush.SetStyle( wxSOLID );
-        else
-            brush.SetStyle( wxTRANSPARENT );
-#endif
 
         DC->SetBrush( brush );
 
@@ -300,41 +294,32 @@
 void GRSetDrawMode( wxDC* DC, GR_DRAWMODE draw_mode )
 {
     if( draw_mode & GR_OR )
-#if defined(__WXMAC__) && (wxMAC_USE_CORE_GRAPHICS || wxCHECK_VERSION( 2, 9, 0 ) )
-
-        DC->SetLogicalFunction( wxCOPY );
-#elif defined( USE_WX_GRAPHICS_CONTEXT )
-
+#if defined(__WXMAC__) || defined( USE_WX_GRAPHICS_CONTEXT )
         DC->SetLogicalFunction( wxCOPY );
 #else
-
         DC->SetLogicalFunction( wxOR );
 #endif
+
     else if( draw_mode & GR_XOR )
 #if defined( USE_WX_GRAPHICS_CONTEXT )
-
         DC->SetLogicalFunction( wxCOPY );
 #else
-
         DC->SetLogicalFunction( wxXOR );
 #endif
+
     else if( draw_mode & GR_NXOR )
-#if defined(__WXMAC__) && (wxMAC_USE_CORE_GRAPHICS || wxCHECK_VERSION( 2, 9, 0 ) )
-
+#if defined(__WXMAC__)
         DC->SetLogicalFunction( wxXOR );
 #elif defined( USE_WX_GRAPHICS_CONTEXT )
-
         DC->SetLogicalFunction( wxCOPY );
 #else
-
         DC->SetLogicalFunction( wxEQUIV );
 #endif
+
     else if( draw_mode & GR_INVERT )
 #if defined( USE_WX_GRAPHICS_CONTEXT )
-
         DC->SetLogicalFunction( wxCOPY );
 #else
-
         DC->SetLogicalFunction( wxINVERT );
 #endif
     else if( draw_mode & GR_COPY )

=== modified file 'common/msgpanel.cpp'
--- common/msgpanel.cpp	2014-05-15 06:32:24 +0000
+++ common/msgpanel.cpp	2015-05-02 06:52:19 +0000
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@xxxxxxxxxxxxxxxxxx
  * Copyright (C) 2011 Wayne Stambaugh <stambaughw@xxxxxxxxxxx>
- * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -235,12 +235,7 @@
     pen.SetColour( color );
 
     brush.SetColour( color );
-
-#if wxCHECK_VERSION( 3, 0, 0 )
     brush.SetStyle( wxBRUSHSTYLE_SOLID );
-#else
-    brush.SetStyle( wxSOLID );
-#endif
 
     aDC->SetPen( pen );
     aDC->SetBrush( brush );

=== modified file 'common/pgm_base.cpp'
--- common/pgm_base.cpp	2015-04-08 17:27:04 +0000
+++ common/pgm_base.cpp	2015-04-26 02:16:11 +0000
@@ -586,11 +586,7 @@
     delete m_locale;
     m_locale = new wxLocale;
 
-#if wxCHECK_VERSION( 2, 9, 0 )
     if( !m_locale->Init( m_language_id ) )
-#else
-    if( !m_locale->Init( m_language_id, wxLOCALE_CONV_ENCODING ) )
-#endif
     {
         wxLogDebug( wxT( "This language is not supported by the system." ) );
 

=== modified file 'common/prependpath.cpp'
--- common/prependpath.cpp	2014-10-19 20:20:16 +0000
+++ common/prependpath.cpp	2015-05-02 06:52:43 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2014 CERN
- * Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
+ * Copyright (C) 2014-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
  * @author Maciej Suminski <maciej.suminski@xxxxxxx>
  *
  * This program is free software; you can redistribute it and/or
@@ -29,59 +29,6 @@
 
 
 
-#if !wxCHECK_VERSION( 2, 9, 0 )
-
-// implement missing wx2.8 function until >= wx3.0 pervades.
-static wxString wxJoin(const wxArrayString& arr, const wxChar sep,
-                const wxChar escape = '\\')
-{
-    size_t count = arr.size();
-    if ( count == 0 )
-        return wxEmptyString;
-
-    wxString str;
-
-    // pre-allocate memory using the estimation of the average length of the
-    // strings in the given array: this is very imprecise, of course, but
-    // better than nothing
-    str.reserve(count*(arr[0].length() + arr[count-1].length()) / 2);
-
-    if ( escape == wxT('\0') )
-    {
-        // escaping is disabled:
-        for ( size_t i = 0; i < count; i++ )
-        {
-            if ( i )
-                str += sep;
-            str += arr[i];
-        }
-    }
-    else // use escape character
-    {
-        for ( size_t n = 0; n < count; n++ )
-        {
-            if ( n )
-                str += sep;
-
-            for ( wxString::const_iterator i = arr[n].begin(),
-                                         end = arr[n].end();
-                  i != end;
-                  ++i )
-            {
-                const wxChar ch = *i;
-                if ( ch == sep )
-                    str += escape;      // escape this separator
-                str += ch;
-            }
-        }
-    }
-
-    str.Shrink(); // release extra memory if we allocated too much
-    return str;
-}
-#endif
-
-
 /// Put aPriorityPath in front of all paths in the value of aEnvVar.
 const wxString PrePendPath( const wxString& aEnvVar, const wxString& aPriorityPath )
 {

=== modified file 'common/selcolor.cpp'
--- common/selcolor.cpp	2014-10-19 20:20:16 +0000
+++ common/selcolor.cpp	2015-04-26 02:42:26 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
+ * Copyright (C) 2014-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -193,12 +193,7 @@
 
         iconDC.SetPen( *wxBLACK_PEN );
         ColorSetBrush( &brush, buttcolor );
-
-#if wxCHECK_VERSION( 3, 0, 0 )
         brush.SetStyle( wxBRUSHSTYLE_SOLID );
-#else
-        brush.SetStyle( wxSOLID );
-#endif
 
         iconDC.SetBrush( brush );
 

=== modified file 'common/tool/tool_dispatcher.cpp'
--- common/tool/tool_dispatcher.cpp	2015-04-03 20:38:24 +0000
+++ common/tool/tool_dispatcher.cpp	2015-04-26 02:43:39 +0000
@@ -3,6 +3,7 @@
  *
  * Copyright (C) 2013 CERN
  * @author Tomasz Wlostowski <tomasz.wlostowski@xxxxxxx>
+ * Copyright (C) 2013-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -297,12 +298,6 @@
 
         if( mods & MD_CTRL )
         {
-#if !wxCHECK_VERSION( 2, 9, 0 )
-            // I really look forward to the day when we will use only one version of wxWidgets..
-            const int WXK_CONTROL_A = 1;
-            const int WXK_CONTROL_Z = 26;
-#endif
-
             // wxWidgets have a quirk related to Ctrl+letter hot keys handled by CHAR_EVT
             // http://docs.wxwidgets.org/trunk/classwx_key_event.html:
             // "char events for ASCII letters in this case carry codes corresponding to the ASCII

=== modified file 'common/view/wx_view_controls.cpp'
--- common/view/wx_view_controls.cpp	2015-04-03 20:38:24 +0000
+++ common/view/wx_view_controls.cpp	2015-05-02 06:53:25 +0000
@@ -4,6 +4,7 @@
  * Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
  * Copyright (C) 2013 CERN
  * @author Tomasz Wlostowski <tomasz.wlostowski@xxxxxxx>
+ * Copyright (C) 2012-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -256,10 +257,8 @@
     {
     case AUTO_PANNING:
     {
-#if wxCHECK_VERSION( 3, 0, 0 )
         if( !m_parentPanel->HasFocus() )
             break;
-#endif
 
         double borderSize = std::min( m_autoPanMargin * m_view->GetScreenPixelSize().x,
                                       m_autoPanMargin * m_view->GetScreenPixelSize().y );
@@ -276,16 +275,9 @@
         wxMouseEvent moveEvent( EVT_REFRESH_MOUSE );
 
         // Set the modifiers state
-#if wxCHECK_VERSION( 3, 0, 0 )
         moveEvent.SetControlDown( wxGetKeyState( WXK_CONTROL ) );
         moveEvent.SetShiftDown( wxGetKeyState( WXK_SHIFT ) );
         moveEvent.SetAltDown( wxGetKeyState( WXK_ALT ) );
-#else
-        // wx <3.0 do not have accessors, but the fields are exposed
-        moveEvent.m_controlDown = wxGetKeyState( WXK_CONTROL );
-        moveEvent.m_shiftDown = wxGetKeyState( WXK_SHIFT );
-        moveEvent.m_altDown = wxGetKeyState( WXK_ALT );
-#endif
 
         wxPostEvent( m_parentPanel, moveEvent );
     }

=== modified file 'common/wx_unit_binder.cpp'
--- common/wx_unit_binder.cpp	2015-03-11 16:04:20 +0000
+++ common/wx_unit_binder.cpp	2015-04-26 02:17:09 +0000
@@ -27,15 +27,13 @@
 #include <wx/textctrl.h>
 #include <limits>
 #include <base_units.h>
-#if wxCHECK_VERSION( 2, 9, 0 )
 #include <wx/valnum.h>
-#endif
 
 #include <boost/optional.hpp>
 
 #include "wx_unit_binder.h"
 
-WX_UNIT_BINDER::WX_UNIT_BINDER( wxWindow* aParent, wxTextCtrl* aTextInput, 
+WX_UNIT_BINDER::WX_UNIT_BINDER( wxWindow* aParent, wxTextCtrl* aTextInput,
                                 wxStaticText* aUnitLabel, wxSpinButton* aSpinButton ) :
     m_textCtrl( aTextInput ),
     m_unitLabel( aUnitLabel ),
@@ -60,7 +58,7 @@
     wxString s = StringFromValue( m_units, aValue, false );
 
     m_textCtrl->SetValue( s );
-    
+
     m_unitLabel->SetLabel( GetAbbreviatedUnitsLabel( m_units ) );
 }
 

=== modified file 'common/wxunittext.cpp'
--- common/wxunittext.cpp	2014-05-13 09:22:51 +0000
+++ common/wxunittext.cpp	2015-04-26 02:15:16 +0000
@@ -28,9 +28,7 @@
 #include <wx/textctrl.h>
 #include <limits>
 #include <base_units.h>
-#if wxCHECK_VERSION( 2, 9, 0 )
 #include <wx/valnum.h>
-#endif
 #include <boost/optional.hpp>
 
 WX_UNIT_TEXT::WX_UNIT_TEXT( wxWindow* aParent, const wxString& aLabel, double aValue, double aStep ) :
@@ -58,7 +56,6 @@
     SetValue( aValue );
     sizer->Add( m_inputValue, 0, wxALIGN_CENTER_VERTICAL | wxALL );
 
-#if wxCHECK_VERSION( 2, 9, 0 )  // Sorry guys, I am tired of dealing with 2.8 compatibility
     wxFloatingPointValidator<double> validator( 4, NULL, wxNUM_VAL_NO_TRAILING_ZEROES );
     validator.SetRange( 0.0, std::numeric_limits<double>::max() );
     m_inputValue->SetValidator( validator );
@@ -72,7 +69,6 @@
 
     Connect( wxEVT_SPIN_UP, wxSpinEventHandler( WX_UNIT_TEXT::onSpinUpEvent ), NULL, this );
     Connect( wxEVT_SPIN_DOWN, wxSpinEventHandler( WX_UNIT_TEXT::onSpinDownEvent ), NULL, this );
-#endif
 
     sizer->AddSpacer( 5 );
 

=== modified file 'eeschema/dialogs/dialog_choose_component.cpp'
--- eeschema/dialogs/dialog_choose_component.cpp	2015-03-30 19:34:41 +0000
+++ eeschema/dialogs/dialog_choose_component.cpp	2015-04-26 02:44:08 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2014 Henner Zeller <h.zeller@xxxxxxx>
- * Copyright (C) 2014 KiCad Developers, see change_log.txt for contributors.
+ * Copyright (C) 2014-2015 KiCad Developers, see change_log.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -47,9 +47,7 @@
     m_searchBox->SetFocus();
     m_componentDetails->SetEditable( false );
 
-#if wxCHECK_VERSION( 3, 0, 0 )
     m_libraryComponentTree->ScrollTo( m_libraryComponentTree->GetFocusedItem() );
-#endif
 
     // The tree showing libs and component uses a fixed font,
     // because we want controle the position of some info when drawing the

=== modified file 'eeschema/dialogs/dialog_color_config.cpp'
--- eeschema/dialogs/dialog_color_config.cpp	2015-03-04 19:45:18 +0000
+++ eeschema/dialogs/dialog_color_config.cpp	2015-04-26 02:44:44 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
+ * Copyright (C) 2014-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -192,12 +192,7 @@
 
             wxBrush brush;
             ColorSetBrush( &brush, color );
-
-#if wxCHECK_VERSION( 3, 0, 0 )
             brush.SetStyle( wxBRUSHSTYLE_SOLID );
-#else
-            brush.SetStyle( wxSOLID );
-#endif
 
             iconDC.SetBrush( brush );
             iconDC.DrawRectangle( 0, 0, BUTT_SIZE_X, BUTT_SIZE_Y );
@@ -298,12 +293,7 @@
     wxBrush  brush;
 
     ColorSetBrush( &brush, color);
-
-#if wxCHECK_VERSION( 3, 0, 0 )
     brush.SetStyle( wxBRUSHSTYLE_SOLID );
-#else
-    brush.SetStyle( wxSOLID );
-#endif
 
     iconDC.SetBrush( brush );
     iconDC.DrawRectangle( 0, 0, BUTT_SIZE_X, BUTT_SIZE_Y );

=== modified file 'gerbview/dialogs/dialog_print_using_printer.cpp'
--- gerbview/dialogs/dialog_print_using_printer.cpp	2015-03-26 17:23:17 +0000
+++ gerbview/dialogs/dialog_print_using_printer.cpp	2015-04-26 02:47:09 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2010-2014 Jean-Pierre Charras  jp.charras at wanadoo.fr
- * Copyright (C) 1992-2014 KiCad Developers, see change_log.txt for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see change_log.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -390,11 +390,6 @@
     wxString title = _( "Print" );
     BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_Parent, title );
 
-#if !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0)
-    wxDC*             dc = printout.GetDC();
-    ( (wxPostScriptDC*) dc )->SetResolution( 600 );  // Postscript DC resolution is 600 ppi
-#endif
-
     if( !printer.Print( this, &printout, true ) )
     {
         if( wxPrinter::GetLastError() == wxPRINTER_ERROR )

=== modified file 'gerbview/draw_gerber_screen.cpp'
--- gerbview/draw_gerber_screen.cpp	2015-03-26 17:23:17 +0000
+++ gerbview/draw_gerber_screen.cpp	2015-04-26 02:46:13 +0000
@@ -166,12 +166,7 @@
     // artifacts can happen with negative items or negative images
 
     wxColour bgColor = MakeColour( gerbFrame->GetDrawBgColor() );
-
-#if wxCHECK_VERSION( 3, 0, 0 )
     wxBrush  bgBrush( bgColor, wxBRUSHSTYLE_SOLID );
-#else
-    wxBrush  bgBrush( bgColor, wxSOLID );
-#endif
 
     int      bitmapWidth, bitmapHeight;
     wxDC*    plotDC = aDC;

=== modified file 'gerbview/gerbview_frame.cpp'
--- gerbview/gerbview_frame.cpp	2015-04-19 18:41:57 +0000
+++ gerbview/gerbview_frame.cpp	2015-04-26 02:45:54 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -452,13 +452,8 @@
         }
     }
 
-#if wxCHECK_VERSION( 2, 9, 4 )
     wxSingleChoiceDialog    dlg( this, wxEmptyString, _( "D Codes" ), list, (void**) NULL,
                                  wxCHOICEDLG_STYLE & ~wxCANCEL );
-#else
-    wxSingleChoiceDialog    dlg( this, wxEmptyString, _( "D Codes" ), list, (char**) NULL,
-                                 wxCHOICEDLG_STYLE & ~wxCANCEL );
-#endif
 
     dlg.ShowModal();
 }

=== modified file 'include/class_page_info.h'
--- include/class_page_info.h	2014-12-23 13:01:59 +0000
+++ include/class_page_info.h	2015-04-26 02:54:15 +0000
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2007-2013 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
  * Copyright (C) 2008-2013 Wayne Stambaugh <stambaughw@xxxxxxxxxxx>
- * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -117,13 +117,9 @@
 
     /**
      * Function GetWxOrientation.
-     * @return ws' style printing orientation (wxPORTRAIT or wxLANDSCAPE).
+     * @return wx style printing orientation (wxPORTRAIT or wxLANDSCAPE).
      */
-#if wxCHECK_VERSION( 2, 9, 0  )
     wxPrintOrientation  GetWxOrientation() const { return IsPortrait() ? wxPORTRAIT : wxLANDSCAPE; }
-#else
-    int  GetWxOrientation() const { return IsPortrait() ? wxPORTRAIT : wxLANDSCAPE; }
-#endif
 
     /**
      * Function GetPaperId

=== modified file 'include/colors.h'
--- include/colors.h	2014-11-02 16:25:04 +0000
+++ include/colors.h	2015-04-26 02:49:24 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2007-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 1992-2014 KiCad Developers, see CHANGELOG.TXT for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -193,25 +193,20 @@
  * returns a wxWidgets wxColor from a KiCad color index with alpha value.
  * Note that alpha support is not available on every wxWidgets platform.  On
  * such platform the behavior is the same as for wxALPHA_OPAQUE and that
- * means the alpha value has no effect and will be ignored.  wxGtk 2.8.4 is
- * not supporting alpha.
+ * means the alpha value has no effect and will be ignored.
  * @return wxColour - given a KiCad color index with alpha value
  */
 inline wxColour MakeColour( EDA_COLOR_T aColor )
 {
-#if wxCHECK_VERSION(2,8,5)
     int alpha = GetAlpha( aColor );
     alpha = alpha ? alpha : wxALPHA_OPAQUE;
-#endif
     EDA_COLOR_T ndx = ColorGetBase( aColor );
     wxASSERT( ndx > UNSPECIFIED_COLOR && ndx < NBCOLORS );
 
     return wxColour( g_ColorRefs[ndx].m_Red,
                      g_ColorRefs[ndx].m_Green,
-                     g_ColorRefs[ndx].m_Blue
-#if wxCHECK_VERSION(2,8,5)
-                     ,(unsigned char) alpha
-#endif
+                     g_ColorRefs[ndx].m_Blue,
+                     (unsigned char) alpha
         );
 }
 

=== modified file 'include/fctsys.h'
--- include/fctsys.h	2014-10-22 15:51:34 +0000
+++ include/fctsys.h	2015-04-26 02:53:12 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2007-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 1992-2014 KiCad Developers, see CHANGELOG.TXT for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -47,12 +47,6 @@
 #define DBG(x)        // nothing
 #endif
 
-
-// wxNullPtr is not defined prior to wxWidgets 2.9.0.
-#if !wxCHECK_VERSION( 2, 9, 0 )
-#define wxNullPtr ((void *)NULL)
-#endif
-
 #include <config.h>
 
 #endif // FCTSYS_H__

=== modified file 'include/gal/cairo/cairo_gal.h'
--- include/gal/cairo/cairo_gal.h	2014-07-09 13:10:32 +0000
+++ include/gal/cairo/cairo_gal.h	2015-04-26 02:55:39 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KICAD, a free EDA CAD application.
  *
  * Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
- * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors.
+ * Copyright (C) 2012-2015 Kicad Developers, see change_log.txt for contributors.
  *
  * CairoGal - Graphics Abstraction Layer for Cairo
  *
@@ -39,11 +39,7 @@
 #if defined(__WXMSW__)
 #define SCREEN_DEPTH 24
 #else
-#if wxCHECK_VERSION( 2, 9, 0 )
 #define SCREEN_DEPTH    wxBITMAP_SCREEN_DEPTH
-#else
-#define SCREEN_DEPTH    32
-#endif
 #endif
 
 /**

=== modified file 'include/gr_basic.h'
--- include/gr_basic.h	2015-03-25 09:55:00 +0000
+++ include/gr_basic.h	2015-04-26 02:52:08 +0000
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@xxxxxxxxxxxxxxxxxx
  * Copyright (C) 2011 Wayne Stambaugh <stambaughw@xxxxxxxxxxx>
- * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -78,15 +78,6 @@
 #define GR_M_MIDDLE_DOWN 0x40000000
 #define GR_M_DCLICK      0x80000000
 
-//wxWidgets 2.8 compatibility
-#if !wxCHECK_VERSION(2,9,0)
-#define wxPENSTYLE_SOLID wxSOLID
-#define wxPENSTYLE_SHORT_DASH wxSHORT_DASH
-#define wxPENSTYLE_DOT_DASH wxDOT_DASH
-typedef int wxPenStyle;
-#endif
-
-
 extern GR_DRAWMODE g_XorMode;
 
 typedef enum {

=== modified file 'include/kiway_player.h'
--- include/kiway_player.h	2014-08-13 20:28:54 +0000
+++ include/kiway_player.h	2015-04-26 03:27:42 +0000
@@ -5,7 +5,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
- * Copyright (C) 2014 KiCad Developers, see change_log.txt for contributors.
+ * Copyright (C) 2014-2015 KiCad Developers, see change_log.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -88,11 +88,7 @@
 
 class KIWAY_EXPRESS;
 
-#if wxCHECK_VERSION( 2, 9, 4 )
- #define WX_EVENT_LOOP      wxGUIEventLoop
-#else
- #define WX_EVENT_LOOP      wxEventLoop
-#endif
+#define WX_EVENT_LOOP      wxGUIEventLoop
 
 class WX_EVENT_LOOP;
 

=== modified file 'include/macros.h'
--- include/macros.h	2014-10-22 15:51:34 +0000
+++ include/macros.h	2015-04-26 02:50:26 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2007-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 1992-2014 KiCad Developers, see CHANGELOG.TXT for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -77,11 +77,7 @@
  */
 static inline const wxChar* GetChars( const wxString& s )
 {
-#if wxCHECK_VERSION( 2, 9, 0 )
     return (const wxChar*) s.c_str();
-#else
-    return s.GetData();
-#endif
 }
 
 // This really needs a function? well, it is used *a lot* of times

=== modified file 'include/xnode.h'
--- include/xnode.h	2014-01-28 10:59:04 +0000
+++ include/xnode.h	2015-04-26 02:51:21 +0000
@@ -5,7 +5,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2010 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
- * Copyright (C) 1992-2010 KiCAd Developers, see change_log.txt for contributors.
+ * Copyright (C) 1992-2015 KiCAd Developers, see change_log.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -34,9 +34,6 @@
 
 #include <wx/xml/xml.h>
 
-#if !wxCHECK_VERSION( 2, 9, 0  )
-#define wxXmlAttribute wxXmlProperty
-#endif
 
 /**
  * Class XNODE
@@ -97,36 +94,6 @@
      * @throw IO_ERROR if a system error writing the output, such as a full disk.
      */
     virtual void FormatContents( OUTPUTFORMATTER* out, int nestLevel ) throw( IO_ERROR );
-
-#if !wxCHECK_VERSION( 2, 9, 0  )
-    // The following functions did not appear in the base class until recently.
-    // Overload them even if they are present in base class, just to make sure
-    // they are present in any older base class implementation.
-    //-----<overloads>---------------------------------------------------------
-
-    wxString GetAttribute( const wxString& attrName, const wxString& defaultVal ) const
-    {
-        return GetPropVal( attrName, defaultVal );
-    }
-    bool GetAttribute( const wxString& attrName, wxString *value ) const
-    {
-        return GetPropVal( attrName, value );
-    }
-    void AddAttribute( const wxString& attrName, const wxString& value )
-    {
-        AddProperty( attrName, value );
-    }
-    bool DeleteAttribute( const wxString& attrName )
-    {
-        return DeleteProperty( attrName );
-    }
-    wxXmlAttribute* GetAttributes() const
-    {
-        return GetProperties();
-    }
-
-    //-----</overloads>--------------------------------------------------------
-#endif
 };
 
 #endif  // XATTR_H_

=== modified file 'kicad/kicad.h'
--- kicad/kicad.h	2015-03-29 21:22:53 +0000
+++ kicad/kicad.h	2015-04-26 02:58:04 +0000
@@ -7,7 +7,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2013 CERN (www.cern.ch)
- * Copyright (C) 2013 KiCad Developers, see CHANGELOG.txt for contributors.
+ * Copyright (C) 2013-2015 KiCad Developers, see CHANGELOG.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -40,11 +40,8 @@
 #include <id.h>
 #include <wxstruct.h>
 
-// With a recent wxWidget, we can use the wxFileSystemWatcherEvent
-// to monitor files add/remove/rename in tree project
-#if wxCHECK_VERSION( 2, 9, 4  )
- #define KICAD_USE_FILES_WATCHER
-#endif
+// We can use the wxFileSystemWatcherEvent to monitor files add/remove/rename in tree project
+#define KICAD_USE_FILES_WATCHER
 
 #define KICAD_MANAGER_FRAME_NAME   wxT( "KicadFrame" )
 

=== modified file 'new/sweet_edit.cpp'
--- new/sweet_edit.cpp	2012-01-23 04:33:36 +0000
+++ new/sweet_edit.cpp	2015-04-26 02:59:15 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2011 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
- * Copyright (C) 2011 KiCad Developers, see change_log.txt for contributors.
+ * Copyright (C) 2011-2015 KiCad Developers, see change_log.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -171,12 +171,7 @@
         wxCMD_LINE_PARAM,
         NULL,
         NULL,
-
-#if wxCHECK_VERSION( 2, 9, 0 )
         "filename of libtable",
-#else
-         wxT( "filename of libtable" ),
-#endif
          wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE
     },
     { wxCMD_LINE_NONE }

=== modified file 'pcbnew/dialogs/dialog_copper_zones.cpp'
--- pcbnew/dialogs/dialog_copper_zones.cpp	2014-09-25 07:07:17 +0000
+++ pcbnew/dialogs/dialog_copper_zones.cpp	2015-04-26 03:00:47 +0000
@@ -7,7 +7,7 @@
  *
  * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@xxxxxxxxxxxxxxx
  * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
-  * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -702,12 +702,7 @@
 
     iconDC.SelectObject( bitmap );
     brush.SetColour( MakeColour( aColor ) );
-
-#if wxCHECK_VERSION( 3, 0, 0 )
     brush.SetStyle( wxBRUSHSTYLE_SOLID );
-#else
-    brush.SetStyle( wxSOLID );
-#endif
 
     iconDC.SetBrush( brush );
     iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );

=== modified file 'pcbnew/dialogs/dialog_design_rules.cpp'
--- pcbnew/dialogs/dialog_design_rules.cpp	2015-03-03 10:50:50 +0000
+++ pcbnew/dialogs/dialog_design_rules.cpp	2015-04-26 03:04:10 +0000
@@ -7,7 +7,7 @@
  *
  * Copyright (C) 2004-2009 Jean-Pierre Charras, jean-pierre.charras@xxxxxxxxxxxxxxxxx
  * Copyright (C) 2009 Dick Hollenbeck, dick@xxxxxxxxxxx
- * Copyright (C) 2009 KiCad Developers, see change_log.txt for contributors.
+ * Copyright (C) 2009-2015 KiCad Developers, see change_log.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -178,12 +178,10 @@
     GetSizer()->Fit( this );
     GetSizer()->SetSizeHints( this );
 
-    // Allow tabbing out of grid controls.  Only available on wxWidgets 2.9.5 or later.
-#if wxCHECK_VERSION( 2, 9, 5 )
+    // Allow tabbing out of grid controls.
     m_grid->SetTabBehaviour( wxGrid::Tab_Leave );
     m_gridViaSizeList->SetTabBehaviour( wxGrid::Tab_Leave );
     m_gridTrackWidthList->SetTabBehaviour( wxGrid::Tab_Leave );
-#endif
 
     Center();
 }

=== modified file 'pcbnew/dialogs/dialog_drc.cpp'
--- pcbnew/dialogs/dialog_drc.cpp	2014-04-02 13:38:59 +0000
+++ pcbnew/dialogs/dialog_drc.cpp	2015-04-26 03:02:24 +0000
@@ -7,7 +7,7 @@
  *
  * Copyright (C) 2011 Jean-Pierre Charras, jean-pierre.charras@xxxxxxxxxxxxxxx
  * Copyright (C) 2009 Dick Hollenbeck, dick@xxxxxxxxxxx
- * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
+ * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -145,12 +145,7 @@
     wxSafeYield();                          // Allows time slice to refresh the m_Messages window
     m_tester->m_pcb->m_Status_Pcb = 0;      // Force full connectivity and ratsnest recalculations
     m_tester->RunTests(m_Messages);
-
-#if wxCHECK_VERSION( 2, 8, 0 )
     m_Notebook->ChangeSelection( 0 );       // display the 1at tab "...Markers ..."
-#else
-    m_Notebook->SetSelection( 0 );          // display the 1at tab "... Markers..."
-#endif
 
 
     // Generate the report
@@ -221,12 +216,7 @@
 
     m_Messages->Clear();
     m_tester->ListUnconnectedPads();
-
-#if wxCHECK_VERSION( 2, 8, 0 )
     m_Notebook->ChangeSelection( 1 );       // display the 2nd tab "Unconnected..."
-#else
-    m_Notebook->SetSelection( 1 );          // display the 2nd tab "Unconnected..."
-#endif
 
     // Generate the report
     if( !reportName.IsEmpty() )

=== modified file 'pcbnew/dialogs/dialog_keepout_area_properties.cpp'
--- pcbnew/dialogs/dialog_keepout_area_properties.cpp	2014-08-02 10:29:10 +0000
+++ pcbnew/dialogs/dialog_keepout_area_properties.cpp	2015-04-26 03:01:23 +0000
@@ -7,7 +7,7 @@
  *
  * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
  * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
-  * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -264,12 +264,7 @@
 
     iconDC.SelectObject( bitmap );
     brush.SetColour( MakeColour( aColor ) );
-
-#if wxCHECK_VERSION( 3, 0, 0 )
     brush.SetStyle( wxBRUSHSTYLE_SOLID );
-#else
-    brush.SetStyle( wxSOLID );
-#endif
 
     iconDC.SetBrush( brush );
     iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );

=== modified file 'pcbnew/dialogs/dialog_non_copper_zones_properties.cpp'
--- pcbnew/dialogs/dialog_non_copper_zones_properties.cpp	2014-10-06 01:18:24 +0000
+++ pcbnew/dialogs/dialog_non_copper_zones_properties.cpp	2015-04-26 03:01:51 +0000
@@ -6,7 +6,7 @@
  *
  * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
  * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
- * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -259,12 +259,7 @@
 
     iconDC.SelectObject( bitmap );
     brush.SetColour( MakeColour( aColor ) );
-
-#if wxCHECK_VERSION( 3, 0, 0 )
     brush.SetStyle( wxBRUSHSTYLE_SOLID );
-#else
-    brush.SetStyle( wxSOLID );
-#endif
 
     iconDC.SetBrush( brush );
     iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );

=== modified file 'pcbnew/dialogs/dialog_pad_properties.cpp'
--- pcbnew/dialogs/dialog_pad_properties.cpp	2015-03-11 13:17:43 +0000
+++ pcbnew/dialogs/dialog_pad_properties.cpp	2015-04-26 03:03:43 +0000
@@ -9,7 +9,7 @@
  * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
  * Copyright (C) 2013 Dick Hollenbeck, dick@xxxxxxxxxxx
  * Copyright (C) 2008-2013 Wayne Stambaugh <stambaughw@xxxxxxxxxxx>
- * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -182,9 +182,6 @@
     {
         m_panelShowPadGal->UseColorScheme( m_board->GetColorsSettings() );
         m_panelShowPadGal->SwitchBackend( m_parent->GetGalCanvas()->GetBackend() );
-#if !wxCHECK_VERSION( 3, 0, 0 )
-        m_panelShowPadGal->SetSize( m_panelShowPad->GetSize() );
-#endif
         m_panelShowPadGal->Show();
         m_panelShowPad->Hide();
         m_panelShowPadGal->GetView()->Add( m_dummyPad );

=== modified file 'pcbnew/dialogs/dialog_print_for_modedit.cpp'
--- pcbnew/dialogs/dialog_print_for_modedit.cpp	2014-11-19 17:13:55 +0000
+++ pcbnew/dialogs/dialog_print_for_modedit.cpp	2015-04-26 03:05:49 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2010-2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
- * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -215,11 +215,6 @@
 
     BOARD_PRINTOUT_CONTROLLER      printout( s_Parameters, m_parent, _( "Print Footprint" ) );
 
-#if !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0)
-    wxDC*             dc = printout.GetDC();
-    ( (wxPostScriptDC*) dc )->SetResolution( 600 );  // Postscript DC resolution is 600 ppi
-#endif
-
     if( !printer.Print( this, &printout, true ) )
     {
         if( wxPrinter::GetLastError() == wxPRINTER_ERROR )

=== modified file 'pcbnew/dialogs/dialog_print_using_printer.cpp'
--- pcbnew/dialogs/dialog_print_using_printer.cpp	2015-03-11 13:59:43 +0000
+++ pcbnew/dialogs/dialog_print_using_printer.cpp	2015-04-26 03:06:44 +0000
@@ -2,7 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2010-2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
- * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -490,12 +490,6 @@
     wxString          title = _( "Print" );
     BOARD_PRINTOUT_CONTROLLER      printout( s_Parameters, m_parent, title );
 
-    // Alexander's patch had this removed altogether, waiting for testing.
-#if 0 && !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0)
-    wxDC*             dc = printout.GetDC();
-    ( (wxPostScriptDC*) dc )->SetResolution( 600 );  // Postscript DC resolution is 600 ppi
-#endif
-
     if( !printer.Print( this, &printout, true ) )
     {
         if( wxPrinter::GetLastError() == wxPRINTER_ERROR )

=== modified file 'pcbnew/dialogs/dialog_track_via_size.cpp'
--- pcbnew/dialogs/dialog_track_via_size.cpp	2015-03-13 16:48:42 +0000
+++ pcbnew/dialogs/dialog_track_via_size.cpp	2015-04-26 03:03:10 +0000
@@ -3,6 +3,7 @@
  *
  * Copyright (C) 2014  CERN
  * Author: Maciej Suminski <maciej.suminski@xxxxxxx>
+ * Copyright (C) 2014-2015 KiCad Developers, see change_log.txt for contributors.
  *
  * This program is free software: you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -49,11 +50,7 @@
     Centre();
 
     // Pressing ENTER when any of the text input fields is active applies changes
-    #if wxCHECK_VERSION( 3, 0, 0 )
-        Connect( wxEVT_TEXT_ENTER, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE::onOkClick ), NULL, this );
-    #else
-        Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE::onOkClick ), NULL, this );
-    #endif
+    Connect( wxEVT_TEXT_ENTER, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE::onOkClick ), NULL, this );
 }
 
 

=== modified file 'pcbnew/footprint_wizard_frame.cpp'
--- pcbnew/footprint_wizard_frame.cpp	2015-04-21 15:42:30 +0000
+++ pcbnew/footprint_wizard_frame.cpp	2015-04-26 03:00:20 +0000
@@ -77,13 +77,8 @@
     EVT_LISTBOX( ID_FOOTPRINT_WIZARD_PAGE_LIST, FOOTPRINT_WIZARD_FRAME::ClickOnPageList )
 
 
-#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 )

=== modified file 'pcbnew/highlight.cpp'
--- pcbnew/highlight.cpp	2014-05-18 15:16:59 +0000
+++ pcbnew/highlight.cpp	2015-04-26 02:59:45 +0000
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@xxxxxxxxxxxxxxx
  * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
- * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -76,11 +76,7 @@
         list.Add( Line );
     }
 
-#if wxCHECK_VERSION( 2, 9, 4 )
     wxSingleChoiceDialog choiceDlg( this, wxEmptyString, _( "Select Net" ), list, (void**) NULL );
-#else
-    wxSingleChoiceDialog choiceDlg( this, wxEmptyString, _( "Select Net" ), list, (char**) NULL );
-#endif
 
     if( (choiceDlg.ShowModal() == wxID_CANCEL) || (choiceDlg.GetSelection() == wxNOT_FOUND) )
         return;

=== modified file 'pcbnew/layer_widget.cpp'
--- pcbnew/layer_widget.cpp	2014-07-09 13:02:56 +0000
+++ pcbnew/layer_widget.cpp	2015-04-26 03:00:03 +0000
@@ -3,7 +3,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2010 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
- * Copyright (C) 2010 KiCad Developers, see change_log.txt for contributors.
+ * Copyright (C) 2010-2015 KiCad Developers, see change_log.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -194,12 +194,7 @@
     iconDC.SelectObject( bitmap );
 
     brush.SetColour( MakeColour( aColor ) );
-
-#if wxCHECK_VERSION( 3, 0, 0 )
     brush.SetStyle( wxBRUSHSTYLE_SOLID );
-#else
-    brush.SetStyle( wxSOLID );
-#endif
 
     iconDC.SetBrush( brush );