Always enable save; move dirty bit to asterisk in title bar.

Also unifies PCB Editor and Schematic Editor names with other
locations in the GUI (which were still Pcbnew and Eeschema).

Fixes https://gitlab.com/kicad/code/kicad/issues/7587

Fixes https://gitlab.com/kicad/code/kicad/issues/7594
This commit is contained in:
Jeff Young 2021-02-18 15:49:35 +00:00
parent 45b2bce698
commit 66b33834b5
25 changed files with 93 additions and 89 deletions

View File

@ -93,7 +93,7 @@ EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent, const wxSt
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::EDA_3D_VIEWER %s", aTitle );
m_disable_ray_tracing = false;
m_aboutTitle = "3D Viewer";
m_aboutTitle = _( "KiCad 3D Viewer" );
// Give it an icon
wxIcon icon;

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -155,10 +155,10 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
m_buttonExportClipboard = new wxButton( m_panelRight, wxID_ANY, _("Export to Clipboard"), wxDefaultPosition, wxDefaultSize, 0 );
brightSizer->Add( m_buttonExportClipboard, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxString m_rbOutputFormatChoices[] = { _("Eeschema (.lib file)"), _("Pcbnew (.kicad_mod file)"), _("Postscript (.ps file)"), _("Logo for title block (.kicad_wks file)") };
wxString m_rbOutputFormatChoices[] = { _("Symbol (.lib file)"), _("Footprint (.kicad_mod file)"), _("Postscript (.ps file)"), _("Worksheet (.kicad_wks file)") };
int m_rbOutputFormatNChoices = sizeof( m_rbOutputFormatChoices ) / sizeof( wxString );
m_rbOutputFormat = new wxRadioBox( m_panelRight, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, m_rbOutputFormatNChoices, m_rbOutputFormatChoices, 1, wxRA_SPECIFY_COLS );
m_rbOutputFormat->SetSelection( 1 );
m_rbOutputFormat = new wxRadioBox( m_panelRight, wxID_ANY, _("Output Format"), wxDefaultPosition, wxDefaultSize, m_rbOutputFormatNChoices, m_rbOutputFormatChoices, 1, wxRA_SPECIFY_COLS );
m_rbOutputFormat->SetSelection( 0 );
brightSizer->Add( m_rbOutputFormat, 0, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sbSizer2;

View File

@ -14,7 +14,6 @@
<property name="file">bitmap2cmp_gui_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">bitmap2cmp_gui</property>
@ -26,7 +25,6 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Frame" expanded="1">
@ -1168,7 +1166,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -1513,7 +1510,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -1587,7 +1583,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -1661,7 +1656,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -1740,7 +1734,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Eeschema (.lib file)&quot; &quot;Pcbnew (.kicad_mod file)&quot; &quot;Postscript (.ps file)&quot; &quot;Logo for title block (.kicad_wks file)&quot;</property>
<property name="choices">&quot;Symbol (.lib file)&quot; &quot;Footprint (.kicad_mod file)&quot; &quot;Postscript (.ps file)&quot; &quot;Worksheet (.kicad_wks file)&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
@ -1755,7 +1749,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Format</property>
<property name="label">Output Format</property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
@ -1772,7 +1766,7 @@
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">1</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -79,7 +79,7 @@ class BM2CMP_FRAME_BASE : public KIWAY_PLAYER
wxRadioBox* m_rbPCBLayer;
wxStatusBar* m_statusBar;
// Virtual event handlers, override them in your derived class
// Virtual event handlers, overide them in your derived class
virtual void OnPaintInit( wxPaintEvent& event ) { event.Skip(); }
virtual void OnPaintGreyscale( wxPaintEvent& event ) { event.Skip(); }
virtual void OnPaintBW( wxPaintEvent& event ) { event.Skip(); }

View File

@ -64,9 +64,9 @@ wxString HOTKEY_STORE::GetSectionName( TOOL_ACTION* aAction )
std::map<wxString, wxString> s_AppNames = {
{ wxT( "common" ), _( "Common" ) },
{ wxT( "kicad" ), _( "Project Manager" ) },
{ wxT( "eeschema" ), _( "Eeschema" ) },
{ wxT( "pcbnew" ), _( "Pcbnew" ) },
{ wxT( "plEditor" ), _( "Page Layout Editor" ), },
{ wxT( "eeschema" ), _( "Schematic Editor" ) },
{ wxT( "pcbnew" ), _( "PCB Editor" ) },
{ wxT( "plEditor" ), _( "Worksheet Editor" ), },
{ wxT( "3DViewer" ), _( "3D Viewer" ) }
};

View File

@ -113,7 +113,7 @@ bool CVPCB_MAINFRAME::ReadNetListAndFpFiles( const std::string& aNetlist )
if( hasMissingNicks )
{
msg = _( "Some of the assigned footprints are legacy entries with no library names. Would "
"you like Kicad to attempt to convert them to the new required LIB_ID format? "
"you like KiCad to attempt to convert them to the new required LIB_ID format? "
"(If you answer no, then these assignments will be cleared and you will need to "
"re-assign them manually.)" );

View File

@ -61,7 +61,7 @@ void SCH_EDIT_FRAME::InstallPreferences( PAGED_DIALOG* aParent,
{
wxTreebook* book = aParent->GetTreebook();
book->AddPage( new wxPanel( book ), _( "Eeschema" ) );
book->AddPage( new wxPanel( book ), _( "Schematic Editor" ) );
book->AddSubPage( new PANEL_EESCHEMA_DISPLAY_OPTIONS( this, book ), _( "Display Options" ) );
book->AddSubPage( new PANEL_EESCHEMA_EDITING_OPTIONS( this, book ), _( "Editing Options" ) );
book->AddSubPage( new PANEL_EESCHEMA_COLOR_SETTINGS( this, book ), _( "Colors" ) );

View File

@ -124,7 +124,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
fileMenu->Add( ACTIONS::plot );
fileMenu->AppendSeparator();
fileMenu->AddQuitOrClose( &Kiface(), _( "Eeschema" ) );
fileMenu->AddQuitOrClose( &Kiface(), _( "Schematic Editor" ) );
//-- Edit menu -----------------------------------------------------------

View File

@ -216,7 +216,7 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_showBorderAndTitleBlock = true; // true to show sheet references
m_hasAutoSave = true;
m_aboutTitle = "Eeschema";
m_aboutTitle = _( "KiCad Schematic Editor" );
m_findReplaceDialog = nullptr;
@ -376,7 +376,7 @@ void SCH_EDIT_FRAME::setupUIConditions()
#define ENABLE( x ) ACTION_CONDITIONS().Enable( x )
#define CHECK( x ) ACTION_CONDITIONS().Check( x )
mgr->SetConditions( ACTIONS::save, ENABLE( cond.ContentModified() ) );
mgr->SetConditions( ACTIONS::save, ENABLE( SELECTION_CONDITIONS::ShowAlways ) );
mgr->SetConditions( ACTIONS::undo, ENABLE( cond.UndoAvailable() ) );
mgr->SetConditions( ACTIONS::redo, ENABLE( cond.RedoAvailable() ) );
@ -805,7 +805,7 @@ void SCH_EDIT_FRAME::OnUpdatePCB( wxCommandEvent& event )
{
DisplayError( this, _( "Cannot update the PCB, because the Schematic Editor is opened"
" in stand-alone mode. In order to create/update PCBs from"
" schematics, launch the Kicad shell and create a project." ) );
" schematics, launch the KiCad shell and create a project." ) );
return;
}
@ -1237,30 +1237,28 @@ void SCH_EDIT_FRAME::AddItemToScreenAndUndoList( SCH_SCREEN* aScreen, SCH_ITEM*
void SCH_EDIT_FRAME::UpdateTitle()
{
wxString title;
wxString nofile = _( "[no file]" ) + wxS(" ");
wxString app = _( "Eeschema" );
if( GetScreen()->GetFileName().IsEmpty() )
{
title = nofile + wxT( "\u2014 " ) + app;
title = _( "[no file]" ) + wxT( " \u2014 " );
}
else
{
wxFileName fn( Prj().AbsolutePath( GetScreen()->GetFileName() ) );
wxString append;
wxFileName fn( Prj().AbsolutePath( GetScreen()->GetFileName() ) );
bool readOnly = false;
bool unsaved = false;
if( fn.FileExists() )
{
if( !fn.IsFileWritable() )
append = _( "[Read Only]" ) + wxS( " " );
}
if( fn.IsOk() && fn.FileExists() )
readOnly = !fn.IsFileWritable();
else
append = nofile;
unsaved = true;
title.Printf( wxT( "%s [%s] %s\u2014 " ) + app,
title.Printf( wxT( "%s%s [%s] %s%s\u2014 " ) + _( "Schematic Editor" ),
fn.GetName(),
IsContentModified() ? "*" : "",
GetCurrentSheet().PathHumanReadable( false ),
append );
readOnly ? _( "[Read Only]" ) + wxS( " " ) : "",
unsaved ? _( "[Unsaved]" ) + wxS( " " ) : "" );
}
SetTitle( title );

View File

@ -106,7 +106,7 @@ SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_libMgr = nullptr;
m_unit = 1;
m_convert = 1;
m_aboutTitle = _( "Symbol Editor" );
m_aboutTitle = _( "KiCad Symbol Editor" );
wxIcon icon;
wxIconBundle icon_bundle;
@ -379,8 +379,8 @@ void SYMBOL_EDIT_FRAME::setupUIConditions()
return !sel.GetLibNickname().empty() && !sel.GetLibItemName().empty();
};
mgr->SetConditions( ACTIONS::saveAll, ENABLE( schematicModifiedCond || libModifiedCondition ) );
mgr->SetConditions( ACTIONS::save, ENABLE( schematicModifiedCond || libModifiedCondition ) );
mgr->SetConditions( ACTIONS::saveAll, ENABLE( SELECTION_CONDITIONS::ShowAlways ) );
mgr->SetConditions( ACTIONS::save, ENABLE( SELECTION_CONDITIONS::ShowAlways ) );
mgr->SetConditions( EE_ACTIONS::saveLibraryAs, ENABLE( libSelectedCondition ) );
mgr->SetConditions( EE_ACTIONS::saveSymbolAs, ENABLE( saveSymbolAsCondition ) );
mgr->SetConditions( EE_ACTIONS::newSymbol, ENABLE( !libSelectedCondition || canEditLib ) );

View File

@ -137,16 +137,21 @@ void SYMBOL_EDIT_FRAME::updateTitle()
if( IsSymbolFromSchematic() )
{
title += wxString::Format( _( "%s from schematic" ), m_reference );
title += wxT( " \u2014 " );
title = wxString::Format( _( "%s%s [from schematic]" ) + wxT( " \u2014 " ),
m_reference,
IsContentModified() ? "*" : "" );
}
else
{
if( GetCurPart() )
title += GetCurPart()->GetLibId().Format() + wxT( " \u2014 " ) ;
{
bool readOnly = m_libMgr && m_libMgr->IsLibraryReadOnly( GetCurLib() );
if( GetCurPart() && m_libMgr && m_libMgr->IsLibraryReadOnly( GetCurLib() ) )
title += _( "[Read Only Library]" ) + wxT( " \u2014 " );
title = wxString::Format( wxT( "%s%s %s\u2014 " ),
GetCurPart()->GetLibId().Format().c_str(),
IsContentModified() ? "*" : "",
readOnly ? _( "[Read Only Library]" ) + wxT( " " ) : "" );
}
}
title += _( "Symbol Editor" );

View File

@ -111,7 +111,7 @@ SYMBOL_VIEWER_FRAME::SYMBOL_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAM
if( aFrameType == FRAME_SCH_VIEWER_MODAL )
SetModal( true );
m_aboutTitle = "Symbol Library Viewer";
m_aboutTitle = _( "KiCad Symbol Library Viewer" );
// Force the frame name used in config. the lib viewer frame has a name
// depending on aFrameType (needed to identify the frame by wxWidgets),

View File

@ -90,7 +90,7 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent )
m_apertText = nullptr;
m_dcodeText = nullptr;
m_displayMode = 0;
m_aboutTitle = "GerbView";
m_aboutTitle = _( "KiCad Gerber Viewer" );
SHAPE_POLY_SET dummy; // A ugly trick to force the linker to include
// some methods in code and avoid link errors
@ -613,7 +613,7 @@ void GERBVIEW_FRAME::UpdateTitleAndInfo()
wxString title;
wxFileName filename( gerber->m_FileName );
title.Printf( wxT( "%s%s \u2014 " ) + _( "GerbView" ),
title.Printf( wxT( "%s%s \u2014 " ) + _( "Gerber Viewer" ),
filename.GetFullName(),
gerber->m_IsX2_file ? wxS( " " ) + _( "(with X2 attributes)" )
: wxString( wxEmptyString ) );

View File

@ -145,7 +145,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
fileMenu->Add( ACTIONS::print );
fileMenu->AppendSeparator();
fileMenu->AddQuitOrClose( &Kiface(), _( "GerbView" ) );
fileMenu->AddQuitOrClose( &Kiface(), _( "Gerber Viewer" ) );
//-- View menu -------------------------------------------------------

View File

@ -78,8 +78,8 @@ TOOL_ACTION GERBVIEW_ACTIONS::showSource( "gerbview.Inspection.showSource",
TOOL_ACTION GERBVIEW_ACTIONS::exportToPcbnew( "gerbview.Control.exportToPcbnew",
AS_GLOBAL, 0, "",
_( "Export to Pcbnew..." ),
_( "Export data in Pcbnew format" ),
_( "Export to PCB Editor..." ),
_( "Export data as a KiCad PCB file" ),
export_to_pcbnew_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::clearLayer( "gerbview.Control.clearLayer",

View File

@ -84,7 +84,7 @@ void PL_EDITOR_FRAME::ReCreateMenuBar()
fileMenu->Add( ACTIONS::print );
fileMenu->AppendSeparator();
fileMenu->AddQuitOrClose( &Kiface(), _( "Page Layout Editor" ) );
fileMenu->AddQuitOrClose( &Kiface(), _( "Worksheet Editor" ) );
//-- Edit menu -------------------------------------------------------
//

View File

@ -93,7 +93,7 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_showBorderAndTitleBlock = true; // true for reference drawings.
WS_DATA_MODEL::GetTheInstance().m_EditMode = true;
SetShowPageLimits( true );
m_aboutTitle = "Page Layout Editor";
m_aboutTitle = _( "KiCad Worksheet Editor" );
// Give an icon
wxIcon icon;
@ -257,7 +257,7 @@ void PL_EDITOR_FRAME::setupUIConditions()
#define ENABLE( x ) ACTION_CONDITIONS().Enable( x )
#define CHECK( x ) ACTION_CONDITIONS().Check( x )
mgr->SetConditions( ACTIONS::save, ENABLE( cond.ContentModified() ) );
mgr->SetConditions( ACTIONS::save, ENABLE( SELECTION_CONDITIONS::ShowAlways ) );
mgr->SetConditions( ACTIONS::undo, ENABLE( cond.UndoAvailable() ) );
mgr->SetConditions( ACTIONS::redo, ENABLE( cond.RedoAvailable() ) );
@ -464,7 +464,7 @@ void PL_EDITOR_FRAME::InstallPreferences( PAGED_DIALOG* aParent,
{
wxTreebook* book = aParent->GetTreebook();
book->AddPage( new wxPanel( book ), _( "Page Layout Editor" ) );
book->AddPage( new wxPanel( book ), _( "Worksheet Editor" ) );
book->AddSubPage( new PANEL_GAL_DISPLAY_OPTIONS( this, aParent ), _( "Display Options" ) );
book->AddSubPage( new PANEL_PL_EDITOR_COLOR_SETTINGS( this, aParent->GetTreebook() ), _( "Colors" ) );
@ -532,7 +532,7 @@ void PL_EDITOR_FRAME::UpdateTitleAndInfo()
wxString title;
wxFileName file( GetCurrentFileName() );
title.Printf( wxT( "%s \u2014 " ) + _( "Page Layout Editor" ),
title.Printf( wxT( "%s \u2014 " ) + _( "Worksheet Editor" ),
file.IsOk() ? file.GetName() : _( "no file selected" ) );
SetTitle( title );
}

View File

@ -180,7 +180,9 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizerSecondLine->Add( 0, 0, 1, wxEXPAND, 5 );
m_boardSetup = new wxHyperlinkCtrl( this, wxID_ANY, _("Board setup"), wxT("File > Board Setup..."), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
m_boardSetup = new wxHyperlinkCtrl( this, wxID_ANY, _("Board setup"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
m_boardSetup->SetToolTip( _("File > Board Setup...") );
bSizerSecondLine->Add( m_boardSetup, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
@ -335,8 +337,8 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizerdxfLeft->Add( m_DXF_plotModeOpt, 0, wxALL, 5 );
m_DXF_plotTextStrokeFontOpt = new wxCheckBox( m_SizerDXF_options->GetStaticBox(), wxID_ANY, _("Use Pcbnew font to plot texts"), wxDefaultPosition, wxDefaultSize, 0 );
m_DXF_plotTextStrokeFontOpt->SetToolTip( _("Check to use Pcbnew stroke font\nUncheck to plot oneline ASCII texts as editable text (using DXF font)") );
m_DXF_plotTextStrokeFontOpt = new wxCheckBox( m_SizerDXF_options->GetStaticBox(), wxID_ANY, _("Use KiCad font to plot texts"), wxDefaultPosition, wxDefaultSize, 0 );
m_DXF_plotTextStrokeFontOpt->SetToolTip( _("Check to use KiCad stroke font\nUncheck to plot single-line ASCII texts as editable text (using DXF font)") );
bSizerdxfLeft->Add( m_DXF_plotTextStrokeFontOpt, 0, wxALL, 5 );

View File

@ -3396,7 +3396,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Use Pcbnew font to plot texts</property>
<property name="label">Use KiCad font to plot texts</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -3417,7 +3417,7 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Check to use Pcbnew stroke font&#x0A;Uncheck to plot oneline ASCII texts as editable text (using DXF font)</property>
<property name="tooltip">Check to use KiCad stroke font&#x0A;Uncheck to plot single-line ASCII texts as editable text (using DXF font)</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>

View File

@ -528,7 +528,7 @@ int PCB_EDIT_FRAME::inferLegacyEdgeClearance( BOARD* aBoard )
// If they had different widths then we can't ensure that fills will be the same.
wxMessageBox( _( "If the zones on this board are refilled the Copper Edge Clearance "
"setting will be used (see Board Setup > Design Rules > Constraints).\n"
"This may result in different fills from previous Kicad versions which "
"This may result in different fills from previous KiCad versions which "
"used the line thicknesses of the board boundary on the Edge Cuts "
"layer." ),
_( "Edge Clearance Warning" ), wxOK | wxICON_WARNING, this );

View File

@ -115,7 +115,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
{
m_showBorderAndTitleBlock = false; // true to show the frame references
m_canvasType = aBackend;
m_aboutTitle = _( "Footprint Editor" );
m_aboutTitle = _( "KiCad Footprint Editor" );
m_selLayerBox = nullptr;
m_settings = nullptr;
@ -747,10 +747,11 @@ void FOOTPRINT_EDIT_FRAME::updateTitle()
if( IsCurrentFPFromBoard() )
{
title += wxString::Format( _( "%s [from %s.%s]" ) + wxT( " \u2014 " ),
footprint->GetReference(),
Prj().GetProjectName(),
PcbFileExtension );
title = wxString::Format( _( "%s%s [from %s.%s]" ) + wxT( " \u2014 " ),
footprint->GetReference(),
IsContentModified() ? "*" : "",
Prj().GetProjectName(),
PcbFileExtension );
}
else if( fpid.IsValid() )
{
@ -764,16 +765,17 @@ void FOOTPRINT_EDIT_FRAME::updateTitle()
}
// Note: don't used GetLoadedFPID(); footprint name may have been edited
title += wxString::Format( wxT( "%s %s\u2014 " ),
title += wxString::Format( wxT( "%s%s %s\u2014 " ),
FROM_UTF8( footprint->GetFPID().Format().c_str() ),
writable ? wxString( wxEmptyString )
: _( "[Read Only]" ) + wxS( " " ) );
IsContentModified() ? "*" : "",
writable ? "" : _( "[Read Only]" ) + wxS( " " ) );
}
else if( !fpid.GetLibItemName().empty() )
{
// Note: don't used GetLoadedFPID(); footprint name may have been edited
title += wxString::Format( wxT( "%s %s \u2014 " ),
title += wxString::Format( wxT( "%s%s %s \u2014 " ),
FROM_UTF8( footprint->GetFPID().GetLibItemName().c_str() ),
IsContentModified() ? "*" : "",
_( "[Unsaved]" ) );
}
@ -985,7 +987,7 @@ void FOOTPRINT_EDIT_FRAME::setupUIConditions()
mgr->SetConditions( ACTIONS::saveAs, ENABLE( footprintTargettedCond ) );
mgr->SetConditions( ACTIONS::revert, ENABLE( cond.ContentModified() ) );
mgr->SetConditions( ACTIONS::save, ENABLE( cond.ContentModified() ) );
mgr->SetConditions( ACTIONS::save, ENABLE( SELECTION_CONDITIONS::ShowAlways ) );
mgr->SetConditions( ACTIONS::undo, ENABLE( cond.UndoAvailable() ) );
mgr->SetConditions( ACTIONS::redo, ENABLE( cond.RedoAvailable() ) );

View File

@ -116,7 +116,7 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
if( aFrameType == FRAME_FOOTPRINT_VIEWER_MODAL )
SetModal( true );
m_aboutTitle = "Footprint Library Viewer";
m_aboutTitle = _( "KiCad Footprint Library Viewer" );
// Force the items to always snap
m_magneticItems.pads = MAGNETIC_OPTIONS::CAPTURE_ALWAYS;

View File

@ -101,7 +101,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
fileMenu->AppendSeparator();
fileMenu->Add( _( "Resc&ue" ),
_( "Clear board and get last rescue file automatically saved by Pcbnew" ),
_( "Clear board and get last rescue file automatically saved by PCB editor" ),
ID_MENU_RECOVER_BOARD_AUTOSAVE,
rescue_xpm );
@ -185,7 +185,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
fileMenu->Add( ACTIONS::plot );
fileMenu->AppendSeparator();
fileMenu->AddQuitOrClose( &Kiface(), _( "Pcbnew" ) );
fileMenu->AddQuitOrClose( &Kiface(), _( "PCB Editor" ) );
//-- Edit menu -----------------------------------------------------------
//

View File

@ -170,7 +170,7 @@ END_EVENT_TABLE()
PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
PCB_BASE_EDIT_FRAME( aKiway, aParent, FRAME_PCB_EDITOR, wxT( "Pcbnew" ), wxDefaultPosition,
PCB_BASE_EDIT_FRAME( aKiway, aParent, FRAME_PCB_EDITOR, wxT( "PCB Editor" ), wxDefaultPosition,
wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, PCB_EDIT_FRAME_NAME )
{
m_maximizeByDefault = true;
@ -186,7 +186,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_ZoneFillsDirty = true;
m_rotationAngle = 900;
m_aboutTitle = "Pcbnew";
m_aboutTitle = _( "KiCad PCB Editor" );
// Create GAL canvas
auto canvas = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_frameSize,
@ -505,7 +505,7 @@ void PCB_EDIT_FRAME::setupUIConditions()
#define ENABLE( x ) ACTION_CONDITIONS().Enable( x )
#define CHECK( x ) ACTION_CONDITIONS().Check( x )
mgr->SetConditions( ACTIONS::save, ENABLE( cond.ContentModified() ) );
mgr->SetConditions( ACTIONS::save, ENABLE( SELECTION_CONDITIONS::ShowAlways ) );
mgr->SetConditions( ACTIONS::undo, ENABLE( cond.UndoAvailable() ) );
mgr->SetConditions( ACTIONS::redo, ENABLE( cond.RedoAvailable() ) );
@ -1181,17 +1181,20 @@ void PCB_EDIT_FRAME::ExportSVG( wxCommandEvent& event )
void PCB_EDIT_FRAME::UpdateTitle()
{
wxFileName fileName = GetBoard()->GetFileName();
wxString fileinfo;
wxFileName fn = GetBoard()->GetFileName();
bool readOnly = false;
bool unsaved = false;
if( fileName.IsOk() && fileName.FileExists() )
fileinfo = fileName.IsFileWritable() ? wxString( wxEmptyString ) : wxS( " " ) + _( "[Read Only]" );
if( fn.IsOk() && fn.FileExists() )
readOnly = !fn.IsFileWritable();
else
fileinfo = wxS( " " ) + _( "[Unsaved]" );
unsaved = true;
SetTitle( wxString::Format( wxT( "%s%s \u2014 " ) + _( "Pcbnew" ),
fileName.GetName(),
fileinfo ) );
SetTitle( wxString::Format( wxT( "%s%s %s%s\u2014 " ) + _( "PCB Editor" ),
fn.GetName(),
IsContentModified() ? "*" : "",
readOnly ? _( "[Read Only]" ) + wxS( " " ) : "",
unsaved ? _( "[Unsaved]" ) + wxS( " " ) : "" ) );
}
@ -1363,7 +1366,7 @@ bool PCB_EDIT_FRAME::FetchNetlistFromSchematic( NETLIST& aNetlist, const wxStrin
{
if( !TestStandalone() )
{
DisplayError( this, _( "Cannot update the PCB because Pcbnew is opened in stand-alone "
DisplayError( this, _( "Cannot update the PCB because PCB editor is opened in stand-alone "
"mode. In order to create or update PCBs from schematics, you "
"must launch the KiCad project manager and create a project." ) );
return false; //Not in standalone mode

View File

@ -51,7 +51,7 @@ void PCB_EDIT_FRAME::InstallPreferences( PAGED_DIALOG* aParent,
{
wxTreebook* book = aParent->GetTreebook();
book->AddPage( new wxPanel( book ), _( "Pcbnew" ) );
book->AddPage( new wxPanel( book ), _( "PCB Editor" ) );
book->AddSubPage( new PANEL_DISPLAY_OPTIONS( this, aParent ), _( "Display Options" ) );
book->AddSubPage( new PANEL_EDIT_OPTIONS( this, aParent ), _( "Editing Options" ) );
book->AddSubPage( new PANEL_PCBNEW_COLOR_SETTINGS( this, book ), _( "Colors" ) );