Try to improve _server on OSX.
authorCarl Hetherington <cth@carlh.net>
Fri, 9 Oct 2015 00:42:05 +0000 (01:42 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 9 Oct 2015 12:45:09 +0000 (13:45 +0100)
run/dcpomatic_server
src/tools/dcpomatic_server.cc

index 7f2aaac3adda467ce7c3344c3f341b23775f7e79..212b599d93b126ae8c50600987b0bda927261723 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export LD_LIBRARY_PATH=build/src/lib:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH=build/src/lib:build/src/wx:$LD_LIBRARY_PATH
 if [ "$1" == "--debug" ]; then
     gdb --args build/src/tools/dcpomatic2_server
 elif [ "$1" == "--valgrind" ]; then
index 72ac66706942a5efd8b456664a3b8968c80aba44..978f600b2deecf829a256cc8451913ef07f16d1e 100644 (file)
@@ -68,11 +68,19 @@ private:
 
 static shared_ptr<MemoryLog> memory_log (new MemoryLog);
 
+#ifdef DCPOMATIC_OSX
+class StatusDialog : public wxFrame
+#else
 class StatusDialog : public wxDialog
+#endif
 {
 public:
        StatusDialog ()
+#ifdef DCPOMATIC_OSX
+               : wxFrame (0, wxID_ANY, _("DCP-o-matic encode server"), wxDefaultPosition, wxSize (600, 80), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
+#else
                : wxDialog (0, wxID_ANY, _("DCP-o-matic encode server"), wxDefaultPosition, wxSize (600, 80), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
+#endif
                , _timer (this, ID_timer)
        {
                _sizer = new wxFlexGridSizer (1, 6, 6);
@@ -115,10 +123,19 @@ public:
                icon.CopyFromBitmap (bitmap);
 #endif
 #ifndef DCPOMATIC_OSX
-               /* XXX: fix this for OS X */
                SetIcon (icon, std_to_wx ("DCP-o-matic encode server"));
 #endif
 
+#ifdef DCPOMATIC_OSX
+               wxMenu* file = new wxMenu;
+               file->Append (wxID_EXIT, _("&Exit"));
+               wxMenuBar* bar = new wxMenuBar;
+               bar->Append (file, _("&File"));
+               SetMenuBar (bar);
+
+               status ();
+#endif
+
                Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&TaskBarIcon::status, this), ID_status);
                Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&TaskBarIcon::quit, this), ID_quit);
        }
@@ -162,7 +179,9 @@ private:
                }
 
                dcpomatic_setup_path_encoding ();
+               dcpomatic_setup_i18n ();
                dcpomatic_setup ();
+               Config::drop ();
 
                _icon = new TaskBarIcon;
                _thread = new thread (bind (&App::main_thread, this));