X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ffont_files_dialog.cc;h=7fd4f9d99aeda678bd4b75a010ab2040a90f7741;hb=9c1bb2e5ca7c80c4e26b1b2e41159aa171360a94;hp=9ed96d715c3b9b95609343f97e50ffb83b3b23ed;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05;p=dcpomatic.git diff --git a/src/wx/font_files_dialog.cc b/src/wx/font_files_dialog.cc index 9ed96d715..7fd4f9d99 100644 --- a/src/wx/font_files_dialog.cc +++ b/src/wx/font_files_dialog.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Carl Hetherington + Copyright (C) 2015-2018 Carl Hetherington This file is part of DCP-o-matic. @@ -20,6 +20,7 @@ #include "font_files_dialog.h" #include "system_font_dialog.h" +#include "static_text.h" using boost::bind; @@ -41,18 +42,18 @@ FontFilesDialog::FontFilesDialog (wxWindow* parent, FontFiles files) for (int i = 0; i < FontFiles::VARIANTS; ++i) { add (labels[i], true); - _name[i] = new wxStaticText ( - this, wxID_ANY, + _name[i] = new StaticText ( + this, std_to_wx(_files.get(static_cast(i)).get_value_or("").string()), wxDefaultPosition, wxSize (200, -1) ); _table->Add (_name[i], 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 6); add (_set_file[i] = new wxButton (this, wxID_ANY, _("Set from file..."))); - _set_file[i]->Bind (wxEVT_COMMAND_BUTTON_CLICKED, bind (&FontFilesDialog::set_from_file_clicked, this, static_cast(i))); + _set_file[i]->Bind (wxEVT_BUTTON, bind (&FontFilesDialog::set_from_file_clicked, this, static_cast(i))); #ifdef DCPOMATIC_WINDOWS add (_set_system[i] = new wxButton (this, wxID_ANY, _("Set from system font..."))); - _set_system[i]->Bind (wxEVT_COMMAND_BUTTON_CLICKED, bind (&FontFilesDialog::set_from_system_clicked, this, static_cast(i))); + _set_system[i]->Bind (wxEVT_BUTTON, bind (&FontFilesDialog::set_from_system_clicked, this, static_cast(i))); #endif }