summaryrefslogtreecommitdiff
path: root/src/wx/screens_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-11-04 20:46:12 +0000
committerCarl Hetherington <cth@carlh.net>2015-11-05 01:42:17 +0000
commit2034a89f30e4a976e44eb8d0a6b4ad6e3100cd4b (patch)
tree7a232c3f1442f3797b50c648a8e70f9bee91db5a /src/wx/screens_panel.cc
parent03b501578c49861a486116534d95617959d92240 (diff)
Add console to dcpomatic_kdm on Windows. Tweak layout a bit more.
Remove unnecessary include from kdm_dialog.h. Unbind selection-changed signal in ScreensPanel destructor to stop it causing problems if it is called during ~ScreensPanel. Add -fno-omit-frame-pointer in case it helps with Dr. Mingw.
Diffstat (limited to 'src/wx/screens_panel.cc')
-rw-r--r--src/wx/screens_panel.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/wx/screens_panel.cc b/src/wx/screens_panel.cc
index ce5f2555e..2130600e4 100644
--- a/src/wx/screens_panel.cc
+++ b/src/wx/screens_panel.cc
@@ -27,6 +27,7 @@
using std::list;
using std::pair;
+using std::cout;
using std::map;
using std::make_pair;
using boost::shared_ptr;
@@ -69,7 +70,7 @@ ScreensPanel::ScreensPanel (wxWindow* parent)
sizer->Add (targets, 1, wxEXPAND);
- _targets->Bind (wxEVT_COMMAND_TREE_SEL_CHANGED, boost::bind (&ScreensPanel::selection_changed, this));
+ _targets->Bind (wxEVT_COMMAND_TREE_SEL_CHANGED, &ScreensPanel::selection_changed, this);
_add_cinema->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ScreensPanel::add_cinema_clicked, this));
_edit_cinema->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ScreensPanel::edit_cinema_clicked, this));
@@ -82,6 +83,11 @@ ScreensPanel::ScreensPanel (wxWindow* parent)
SetSizer (sizer);
}
+ScreensPanel::~ScreensPanel ()
+{
+ _targets->Unbind (wxEVT_COMMAND_TREE_SEL_CHANGED, &ScreensPanel::selection_changed, this);
+}
+
list<pair<wxTreeItemId, shared_ptr<Cinema> > >
ScreensPanel::selected_cinemas () const
{
@@ -299,7 +305,7 @@ ScreensPanel::screens () const
}
void
-ScreensPanel::selection_changed ()
+ScreensPanel::selection_changed (wxTreeEvent &)
{
setup_sensitivity ();
ScreensChanged ();