Type fix for OS X.
[dcpomatic.git] / src / wx / key_dialog.cc
index 3ab16d7954dc93ff5240ef75e8f00a257cdb76d3..2d8cd4c37afee4dc0f5417b0868b02b6370dd116 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "key_dialog.h"
 #include "wx_util.h"
+#include "dcpomatic_button.h"
 #include <iostream>
 
 using std::cout;
@@ -47,10 +48,10 @@ KeyDialog::KeyDialog (wxWindow* parent, dcp::Key key)
        _key->SetValue (std_to_wx (key.hex ()));
        _key->SetMaxLength (32);
 
-       _random = add (new wxButton (this, wxID_ANY, _("Random")));
+       _random = add (new Button(this, _("Random")));
 
-       _key->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&KeyDialog::key_changed, this));
-       _random->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&KeyDialog::random, this));
+       _key->Bind (wxEVT_TEXT, boost::bind (&KeyDialog::key_changed, this));
+       _random->Bind (wxEVT_BUTTON, boost::bind (&KeyDialog::random, this));
 
        layout ();
 }