41 m_list =
new wxListCtrl(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
42 wxLC_HRULES | wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_VRULES );
43 m_list->AppendColumn(
_(
"Time" ) );
44 m_list->AppendColumn(
_(
"Action" ) );
45 m_list->AppendColumn(
_(
"Count" ) );
47 m_details =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
48 wxTE_MULTILINE | wxTE_READONLY );
50 wxStdDialogButtonSizer* buttons =
new wxStdDialogButtonSizer();
55 buttons->AddButton(
new wxButton(
this, wxID_CANCEL ) );
58 wxBoxSizer* topSizer =
new wxBoxSizer( wxVERTICAL );
59 topSizer->Add(
m_list, 1, wxEXPAND | wxALL, 5 );
60 topSizer->Add(
m_details, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
61 topSizer->Add( buttons, 0, wxEXPAND | wxALL, 5 );
62 SetSizerAndFit( topSizer );
64 SetMinSize( FromDIP( wxSize( 700, 500 ) ) );
76 long row =
m_list->InsertItem(
m_list->GetItemCount(), snapshot.date.FormatISOCombined() );
78 snapshot.filesChanged > 0 ? wxString::Format(
"%d", snapshot.filesChanged ) : wxString(
"-" );
80 m_list->SetItem( row, 1, snapshot.summary );
82 m_list->SetItem( row, 2, countText );
85 m_list->SetColumnWidth( 0, FromDIP( 170 ) );
86 m_list->SetColumnWidth( 1, FromDIP( 380 ) );
87 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)