Try to clean up the mess of exporting subtitles when there is
[dcpomatic.git] / src / tools / dcpomatic_player.cc
index 67a06aec4f452b1dabde3f2166c73a3d54ba7a46..11f4bfaa7a4fd9107aff49a383047962273972ba 100644 (file)
@@ -73,9 +73,6 @@
 #ifdef __WXGTK__
 #include <X11/Xlib.h>
 #endif
-#ifdef __WXOSX__
-#include <ApplicationServices/ApplicationServices.h>
-#endif
 #include <boost/bind.hpp>
 #include <boost/algorithm/string.hpp>
 #include <iostream>
@@ -426,6 +423,8 @@ public:
 #endif
                } catch (dcp::ReadError& e) {
                        error_dialog (this, wxString::Format(_("Could not load a DCP from %s"), std_to_wx(dir.string())), std_to_wx(e.what()));
+               } catch (DCPError& e) {
+                       error_dialog (this, wxString::Format(_("Could not load a DCP from %s"), std_to_wx(dir.string())), std_to_wx(e.what()));
                }
        }
 
@@ -1156,10 +1155,8 @@ private:
                        unsetenv ("UBUNTU_MENUPROXY");
 #endif
 
-#ifdef __WXOSX__
-                       ProcessSerialNumber serial;
-                       GetCurrentProcess (&serial);
-                       TransformProcessType (&serial, kProcessTransformToForegroundApplication);
+#ifdef DCPOMATIC_OSX
+                       make_foreground_application ();
 #endif
 
                        dcpomatic_setup_path_encoding ();