Commit bb6fffa5 authored by Felix Morgner's avatar Felix Morgner

* Set "Ctrl+Shift+S" as shortcut for "Save as..." in CvPcb and PCBnew.

  This seems to me like the defacto standard for this menu command.
* Added a default filename for save as. Currently it's set to
  "Unnamed file" using _() so its translatable.
* Changed the save dialog in PCBnew to use the path of the "original"
  file as a base for the new file.
parent 3a9f3f89
......@@ -95,7 +95,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
// Save as the .cmp file
AddMenuItem( filesMenu,
wxID_SAVEAS,
_( "Save &As..." ), SAVE_AS_HLP_MSG, KiBitmap( save_xpm ) );
_( "Save &As...\tCtrl+Shift+S" ), SAVE_AS_HLP_MSG, KiBitmap( save_xpm ) );
// Separator
filesMenu->AppendSeparator();
......
......@@ -166,8 +166,8 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName )
}
else
{
wxFileDialog dlg( this, _( "Save Component Footprint Link File" ), wxGetCwd(),
wxEmptyString, ComponentFileWildcard, wxFD_SAVE );
wxFileDialog dlg( this, _( "Save Component Footprint Link File" ), wxEmptyString,
_( "Unnamed file" ), ComponentFileWildcard, wxFD_SAVE );
if( dlg.ShowModal() == wxID_CANCEL )
return -1;
......
......@@ -445,12 +445,17 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
pcbFileName = GetBoard()->GetFileName();
if( pcbFileName.GetName() == wxEmptyString )
{
pcbFileName.SetName( _( "Unnamed file" ) );
}
// Match the default wildcard filter choice, with the inital file extension shown.
// That'll be the extension unless user changes filter dropdown listbox.
pcbFileName.SetExt( KiCadPcbFileExtension );
wxFileDialog dlg( this, _( "Save Board File As" ), wxEmptyString,
pcbFileName.GetFullPath(),
wxFileDialog dlg( this, _( "Save Board File As" ), pcbFileName.GetPath(),
pcbFileName.GetFullName(),
wildcard, wxFD_SAVE
/* wxFileDialog is not equipped to handle multiple wildcards and
wxFD_OVERWRITE_PROMPT both together.
......
......@@ -106,8 +106,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// Save As
AddMenuItem( filesMenu, ID_SAVE_BOARD_AS,
_( "Sa&ve As..." ),
_( "Save the current board as.." ),
_( "Sa&ve As...\tCtrl+Shift+S" ),
_( "Save the current board as..." ),
KiBitmap( save_as_xpm ) );
filesMenu->AppendSeparator();
......
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