diff options
Diffstat (limited to 'src/tools/dcpomatic_server.cc')
| -rw-r--r-- | src/tools/dcpomatic_server.cc | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/tools/dcpomatic_server.cc b/src/tools/dcpomatic_server.cc index 9bdc688c8..5747e89af 100644 --- a/src/tools/dcpomatic_server.cc +++ b/src/tools/dcpomatic_server.cc @@ -22,7 +22,13 @@ #include "wx/static_text.h" #include "wx/wx_signal_manager.h" #include "wx/wx_util.h" +#include "wx/wx_variant.h" #include "lib/config.h" +#ifdef DCPOMATIC_GROK +#include "lib/grok/context.h" +#endif +#include "lib/log.h" +#include "lib/signaller.h" #include "lib/cross.h" #include "lib/dcpomatic_log.h" #include "lib/encode_server.h" @@ -149,7 +155,7 @@ class StatusDialog : public wxDialog public: StatusDialog () : wxDialog ( - nullptr, wxID_ANY, _("DCP-o-matic Encode Server"), + nullptr, wxID_ANY, variant::wx::dcpomatic_encode_server(), wxDefaultPosition, wxDefaultSize, #ifdef DCPOMATIC_OSX wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxSTAY_ON_TOP @@ -161,14 +167,14 @@ public: auto state_sizer = new wxFlexGridSizer (2, DCPOMATIC_SIZER_GAP, DCPOMATIC_SIZER_GAP); add_label_to_sizer (state_sizer, this, _("Frames per second"), true); - _fps = new StaticText (this, wxT("")); + _fps = new StaticText(this, {}); state_sizer->Add (_fps); auto log_sizer = new wxFlexGridSizer (1, DCPOMATIC_SIZER_GAP, DCPOMATIC_SIZER_GAP); log_sizer->AddGrowableCol (0, 1); wxClientDC dc (this); - wxSize size = dc.GetTextExtent (wxT ("This is the length of the file label it should be quite long")); + wxSize size = dc.GetTextExtent(char_to_wx("This is the length of the file label it should be quite long")); int const height = (size.GetHeight() + 2) * log_lines; SetSize (700, height + DCPOMATIC_SIZER_GAP * 2); @@ -196,7 +202,7 @@ public: private: void appended (string s) { - (*_text) << s << "\n"; + (*_text) << std_to_wx(s) << char_to_wx("\n"); } void removed (int n) @@ -206,7 +212,7 @@ private: void update_state () { - _fps->SetLabel (wxString::Format ("%.1f", server_log->fps())); + _fps->SetLabel(wxString::Format(char_to_wx("%.1f"), server_log->fps())); } wxTextCtrl* _text; @@ -232,8 +238,8 @@ public: wxMenu* CreatePopupMenu () override { auto menu = new wxMenu; - menu->Append (ID_status, std_to_wx ("Status...")); - menu->Append (ID_quit, std_to_wx ("Quit")); + menu->Append(ID_status, _("Status...")); + menu->Append(ID_quit, _("Quit")); return menu; } @@ -251,7 +257,7 @@ public: icon.CopyFromBitmap (bitmap); #endif - SetIcon (icon, std_to_wx ("DCP-o-matic Encode Server")); + SetIcon(icon, _("DCP-o-matic Encode Server")); } private: @@ -327,6 +333,11 @@ private: SetExitOnFrameDelete (false); +#ifdef DCPOMATIC_GROK + grk_plugin::setMessengerLogger(new grk_plugin::GrokLogger("[GROK] ")); + setup_grok_library_path(); +#endif + return true; } @@ -352,7 +363,7 @@ private: error_dialog (nullptr, std_to_wx(e.what())); wxTheApp->ExitMainLoop (); } catch (...) { - error_dialog (nullptr, _("An unknown error has occurred with the DCP-o-matic server.")); + error_dialog(nullptr, variant::wx::insert_dcpomatic_encode_server(_("An unknown error has occurred with the %s."))); wxTheApp->ExitMainLoop (); } } |
