Improve error messages when failing to decode video.
[dcpomatic.git] / src / tools / dcpomatic_server.cc
index 9c483213830affc100d8b2356505bdee7ccb27f0..95dea5b12ff88a1360a935b2ba81d432e866cb44 100644 (file)
@@ -48,6 +48,9 @@ using boost::thread;
 using boost::bind;
 using boost::optional;
 using boost::dynamic_pointer_cast;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
 
 enum {
        ID_status = 1,
@@ -145,7 +148,11 @@ public:
                : wxDialog (
                        0, wxID_ANY, _("DCP-o-matic Encode Server"),
                        wxDefaultPosition, wxDefaultSize,
+#ifdef DCPOMATIC_OSX
+                       wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxSTAY_ON_TOP
+#else
                        wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
+#endif
                        )
        {
                wxFlexGridSizer* state_sizer = new wxFlexGridSizer (2, DCPOMATIC_SIZER_GAP, DCPOMATIC_SIZER_GAP);
@@ -210,7 +217,13 @@ public:
        TaskBarIcon ()
                : _status (0)
        {
+#ifdef DCPOMATIC_WINDOWS
                wxIcon icon (std_to_wx ("id"));
+#else
+               wxBitmap bitmap (wxString::Format (wxT ("%s/dcpomatic_small.png"), std_to_wx (shared_path().string())), wxBITMAP_TYPE_PNG);
+               wxIcon icon;
+               icon.CopyFromBitmap (bitmap);
+#endif
 
                SetIcon (icon, std_to_wx ("DCP-o-matic Encode Server"));
 
@@ -286,7 +299,7 @@ private:
                */
                Config::instance();
 
-#if defined(DCPOMATIC_LINUX) || defined(DCPOMATIC_OSX)
+#ifdef DCPOMATIC_LINUX
                StatusDialog* d = new StatusDialog ();
                d->Show ();
 #else
@@ -302,6 +315,8 @@ private:
                        splash->Destroy ();
                }
 
+               SetExitOnFrameDelete (false);
+
                return true;
        }