diff --git a/common/dialogs/dialog_page_settings_base.cpp b/common/dialogs/dialog_page_settings_base.cpp index 0f99290cb1..e11dff30ca 100644 --- a/common/dialogs/dialog_page_settings_base.cpp +++ b/common/dialogs/dialog_page_settings_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -343,7 +343,7 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind wxBoxSizer* bSizerFilename; bSizerFilename = new wxBoxSizer( wxVERTICAL ); - m_staticTextfilename = new wxStaticText( this, wxID_ANY, _("Page layout file description"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextfilename = new wxStaticText( this, wxID_ANY, _("Page layout description file"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextfilename->Wrap( -1 ); bSizerFilename->Add( m_staticTextfilename, 0, wxRIGHT|wxLEFT, 5 ); diff --git a/common/dialogs/dialog_page_settings_base.fbp b/common/dialogs/dialog_page_settings_base.fbp index ce60f5331c..7cbdda3d75 100644 --- a/common/dialogs/dialog_page_settings_base.fbp +++ b/common/dialogs/dialog_page_settings_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 0 0 @@ -4173,7 +4175,7 @@ 0 0 wxID_ANY - Page layout file description + Page layout description file 0 diff --git a/common/dialogs/dialog_page_settings_base.h b/common/dialogs/dialog_page_settings_base.h index 9ba85e6a18..f4bcc42ab8 100644 --- a/common/dialogs/dialog_page_settings_base.h +++ b/common/dialogs/dialog_page_settings_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 7f170a3d5e..22db54e619 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -118,6 +118,8 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* aParent, m_snapToGrid = true; m_MsgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight(); + m_auimgr.SetFlags(wxAUI_MGR_DEFAULT|wxAUI_MGR_LIVE_RESIZE); + CreateStatusBar( 6 ); // set the size of the status bar subwindows: diff --git a/eeschema/dialogs/dialog_edit_component_in_lib_base.cpp b/eeschema/dialogs/dialog_edit_component_in_lib_base.cpp index bd98cc4053..8aa344869f 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib_base.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_lib_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -64,7 +64,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx m_staticTextNbUnits = new wxStaticText( m_PanelBasic, wxID_ANY, _("Number of Units"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextNbUnits->Wrap( -1 ); - m_staticTextNbUnits->SetToolTip( _("Enter the number of units in for a component that contains more than one unit") ); + m_staticTextNbUnits->SetToolTip( _("Enter the number of units for a component that contains more than one unit") ); bSizernbunits->Add( m_staticTextNbUnits, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -74,20 +74,20 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx bSizerMidBasicPanel->Add( bSizernbunits, 1, wxEXPAND, 5 ); - wxBoxSizer* bSizer17; - bSizer17 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizerOffset; + bSizerOffset = new wxBoxSizer( wxVERTICAL ); m_staticTextskew = new wxStaticText( m_PanelBasic, wxID_ANY, _("Pin Name Position Offset"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextskew->Wrap( -1 ); m_staticTextskew->SetToolTip( _("Margin (in 0.001 inches) between a pin name position and the component body.\nA value from 10 to 40 is usually good.") ); - bSizer17->Add( m_staticTextskew, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizerOffset->Add( m_staticTextskew, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_SetSkew = new wxSpinCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 0 ); - bSizer17->Add( m_SetSkew, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizerOffset->Add( m_SetSkew, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bSizerMidBasicPanel->Add( bSizer17, 1, wxEXPAND, 5 ); + bSizerMidBasicPanel->Add( bSizerOffset, 1, wxEXPAND, 5 ); bSizerBasicPanel->Add( bSizerMidBasicPanel, 0, wxEXPAND, 5 ); diff --git a/eeschema/dialogs/dialog_edit_component_in_lib_base.fbp b/eeschema/dialogs/dialog_edit_component_in_lib_base.fbp index 6417c11a0e..f112d8a2c8 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib_base.fbp +++ b/eeschema/dialogs/dialog_edit_component_in_lib_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 0 0 @@ -783,7 +785,7 @@ 0 - Enter the number of units in for a component that contains more than one unit + Enter the number of units for a component that contains more than one unit @@ -908,7 +910,7 @@ 1 - bSizer17 + bSizerOffset wxVERTICAL none diff --git a/eeschema/dialogs/dialog_edit_component_in_lib_base.h b/eeschema/dialogs/dialog_edit_component_in_lib_base.h index e627de5431..0624bf8520 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib_base.h +++ b/eeschema/dialogs/dialog_edit_component_in_lib_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/eeschema/libedit.cpp b/eeschema/libedit.cpp index 8d49af7651..e5f3b6511d 100644 --- a/eeschema/libedit.cpp +++ b/eeschema/libedit.cpp @@ -119,7 +119,7 @@ void LIB_EDIT_FRAME::LoadOneLibraryPart( wxCommandEvent& event ) m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() ); if( GetScreen()->IsModify() - && !IsOK( this, _( "Current component is not saved.\n\nDiscard current changes?" ) ) ) + && !IsOK( this, _( "The current component is not saved.\n\nDiscard current changes?" ) ) ) return; // No current lib, ask user for the library to use. diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index a56c226d63..e6f1619d18 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -2752,7 +2752,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, continue; // OK, pad found // not found: bad footprint, report error - msg.Printf( _( "** Error: Component \"%s\" pad '%s' not found in footprint \"%s\" **\n" ), + msg.Printf( _( "*** Error: Component '%s' pad '%s' not found in footprint '%s' ***\n" ), GetChars( component->GetReference() ), GetChars( padname ), GetChars( footprint->GetFPID().Format() ) ); @@ -2777,8 +2777,8 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, // Net name not valid, report error wxString coord; coord << zone->GetPosition(); - msg.Printf( _( "** Error: Zone '%s' layer '%s'" - " has non-existent net name \"%s\" **\n" ), + msg.Printf( _( "*** Error: Zone '%s' layer '%s'" + " has non-existent net name '%s' ***\n" ), GetChars( coord ), GetChars( zone->GetLayerName() ), GetChars( zone->GetNetName() ) ); diff --git a/pcbnew/dialogs/dialog_design_rules_base.cpp b/pcbnew/dialogs/dialog_design_rules_base.cpp index c9a61997dc..67ed0a5180 100644 --- a/pcbnew/dialogs/dialog_design_rules_base.cpp +++ b/pcbnew/dialogs/dialog_design_rules_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -171,7 +171,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID int m_OptViaTypeNChoices = sizeof( m_OptViaTypeChoices ) / sizeof( wxString ); m_OptViaType = new wxRadioBox( m_panelGolbalDesignRules, wxID_ANY, _("Blind/buried Vias:"), wxDefaultPosition, wxDefaultSize, m_OptViaTypeNChoices, m_OptViaTypeChoices, 1, wxRA_SPECIFY_COLS ); m_OptViaType->SetSelection( 0 ); - m_OptViaType->SetToolTip( _("Allows or not blind/buried vias.\nDo not allow is the usual selection\nNote: micro vias are a special type of blind vias and are not managed here") ); + m_OptViaType->SetToolTip( _("Allows or not blind/buried vias.\nDo not allow is the usual selection.\nNote: micro vias are a special type of blind vias and are not managed here") ); sbViasOptionSizer->Add( m_OptViaType, 0, wxALL|wxEXPAND, 5 ); diff --git a/pcbnew/dialogs/dialog_design_rules_base.fbp b/pcbnew/dialogs/dialog_design_rules_base.fbp index d0808ee3ac..e36c17226b 100644 --- a/pcbnew/dialogs/dialog_design_rules_base.fbp +++ b/pcbnew/dialogs/dialog_design_rules_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 1 0 @@ -1642,7 +1644,7 @@ wxRA_SPECIFY_COLS 0 - Allows or not blind/buried vias. Do not allow is the usual selection Note: micro vias are a special type of blind vias and are not managed here + Allows or not blind/buried vias. Do not allow is the usual selection. Note: micro vias are a special type of blind vias and are not managed here wxFILTER_NONE wxDefaultValidator diff --git a/pcbnew/dialogs/dialog_design_rules_base.h b/pcbnew/dialogs/dialog_design_rules_base.h index 45b2b28b1d..d553d4844d 100644 --- a/pcbnew/dialogs/dialog_design_rules_base.h +++ b/pcbnew/dialogs/dialog_design_rules_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/pcbnew/github/github_plugin.cpp b/pcbnew/github/github_plugin.cpp index 7099a83a88..897674c9fb 100644 --- a/pcbnew/github/github_plugin.cpp +++ b/pcbnew/github/github_plugin.cpp @@ -493,7 +493,7 @@ void GITHUB_PLUGIN::remote_get_zip( const wxString& aRepoURL ) throw( IO_ERROR ) catch( boost::system::system_error& e ) { // https "GET" has faild, report this to API caller. - wxString fmt( _( "Cannot GET zip: '%s'\nfor lib-path: '%s'.\nWhat: '%s'" ) ); + wxString fmt( _( "Cannot get/download Zip archive: '%s'\nfor library path: '%s'.\nReason: '%s'" ) ); string msg = StrPrintf( TO_UTF8( fmt ), zip_url.c_str(), diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 4bc6e4550a..c919ae0bc7 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -90,7 +90,7 @@ typedef LEGACY_PLUGIN::BIU BIU; -#define VERSION_ERROR_FORMAT _( "File <%s> is format version: %d.\nI only support format version <= %d.\nPlease upgrade Pcbnew to load this file." ) +#define VERSION_ERROR_FORMAT _( "File '%s' is format version: %d.\nI only support format version <= %d.\nPlease upgrade Pcbnew to load this file." ) #define UNKNOWN_GRAPHIC_FORMAT _( "unknown graphic type: %d") #define UNKNOWN_PAD_FORMAT _( "unknown pad type: %d") #define UNKNOWN_PAD_ATTRIBUTE _( "unknown pad attribute: %d" ) @@ -1197,7 +1197,7 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) case 'O': padshape = PAD_OVAL; break; case 'T': padshape = PAD_TRAPEZOID; break; default: - m_error.Printf( _( "Unknown padshape '%c=0x%02x' on line:%d of module:'%s'" ), + m_error.Printf( _( "Unknown padshape '%c=0x%02x' on line: %d of module: '%s'" ), padchar, padchar, m_reader->LineNumber(), @@ -2777,7 +2777,7 @@ BIU LEGACY_PLUGIN::biuParse( const char* aValue, const char** nptrptr ) if( errno ) { - m_error.Printf( _( "invalid float number in file: <%s>\nline: %d, offset: %d" ), + m_error.Printf( _( "invalid float number in file: '%s'\nline: %d, offset: %d" ), m_reader->GetSource().GetData(), m_reader->LineNumber(), aValue - m_reader->Line() + 1 ); @@ -2786,7 +2786,7 @@ BIU LEGACY_PLUGIN::biuParse( const char* aValue, const char** nptrptr ) if( aValue == nptr ) { - m_error.Printf( _( "missing float number in file: <%s>\nline: %d, offset: %d" ), + m_error.Printf( _( "missing float number in file: '%s'\nline: %d, offset: %d" ), m_reader->GetSource().GetData(), m_reader->LineNumber(), aValue - m_reader->Line() + 1 ); @@ -2814,7 +2814,7 @@ double LEGACY_PLUGIN::degParse( const char* aValue, const char** nptrptr ) if( errno ) { - m_error.Printf( _( "invalid float number in file: <%s>\nline: %d, offset: %d" ), + m_error.Printf( _( "invalid float number in file: '%s'\nline: %d, offset: %d" ), m_reader->GetSource().GetData(), m_reader->LineNumber(), aValue - m_reader->Line() + 1 ); THROW_IO_ERROR( m_error ); @@ -2822,7 +2822,7 @@ double LEGACY_PLUGIN::degParse( const char* aValue, const char** nptrptr ) if( aValue == nptr ) { - m_error.Printf( _( "missing float number in file: <%s>\nline: %d, offset: %d" ), + m_error.Printf( _( "missing float number in file: '%s'\nline: %d, offset: %d" ), m_reader->GetSource().GetData(), m_reader->LineNumber(), aValue - m_reader->Line() + 1 ); THROW_IO_ERROR( m_error ); @@ -2865,7 +2865,7 @@ void LEGACY_PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, const PROPER FILE* fp = wxFopen( aFileName, wxT( "w" ) ); if( !fp ) { - m_error.Printf( _( "Unable to open file <%s>" ), aFileName.GetData() ); + m_error.Printf( _( "Unable to open file '%s'" ), aFileName.GetData() ); THROW_IO_ERROR( m_error ); } @@ -2890,7 +2890,7 @@ void LEGACY_PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, const PROPER wxString LEGACY_PLUGIN::writeError() const { - return wxString::Format( _( "error writing to file <%s>" ), m_filename.GetData() ); + return wxString::Format( _( "error writing to file '%s'" ), m_filename.GetData() ); } #define CHECK_WRITE_ERROR() \ @@ -4001,7 +4001,7 @@ void LP_CACHE::ReadAndVerifyHeader( LINE_READER* aReader ) } L_bad_library: - THROW_IO_ERROR( wxString::Format( _( "File <%s> is empty or is not a legacy library" ), + THROW_IO_ERROR( wxString::Format( _( "File '%s' is empty or is not a legacy library" ), m_lib_path.GetData() ) ); } @@ -4138,7 +4138,7 @@ void LP_CACHE::Save() if( !m_writable ) { THROW_IO_ERROR( wxString::Format( - _( "Legacy library file <%s> is read only" ), m_lib_path.GetData() ) ); + _( "Legacy library file '%s' is read only" ), m_lib_path.GetData() ) ); } wxString tempFileName; @@ -4157,7 +4157,7 @@ void LP_CACHE::Save() if( !fp ) { THROW_IO_ERROR( wxString::Format( - _( "Unable to open or create legacy library file <%s>" ), + _( "Unable to open or create legacy library file '%s'" ), m_lib_path.GetData() ) ); } @@ -4183,7 +4183,7 @@ void LP_CACHE::Save() if( wxRename( tempFileName, m_lib_path ) ) { THROW_IO_ERROR( wxString::Format( - _( "Unable to rename tempfile <%s> to library file <%s>" ), + _( "Unable to rename tempfile '%s' to library file '%s'" ), tempFileName.GetData(), m_lib_path.GetData() ) ); } @@ -4296,7 +4296,7 @@ void LEGACY_PLUGIN::FootprintSave( const wxString& aLibraryPath, if( !m_cache->m_writable ) { - THROW_IO_ERROR( wxString::Format( _( "Library <%s> is read only" ), aLibraryPath.GetData() ) ); + THROW_IO_ERROR( wxString::Format( _( "Library '%s' is read only" ), aLibraryPath.GetData() ) ); } std::string footprintName = aFootprint->GetFPID().GetFootprintName(); @@ -4341,7 +4341,7 @@ void LEGACY_PLUGIN::FootprintDelete( const wxString& aLibraryPath, if( !m_cache->m_writable ) { - THROW_IO_ERROR( wxString::Format( _( "Library <%s> is read only" ), aLibraryPath.GetData() ) ); + THROW_IO_ERROR( wxString::Format( _( "Library '%s' is read only" ), aLibraryPath.GetData() ) ); } std::string footprintName = TO_UTF8( aFootprintName ); @@ -4351,7 +4351,7 @@ void LEGACY_PLUGIN::FootprintDelete( const wxString& aLibraryPath, if( erasedCount != 1 ) { THROW_IO_ERROR( wxString::Format( - _( "library <%s> has no footprint '%s' to delete" ), + _( "library '%s' has no footprint '%s' to delete" ), aLibraryPath.GetData(), aFootprintName.GetData() ) ); } @@ -4364,7 +4364,7 @@ void LEGACY_PLUGIN::FootprintLibCreate( const wxString& aLibraryPath, const PROP if( wxFileExists( aLibraryPath ) ) { THROW_IO_ERROR( wxString::Format( - _( "library <%s> already exists, will not create a new" ), + _( "library '%s' already exists, will not create a new" ), aLibraryPath.GetData() ) ); } @@ -4391,7 +4391,7 @@ bool LEGACY_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const PROP if( wxRemove( aLibraryPath ) ) { THROW_IO_ERROR( wxString::Format( - _( "library <%s> cannot be deleted" ), + _( "library '%s' cannot be deleted" ), aLibraryPath.GetData() ) ); } diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 83428fdaf2..8e22bc4154 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -117,6 +117,7 @@ static wxAcceleratorEntry accels[] = #define FOOTPRINT_VIEWER_FRAME_NAME wxT( "ModViewFrame" ) + FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( PCB_BASE_FRAME* aParent, FP_LIB_TABLE* aTable, wxSemaphore* aSemaphore, @@ -137,14 +138,12 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( PCB_BASE_FRAME* aParent, SetIcon( icon ); m_HotkeysZoomAndGridList = g_Module_Viewer_Hokeys_Descr; - m_FootprintList = NULL; - m_LibList = NULL; - m_LibListWindow = NULL; - m_FootprintListWindow = NULL; - m_Semaphore = aSemaphore; + m_footprintList = NULL; + m_libList = NULL; + m_semaphore = aSemaphore; m_selectedFootprintName.Empty(); - if( m_Semaphore ) + if( m_semaphore ) SetModalMode( true ); SetBoard( new BOARD() ); @@ -160,33 +159,17 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( PCB_BASE_FRAME* aParent, ReCreateHToolbar(); ReCreateVToolbar(); - wxSize initialSashSize( 100, -1 ); - - // Creates the libraries window display - m_LibListWindow = - new wxSashLayoutWindow( this, ID_MODVIEW_LIBWINDOW, wxDefaultPosition, - initialSashSize, wxCLIP_CHILDREN | wxSW_3D, - wxT( "LibWindow" ) ); - m_LibListWindow->SetOrientation( wxLAYOUT_VERTICAL ); - m_LibListWindow->SetAlignment( wxLAYOUT_LEFT ); - m_LibListWindow->SetSashVisible( wxSASH_RIGHT, true ); - m_LibListWindow->SetExtraBorderSize( EXTRA_BORDER_SIZE ); - m_LibList = new wxListBox( m_LibListWindow, ID_MODVIEW_LIB_LIST, - wxDefaultPosition, initialSashSize, + wxSize minsize(100,-1); + // Creates the library and footprint list + m_libList = new wxListBox( this, ID_MODVIEW_LIB_LIST, + wxDefaultPosition, minsize, 0, NULL, wxLB_HSCROLL ); + m_libList->SetMinSize( minsize ); - // Creates the footprint window display - m_FootprintListWindow = new wxSashLayoutWindow( this, ID_MODVIEW_FOOTPRINT_WINDOW, - wxDefaultPosition, initialSashSize, - wxCLIP_CHILDREN | wxSW_3D, - wxT( "CmpWindow" ) ); - m_FootprintListWindow->SetOrientation( wxLAYOUT_VERTICAL ); - - m_FootprintListWindow->SetSashVisible( wxSASH_RIGHT, true ); - m_FootprintListWindow->SetExtraBorderSize( EXTRA_BORDER_SIZE ); - m_FootprintList = new wxListBox( m_FootprintListWindow, ID_MODVIEW_FOOTPRINT_LIST, - wxDefaultPosition, initialSashSize, + m_footprintList = new wxListBox( this, ID_MODVIEW_FOOTPRINT_LIST, + wxDefaultPosition, minsize, 0, NULL, wxLB_HSCROLL ); + m_footprintList->SetMinSize( minsize ); ReCreateLibraryList(); DisplayLibInfos(); @@ -211,7 +194,8 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( PCB_BASE_FRAME* aParent, // most likely due to the fact that the other windows are not dockable and are preventing the // tool bar from docking on the right and left. wxAuiPaneInfo toolbarPaneInfo; - toolbarPaneInfo.Name( wxT( "m_mainToolBar" ) ).ToolbarPane().Top().CloseButton( false ); + toolbarPaneInfo.Name( wxT( "m_mainToolBar" ) ).ToolbarPane().Top() + .CloseButton( false ); EDA_PANEINFO info; info.InfoToolbarPane(); @@ -223,41 +207,44 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( PCB_BASE_FRAME* aParent, m_auimgr.AddPane( m_mainToolBar, toolbarPaneInfo ); // Manage the list of libraries, left pane. - if( m_LibListWindow ) - m_auimgr.AddPane( m_LibListWindow, wxAuiPaneInfo( info ).Name( wxT( "m_LibList" ) ). - Left().Row( 1 ) ); + m_auimgr.AddPane( m_libList, + wxAuiPaneInfo( info ).Name( wxT( "m_libList" ) ) + .Left().Row( 1 ) ); // Manage the list of footprints, center pane. - m_auimgr.AddPane( m_FootprintListWindow, - wxAuiPaneInfo( info ).Name( wxT( "m_FootprintList" ) ).Centre().Row( 1 ) ); + m_auimgr.AddPane( m_footprintList, + wxAuiPaneInfo( info ).Name( wxT( "m_footprintList" ) ) + .Left().Row( 2 ) ); // Manage the draw panel, right pane. m_auimgr.AddPane( m_canvas, - wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).Right().Row( 1 ).CloseButton( false ) ); + wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).Centre().Row( 1 ).CloseButton( false ) ); // Manage the message panel, bottom pane. m_auimgr.AddPane( m_messagePanel, wxAuiPaneInfo( mesg ).Name( wxT( "MsgPanel" ) ).Bottom() ); - /* Now the minimum windows are fixed, set library list - * and component list of the previous values from last viewlib use - */ - if( m_LibListWindow ) - { - wxAuiPaneInfo& pane = m_auimgr.GetPane( m_LibListWindow ); - pane.MinSize( wxSize( 30, -1 ) ); - } - - if( m_FootprintListWindow ) - { - wxAuiPaneInfo& pane = m_auimgr.GetPane( m_FootprintListWindow ); - pane.MinSize( wxSize( 30, -1 ) ); - } - if( !m_perspective.IsEmpty() ) - m_auimgr.LoadPerspective( m_perspective ); - else - m_auimgr.Update(); + { + // Restore last saved sizes, pos and other params + // However m_mainToolBar size cannot be set to its last saved size + // because the actual size change depending on the way modview was called: + // the tool to export the current footprint exist or not. + // and the saved size is not always OK + // the trick is to get the default toolbar size, and set the size after + // calling LoadPerspective + wxSize tbsize = m_mainToolBar->GetSize(); + m_auimgr.LoadPerspective( m_perspective, false ); + m_auimgr.GetPane( m_mainToolBar ).BestSize( tbsize ); + } + + // Set min size (overwrite params read in LoadPerspective(), is any) + m_auimgr.GetPane( m_libList ).MinSize( minsize ); + m_auimgr.GetPane( m_footprintList ).MinSize( minsize ); + + // after changing something to the aui manager, + // call Update()() to reflect the changes + m_auimgr.Update(); // Now Drawpanel is sized, we can use BestZoom to show the component (if any) #ifdef USE_WX_GRAPHICS_CONTEXT @@ -294,9 +281,9 @@ FOOTPRINT_VIEWER_FRAME* FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer() void FOOTPRINT_VIEWER_FRAME::OnCloseWindow( wxCloseEvent& Event ) { - if( m_Semaphore ) + if( m_semaphore ) { - m_Semaphore->Post(); + m_semaphore->Post(); SetModalMode( false ); // This window will be destroyed by the calling function, // to avoid side effects @@ -324,22 +311,22 @@ void FOOTPRINT_VIEWER_FRAME::OnSetRelativeOffset( wxCommandEvent& event ) void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList() { - if( m_LibList == NULL ) + if( m_libList == NULL ) return; - m_LibList->Clear(); + m_libList->Clear(); std::vector< wxString > libName = m_footprintLibTable->GetLogicalLibs(); for( unsigned ii = 0; ii < libName.size(); ii++ ) - m_LibList->Append( libName[ii] ); + m_libList->Append( libName[ii] ); // Search for a previous selection: - int index = m_LibList->FindString( m_libraryName ); + int index = m_libList->FindString( m_libraryName ); if( index != wxNOT_FOUND ) { - m_LibList->SetSelection( index, true ); + m_libList->SetSelection( index, true ); } else { @@ -358,10 +345,10 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList() void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList() { - if( m_FootprintList == NULL ) + if( m_footprintList == NULL ) return; - m_FootprintList->Clear(); + m_footprintList->Clear(); if( m_libraryName.IsEmpty() ) { @@ -387,25 +374,25 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList() fpList.Add( footprint.GetFootprintName() ); } - m_FootprintList->Append( fpList ); + m_footprintList->Append( fpList ); - int index = m_FootprintList->FindString( m_footprintName ); + int index = m_footprintList->FindString( m_footprintName ); if( index == wxNOT_FOUND ) m_footprintName = wxEmptyString; else - m_FootprintList->SetSelection( index, true ); + m_footprintList->SetSelection( index, true ); } void FOOTPRINT_VIEWER_FRAME::ClickOnLibList( wxCommandEvent& event ) { - int ii = m_LibList->GetSelection(); + int ii = m_libList->GetSelection(); if( ii < 0 ) return; - wxString name = m_LibList->GetString( ii ); + wxString name = m_libList->GetString( ii ); if( m_libraryName == name ) return; @@ -420,15 +407,15 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnLibList( wxCommandEvent& event ) void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) { - if( m_FootprintList->GetCount() == 0 ) + if( m_footprintList->GetCount() == 0 ) return; - int ii = m_FootprintList->GetSelection(); + int ii = m_footprintList->GetSelection(); if( ii < 0 ) return; - wxString name = m_FootprintList->GetString( ii ); + wxString name = m_footprintList->GetString( ii ); if( m_footprintName.CmpNoCase( name ) != 0 ) { @@ -463,7 +450,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) void FOOTPRINT_VIEWER_FRAME::DClickOnFootprintList( wxCommandEvent& event ) { - if( m_Semaphore ) + if( m_semaphore ) { ExportSelectedFootprint( event ); // Prevent the double click from being as a single mouse button release @@ -478,10 +465,10 @@ void FOOTPRINT_VIEWER_FRAME::DClickOnFootprintList( wxCommandEvent& event ) void FOOTPRINT_VIEWER_FRAME::ExportSelectedFootprint( wxCommandEvent& event ) { - int ii = m_FootprintList->GetSelection(); + int ii = m_footprintList->GetSelection(); if( ii >= 0 ) - m_selectedFootprintName = m_FootprintList->GetString( ii ); + m_selectedFootprintName = m_footprintList->GetString( ii ); else m_selectedFootprintName.Empty(); @@ -524,13 +511,13 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event ) // Ensure we have the right library list: std::vector< wxString > libNicknames = m_footprintLibTable->GetLogicalLibs(); - if( libNicknames.size() == m_LibList->GetCount() ) + if( libNicknames.size() == m_libList->GetCount() ) { unsigned ii; for( ii = 0; ii < libNicknames.size(); ii++ ) { - if( libNicknames[ii] != m_LibList->GetString( ii ) ) + if( libNicknames[ii] != m_libList->GetString( ii ) ) break; } @@ -767,10 +754,10 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event ) DisplayLibInfos(); ReCreateFootprintList(); - int id = m_LibList->FindString( m_libraryName ); + int id = m_libList->FindString( m_libraryName ); if( id >= 0 ) - m_LibList->SetSelection( id ); + m_libList->SetSelection( id ); } @@ -800,7 +787,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event ) Zoom_Automatique( false ); m_canvas->Refresh(); Update3D_Frame(); - m_FootprintList->SetStringSelection( m_footprintName ); + m_footprintList->SetStringSelection( m_footprintName ); } } @@ -817,11 +804,11 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode ) if( m_libraryName.IsEmpty() ) return; - int selection = m_FootprintList->FindString( m_footprintName ); + int selection = m_footprintList->FindString( m_footprintName ); if( aMode == NEXT_PART ) { - if( selection != wxNOT_FOUND && selection < (int)m_FootprintList->GetCount()-1 ) + if( selection != wxNOT_FOUND && selection < (int)m_footprintList->GetCount()-1 ) selection++; } @@ -833,8 +820,8 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode ) if( selection != wxNOT_FOUND ) { - m_FootprintList->SetSelection( selection ); - m_footprintName = m_FootprintList->GetString( selection ); + m_footprintList->SetSelection( selection ); + m_footprintName = m_footprintList->GetString( selection ); SetCurItem( NULL ); // Delete the current footprint diff --git a/pcbnew/modview_frame.h b/pcbnew/modview_frame.h index 19d09d6268..bf35e871eb 100644 --- a/pcbnew/modview_frame.h +++ b/pcbnew/modview_frame.h @@ -44,16 +44,11 @@ class FP_LIB_TABLE; class FOOTPRINT_VIEWER_FRAME : public PCB_BASE_FRAME { private: - // List of libraries (for selection ) - wxSashLayoutWindow* m_LibListWindow; - wxListBox* m_LibList; // The list of libs names - - // List of components in the selected library - wxSashLayoutWindow* m_FootprintListWindow; - wxListBox* m_FootprintList; // The list of footprint names + wxListBox* m_libList; // The list of libs names + wxListBox* m_footprintList; // The list of footprint names // Flags - wxSemaphore* m_Semaphore; // != NULL if the frame must emulate a modal dialog + wxSemaphore* m_semaphore; // != NULL if the frame emulates a modal dialog wxString m_configPath; // subpath for configuration protected: diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 3257e8eb50..7a9df27834 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -356,7 +356,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, if( screenHeight <= 900 ) pointSize = (pointSize * 8) / 10; - m_Layers = new PCB_LAYER_WIDGET( this, GetGalCanvas(), pointSize ); + m_Layers = new PCB_LAYER_WIDGET( this, GetCanvas(), pointSize ); m_drc = new DRC( this ); // these 2 objects point to each other diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 849a4b1e29..a11987ccb8 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -148,7 +148,7 @@ bool EnsureOutputDirectory( wxFileName* aOutputDir, { if( aReporter ) { - msg.Printf( _( "*** Error: cannot make path <%s> absolute with respect to <%s>! ***" ), + msg.Printf( _( "*** Error: cannot make path '%s' absolute with respect to '%s'! ***" ), GetChars( aOutputDir->GetPath() ), GetChars( boardFilePath ) ); aReporter->Report( msg ); @@ -165,7 +165,7 @@ bool EnsureOutputDirectory( wxFileName* aOutputDir, { if( aReporter ) { - msg.Printf( _( "Output directory <%s> created.\n" ), GetChars( outputPath ) ); + msg.Printf( _( "Output directory '%s' created.\n" ), GetChars( outputPath ) ); aReporter->Report( msg ); return true; } @@ -174,7 +174,7 @@ bool EnsureOutputDirectory( wxFileName* aOutputDir, { if( aReporter ) { - msg.Printf( _( "*** Error: cannot create output directory <%s>! ***\n" ), + msg.Printf( _( "*** Error: cannot create output directory '%s'! ***\n" ), GetChars( outputPath ) ); aReporter->Report( msg ); } diff --git a/pcbnew/plugin.cpp b/pcbnew/plugin.cpp index fd6359f4c5..22e060be09 100644 --- a/pcbnew/plugin.cpp +++ b/pcbnew/plugin.cpp @@ -123,8 +123,8 @@ void PLUGIN::FootprintLibOptions( PROPERTIES* aListToAppendTo ) const )); (*aListToAppendTo)["enable_transaction_logging"] = UTF8( _( - "Enable transaction logging. The mere presence of this option turns on the " - " logging, no need to set a Value." + "Enable transaction logging. The mere presence of this option turns on the " + "logging, no need to set a Value." )); (*aListToAppendTo)["username"] = UTF8( _( diff --git a/pcbnew/tool_modview.cpp b/pcbnew/tool_modview.cpp index 5376497e21..02fccab586 100644 --- a/pcbnew/tool_modview.cpp +++ b/pcbnew/tool_modview.cpp @@ -47,7 +47,9 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() if( m_mainToolBar == NULL ) { m_mainToolBar = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, - wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_OVERFLOW ); + wxAUI_TB_DEFAULT_STYLE + | wxAUI_TB_OVERFLOW + ); // Set up toolbar m_mainToolBar->AddTool( ID_MODVIEW_SELECT_LIB, wxEmptyString, @@ -93,22 +95,14 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg ); - if( m_Semaphore ) + // Enable this tool only if the library browser is called from + // a "load component" command + if( m_semaphore ) { - // The library browser is called from a "load component" command m_mainToolBar->AddSeparator(); - - /* - this ID_MODVIEW_FOOTPRINT_EXPORT_TO_BOARD control - is broken it does not lead to a fetched footprint on linux, either 3.0 nor 2.8 wx: - and I really don't like the drop down menu here: - - whoever broke it, please fix it: - m_mainToolBar->AddTool( ID_MODVIEW_FOOTPRINT_EXPORT_TO_BOARD, wxEmptyString, KiBitmap( export_footprint_names_xpm ), _( "Insert footprint in board" ) ); - */ } // after adding the buttons to the toolbar, must call Realize() to diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index a4ce86869f..babfc4818f 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -388,7 +388,7 @@ bool DIALOG_EXCHANGE_MODULE::Change_1_Module( MODULE* aModule, FPID oldFootprintFPID = aModule->GetFPID(); // Load module. - line.Printf( _( "Change module %s (from %s) to %s" ), + line.Printf( _( "Change module '%s' (from '%s') to '%s'" ), GetChars( aModule->GetReference() ), oldFootprintFPID.Format().c_str(), aNewFootprintFPID.Format().c_str() );