From dfa88d5ad8760d10c15864d01aae9eb8222060ea Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 6 Jan 2013 13:29:21 +0000 Subject: [PATCH] Stub new cinema dialog. --- src/wx/kdm_dialog.cc | 17 +++++++++++++++++ src/wx/kdm_dialog.h | 2 ++ src/wx/new_cinema_dialog.cc | 26 ++++++++++++++++++++++++++ src/wx/new_cinema_dialog.h | 27 +++++++++++++++++++++++++++ src/wx/wscript | 1 + 5 files changed, 73 insertions(+) create mode 100644 src/wx/new_cinema_dialog.cc create mode 100644 src/wx/new_cinema_dialog.h diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc index ba478f7d5..519317dcc 100644 --- a/src/wx/kdm_dialog.cc +++ b/src/wx/kdm_dialog.cc @@ -22,6 +22,7 @@ #include #include "lib/cinema.h" #include "kdm_dialog.h" +#include "new_cinema_dialog.h" #include "wx_util.h" #ifdef __WXMSW__ #include "dir_picker_ctrl.h" @@ -94,6 +95,8 @@ KDMDialog::KDMDialog (wxWindow* parent) } _targets->Connect (wxID_ANY, wxEVT_COMMAND_TREE_SEL_CHANGED, wxCommandEventHandler (KDMDialog::targets_selection_changed), 0, this); + _new_cinema->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (KDMDialog::new_cinema_clicked), 0, this); + _new_screen->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (KDMDialog::new_screen_clicked), 0, this); _new_screen->Enable (false); @@ -138,3 +141,17 @@ KDMDialog::add_screen (shared_ptr c, shared_ptr s) _screens[_targets->AppendItem (i->first, std_to_wx (s->name))] = s; } + +void +KDMDialog::new_cinema_clicked (wxCommandEvent &) +{ + NewCinemaDialog* d = new NewCinemaDialog (this); + d->ShowModal (); + d->Destroy (); +} + +void +KDMDialog::new_screen_clicked (wxCommandEvent &) +{ + +} diff --git a/src/wx/kdm_dialog.h b/src/wx/kdm_dialog.h index fe44bb83a..d45d4bef8 100644 --- a/src/wx/kdm_dialog.h +++ b/src/wx/kdm_dialog.h @@ -40,6 +40,8 @@ private: void add_cinema (boost::shared_ptr); void add_screen (boost::shared_ptr, boost::shared_ptr); void targets_selection_changed (wxCommandEvent &); + void new_cinema_clicked (wxCommandEvent &); + void new_screen_clicked (wxCommandEvent &); wxTreeCtrl* _targets; wxButton* _new_cinema; diff --git a/src/wx/new_cinema_dialog.cc b/src/wx/new_cinema_dialog.cc new file mode 100644 index 000000000..22fd61be9 --- /dev/null +++ b/src/wx/new_cinema_dialog.cc @@ -0,0 +1,26 @@ +/* + Copyright (C) 2012 Carl Hetherington + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#include "new_cinema_dialog.h" + +NewCinemaDialog::NewCinemaDialog (wxWindow* parent) + : wxDialog (parent, wxID_ANY, _("New Cinema")) +{ + +} diff --git a/src/wx/new_cinema_dialog.h b/src/wx/new_cinema_dialog.h new file mode 100644 index 000000000..9e05bba41 --- /dev/null +++ b/src/wx/new_cinema_dialog.h @@ -0,0 +1,27 @@ +/* + Copyright (C) 2012 Carl Hetherington + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#include + +class NewCinemaDialog : public wxDialog +{ +public: + NewCinemaDialog (wxWindow *); + +}; diff --git a/src/wx/wscript b/src/wx/wscript index 255c5ab33..1f0bc127a 100644 --- a/src/wx/wscript +++ b/src/wx/wscript @@ -24,6 +24,7 @@ def build(bld): job_manager_view.cc job_wrapper.cc kdm_dialog.cc + new_cinema_dialog.cc new_film_dialog.cc properties_dialog.cc server_dialog.cc -- 2.30.2