-using boost::shared_ptr;
-
-KDMDialog::KDMDialog (wxWindow* parent)
- : wxDialog (parent, wxID_ANY, _("Make KDMs"))
-{
- wxBoxSizer* vertical = new wxBoxSizer (wxVERTICAL);
-
- add_label_to_sizer (vertical, this, "Make KDMs for");
-
- wxBoxSizer* targets = new wxBoxSizer (wxHORIZONTAL);
-
- _targets = new wxTreeCtrl (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_HIDE_ROOT | wxTR_MULTIPLE | wxTR_HAS_BUTTONS);
- targets->Add (_targets, 1, wxEXPAND | wxALL, 6);
-
- _root = _targets->AddRoot ("Foo");
-
- list<shared_ptr<Cinema> > c = Config::instance()->cinemas ();
- for (list<shared_ptr<Cinema> >::iterator i = c.begin(); i != c.end(); ++i) {
- add_cinema (*i);
- }
-
- _targets->ExpandAll ();
-
- wxBoxSizer* target_buttons = new wxBoxSizer (wxVERTICAL);
-
- _add_cinema = new wxButton (this, wxID_ANY, _("Add Cinema..."));
- target_buttons->Add (_add_cinema, 1, 0, 6);
- _edit_cinema = new wxButton (this, wxID_ANY, _("Edit Cinema..."));
- target_buttons->Add (_edit_cinema, 1, 0, 6);
- _remove_cinema = new wxButton (this, wxID_ANY, _("Remove Cinema"));
- target_buttons->Add (_remove_cinema, 1, 0, 6);
-
- _add_screen = new wxButton (this, wxID_ANY, _("Add Screen..."));
- target_buttons->Add (_add_screen, 1, 0, 6);
- _edit_screen = new wxButton (this, wxID_ANY, _("Edit Screen..."));
- target_buttons->Add (_edit_screen, 1, 0, 6);
- _remove_screen = new wxButton (this, wxID_ANY, _("Remove Screen"));
- target_buttons->Add (_remove_screen, 1, 0, 6);
-
- targets->Add (target_buttons, 0, 0, 6);
-
- vertical->Add (targets, 1, wxEXPAND | wxALL, 6);
-
- wxFlexGridSizer* table = new wxFlexGridSizer (3, 2, 6);
- add_label_to_sizer (table, this, "From");
- _from_date = new wxDatePickerCtrl (this, wxID_ANY);
- table->Add (_from_date, 1, wxEXPAND);
- _from_time = new wxTimePickerCtrl (this, wxID_ANY);
- table->Add (_from_time, 1, wxEXPAND);
-
- add_label_to_sizer (table, this, "Until");
- _until_date = new wxDatePickerCtrl (this, wxID_ANY);
- table->Add (_until_date, 1, wxEXPAND);
- _until_time = new wxTimePickerCtrl (this, wxID_ANY);
- table->Add (_until_time, 1, wxEXPAND);
-
- add_label_to_sizer (table, this, "Write to");
-
-#ifdef __WXMSW__
- _folder = new DirPickerCtrl (this);
-#else
- _folder = new wxDirPickerCtrl (this, wxDD_DIR_MUST_EXIST);