Commit 752e4a4a authored by jean-pierre charras's avatar jean-pierre charras

All: change some texts and messages hard to translate, or not translatable...

All: change some texts and messages hard to translate, or not translatable (and some incorrect messages).
Pcbnew, layer manager: add option (popup menu) to always keep copper layers not visible but the active layer, even when the active layer is changed.
Usefull for multilayer ( more than 4 layers) PCBs.
parent d12a4592
...@@ -105,16 +105,16 @@ void EDA_3D_FRAME::ReCreateHToolbar() ...@@ -105,16 +105,16 @@ void EDA_3D_FRAME::ReCreateHToolbar()
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString, KiBitmap( left_xpm ), m_HToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString, KiBitmap( left_xpm ),
_( "Move left <-" ) ); _( "Move left" ) );
m_HToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString, KiBitmap( right_xpm ), m_HToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString, KiBitmap( right_xpm ),
_( "Move right ->" ) ); _( "Move right" ) );
m_HToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString, KiBitmap( up_xpm ), m_HToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString, KiBitmap( up_xpm ),
_( "Move up ^" ) ); _( "Move up" ) );
m_HToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, KiBitmap( down_xpm ), m_HToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, KiBitmap( down_xpm ),
_( "Move down v" ) ); _( "Move down" ) );
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_ORTHO, wxEmptyString, KiBitmap( ortho_xpm ), m_HToolBar->AddTool( ID_ORTHO, wxEmptyString, KiBitmap( ortho_xpm ),
......
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 20131 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -289,7 +289,7 @@ wxString EDA_BASE_FRAME::GetFileFromHistory( int cmdId, const wxString& type, ...@@ -289,7 +289,7 @@ wxString EDA_BASE_FRAME::GetFileFromHistory( int cmdId, const wxString& type,
if( !wxFileName::FileExists( fn ) ) if( !wxFileName::FileExists( fn ) )
{ {
msg = type + _( " file <" ) + fn + _( "> was not found." ); msg.Printf( wxT( "file <%s> was not found." ), GetChars( fn ) );
wxMessageBox( msg ); wxMessageBox( msg );
fileHistory->RemoveFileFromHistory( i ); fileHistory->RemoveFileFromHistory( i );
fn = wxEmptyString; fn = wxEmptyString;
......
...@@ -44,7 +44,7 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind ...@@ -44,7 +44,7 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
m_plotOriginOpt->SetSelection( 0 ); m_plotOriginOpt->SetSelection( 0 );
m_paperHPGLSizer->Add( m_plotOriginOpt, 0, wxALL, 5 ); m_paperHPGLSizer->Add( m_plotOriginOpt, 0, wxALL, 5 );
m_penHPLGWidthTitle = new wxStaticText( this, wxID_ANY, _("Pen Width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_penHPLGWidthTitle = new wxStaticText( this, wxID_ANY, _("Pen width"), wxDefaultPosition, wxDefaultSize, 0 );
m_penHPLGWidthTitle->Wrap( -1 ); m_penHPLGWidthTitle->Wrap( -1 );
m_paperHPGLSizer->Add( m_penHPLGWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_paperHPGLSizer->Add( m_penHPLGWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
...@@ -67,7 +67,7 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind ...@@ -67,7 +67,7 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
wxStaticBoxSizer* sbSizerPlotFormat; wxStaticBoxSizer* sbSizerPlotFormat;
sbSizerPlotFormat = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("General Options") ), wxVERTICAL ); sbSizerPlotFormat = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("General Options") ), wxVERTICAL );
m_defaultLineWidthTitle = new wxStaticText( this, wxID_ANY, _("Default Line Thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); m_defaultLineWidthTitle = new wxStaticText( this, wxID_ANY, _("Default line thickness"), wxDefaultPosition, wxDefaultSize, 0 );
m_defaultLineWidthTitle->Wrap( -1 ); m_defaultLineWidthTitle->Wrap( -1 );
sbSizerPlotFormat->Add( m_defaultLineWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); sbSizerPlotFormat->Add( m_defaultLineWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<property name="size">-1,-1</property> <property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property> <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Plot</property> <property name="title">Plot Schematic</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
...@@ -507,7 +507,7 @@ ...@@ -507,7 +507,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Pen Width:</property> <property name="label">Pen width</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -787,7 +787,7 @@ ...@@ -787,7 +787,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Default Line Thickness:</property> <property name="label">Default line thickness</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
......
...@@ -77,7 +77,7 @@ class DIALOG_PLOT_SCHEMATIC_BASE : public DIALOG_SHIM ...@@ -77,7 +77,7 @@ class DIALOG_PLOT_SCHEMATIC_BASE : public DIALOG_SHIM
public: public:
DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot Schematic"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PLOT_SCHEMATIC_BASE(); ~DIALOG_PLOT_SCHEMATIC_BASE();
}; };
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
#if defined(PCBNEW) || defined(CVPCB) || defined(GERBVIEW) #if defined(PCBNEW) || defined(CVPCB) || defined(GERBVIEW)
#if defined( USE_PCBNEW_NANOMETRES ) #if defined( USE_PCBNEW_NANOMETRES )
#if defined(GERBVIEW) #if defined(GERBVIEW)
#define IU_PER_MM 1e5 // Gerbview uses 10 micrometer. #define IU_PER_MM 1e5 // Gerbview IU is 10 nanometers.
#else #else
#define IU_PER_MM 1e6 // Pcbnew uses nanometers. #define IU_PER_MM 1e6 // Pcbnew IU is 1 nanometer.
#endif #endif
#define IU_PER_MILS (IU_PER_MM * 0.0254) #define IU_PER_MILS (IU_PER_MM * 0.0254)
#define IU_PER_DECIMILS (IU_PER_MM * 0.00254) #define IU_PER_DECIMILS (IU_PER_MM * 0.00254)
......
...@@ -78,6 +78,7 @@ PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( PCB_EDIT_FRAME* aParent, wxWindow* aFocusOwn ...@@ -78,6 +78,7 @@ PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( PCB_EDIT_FRAME* aParent, wxWindow* aFocusOwn
LAYER_WIDGET( aParent, aFocusOwner, aPointSize ), LAYER_WIDGET( aParent, aFocusOwner, aPointSize ),
myframe( aParent ) myframe( aParent )
{ {
m_alwaysShowActiveCopperLayer = false;
ReFillRender(); ReFillRender();
// Update default tabs labels for GerbView // Update default tabs labels for GerbView
...@@ -90,7 +91,7 @@ PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( PCB_EDIT_FRAME* aParent, wxWindow* aFocusOwn ...@@ -90,7 +91,7 @@ PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( PCB_EDIT_FRAME* aParent, wxWindow* aFocusOwn
// since Popupmenu() calls this->ProcessEvent() we must call this->Connect() // since Popupmenu() calls this->ProcessEvent() we must call this->Connect()
// and not m_LayerScrolledWindow->Connect() // and not m_LayerScrolledWindow->Connect()
Connect( ID_SHOW_ALL_COPPERS, ID_SHOW_NO_COPPERS_BUT_ACTIVE, wxEVT_COMMAND_MENU_SELECTED, Connect( ID_SHOW_ALL_COPPERS, ID_ALWAYS_SHOW_NO_COPPERS_BUT_ACTIVE, wxEVT_COMMAND_MENU_SELECTED,
wxCommandEventHandler( PCB_LAYER_WIDGET::onPopupSelection ), NULL, this ); wxCommandEventHandler( PCB_LAYER_WIDGET::onPopupSelection ), NULL, this );
// install the right click handler into each control at end of ReFill() // install the right click handler into each control at end of ReFill()
...@@ -120,9 +121,14 @@ void PCB_LAYER_WIDGET::onRightDownLayers( wxMouseEvent& event ) ...@@ -120,9 +121,14 @@ void PCB_LAYER_WIDGET::onRightDownLayers( wxMouseEvent& event )
// menu text is capitalized: // menu text is capitalized:
// http://library.gnome.org/devel/hig-book/2.20/design-text-labels.html.en#layout-capitalization // http://library.gnome.org/devel/hig-book/2.20/design-text-labels.html.en#layout-capitalization
menu.Append( new wxMenuItem( &menu, ID_SHOW_ALL_COPPERS, _( "Show All Copper Layers" ) ) ); menu.Append( new wxMenuItem( &menu, ID_SHOW_ALL_COPPERS,
menu.Append( new wxMenuItem( &menu, ID_SHOW_NO_COPPERS_BUT_ACTIVE, _( "Hide All Copper Layers But Active" ) ) ); _( "Show All Copper Layers" ) ) );
menu.Append( new wxMenuItem( &menu, ID_SHOW_NO_COPPERS, _( "Hide All Copper Layers" ) ) ); menu.Append( new wxMenuItem( &menu, ID_SHOW_NO_COPPERS_BUT_ACTIVE,
_( "Hide All Copper Layers But Active" ) ) );
menu.Append( new wxMenuItem( &menu, ID_ALWAYS_SHOW_NO_COPPERS_BUT_ACTIVE,
_( "Always Hide All Copper Layers But Active" ) ) );
menu.Append( new wxMenuItem( &menu, ID_SHOW_NO_COPPERS,
_( "Hide All Copper Layers" ) ) );
PopupMenu( &menu ); PopupMenu( &menu );
...@@ -135,20 +141,22 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) ...@@ -135,20 +141,22 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
int rowCount; int rowCount;
int menuId = event.GetId(); int menuId = event.GetId();
bool visible; bool visible;
bool force_active_layer_visible;
switch( menuId ) switch( menuId )
{ {
case ID_SHOW_ALL_COPPERS: case ID_SHOW_ALL_COPPERS:
visible = true; case ID_ALWAYS_SHOW_NO_COPPERS_BUT_ACTIVE:
goto L_change_coppers;
case ID_SHOW_NO_COPPERS_BUT_ACTIVE: case ID_SHOW_NO_COPPERS_BUT_ACTIVE:
case ID_SHOW_NO_COPPERS: case ID_SHOW_NO_COPPERS:
visible = false; visible = menuId == ID_SHOW_ALL_COPPERS;
L_change_coppers: m_alwaysShowActiveCopperLayer = ( menuId == ID_ALWAYS_SHOW_NO_COPPERS_BUT_ACTIVE );
force_active_layer_visible = ( menuId == ID_SHOW_NO_COPPERS_BUT_ACTIVE ||
menuId == ID_ALWAYS_SHOW_NO_COPPERS_BUT_ACTIVE );
// Search the last copper layer row index:
int lastCu = -1; int lastCu = -1;
rowCount = GetLayerRowCount(); rowCount = GetLayerRowCount();
for( int row=rowCount-1; row>=0; --row ) for( int row = rowCount-1; row>=0; --row )
{ {
wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 3 ); wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 3 );
LAYER_NUM layer = getDecodedId( cb->GetId() ); LAYER_NUM layer = getDecodedId( cb->GetId() );
...@@ -159,6 +167,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) ...@@ -159,6 +167,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
} }
} }
// Enbale/disable the copper layers visibility:
for( int row=0; row<rowCount; ++row ) for( int row=0; row<rowCount; ++row )
{ {
wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 3 ); wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 3 );
...@@ -167,14 +176,12 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) ...@@ -167,14 +176,12 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
if( IsValidCopperLayerIndex( layer ) ) if( IsValidCopperLayerIndex( layer ) )
{ {
bool loc_visible = visible; bool loc_visible = visible;
if( (menuId == ID_SHOW_NO_COPPERS_BUT_ACTIVE ) && if( force_active_layer_visible && (layer == myframe->getActiveLayer() ) )
(layer == myframe->getActiveLayer() ) )
loc_visible = true; loc_visible = true;
cb->SetValue( loc_visible ); cb->SetValue( loc_visible );
bool isLastCopperLayer = (row==lastCu); bool isLastCopperLayer = (row==lastCu);
OnLayerVisible( layer, loc_visible, isLastCopperLayer ); OnLayerVisible( layer, loc_visible, isLastCopperLayer );
if( isLastCopperLayer ) if( isLastCopperLayer )
...@@ -338,12 +345,27 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) ...@@ -338,12 +345,27 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer )
// false from this function. // false from this function.
myframe->setActiveLayer( aLayer, false ); myframe->setActiveLayer( aLayer, false );
if(DisplayOpt.ContrastModeDisplay) if( m_alwaysShowActiveCopperLayer )
OnLayerSelected();
else if(DisplayOpt.ContrastModeDisplay)
myframe->GetCanvas()->Refresh(); myframe->GetCanvas()->Refresh();
return true; return true;
} }
void PCB_LAYER_WIDGET::OnLayerSelected()
{
if( !m_alwaysShowActiveCopperLayer )
return;
// postprocess after an active layer selection
// ensure active layer visible
wxCommandEvent event;
event.SetId( ID_ALWAYS_SHOW_NO_COPPERS_BUT_ACTIVE );
onPopupSelection( event );
}
void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool isFinal ) void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool isFinal )
{ {
...@@ -371,29 +393,7 @@ void PCB_LAYER_WIDGET::OnRenderColorChange( int aId, EDA_COLOR_T aColor ) ...@@ -371,29 +393,7 @@ void PCB_LAYER_WIDGET::OnRenderColorChange( int aId, EDA_COLOR_T aColor )
void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
{ {
BOARD* brd = myframe->GetBoard(); BOARD* brd = myframe->GetBoard();
brd->SetElementVisibility( aId, isEnabled );
/* @todo:
move:
GRID_VISIBLE, ? maybe not this one
into m_VisibleElements and get rid of globals.
*/
switch( aId )
{
// see todo above, don't really want anything except IsElementVisible() here.
case GRID_VISIBLE:
// @todo, make read/write accessors for grid control so the write accessor can fire updates to
// grid state listeners. I think the grid state should be kept in the BOARD.
brd->SetElementVisibility( aId, isEnabled ); // set visibilty flag also in list, and myframe->m_Draw_Grid
break;
default:
brd->SetElementVisibility( aId, isEnabled );
}
myframe->GetCanvas()->Refresh(); myframe->GetCanvas()->Refresh();
} }
......
...@@ -89,17 +89,24 @@ public: ...@@ -89,17 +89,24 @@ public:
void OnRenderEnable( int aId, bool isEnabled ); void OnRenderEnable( int aId, bool isEnabled );
//-----</implement LAYER_WIDGET abstract callback functions>---------- //-----</implement LAYER_WIDGET abstract callback functions>----------
void OnLayerSelected(); // postprocess after an active layer selection
// ensure active layer visible if
// m_alwaysShowActiveCopperLayer is true;
protected: protected:
static const LAYER_WIDGET::ROW s_render_rows[]; static const LAYER_WIDGET::ROW s_render_rows[];
bool m_alwaysShowActiveCopperLayer; // If true: Only shows the current active layer
// even if it is changed
PCB_EDIT_FRAME* myframe; PCB_EDIT_FRAME* myframe;
// popup menu ids. // popup menu ids.
#define ID_SHOW_ALL_COPPERS wxID_HIGHEST #define ID_SHOW_ALL_COPPERS wxID_HIGHEST
#define ID_SHOW_NO_COPPERS (wxID_HIGHEST+1) #define ID_SHOW_NO_COPPERS (wxID_HIGHEST+1)
#define ID_SHOW_NO_COPPERS_BUT_ACTIVE (wxID_HIGHEST+2) #define ID_SHOW_NO_COPPERS_BUT_ACTIVE (wxID_HIGHEST+2)
#define ID_ALWAYS_SHOW_NO_COPPERS_BUT_ACTIVE (wxID_HIGHEST+3)
/** /**
* Function OnRightDownLayers * Function OnRightDownLayers
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012) // C++ code generated with wxFormBuilder (version Oct 8 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_FP_LIB_TABLE_BASE_H__ #ifndef __DIALOG_FP_LIB_TABLE_BASE_H__
#define __DIALOG_FP_LIB_TABLE_BASE_H__ #define __DIALOG_FP_LIB_TABLE_BASE_H__
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h> #include <wx/intl.h>
class DIALOG_SHIM; class DIALOG_SHIM;
#include "dialog_shim.h" #include "dialog_shim.h"
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/string.h> #include <wx/string.h>
#include <wx/font.h> #include <wx/font.h>
#include <wx/grid.h> #include <wx/grid.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/panel.h> #include <wx/panel.h>
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include <wx/image.h> #include <wx/image.h>
#include <wx/icon.h> #include <wx/icon.h>
#include <wx/aui/auibook.h> #include <wx/aui/auibook.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/splitter.h> #include <wx/splitter.h>
#include <wx/dialog.h> #include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_FP_LIB_TABLE_BASE /// Class DIALOG_FP_LIB_TABLE_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DIALOG_FP_LIB_TABLE_BASE : public DIALOG_SHIM class DIALOG_FP_LIB_TABLE_BASE : public DIALOG_SHIM
{ {
private: private:
protected: protected:
wxSplitterWindow* m_splitter; wxSplitterWindow* m_splitter;
wxPanel* m_top; wxPanel* m_top;
wxAuiNotebook* m_auinotebook; wxAuiNotebook* m_auinotebook;
wxPanel* m_global_panel; wxPanel* m_global_panel;
wxGrid* m_global_grid; wxGrid* m_global_grid;
wxPanel* m_project_panel; wxPanel* m_project_panel;
wxGrid* m_project_grid; wxGrid* m_project_grid;
wxButton* m_append_button; wxButton* m_append_button;
wxButton* m_delete_button; wxButton* m_delete_button;
wxButton* m_move_up_button; wxButton* m_move_up_button;
wxButton* m_move_down_button; wxButton* m_move_down_button;
wxPanel* m_bottom; wxPanel* m_bottom;
wxGrid* m_path_subs_grid; wxGrid* m_path_subs_grid;
wxStdDialogButtonSizer* m_sdbSizer1; wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel; wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void pageChangedHandler( wxAuiNotebookEvent& event ) { event.Skip(); } virtual void pageChangedHandler( wxAuiNotebookEvent& event ) { event.Skip(); }
virtual void onGridCellLeftClick( wxGridEvent& event ) { event.Skip(); } virtual void onGridCellLeftClick( wxGridEvent& event ) { event.Skip(); }
virtual void onGridCellLeftDClick( wxGridEvent& event ) { event.Skip(); } virtual void onGridCellLeftDClick( wxGridEvent& event ) { event.Skip(); }
virtual void onGridCellRightClick( wxGridEvent& event ) { event.Skip(); } virtual void onGridCellRightClick( wxGridEvent& event ) { event.Skip(); }
virtual void onGridCmdSelectCell( wxGridEvent& event ) { event.Skip(); } virtual void onGridCmdSelectCell( wxGridEvent& event ) { event.Skip(); }
virtual void appendRowHandler( wxMouseEvent& event ) { event.Skip(); } virtual void appendRowHandler( wxMouseEvent& event ) { event.Skip(); }
virtual void deleteRowHandler( wxMouseEvent& event ) { event.Skip(); } virtual void deleteRowHandler( wxMouseEvent& event ) { event.Skip(); }
virtual void moveUpHandler( wxMouseEvent& event ) { event.Skip(); } virtual void moveUpHandler( wxMouseEvent& event ) { event.Skip(); }
virtual void moveDownHandler( wxMouseEvent& event ) { event.Skip(); } virtual void moveDownHandler( wxMouseEvent& event ) { event.Skip(); }
virtual void onCancelButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void onCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void onOKButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void onOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
public: public:
DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("PCB Library Tables"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 996,652 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("PCB Library Tables"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 996,652 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_FP_LIB_TABLE_BASE(); ~DIALOG_FP_LIB_TABLE_BASE();
void m_splitterOnIdle( wxIdleEvent& ) void m_splitterOnIdle( wxIdleEvent& )
{ {
m_splitter->SetSashPosition( 398 ); m_splitter->SetSashPosition( 398 );
m_splitter->Disconnect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_FP_LIB_TABLE_BASE::m_splitterOnIdle ), NULL, this ); m_splitter->Disconnect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_FP_LIB_TABLE_BASE::m_splitterOnIdle ), NULL, this );
} }
}; };
#endif //__DIALOG_FP_LIB_TABLE_BASE_H__ #endif //__DIALOG_FP_LIB_TABLE_BASE_H__
...@@ -523,7 +523,7 @@ void DIALOG_GENDRILL::OnGenReportFile( wxCommandEvent& event ) ...@@ -523,7 +523,7 @@ void DIALOG_GENDRILL::OnGenReportFile( wxCommandEvent& event )
} }
else else
{ {
msg.Printf( _( "Create report file %s\n" ), GetChars( dlg.GetPath() ) ); msg.Printf( _( "Report file %s created\n" ), GetChars( dlg.GetPath() ) );
m_messagesBox->AppendText( msg ); m_messagesBox->AppendText( msg );
} }
} }
......
...@@ -161,8 +161,9 @@ bool PCB_EDIT_FRAME::LoadOnePcbFile( const wxString& aFileName, bool aAppend, ...@@ -161,8 +161,9 @@ bool PCB_EDIT_FRAME::LoadOnePcbFile( const wxString& aFileName, bool aAppend,
{ {
if( GetScreen()->IsModify() && !aAppend ) if( GetScreen()->IsModify() && !aAppend )
{ {
if( !IsOK( this, _( "The current board has been modified. Do you wish to discard \ if( !IsOK( this,
the changes?" ) ) ) _( "The current board has been modified.\n"
"Do you wish to discard the changes?" ) ) )
return false; return false;
} }
......
...@@ -924,7 +924,7 @@ bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES* ...@@ -924,7 +924,7 @@ bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES*
if( tmp.GetExt() != KiCadFootprintFileExtension ) if( tmp.GetExt() != KiCadFootprintFileExtension )
{ {
THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' has found in library path '%s'" ), THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' was found in library path '%s'" ),
files[i].GetData(), aLibraryPath.GetData() ) ); files[i].GetData(), aLibraryPath.GetData() ) );
} }
} }
......
...@@ -1758,7 +1758,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES* aProp ...@@ -1758,7 +1758,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES* aProp
if( tmp.GetExt() != KiCadFootprintFileExtension ) if( tmp.GetExt() != KiCadFootprintFileExtension )
{ {
THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' has found in library path '%s'" ), THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' was found in library path '%s'" ),
files[i].GetData(), aLibraryPath.GetData() ) ); files[i].GetData(), aLibraryPath.GetData() ) );
} }
} }
......
...@@ -102,8 +102,8 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar() ...@@ -102,8 +102,8 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// Save the currently loaded legacy library as an s-expression library. // Save the currently loaded legacy library as an s-expression library.
AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBRARY_AS, AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBRARY_AS,
_( "Save Current Library as Other" ), _( "Save Current Library as ..." ),
_( "Save entire current library as new library." ), _( "Save entire current library under a new name." ),
wxNullBitmap ); wxNullBitmap );
// Save module // Save module
......
...@@ -679,6 +679,7 @@ bool PCB_EDIT_FRAME::IsMicroViaAcceptable( void ) ...@@ -679,6 +679,7 @@ bool PCB_EDIT_FRAME::IsMicroViaAcceptable( void )
void PCB_EDIT_FRAME::syncLayerWidgetLayer() void PCB_EDIT_FRAME::syncLayerWidgetLayer()
{ {
m_Layers->SelectLayer( getActiveLayer() ); m_Layers->SelectLayer( getActiveLayer() );
m_Layers->OnLayerSelected();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment