diff --git a/3d-viewer/3d_frame.cpp b/3d-viewer/3d_frame.cpp index beef451f44..89cf0189b4 100644 --- a/3d-viewer/3d_frame.cpp +++ b/3d-viewer/3d_frame.cpp @@ -78,7 +78,7 @@ WinEDA3D_DrawFrame::WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent, // Make a Pcb3D_GLCanvas m_Canvas = new Pcb3D_GLCanvas( this ); -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) m_auimgr.SetManagedWindow( this ); wxAuiPaneInfo horiz; diff --git a/3d-viewer/3d_toolbar.cpp b/3d-viewer/3d_toolbar.cpp index 492245f7ec..ea73dbd600 100644 --- a/3d-viewer/3d_toolbar.cpp +++ b/3d-viewer/3d_toolbar.cpp @@ -21,7 +21,7 @@ void WinEDA3D_DrawFrame::ReCreateHToolbar() m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE ); -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) SetToolBar( (wxToolBar*) m_HToolBar ); #endif diff --git a/3d-viewer/3d_viewer.h b/3d-viewer/3d_viewer.h index eb48b14a0b..bd5e4c54d2 100644 --- a/3d-viewer/3d_viewer.h +++ b/3d-viewer/3d_viewer.h @@ -185,7 +185,7 @@ public: wxPoint m_FramePos; wxSize m_FrameSize; -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) wxAuiManager m_auimgr; ~WinEDA3D_DrawFrame() { m_auimgr.UnInit(); }; #endif diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9c20ee77d8..91e7f1b095 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,13 @@ KiCad ChangeLog 2009 Please add newer entries at the top, list the date and your name with email address. + +2009-Nov-5 UPDATE Dick Hollenbeck +================================================================================ +++all + CMakeLists.txt support for AUI. + + 2009-Nov-04 UPDATE Jean-Pierre Charras ================================================================================ ++pcbnew diff --git a/CMakeLists.txt b/CMakeLists.txt index d545bf100e..6ca31b9b0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,16 @@ option(KICAD_CYRILLIC "enable/disable building using cyrillic (needs unicode) (d option(wxUSE_UNICODE "enable/disable building unicode (default OFF)") option(KICAD_GOST "enable/disable building using GOST notation for multiple gates per package (default OFF)") + +if(APPLE) + option(KICAD_AUIMANAGER "Enable use of wxAuiManager (default ON)" ON) + option(KICAD_AUITOOLBAR "Enable use of wxAuiToolBar (default ON)" ON) +else(APPLE) + option(KICAD_AUIMANAGER "Enable use of wxAuiManager (default OFF)" OFF) + option(KICAD_AUITOOLBAR "Enable use of wxAuiToolBar (default OFF)" OFF) +endif(APPLE) + + # Comment this out if you don't want to build with Python support. # OPTION(KICAD_PYTHON "enable/disable building with Python support (default OFF)") @@ -119,7 +129,12 @@ check_find_package_result(OPENGL_FOUND "OpenGL") # Here you can define what libraries of wxWidgets you need for your # application. You can figure out what libraries you need here; # http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html -find_package(wxWidgets COMPONENTS gl html adv core net base QUIET) + +if( KICAD_AUIMANAGER OR KICAD_AUITOOLBAR ) + find_package(wxWidgets COMPONENTS gl html adv core net base aui QUIET) +else( KICAD_AUIMANAGER OR KICAD_AUITOOLBAR ) + find_package(wxWidgets COMPONENTS gl html adv core net base QUIET) +endif( KICAD_AUIMANAGER OR KICAD_AUITOOLBAR ) check_find_package_result(wxWidgets_FOUND "wxWidgets") @@ -129,6 +144,7 @@ include(${wxWidgets_USE_FILE}) # Include MinGW resource compiler. include(MinGWResourceCompiler) + # Generate build system specific header file. include(PerformFeatureChecks) perform_feature_checks() diff --git a/CMakeModules/config.h.cmake b/CMakeModules/config.h.cmake index 1d76a59a0b..02a1ca14d2 100644 --- a/CMakeModules/config.h.cmake +++ b/CMakeModules/config.h.cmake @@ -49,4 +49,8 @@ #define strnicmp _strnicmp #endif + +#cmakedefine KICAD_AUIMANAGER 1 +#cmakedefine KICAD_AUITOOLBAR 1 + #endif /* __CONFIG_H__ */ diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 8b3fae6a48..d03109a948 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -116,7 +116,8 @@ WinEDA_DrawFrame::~WinEDA_DrawFrame() { if( m_CurrentScreen != NULL ) delete m_CurrentScreen; -#if KICAD_AUIMANAGER + +#if defined(KICAD_AUIMANAGER) m_auimgr.UnInit(); #endif } @@ -325,9 +326,10 @@ void WinEDA_DrawFrame::SetToolbars() /***************************************/ { DisplayUnitsMsg(); -#if KICAD_AUIMANAGER -if(m_auimgr.GetManagedWindow()) - m_auimgr.Update(); + +#if defined(KICAD_AUIMANAGER) + if( m_auimgr.GetManagedWindow() ) + m_auimgr.Update(); #endif } @@ -398,7 +400,7 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv ) m_FrameSize = size; size.y -= m_MsgFrameHeight; -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) if( MsgPanel ) // Positionnement en bas d'ecran { MsgPanel->SetSize( 0, size.y, size.x, m_MsgFrameHeight ); diff --git a/common/toolbars.cpp b/common/toolbars.cpp index 13027abc99..4158750d0e 100644 --- a/common/toolbars.cpp +++ b/common/toolbars.cpp @@ -15,7 +15,7 @@ WinEDA_Toolbar::WinEDA_Toolbar( id_toolbar type, wxWindow * parent, wxWindowID id, bool horizontal ): -#if KICAD_AUITOOLBAR +#if defined(KICAD_AUITOOLBAR) wxAuiToolBar( parent, id, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE | (horizontal ? wxAUI_TB_HORZ_LAYOUT : wxAUI_TB_VERTICAL)) #else diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 5a6ad6ed5c..fc1db0c493 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -181,9 +181,10 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) : // Framesize and position SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); -#if KICAD_AUIMANAGER + +#if defined(KICAD_AUIMANAGER) m_auimgr.SetManagedWindow(this); - + wxAuiPaneInfo horiz; horiz.Gripper(false); horiz.DockFixed(true); @@ -191,15 +192,15 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) : horiz.Floatable(false); horiz.CloseButton(false); horiz.CaptionVisible(false); - + wxAuiPaneInfo vert(horiz); - + vert.TopDockable(false).BottomDockable(false); horiz.LeftDockable(false).RightDockable(false); - + m_auimgr.AddPane(m_HToolBar, wxAuiPaneInfo(horiz).Name(wxT("m_HToolBar")).Top()); - + m_auimgr.AddPane(m_FootprintList, wxAuiPaneInfo(horiz).Name(wxT("m_FootprintList")).Left().BestSize(m_FrameSize.x * 0.3 ,m_FrameSize.y * 0.9)); @@ -224,9 +225,9 @@ WinEDA_CvpcbFrame::~WinEDA_CvpcbFrame() config->Write( wxT( FILTERFOOTPRINTKEY ), state ); } -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) m_auimgr.UnInit(); -#endif +#endif } diff --git a/cvpcb/tool_cvpcb.cpp b/cvpcb/tool_cvpcb.cpp index 0f74d4d04e..abd5198165 100644 --- a/cvpcb/tool_cvpcb.cpp +++ b/cvpcb/tool_cvpcb.cpp @@ -23,7 +23,7 @@ void WinEDA_CvpcbFrame::ReCreateHToolbar() return; m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE ); -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) SetToolBar( (wxToolBar *)m_HToolBar ); #endif m_HToolBar->AddTool( ID_CVPCB_READ_INPUT_NETLIST, wxEmptyString, diff --git a/eeschema/libframe.cpp b/eeschema/libframe.cpp index a24cc0eaa5..9be705a754 100644 --- a/eeschema/libframe.cpp +++ b/eeschema/libframe.cpp @@ -188,7 +188,7 @@ WinEDA_LibeditFrame::WinEDA_LibeditFrame( wxWindow* father, Zoom_Automatique( false ); Show( true ); -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) m_auimgr.SetManagedWindow( this ); wxAuiPaneInfo horiz; diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 54a88df563..07965ad3c4 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -190,7 +190,7 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father, ReCreateVToolbar(); ReCreateOptToolbar(); -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) m_auimgr.SetManagedWindow( this ); wxAuiPaneInfo horiz; diff --git a/eeschema/tool_lib.cpp b/eeschema/tool_lib.cpp index 3a4665e1d7..4adcb0c6f4 100644 --- a/eeschema/tool_lib.cpp +++ b/eeschema/tool_lib.cpp @@ -94,7 +94,7 @@ void WinEDA_LibeditFrame::ReCreateHToolbar() return; m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true ); -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) SetToolBar( (wxToolBar*)m_HToolBar ); #endif // Set up toolbar diff --git a/eeschema/tool_sch.cpp b/eeschema/tool_sch.cpp index f0befaa924..9a8726803f 100644 --- a/eeschema/tool_sch.cpp +++ b/eeschema/tool_sch.cpp @@ -25,7 +25,7 @@ void WinEDA_SchematicFrame::ReCreateHToolbar() wxString msg; m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE ); -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) SetToolBar( (wxToolBar*)m_HToolBar ); #endif diff --git a/eeschema/tool_viewlib.cpp b/eeschema/tool_viewlib.cpp index cc392c5702..6dde142973 100644 --- a/eeschema/tool_viewlib.cpp +++ b/eeschema/tool_viewlib.cpp @@ -28,7 +28,7 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar() m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true ); -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) SetToolBar( (wxToolBar*)m_HToolBar ); #endif diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index 348c613983..6ec13d99da 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -123,7 +123,7 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father, wxPoint win_pos( 0, 0 ); -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) if( Library == NULL ) { // Creates the libraries window display @@ -201,7 +201,7 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father, Zoom_Automatique( false ); Show( TRUE ); -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) m_auimgr.SetManagedWindow( this ); wxAuiPaneInfo horiz; @@ -343,7 +343,7 @@ void WinEDA_ViewlibFrame::OnSize( wxSizeEvent& SizeEv ) wxSize( EXTRA_BORDER_SIZE * 2, 0 ) ); } -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) if( m_auimgr.GetManagedWindow() ) m_auimgr.Update(); #endif diff --git a/gerbview/gerberframe.cpp b/gerbview/gerberframe.cpp index be9892a89e..c9a0317962 100644 --- a/gerbview/gerberframe.cpp +++ b/gerbview/gerberframe.cpp @@ -156,7 +156,7 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father, ReCreateHToolbar(); ReCreateVToolbar(); ReCreateOptToolbar(); -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) m_auimgr.SetManagedWindow(this); wxAuiPaneInfo horiz; @@ -321,7 +321,7 @@ void WinEDA_GerberFrame::SetToolbars() } DisplayUnitsMsg(); -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) if(m_auimgr.GetManagedWindow()) m_auimgr.Update(); #endif diff --git a/gerbview/tool_gerber.cpp b/gerbview/tool_gerber.cpp index 48ef61a593..1f84398821 100644 --- a/gerbview/tool_gerber.cpp +++ b/gerbview/tool_gerber.cpp @@ -161,7 +161,7 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void ) } m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE ); -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) SetToolBar( (wxToolBar*)m_HToolBar ); #endif // Set up toolbar diff --git a/include/wxstruct.h b/include/wxstruct.h index 7e66e42dc3..41d7620ce4 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -6,12 +6,6 @@ #ifndef WXSTRUCT_H #define WXSTRUCT_H -// @todo: these 2 defines need to be moved into the top most CMakeLists.txt as a CMake OPTION. -// and they need to be boiled down to a single OPTION, not 2, and we need to add the wxWidgets aui -// library to the link image under these circumstances. I volunteer, but need a day or so. Dick -//#define KICAD_AUITOOLBAR 1 -//#define KICAD_AUIMANAGER 1 - #include @@ -21,7 +15,7 @@ #include #include -#if defined(KICAD_AUIMANAGER) +#if defined(KICAD_AUIMANAGER) || defined(KICAD_AUITOOLBAR) #include #endif @@ -656,7 +650,7 @@ public: /* class WinEDA_Toolbar */ /*************************/ -#if KICAD_AUITOOLBAR +#if defined(KICAD_AUITOOLBAR) class WinEDA_Toolbar : public wxAuiToolBar #else class WinEDA_Toolbar : public wxToolBar @@ -674,19 +668,20 @@ public: wxWindowID id, bool horizontal ); WinEDA_Toolbar* Next() { return Pnext; } -#if KICAD_AUITOOLBAR - bool GetToolState(int toolId) {return GetToolToggled(toolId); }; +#if defined(KICAD_AUITOOLBAR) + bool GetToolState( int toolId ) { return GetToolToggled(toolId); }; - void AddRadioTool(int toolid, const wxString& label, const wxBitmap& bitmap, + void AddRadioTool( int toolid, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled = wxNullBitmap, const wxString& shortHelp = wxEmptyString, const wxString& longHelp = wxEmptyString, - wxObject *data = NULL) { - AddTool( toolid, label, bitmap, bmpDisabled, wxITEM_CHECK, shortHelp, longHelp, data); + wxObject *data = NULL ) + { + AddTool( toolid, label, bitmap, bmpDisabled, wxITEM_CHECK, shortHelp, longHelp, data ); }; - void SetToolNormalBitmap(int id, const wxBitmap& bitmap) {}; - void SetRows(int nRows) {}; + void SetToolNormalBitmap( int id, const wxBitmap& bitmap ) {}; + void SetRows( int nRows ) {}; #endif }; diff --git a/kicad/buildmnu.cpp b/kicad/buildmnu.cpp index f625cd5860..15fb6a0a9f 100644 --- a/kicad/buildmnu.cpp +++ b/kicad/buildmnu.cpp @@ -19,7 +19,7 @@ BEGIN_EVENT_TABLE( WinEDA_MainFrame, WinEDA_BasicFrame ) /* Window events */ EVT_SIZE( WinEDA_MainFrame::OnSize ) EVT_CLOSE( WinEDA_MainFrame::OnCloseWindow ) -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) /* Sash drag events */ EVT_SASH_DRAGGED( ID_LEFT_FRAME, WinEDA_MainFrame::OnSashDrag ) EVT_SASH_DRAGGED( ID_BOTTOM_FRAME, WinEDA_MainFrame::OnSashDrag ) @@ -253,7 +253,7 @@ void WinEDA_MainFrame::RecreateBaseHToolbar() // Allocate memory for m_HToolBar m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE ); -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) SetToolBar( (wxToolBar*)m_HToolBar ); #endif // Set up toolbar diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index eba5e33eac..8428128762 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -70,7 +70,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent, m_LeftWin->SetSashVisible( wxSASH_RIGHT, TRUE ); m_LeftWin->SetExtraBorderSize( 2 ); -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) // Bottom Window: box to display messages m_BottomWin = new wxSashLayoutWindow( this, ID_BOTTOM_FRAME, wxDefaultPosition, wxDefaultSize, @@ -105,7 +105,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent, PyHandler::GetInstance()->DeclareEvent( wxT( "kicad::LoadProject" ) ); #endif -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) RecreateBaseHToolbar(); m_auimgr.SetManagedWindow(this); @@ -143,7 +143,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent, WinEDA_MainFrame::~WinEDA_MainFrame() /*****************************************************************************/ { -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) m_auimgr.UnInit(); #endif } @@ -236,7 +236,7 @@ void WinEDA_MainFrame::OnSize( wxSizeEvent& event ) layout.LayoutFrame( this ); if( m_CommandWin ) m_CommandWin->Refresh( TRUE ); -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) if(m_auimgr.GetManagedWindow()) m_auimgr.Update(); #endif diff --git a/pcbnew/dialog_general_options.cpp b/pcbnew/dialog_general_options.cpp index 5d1278d72e..9d43834616 100644 --- a/pcbnew/dialog_general_options.cpp +++ b/pcbnew/dialog_general_options.cpp @@ -277,7 +277,7 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event ) break; case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1: -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) if( m_OptionsToolBar->GetToolState( id ) ) // show aux V toolbar (Microwave tool) ReCreateAuxVToolbar(); else diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 238f6ba3e1..6f02ce1fe4 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -192,7 +192,7 @@ WinEDA_ModuleEditFrame::WinEDA_ModuleEditFrame( wxWindow* father, if( DrawPanel ) DrawPanel->m_Block_Enable = TRUE; -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) m_auimgr.SetManagedWindow(this); wxAuiPaneInfo horiz; @@ -407,7 +407,7 @@ void WinEDA_ModuleEditFrame::SetToolbars() } DisplayUnitsMsg(); -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) if(m_auimgr.GetManagedWindow()) m_auimgr.Update(); #endif diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 396fae14db..ec2efd6436 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -264,9 +264,9 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, if( m_show_microwave_tools ) ReCreateAuxVToolbar(); -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) m_auimgr.SetManagedWindow(this); - + wxAuiPaneInfo horiz; horiz.Gripper(false); horiz.DockFixed(true); @@ -295,10 +295,10 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, m_auimgr.AddPane(m_OptionsToolBar, wxAuiPaneInfo(vert).Name(wxT("m_OptionsToolBar")).Left()); - m_auimgr.AddPane(DrawPanel, + m_auimgr.AddPane(DrawPanel, wxAuiPaneInfo().Name(wxT("DrawFrame")).CentrePane()); - m_auimgr.AddPane(MsgPanel, + m_auimgr.AddPane(MsgPanel, wxAuiPaneInfo(horiz).Name(wxT("MsgPanel")).Bottom()); m_auimgr.Update(); diff --git a/pcbnew/tool_modedit.cpp b/pcbnew/tool_modedit.cpp index 8e850b3083..485a06c680 100644 --- a/pcbnew/tool_modedit.cpp +++ b/pcbnew/tool_modedit.cpp @@ -33,7 +33,7 @@ void WinEDA_ModuleEditFrame::ReCreateHToolbar() wxString msg; m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE ); -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) SetToolBar( (wxToolBar*) m_HToolBar ); #endif // Set up toolbar diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index 6c9b448ef0..9a05a7ccda 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -196,7 +196,7 @@ void WinEDA_PcbFrame::ReCreateHToolbar() m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true ); m_HToolBar->SetRows( 1 ); -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) SetToolBar( (wxToolBar*)m_HToolBar ); #endif // Set up toolbar diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index fa2c6c9b11..2fb84b38e9 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -275,7 +275,7 @@ void WinEDA_PcbFrame::SetToolbars() _( "Hide invisible text" ) : _( "Show invisible text" ) ); -#if !KICAD_AUIMANAGER +#if !defined(KICAD_AUIMANAGER) m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, m_AuxVToolBar ? true : false ); #else @@ -290,7 +290,7 @@ void WinEDA_PcbFrame::SetToolbars() UpdateToolbarLayerInfo(); PrepareLayerIndicator(); DisplayUnitsMsg(); -#if KICAD_AUIMANAGER +#if defined(KICAD_AUIMANAGER) if(m_auimgr.GetManagedWindow()) m_auimgr.Update(); #endif