summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-09-20 18:47:13 +0100
committerCarl Hetherington <cth@carlh.net>2013-09-20 18:47:13 +0100
commitf0380b3df50ca48ad2f22b5e7d5544dc9fa30d61 (patch)
tree3c4a73185ee36a7c73e9e3e84fc6f7447477cb0a /src/wx
parent1ba7bca7f2950faa441ec83920d35b65016f3fa6 (diff)
More various KDM fixes.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/kdm_dialog.cc11
-rw-r--r--src/wx/kdm_dialog.h2
2 files changed, 8 insertions, 5 deletions
diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc
index c8db016aa..c8212636a 100644
--- a/src/wx/kdm_dialog.cc
+++ b/src/wx/kdm_dialog.cc
@@ -26,7 +26,7 @@
#include "cinema_dialog.h"
#include "screen_dialog.h"
#include "wx_util.h"
-#ifdef __WXMSW__
+#ifdef DCPOMATIC_USE_OWN_DIR_PICKER
#include "dir_picker_ctrl.h"
#else
#include <wx/filepicker.h>
@@ -92,10 +92,10 @@ KDMDialog::KDMDialog (wxWindow* parent)
add_label_to_sizer (table, this, "Write to", true);
-#ifdef __WXMSW__
- _folder = new DirPickerCtrl (this);
+#ifdef DCPOMATIC_USE_OWN_DIR_PICKER
+ _folder = new DirPickerCtrl (this);
#else
- _folder = new wxDirPickerCtrl (this, wxDD_DIR_MUST_EXIST);
+ _folder = new wxDirPickerCtrl (this, wxID_ANY);
#endif
table->Add (_folder, 1, wxEXPAND);
@@ -176,6 +176,9 @@ KDMDialog::setup_sensitivity ()
_add_screen->Enable (sc);
_edit_screen->Enable (ss);
_remove_screen->Enable (ss);
+
+ wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK));
+ ok->Enable (sc || sc);
}
void
diff --git a/src/wx/kdm_dialog.h b/src/wx/kdm_dialog.h
index ac2db9b95..96893ccef 100644
--- a/src/wx/kdm_dialog.h
+++ b/src/wx/kdm_dialog.h
@@ -69,7 +69,7 @@ private:
wxDatePickerCtrl* _until_date;
wxTimePickerCtrl* _from_time;
wxTimePickerCtrl* _until_time;
-#ifdef __WXMSW__
+#ifdef DCPOMATIC_USE_OWN_DIR_PICKER
DirPickerCtrl* _folder;
#else
wxDirPickerCtrl* _folder;