More OS X tweaks.
[dcpomatic.git] / src / tools / dcpomatic_kdm.cc
index bc58be914a93ae1c13ad243748a9f9f1b9004908..df0df54896a87e3cfc6c92b674fe3a496217dc04 100644 (file)
@@ -41,6 +41,9 @@
 #include <wx/wx.h>
 #include <wx/preferences.h>
 #include <wx/filepicker.h>
+#ifdef __WXOSX__
+#include <ApplicationServices/ApplicationServices.h>
+#endif
 #include <boost/bind.hpp>
 #include <boost/foreach.hpp>
 
 
 using std::exception;
 using std::list;
+using std::string;
 using boost::shared_ptr;
 using boost::bind;
 
 enum {
-       ID_help_report_a_problem,
+       ID_help_report_a_problem = 1,
 };
 
 class DOMFrame : public wxFrame
@@ -273,8 +277,12 @@ private:
                                        wxString::Format (s, int(screen_kdms.size()), std_to_wx(_output->directory().string()).data())
                                        );
                        } else {
+                               string film_name = decrypted.annotation_text ();
+                               if (film_name.empty ()) {
+                                       film_name = decrypted.content_title_text ();
+                               }
                                shared_ptr<Job> job (new SendKDMEmailJob (
-                                                            decrypted.annotation_text(),
+                                                            film_name,
                                                             decrypted.content_title_text(),
                                                             _timing->from(), _timing->until(),
                                                             CinemaKDMs::collect (screen_kdms)