Stub new cinema dialog.
authorCarl Hetherington <cth@carlh.net>
Sun, 6 Jan 2013 13:29:21 +0000 (13:29 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 6 Jan 2013 13:29:21 +0000 (13:29 +0000)
src/wx/kdm_dialog.cc
src/wx/kdm_dialog.h
src/wx/new_cinema_dialog.cc [new file with mode: 0644]
src/wx/new_cinema_dialog.h [new file with mode: 0644]
src/wx/wscript

index ba478f7d57d4af17c48803116ec6c22cd1a44c11..519317dcc9d07b804518585e5431822264471d88 100644 (file)
@@ -22,6 +22,7 @@
 #include <wx/timectrl.h>
 #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<Cinema> c, shared_ptr<Screen> 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 &)
+{
+
+}
index fe44bb83adfbf761d5e4b3ea61116a6c68126bc0..d45d4bef884832b3e7cd74366c05e4b153650f1c 100644 (file)
@@ -40,6 +40,8 @@ private:
        void add_cinema (boost::shared_ptr<Cinema>);
        void add_screen (boost::shared_ptr<Cinema>, boost::shared_ptr<Screen>);
        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 (file)
index 0000000..22fd61b
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+
+    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 (file)
index 0000000..9e05bba
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+
+    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 <wx/wx.h>
+
+class NewCinemaDialog : public wxDialog
+{
+public:
+       NewCinemaDialog (wxWindow *);
+
+};
index 255c5ab33e55954f529cc81f1fe442dc8f005ef2..1f0bc127a0f37d66b2326292731ac0976cc71704 100644 (file)
@@ -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