summaryrefslogtreecommitdiff
path: root/src/wx/kdm_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-03-17 00:22:52 +0000
committerCarl Hetherington <cth@carlh.net>2014-03-17 00:22:52 +0000
commit2e504b33eb9f38cac629ad31b7c107fb0cf5efda (patch)
tree9c571653f312597b744896d45e27d422acbeea88 /src/wx/kdm_dialog.cc
parenta4c19a34244aeaf183c25878933b570fc5c0ee34 (diff)
parent48b2c7b8ec57e72f2f27d5080e54e4b3c3fcda3d (diff)
Merge master.
Diffstat (limited to 'src/wx/kdm_dialog.cc')
-rw-r--r--src/wx/kdm_dialog.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc
index 5410f6cec..1f4d62bde 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);
@@ -117,7 +122,7 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr<const Film> film)
}
}
- table = new wxFlexGridSizer (3, 2, 6);
+ table = new wxFlexGridSizer (2, 2, 6);
_write_to = new wxRadioButton (this, wxID_ANY, _("Write to"));
table->Add (_write_to, 1, wxEXPAND);
@@ -125,13 +130,12 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr<const Film> film)
#ifdef DCPOMATIC_USE_OWN_DIR_PICKER
_folder = new DirPickerCtrl (this);
#else
- _folder = new wxDirPickerCtrl (this, wxID_ANY);
+ _folder = new wxDirPickerCtrl (this, wxID_ANY, wxEmptyString, wxDirSelectorPromptStr, wxDefaultPosition, wxSize (300, -1));
#endif
_folder->SetPath (wxStandardPaths::Get().GetDocumentsDir());
table->Add (_folder, 1, wxEXPAND);
- table->AddSpacer (0);
_email = new wxRadioButton (this, wxID_ANY, _("Send by email"));
table->Add (_email, 1, wxEXPAND);
@@ -144,6 +148,8 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr<const Film> film)
vertical->Add (buttons, wxSizerFlags().Expand().DoubleBorder());
}
+ _write_to->SetValue (true);
+
_targets->Bind (wxEVT_COMMAND_TREE_SEL_CHANGED, boost::bind (&KDMDialog::setup_sensitivity, this));
_add_cinema->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&KDMDialog::add_cinema_clicked, this));