Logging improvements to allow prettier displays in the server GUI.
[dcpomatic.git] / src / wx / screen_dialog.cc
index 66e37a4cf94d58225b199fa8a88cef93fe19de22..e312af9205b1dc24ebf940b14e520d957c847463 100644 (file)
@@ -33,7 +33,7 @@ using std::cout;
 using boost::optional;
 
 ScreenDialog::ScreenDialog (wxWindow* parent, string title, string name, optional<dcp::Certificate> certificate)
-       : TableDialog (parent, std_to_wx (title), 2, true)
+       : TableDialog (parent, std_to_wx (title), 2, 1, true)
        , _certificate (certificate)
 {
        add (_("Name"), true);
@@ -93,7 +93,7 @@ ScreenDialog::load_certificate (boost::filesystem::path file)
                _certificate = dcp::Certificate (dcp::file_to_string (file));
                _certificate_text->SetValue (_certificate->certificate ());
        } catch (dcp::MiscError& e) {
-               error_dialog (this, wxString::Format (_("Could not read certificate file (%s)"), e.what()));
+               error_dialog (this, wxString::Format (_("Could not read certificate file (%s)"), std_to_wx(e.what()).data()));
        }
 }
 
@@ -130,7 +130,7 @@ ScreenDialog::setup_sensitivity ()
 {
        wxButton* ok = dynamic_cast<wxButton*> (FindWindowById (wxID_OK, this));
        if (ok) {
-               ok->Enable (_certificate);
+               ok->Enable (static_cast<bool>(_certificate));
        }
 
        _download_certificate->Enable (