#include "wx/about_dialog.h"
#include "wx/dcpomatic_button.h"
#include "wx/full_config_dialog.h"
+#include "wx/id.h"
#include "wx/job_manager_view.h"
#include "wx/servers_list_dialog.h"
#include "wx/wx_ptr.h"
#include "lib/config.h"
#include "lib/dcpomatic_socket.h"
#include "lib/film.h"
+#ifdef DCPOMATIC_GROK
+#include "lib/grok/context.h"
+#endif
#include "lib/job.h"
#include "lib/job_manager.h"
#include "lib/make_dcp.h"
enum {
- ID_file_add_film = 1,
+ ID_file_add_film = DCPOMATIC_MAIN_MENU,
ID_tools_encoding_servers,
ID_help_about
};
#endif
#ifdef DCPOMATIC_OSX
- file->Append (wxID_PREFERENCES, _("&Preferences...\tCtrl-P"));
+ file->Append(wxID_PREFERENCES, _("&Preferences...\tCtrl-,"));
#else
auto edit = new wxMenu;
edit->Append (wxID_PREFERENCES, _("&Preferences...\tCtrl-P"));
}
ev.Skip ();
+ JobManager::drop ();
}
void file_add_film ()
);
}
}
+
+#ifdef DCPOMATIC_GROK
+ if (what == Config::GROK) {
+ setup_grok_library_path();
+ }
+#endif
}
boost::optional<boost::filesystem::path> _last_parent;
void handle (shared_ptr<Socket> socket) override
{
try {
- int const length = socket->read_uint32 ();
- scoped_array<char> buffer(new char[length]);
- socket->read (reinterpret_cast<uint8_t*>(buffer.get()), length);
- string s (buffer.get());
- emit(boost::bind(boost::ref(StartJob), s));
- socket->write (reinterpret_cast<uint8_t const *>("OK"), 3);
+ auto const length = socket->read_uint32();
+ if (length < 65536) {
+ scoped_array<char> buffer(new char[length]);
+ socket->read(reinterpret_cast<uint8_t*>(buffer.get()), length);
+ string s(buffer.get());
+ emit(boost::bind(boost::ref(StartJob), s));
+ socket->write (reinterpret_cast<uint8_t const *>("OK"), 3);
+ }
} catch (...) {
}
}
}
+#ifdef DCPOMATIC_GROK
+ grk_plugin::setMessengerLogger(new grk_plugin::GrokLogger("[GROK] "));
+ setup_grok_library_path();
+#endif
+
return true;
}