45 m_list =
new wxListCtrl(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
46 wxLC_HRULES | wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_VRULES );
47 m_list->AppendColumn(
_(
"Time" ) );
48 m_list->AppendColumn(
_(
"Action" ) );
49 m_list->AppendColumn(
_(
"Count" ) );
51 m_details =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
52 wxTE_MULTILINE | wxTE_READONLY );
54 wxStdDialogButtonSizer* buttons =
new wxStdDialogButtonSizer();
59 buttons->AddButton(
new wxButton(
this, wxID_CANCEL ) );
62 wxBoxSizer* topSizer =
new wxBoxSizer( wxVERTICAL );
63 topSizer->Add(
m_list, 1, wxEXPAND | wxALL, 5 );
64 topSizer->Add(
m_details, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
65 topSizer->Add( buttons, 0, wxEXPAND | wxALL, 5 );
66 SetSizerAndFit( topSizer );
68 SetMinSize( FromDIP( wxSize( 700, 500 ) ) );
80 long row =
m_list->InsertItem(
m_list->GetItemCount(), snapshot.date.FormatISOCombined() );
82 snapshot.filesChanged > 0 ? wxString::Format(
"%d", snapshot.filesChanged ) : wxString(
"-" );
84 m_list->SetItem( row, 1, snapshot.summary );
86 m_list->SetItem( row, 2, countText );
89 m_list->SetColumnWidth( 0, FromDIP( 170 ) );
90 m_list->SetColumnWidth( 1, FromDIP( 380 ) );
91 m_list->SetColumnWidth( 2, FromDIP( 70 ) );
void UpdateDetails(long aIndex)
DIALOG_RESTORE_LOCAL_HISTORY(wxWindow *aParent, const std::vector< LOCAL_HISTORY_SNAPSHOT_INFO > &aSnapshots)
void OnRestoreClicked(wxCommandEvent &aEvent)
wxButton * m_restoreButton
const std::vector< LOCAL_HISTORY_SNAPSHOT_INFO > & m_snapshots
void OnItemActivated(wxListEvent &aEvent)
void OnSelectionChanged(wxListEvent &aEvent)
wxString GetSelectedHash() const
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)