Initial stuff; mostly ok but some hints are still not implemented as warnings.
[dcpomatic.git] / src / wx / screen_dialog.cc
index fcb878bc0911af1be4b2ffff0980cb9b23806682..ddedb71ecc351bdaae0697ce58eb3193fad201cd 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2016 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
@@ -44,14 +44,14 @@ class CertificateFileDialogWrapper : public FileDialogWrapper<dcp::Certificate>
 {
 public:
        CertificateFileDialogWrapper (wxWindow* parent)
-               : FileDialogWrapper (parent, _("Select certificate file"))
+               : FileDialogWrapper<dcp::Certificate> (parent, _("Select certificate file"))
        {
 
        }
 };
 
-ScreenDialog::ScreenDialog (wxWindow* parent, string title, string name, optional<dcp::Certificate> recipient, vector<dcp::Certificate> trusted_devices)
-       : wxDialog (parent, wxID_ANY, std_to_wx (title))
+ScreenDialog::ScreenDialog (wxWindow* parent, wxString title, string name, optional<dcp::Certificate> recipient, vector<dcp::Certificate> trusted_devices)
+       : wxDialog (parent, wxID_ANY, title)
        , _recipient (recipient)
        , _trusted_devices (trusted_devices)
 {
@@ -92,7 +92,13 @@ ScreenDialog::ScreenDialog (wxWindow* parent, string title, string name, optiona
        vector<string> columns;
        columns.push_back (wx_to_std (_("Thumbprint")));
        _trusted_device_list = new EditableList<dcp::Certificate, CertificateFileDialogWrapper> (
-               this, columns, bind (&ScreenDialog::trusted_devices, this), bind (&ScreenDialog::set_trusted_devices, this, _1), bind (&column, _1), false
+               this,
+               columns,
+               bind (&ScreenDialog::trusted_devices, this),
+               bind (&ScreenDialog::set_trusted_devices, this, _1),
+               bind (&always_valid),
+               bind (&column, _1),
+               false
                );
 
        _sizer->Add (_trusted_device_list, wxGBPosition (r, 0), wxGBSpan (1, 3), wxEXPAND);