diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-15 19:34:27 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-15 19:34:27 +0000 |
| commit | 9c04891e53ef3f0693a91ca6f50f0e6625c109eb (patch) | |
| tree | af061bb16659b0b822681ae454577c9ceb2e7bc4 /src | |
| parent | 400feca360a5b39c05959f0fdc2d0fe847090972 (diff) | |
Fix KDM dialog to initialise its time period to a week from now.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/kdm_dialog.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc index 5410f6cec..7d136955c 100644 --- a/src/wx/kdm_dialog.cc +++ b/src/wx/kdm_dialog.cc @@ -83,15 +83,20 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr<const Film> film) wxFlexGridSizer* table = new wxFlexGridSizer (3, 2, 6); add_label_to_sizer (table, this, _("From"), true); - _from_date = new wxDatePickerCtrl (this, wxID_ANY); + wxDateTime from; + from.SetToCurrent (); + _from_date = new wxDatePickerCtrl (this, wxID_ANY, from); table->Add (_from_date, 1, wxEXPAND); - _from_time = new wxTimePickerCtrl (this, wxID_ANY); + _from_time = new wxTimePickerCtrl (this, wxID_ANY, from); table->Add (_from_time, 1, wxEXPAND); - + add_label_to_sizer (table, this, _("Until"), true); - _until_date = new wxDatePickerCtrl (this, wxID_ANY); + wxDateTime to = from; + /* 1 week from now */ + to.Add (wxDateSpan (0, 0, 1, 0)); + _until_date = new wxDatePickerCtrl (this, wxID_ANY, to); table->Add (_until_date, 1, wxEXPAND); - _until_time = new wxTimePickerCtrl (this, wxID_ANY); + _until_time = new wxTimePickerCtrl (this, wxID_ANY, to); table->Add (_until_time, 1, wxEXPAND); vertical->Add (table, 0, wxEXPAND | wxALL, 6); |
