From cf59468de2849d6ac250ed7153777ff05c7eadb1 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sun, 1 Nov 2020 08:30:27 -0500 Subject: [PATCH] Fix library table dialog tab appearance in dark mode. Fixes https://gitlab.com/kicad/code/kicad/-/issues/6236 --- eeschema/dialogs/panel_sym_lib_table.cpp | 21 ++++++++----- eeschema/dialogs/panel_sym_lib_table.h | 4 +-- eeschema/dialogs/panel_sym_lib_table_base.cpp | 20 ++++++------- eeschema/dialogs/panel_sym_lib_table_base.fbp | 30 +++++++++++-------- eeschema/dialogs/panel_sym_lib_table_base.h | 8 ++--- pcbnew/dialogs/panel_fp_lib_table.cpp | 15 ++++++---- pcbnew/dialogs/panel_fp_lib_table.h | 4 +-- pcbnew/dialogs/panel_fp_lib_table_base.cpp | 18 +++++------ pcbnew/dialogs/panel_fp_lib_table_base.fbp | 29 +++++++++--------- pcbnew/dialogs/panel_fp_lib_table_base.h | 6 ++-- 10 files changed, 82 insertions(+), 73 deletions(-) diff --git a/eeschema/dialogs/panel_sym_lib_table.cpp b/eeschema/dialogs/panel_sym_lib_table.cpp index 953ff919f6..e06f12cd2c 100644 --- a/eeschema/dialogs/panel_sym_lib_table.cpp +++ b/eeschema/dialogs/panel_sym_lib_table.cpp @@ -287,6 +287,9 @@ PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, setupGrid( m_global_grid ); + m_notebook->SetPageText( 0, _( "Global Libraries" ) ); + m_notebook->SetPageText( 1, _( "Project Specific Libraries" ) ); + if( aProject ) { m_PrjTableFilename->SetLabel( aProjectTablePath ); @@ -296,7 +299,7 @@ PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, else { m_pageNdx = 0; - m_auinotebook->DeletePage( 1 ); + m_notebook->DeletePage( 1 ); m_project_grid = nullptr; } @@ -306,7 +309,7 @@ PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, populateEnvironReadOnlyTable(); // select the last selected page - m_auinotebook->SetSelection( m_pageNdx ); + m_notebook->SetSelection( m_pageNdx ); m_cur_grid = ( m_pageNdx == 0 ) ? m_global_grid : m_project_grid; m_path_subs_grid->SetColLabelValue( 0, _( "Name" ) ); @@ -371,7 +374,7 @@ bool PANEL_SYM_LIB_TABLE::verifyTables() // show the tabbed panel holding the grid we have flunked: if( model != cur_model() ) - m_auinotebook->SetSelection( model == global_model() ? 0 : 1 ); + m_notebook->SetSelection( model == global_model() ? 0 : 1 ); m_cur_grid->MakeCellVisible( r, 0 ); m_cur_grid->SetGridCursor( r, 1 ); @@ -410,7 +413,7 @@ bool PANEL_SYM_LIB_TABLE::verifyTables() // show the tabbed panel holding the grid we have flunked: if( model != cur_model() ) - m_auinotebook->SetSelection( model == global_model() ? 0 : 1 ); + m_notebook->SetSelection( model == global_model() ? 0 : 1 ); // go to the lower of the two rows, it is technically the duplicate: m_cur_grid->MakeCellVisible( r2, 0 ); @@ -465,9 +468,9 @@ bool PANEL_SYM_LIB_TABLE::verifyTables() } -void PANEL_SYM_LIB_TABLE::pageChangedHandler( wxAuiNotebookEvent& event ) +void PANEL_SYM_LIB_TABLE::pageChangedHandler( wxNotebookEvent& event ) { - m_pageNdx = (unsigned) std::max( 0, m_auinotebook->GetSelection() ); + m_pageNdx = (unsigned) std::max( 0, m_notebook->GetSelection() ); m_cur_grid = m_pageNdx == 0 ? m_global_grid : m_project_grid; } @@ -479,7 +482,8 @@ void PANEL_SYM_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event ) + "|" + LegacySymbolLibFileWildcard(); EESCHEMA_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings(); - wxFileDialog dlg( this, _( "Select Library" ), cfg->m_lastSymbolLibDir, wxEmptyString, wildcards, + wxFileDialog dlg( this, _( "Select Library" ), + cfg->m_lastSymbolLibDir, wxEmptyString, wildcards, wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE ); auto result = dlg.ShowModal(); @@ -511,7 +515,8 @@ void PANEL_SYM_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event ) if( !applyToAll ) { // The cancel button adds the library to the table anyway - addDuplicates = ( OKOrCancelDialog( this, warning, wxString::Format( msg, nickname ), + addDuplicates = ( OKOrCancelDialog( this, warning, + wxString::Format( msg, nickname ), detailedMsg, _( "Skip" ), _( "Add Anyway" ), &applyToAll ) == wxID_CANCEL ); } diff --git a/eeschema/dialogs/panel_sym_lib_table.h b/eeschema/dialogs/panel_sym_lib_table.h index f682bfbc04..1a007ed063 100644 --- a/eeschema/dialogs/panel_sym_lib_table.h +++ b/eeschema/dialogs/panel_sym_lib_table.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2017 Wayne Stambaugh - * Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2017-2020 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 as published by the @@ -49,7 +49,7 @@ private: */ bool verifyTables(); - void pageChangedHandler( wxAuiNotebookEvent& event ) override; + void pageChangedHandler( wxNotebookEvent& event ) override; void browseLibrariesHandler( wxCommandEvent& event ) override; void appendRowHandler( wxCommandEvent& event ) override; void deleteRowHandler( wxCommandEvent& event ) override; diff --git a/eeschema/dialogs/panel_sym_lib_table_base.cpp b/eeschema/dialogs/panel_sym_lib_table_base.cpp index 80377f027e..4e05acdbc8 100644 --- a/eeschema/dialogs/panel_sym_lib_table_base.cpp +++ b/eeschema/dialogs/panel_sym_lib_table_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 18 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -19,10 +19,8 @@ PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE( wxWindow* parent, wxWindowID wxStaticBoxSizer* m_top_sizer; m_top_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Libraries by Scope") ), wxVERTICAL ); - m_auinotebook = new wxAuiNotebook( m_top_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_auinotebook->SetMinSize( wxSize( 720,460 ) ); - - m_global_panel = new wxPanel( m_auinotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_notebook = new wxNotebook( m_top_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_global_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* m_global_sizer; m_global_sizer = new wxBoxSizer( wxVERTICAL ); @@ -74,8 +72,8 @@ PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE( wxWindow* parent, wxWindowID m_global_panel->SetSizer( m_global_sizer ); m_global_panel->Layout(); m_global_sizer->Fit( m_global_panel ); - m_auinotebook->AddPage( m_global_panel, _("Global Libraries"), false, wxNullBitmap ); - m_project_panel = new wxPanel( m_auinotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_notebook->AddPage( m_global_panel, _("a page"), false ); + m_project_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* m_project_sizer; m_project_sizer = new wxBoxSizer( wxVERTICAL ); @@ -126,9 +124,9 @@ PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE( wxWindow* parent, wxWindowID m_project_panel->SetSizer( m_project_sizer ); m_project_panel->Layout(); m_project_sizer->Fit( m_project_panel ); - m_auinotebook->AddPage( m_project_panel, _("Project Specific Libraries"), true, wxNullBitmap ); + m_notebook->AddPage( m_project_panel, _("a page"), true ); - m_top_sizer->Add( m_auinotebook, 1, wxEXPAND | wxALL, 5 ); + m_top_sizer->Add( m_notebook, 1, wxEXPAND | wxALL, 5 ); wxBoxSizer* bSizer51; bSizer51 = new wxBoxSizer( wxHORIZONTAL ); @@ -210,7 +208,7 @@ PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE( wxWindow* parent, wxWindowID bSizer1->Fit( this ); // Connect Events - m_auinotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( PANEL_SYM_LIB_TABLE_BASE::pageChangedHandler ), NULL, this ); + m_notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( PANEL_SYM_LIB_TABLE_BASE::pageChangedHandler ), NULL, this ); m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::appendRowHandler ), NULL, this ); m_browse_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::browseLibrariesHandler ), NULL, this ); m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveUpHandler ), NULL, this ); @@ -222,7 +220,7 @@ PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE( wxWindow* parent, wxWindowID PANEL_SYM_LIB_TABLE_BASE::~PANEL_SYM_LIB_TABLE_BASE() { // Disconnect Events - m_auinotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( PANEL_SYM_LIB_TABLE_BASE::pageChangedHandler ), NULL, this ); + m_notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( PANEL_SYM_LIB_TABLE_BASE::pageChangedHandler ), NULL, this ); m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::appendRowHandler ), NULL, this ); m_browse_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::browseLibrariesHandler ), NULL, this ); m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveUpHandler ), NULL, this ); diff --git a/eeschema/dialogs/panel_sym_lib_table_base.fbp b/eeschema/dialogs/panel_sym_lib_table_base.fbp index b0d03a7e69..f3c7c29a13 100644 --- a/eeschema/dialogs/panel_sym_lib_table_base.fbp +++ b/eeschema/dialogs/panel_sym_lib_table_base.fbp @@ -14,6 +14,7 @@ panel_sym_lib_table_base 1000 none + 1 sym_lib_table @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -70,7 +72,7 @@ 5 wxEXPAND | wxALL 1 - + 1 1 1 @@ -81,12 +83,13 @@ + 1 0 1 - 0 + 1 0 Dock 0 @@ -103,9 +106,9 @@ 0 - 720,460 + 1 - m_auinotebook + m_notebook 1 @@ -116,18 +119,16 @@ 1 - - -1 + ; ; forward_declare 0 - - pageChangedHandler - + pageChangedHandler + - Global Libraries + a page 0 1 @@ -416,9 +417,9 @@ - + - Project Specific Libraries + a page 1 1 @@ -731,6 +732,7 @@ + 0 @@ -804,6 +806,7 @@ + 0 @@ -877,6 +880,7 @@ + 0 @@ -950,6 +954,7 @@ + 0 @@ -1033,6 +1038,7 @@ + 0 diff --git a/eeschema/dialogs/panel_sym_lib_table_base.h b/eeschema/dialogs/panel_sym_lib_table_base.h index 187d1a7029..969f6eeada 100644 --- a/eeschema/dialogs/panel_sym_lib_table_base.h +++ b/eeschema/dialogs/panel_sym_lib_table_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 18 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -24,7 +24,7 @@ class WX_GRID; #include #include #include -#include +#include #include #include #include @@ -40,7 +40,7 @@ class PANEL_SYM_LIB_TABLE_BASE : public wxPanel private: protected: - wxAuiNotebook* m_auinotebook; + wxNotebook* m_notebook; wxPanel* m_global_panel; wxStaticText* m_staticText3; wxStaticText* m_GblTableFilename; @@ -57,7 +57,7 @@ class PANEL_SYM_LIB_TABLE_BASE : public wxPanel WX_GRID* m_path_subs_grid; // Virtual event handlers, overide them in your derived class - virtual void pageChangedHandler( wxAuiNotebookEvent& event ) { event.Skip(); } + virtual void pageChangedHandler( wxNotebookEvent& event ) { event.Skip(); } virtual void appendRowHandler( wxCommandEvent& event ) { event.Skip(); } virtual void browseLibrariesHandler( wxCommandEvent& event ) { event.Skip(); } virtual void moveUpHandler( wxCommandEvent& event ) { event.Skip(); } diff --git a/pcbnew/dialogs/panel_fp_lib_table.cpp b/pcbnew/dialogs/panel_fp_lib_table.cpp index 1fd61c4ec4..5c7a057513 100644 --- a/pcbnew/dialogs/panel_fp_lib_table.cpp +++ b/pcbnew/dialogs/panel_fp_lib_table.cpp @@ -436,6 +436,9 @@ PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, populateEnvironReadOnlyTable(); + m_notebook->SetPageText( 0, _( "Global Libraries" ) ); + m_notebook->SetPageText( 1, _( "Project Specific Libraries" ) ); + if( aProject ) { m_PrjTableFilename->SetLabel( aProjectTblPath ); @@ -445,7 +448,7 @@ PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, else { m_pageNdx = 0; - m_auinotebook->DeletePage( 1 ); + m_notebook->DeletePage( 1 ); m_project_grid = nullptr; } @@ -453,7 +456,7 @@ PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, m_path_subs_grid->SetColLabelValue( 1, _( "Value" ) ); // select the last selected page - m_auinotebook->SetSelection( m_pageNdx ); + m_notebook->SetSelection( m_pageNdx ); m_cur_grid = ( m_pageNdx == 0 ) ? m_global_grid : m_project_grid; // for ALT+A handling, we want the initial focus to be on the first selected grid. @@ -540,7 +543,7 @@ bool PANEL_FP_LIB_TABLE::verifyTables() // show the tabbed panel holding the grid we have flunked: if( model != cur_model() ) - m_auinotebook->SetSelection( model == global_model() ? 0 : 1 ); + m_notebook->SetSelection( model == global_model() ? 0 : 1 ); m_cur_grid->MakeCellVisible( r, 0 ); m_cur_grid->SetGridCursor( r, 1 ); @@ -579,7 +582,7 @@ bool PANEL_FP_LIB_TABLE::verifyTables() // show the tabbed panel holding the grid we have flunked: if( model != cur_model() ) - m_auinotebook->SetSelection( model == global_model() ? 0 : 1 ); + m_notebook->SetSelection( model == global_model() ? 0 : 1 ); // go to the lower of the two rows, it is technically the duplicate: m_cur_grid->MakeCellVisible( r2, 0 ); @@ -599,9 +602,9 @@ bool PANEL_FP_LIB_TABLE::verifyTables() //--------------------------------------- -void PANEL_FP_LIB_TABLE::pageChangedHandler( wxAuiNotebookEvent& event ) +void PANEL_FP_LIB_TABLE::pageChangedHandler( wxNotebookEvent& event ) { - m_pageNdx = (unsigned) std::max( 0, m_auinotebook->GetSelection() ); + m_pageNdx = (unsigned) std::max( 0, m_notebook->GetSelection() ); m_cur_grid = m_pageNdx == 0 ? m_global_grid : m_project_grid; } diff --git a/pcbnew/dialogs/panel_fp_lib_table.h b/pcbnew/dialogs/panel_fp_lib_table.h index 8735f29c67..829e389945 100644 --- a/pcbnew/dialogs/panel_fp_lib_table.h +++ b/pcbnew/dialogs/panel_fp_lib_table.h @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2018 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2018-2020 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 as published by the @@ -50,7 +50,7 @@ private: */ bool verifyTables(); - void pageChangedHandler( wxAuiNotebookEvent& event ) override; + void pageChangedHandler( wxNotebookEvent& event ) override; void appendRowHandler( wxCommandEvent& event ) override; void browseLibrariesHandler( wxCommandEvent& event ); void deleteRowHandler( wxCommandEvent& event ) override; diff --git a/pcbnew/dialogs/panel_fp_lib_table_base.cpp b/pcbnew/dialogs/panel_fp_lib_table_base.cpp index 8ee40dfd5e..ebb6bec3b7 100644 --- a/pcbnew/dialogs/panel_fp_lib_table_base.cpp +++ b/pcbnew/dialogs/panel_fp_lib_table_base.cpp @@ -19,10 +19,8 @@ PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID i wxStaticBoxSizer* m_top_sizer; m_top_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Libraries by Scope") ), wxVERTICAL ); - m_auinotebook = new wxAuiNotebook( m_top_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_auinotebook->SetMinSize( wxSize( 720,460 ) ); - - m_global_panel = new wxPanel( m_auinotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_notebook = new wxNotebook( m_top_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_global_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* m_global_sizer; m_global_sizer = new wxBoxSizer( wxVERTICAL ); @@ -73,8 +71,8 @@ PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID i m_global_panel->SetSizer( m_global_sizer ); m_global_panel->Layout(); m_global_sizer->Fit( m_global_panel ); - m_auinotebook->AddPage( m_global_panel, _("Global Libraries"), true, wxNullBitmap ); - m_project_panel = new wxPanel( m_auinotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_notebook->AddPage( m_global_panel, _("a page"), false ); + m_project_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* m_project_sizer; m_project_sizer = new wxBoxSizer( wxVERTICAL ); @@ -125,9 +123,9 @@ PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID i m_project_panel->SetSizer( m_project_sizer ); m_project_panel->Layout(); m_project_sizer->Fit( m_project_panel ); - m_auinotebook->AddPage( m_project_panel, _("Project Specific Libraries"), false, wxNullBitmap ); + m_notebook->AddPage( m_project_panel, _("a page"), false ); - m_top_sizer->Add( m_auinotebook, 6, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_top_sizer->Add( m_notebook, 1, wxEXPAND | wxALL, 5 ); wxBoxSizer* bButtonsSizer; bButtonsSizer = new wxBoxSizer( wxHORIZONTAL ); @@ -207,7 +205,7 @@ PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID i bMainSizer->Fit( this ); // Connect Events - m_auinotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( PANEL_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this ); + m_notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( PANEL_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this ); m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this ); m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this ); m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this ); @@ -218,7 +216,7 @@ PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID i PANEL_FP_LIB_TABLE_BASE::~PANEL_FP_LIB_TABLE_BASE() { // Disconnect Events - m_auinotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( PANEL_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this ); + m_notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( PANEL_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this ); m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this ); m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this ); m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this ); diff --git a/pcbnew/dialogs/panel_fp_lib_table_base.fbp b/pcbnew/dialogs/panel_fp_lib_table_base.fbp index 86ff00da80..839dd4091e 100644 --- a/pcbnew/dialogs/panel_fp_lib_table_base.fbp +++ b/pcbnew/dialogs/panel_fp_lib_table_base.fbp @@ -70,9 +70,9 @@ none 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 6 - + wxEXPAND | wxALL + 1 + 1 1 1 @@ -83,12 +83,13 @@ + 1 0 1 - 0 + 1 0 Dock 0 @@ -105,9 +106,9 @@ 0 - 720,460 + 1 - m_auinotebook + m_notebook 1 @@ -118,19 +119,17 @@ 1 - - -1 + ; ; forward_declare 0 - - pageChangedHandler - + pageChangedHandler + - Global Libraries - 1 + a page + 0 1 1 @@ -418,9 +417,9 @@ - + - Project Specific Libraries + a page 0 1 diff --git a/pcbnew/dialogs/panel_fp_lib_table_base.h b/pcbnew/dialogs/panel_fp_lib_table_base.h index de3b88e8f4..addc9d613a 100644 --- a/pcbnew/dialogs/panel_fp_lib_table_base.h +++ b/pcbnew/dialogs/panel_fp_lib_table_base.h @@ -24,7 +24,7 @@ class WX_GRID; #include #include #include -#include +#include #include #include #include @@ -41,7 +41,7 @@ class PANEL_FP_LIB_TABLE_BASE : public wxPanel private: protected: - wxAuiNotebook* m_auinotebook; + wxNotebook* m_notebook; wxPanel* m_global_panel; wxStaticText* m_staticText3; wxStaticText* m_GblTableFilename; @@ -58,7 +58,7 @@ class PANEL_FP_LIB_TABLE_BASE : public wxPanel WX_GRID* m_path_subs_grid; // Virtual event handlers, overide them in your derived class - virtual void pageChangedHandler( wxAuiNotebookEvent& event ) { event.Skip(); } + virtual void pageChangedHandler( wxNotebookEvent& event ) { event.Skip(); } virtual void appendRowHandler( wxCommandEvent& event ) { event.Skip(); } virtual void moveUpHandler( wxCommandEvent& event ) { event.Skip(); } virtual void moveDownHandler( wxCommandEvent& event ) { event.Skip(); }