diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index be84b15d29..1edb513bae 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -197,40 +197,46 @@ EDA_ITEM* SEGVIA::Clone() const wxString SEGVIA::GetSelectMenuText() const { + // Note: we use here Printf to make message translatable. wxString text; + wxString format; NETINFO_ITEM* net; BOARD* board = GetBoard(); int shape = GetShape(); if( shape == VIA_BLIND_BURIED ) - text << wxT( " " ) << _( "Blind/Buried " ); + format = _( "Blind/Buried Via %s, net[%s] (%d) on layers %s/%s" ); else if( shape == VIA_MICROVIA ) - text << wxT( " " ) << _( "Micro " ); + format = _( "Micro Via %s, Net [%s] (%d) on layers %s/%s" ); // else say nothing about normal (through) vias - - text << _( "Via" ) << wxT( " " ) << ShowWidth(); + else format = _( "Via %s net [%s] (%d) on layers %s/%s" ); if( board ) { net = board->FindNet( GetNet() ); + wxString netname; if( net ) - text << wxT( " [" ) << net->GetNetname() << wxT( "]" ); - - text << wxChar( ' ' ) << _( "Net:" ) << GetNet(); + netname = net->GetNetname(); // say which layers, only two for now LAYER_NUM topLayer; LAYER_NUM botLayer; ReturnLayerPair( &topLayer, &botLayer ); - text << _( " on " ) << board->GetLayerName( topLayer ) << wxT( "/" ) - << board->GetLayerName( botLayer ); + text.Printf( format.GetData(), GetChars( ShowWidth() ), + GetChars( netname ), GetNet(), + GetChars( board->GetLayerName( topLayer ) ), + GetChars( board->GetLayerName( botLayer ) ) ); + } else { wxFAIL_MSG( wxT( "SEGVIA::GetSelectMenuText: BOARD is NULL" ) ); text << wxT( "???" ); + text.Printf( format.GetData(), GetChars( ShowWidth() ), + wxT( "???" ), 0, + wxT( "??" ), wxT( "??" ) ); } return text; @@ -1116,7 +1122,7 @@ void TRACK::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList ) LAYER_NUM top_layer, bottom_layer; Via->ReturnLayerPair( &top_layer, &bottom_layer ); - msg = board->GetLayerName( top_layer ) + wxT( "/" ) + msg = board->GetLayerName( top_layer ) + wxT( "/" ) + board->GetLayerName( bottom_layer ); } else @@ -1507,29 +1513,31 @@ int TRACK::GetEndSegments( int aCount, TRACK** aStartTrace, TRACK** aEndTrace ) wxString TRACK::GetSelectMenuText() const { wxString text; - wxString temp; + wxString netname; NETINFO_ITEM* net; BOARD* board = GetBoard(); // deleting tracks requires all the information we can get to // disambiguate all the choices under the cursor! - text << _( "Track" ) << wxT( " " ) << ShowWidth(); - if( board ) { net = board->FindNet( GetNet() ); if( net ) - text << wxT( " [" ) << net->GetNetname() << wxT( "]" ); + netname = net->GetNetname(); + else + netname = _("Not found"); } else { wxFAIL_MSG( wxT( "TRACK::GetSelectMenuText: BOARD is NULL" ) ); - text << wxT( "???" ); + netname = wxT( "???" ); } - text << _( " on " ) << GetLayerName() << wxT(", ") << _("Net:") << GetNet() - << wxT(", ") << _("Length:") << ::LengthDoubleToString( GetLength() ); + text.Printf( _("Track %s, net [%s] (%d) on layer %s, length: %s" ), + GetChars( ShowWidth() ), GetChars( netname ), + GetNet(), GetLayerName(), + GetChars( ::LengthDoubleToString( GetLength() ) ) ); return text; } diff --git a/pcbnew/dialogs/dialog_footprint_wizard_list.fbp b/pcbnew/dialogs/dialog_footprint_wizard_list.fbp index ea4218b74e..7060f4a00f 100644 --- a/pcbnew/dialogs/dialog_footprint_wizard_list.fbp +++ b/pcbnew/dialogs/dialog_footprint_wizard_list.fbp @@ -39,11 +39,11 @@ 0 wxID_ANY - + 400,200 DIALOG_FOOTPRINT_WIZARD_LIST_BASE - - wxDEFAULT_DIALOG_STYLE + 404,200 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Footprint Wizards @@ -88,12 +88,12 @@ - bSizer4 + bSizerMain wxVERTICAL none 5 - wxALL + wxALL|wxEXPAND 1 1 @@ -153,7 +153,7 @@ 0 - -1,120 + 485,120 1 m_footprintWizardsGrid 1 @@ -255,7 +255,7 @@ 1 1 - 0 + 1 0 Dock 0 diff --git a/pcbnew/dialogs/dialog_footprint_wizard_list_base.cpp b/pcbnew/dialogs/dialog_footprint_wizard_list_base.cpp index 6bdf498878..6a0aabd45c 100644 --- a/pcbnew/dialogs/dialog_footprint_wizard_list_base.cpp +++ b/pcbnew/dialogs/dialog_footprint_wizard_list_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,10 +11,10 @@ DIALOG_FOOTPRINT_WIZARD_LIST_BASE::DIALOG_FOOTPRINT_WIZARD_LIST_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetSizeHints( wxSize( 400,200 ), wxDefaultSize ); - wxBoxSizer* bSizer4; - bSizer4 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizerMain; + bSizerMain = new wxBoxSizer( wxVERTICAL ); m_footprintWizardsGrid = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); @@ -47,17 +47,17 @@ DIALOG_FOOTPRINT_WIZARD_LIST_BASE::DIALOG_FOOTPRINT_WIZARD_LIST_BASE( wxWindow* // Cell Defaults m_footprintWizardsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); - m_footprintWizardsGrid->SetMinSize( wxSize( -1,120 ) ); + m_footprintWizardsGrid->SetMinSize( wxSize( 485,120 ) ); - bSizer4->Add( m_footprintWizardsGrid, 1, wxALL, 5 ); + bSizerMain->Add( m_footprintWizardsGrid, 1, wxALL|wxEXPAND, 5 ); m_btOpen = new wxButton( this, wxID_ANY, _("Open"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer4->Add( m_btOpen, 0, wxALIGN_CENTER|wxALL, 5 ); + m_btOpen->SetDefault(); + bSizerMain->Add( m_btOpen, 0, wxALIGN_CENTER|wxALL, 5 ); - this->SetSizer( bSizer4 ); + this->SetSizer( bSizerMain ); this->Layout(); - bSizer4->Fit( this ); this->Centre( wxBOTH ); diff --git a/pcbnew/dialogs/dialog_footprint_wizard_list_base.h b/pcbnew/dialogs/dialog_footprint_wizard_list_base.h index 974728e6b4..8b7c0abb31 100644 --- a/pcbnew/dialogs/dialog_footprint_wizard_list_base.h +++ b/pcbnew/dialogs/dialog_footprint_wizard_list_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,8 @@ #include #include #include +class DIALOG_SHIM; + #include "dialog_shim.h" #include #include @@ -43,7 +45,7 @@ class DIALOG_FOOTPRINT_WIZARD_LIST_BASE : public DIALOG_SHIM public: - DIALOG_FOOTPRINT_WIZARD_LIST_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Wizards"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + DIALOG_FOOTPRINT_WIZARD_LIST_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Wizards"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 404,200 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_FOOTPRINT_WIZARD_LIST_BASE(); };