X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_server.cc;h=e5e3a7e5a072e6a5838f8ff40e149cd49e3bae51;hb=c77ca38aedcdba1de4abf5e80cf424ab5d117883;hp=401fb1077d047c83921f329d1570f8413f6fe3ae;hpb=8df7c0402e51fa42b03e6faabfb95f10787be740;p=dcpomatic.git diff --git a/src/tools/dcpomatic_server.cc b/src/tools/dcpomatic_server.cc index 401fb1077..e5e3a7e5a 100644 --- a/src/tools/dcpomatic_server.cc +++ b/src/tools/dcpomatic_server.cc @@ -29,16 +29,17 @@ #include "lib/signaller.h" #include "lib/cross.h" #include "lib/dcpomatic_log.h" -#include "lib/warnings.h" -DCPOMATIC_DISABLE_WARNINGS -#include -#include +#include +LIBDCP_DISABLE_WARNINGS #include -DCPOMATIC_ENABLE_WARNINGS +#include +#include +LIBDCP_ENABLE_WARNINGS #include #include #include + using std::cout; using std::string; using std::exception; @@ -54,6 +55,7 @@ using std::dynamic_pointer_cast; using namespace boost::placeholders; #endif + enum { ID_status = 1, ID_quit, @@ -87,7 +89,7 @@ public: boost::signals2::signal Removed; private: - void do_log (shared_ptr entry) + void do_log (shared_ptr entry) override { time_t const s = entry->seconds (); struct tm* local = localtime (&s); @@ -226,7 +228,7 @@ public: Bind (wxEVT_MENU, boost::bind (&TaskBarIcon::quit, this), ID_quit); } - wxMenu* CreatePopupMenu () + wxMenu* CreatePopupMenu () override { auto menu = new wxMenu; menu->Append (ID_status, std_to_wx ("Status...")); @@ -241,7 +243,7 @@ public: #else string const colour = gui_is_dark() ? "white" : "black"; wxBitmap bitmap ( - bitmap_path(String::compose("dcpomatic_small_%1", colour)), + bitmap_path(String::compose("dcpomatic_small_%1.png", colour)), wxBITMAP_TYPE_PNG ); wxIcon icon; @@ -273,7 +275,7 @@ public: private: - bool OnInit () + bool OnInit () override { if (!wxApp::OnInit()) { return false; @@ -285,7 +287,7 @@ private: server_log->set_types (LogEntry::TYPE_GENERAL | LogEntry::TYPE_WARNING | LogEntry::TYPE_ERROR); dcpomatic_log = server_log; - Config::FailedToLoad.connect (boost::bind (&App::config_failed_to_load, this)); + Config::FailedToLoad.connect(boost::bind(&App::config_failed_to_load, this, _1)); Config::Warning.connect (boost::bind (&App::config_warning, this, _1)); auto splash = maybe_show_splash (); @@ -327,7 +329,7 @@ private: return true; } - int OnExit () + int OnExit () override { delete _icon; return wxApp::OnExit (); @@ -359,9 +361,9 @@ private: signal_manager->ui_idle (); } - void config_failed_to_load () + void config_failed_to_load(Config::LoadFailure what) { - message_dialog (nullptr, _("The existing configuration failed to load. Default values will be used instead. These may take a short time to create.")); + report_config_load_failure(nullptr, what); } void config_warning (string m)