12DIALOG_AUTOSAVE_RECOVERY_BASE::DIALOG_AUTOSAVE_RECOVERY_BASE( wxWindow* parent, wxWindowID
id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style ) : wxDialog( parent, id, title, pos, size, style )
14 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18 m_explanation =
new wxStaticText(
this, wxID_ANY,
_(
"KiCad found auto-saved changes from a previous session. This usually means KiCad closed unexpectedly while you had unsaved work."), wxDefaultPosition, wxDefaultSize, 0 );
22 m_fileList =
new wxListCtrl(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VRULES );
25 wxBoxSizer* bButtonSizer;
26 bButtonSizer =
new wxBoxSizer( wxHORIZONTAL );
28 m_btnRestore =
new wxButton(
this, wxID_ANY,
_(
"Restore auto-saved"), wxDefaultPosition, wxDefaultSize, 0 );
29 m_btnRestore->SetToolTip(
_(
"Replaces your saved file with the auto-saved version. The previous saved content is discarded.") );
33 m_btnKeepCurrent =
new wxButton(
this, wxID_ANY,
_(
"Keep current"), wxDefaultPosition, wxDefaultSize, 0 );
34 m_btnKeepCurrent->SetToolTip(
_(
"Keeps your saved file as-is and discards the auto-saved changes.") );
38 m_btnKeepBoth =
new wxButton(
this, wxID_ANY,
_(
"Keep both"), wxDefaultPosition, wxDefaultSize, 0 );
39 m_btnKeepBoth->SetToolTip(
_(
"Keeps your saved file and writes the auto-saved version alongside it as a separate timestamped file you can review later.") );
44 bButtonSizer->Add( 0, 0, 1, wxEXPAND, 5 );
46 m_btnCancel =
new wxButton(
this, wxID_CANCEL,
_(
"Cancel open"), wxDefaultPosition, wxDefaultSize, 0 );
49 m_btnCancel->SetToolTip(
_(
"Closes this dialog without making any changes. The auto-saved files stay on disk and will be offered again next time you open the project.") );
54 bMainSizer->Add( bButtonSizer, 0, wxALL|wxEXPAND, 10 );
60 this->Centre( wxBOTH );
DIALOG_AUTOSAVE_RECOVERY_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Auto-Save Recovery"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(600, 400), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)