using std::cout;
using std::min;
using boost::shared_ptr;
+using boost::optional;
using dcp::raw_convert;
CopyToDriveJob::CopyToDriveJob (boost::filesystem::path dcp, Drive drive, Nanomsg& nanomsg)
void
CopyToDriveJob::run ()
{
- if (!_nanomsg.nonblocking_send(String::compose(DISK_WRITER_WRITE "\n%1\n%2\n", _dcp.string(), _drive.internal_name()))) {
- throw CopyError ("Could not communicate with writer process", 0);
+ if (!_nanomsg.send(String::compose(DISK_WRITER_WRITE "\n%1\n%2\n", _dcp.string(), _drive.internal_name()), 2000)) {
+ throw CommunicationFailedError ();
}
bool formatting = false;
while (true) {
- string s = _nanomsg.blocking_get ();
- if (s == DISK_WRITER_OK) {
+ optional<string> s = _nanomsg.receive (10000);
+ if (!s) {
+ continue;
+ }
+ if (*s == DISK_WRITER_OK) {
set_state (FINISHED_OK);
return;
- } else if (s == DISK_WRITER_ERROR) {
- string const m = _nanomsg.blocking_get ();
- string const n = _nanomsg.blocking_get ();
- throw CopyError (m, raw_convert<int>(n));
- } else if (s == DISK_WRITER_FORMATTING) {
+ } else if (*s == DISK_WRITER_ERROR) {
+ optional<string> const m = _nanomsg.receive (500);
+ optional<string> const n = _nanomsg.receive (500);
+ throw CopyError (m.get_value_or("Unknown"), raw_convert<int>(n.get_value_or("0")));
+ } else if (*s == DISK_WRITER_FORMATTING) {
sub ("Formatting drive");
set_progress_unknown ();
formatting = true;
- } else if (s == DISK_WRITER_PROGRESS) {
+ } else if (*s == DISK_WRITER_PROGRESS) {
if (formatting) {
sub ("Copying DCP");
formatting = false;
}
- set_progress (raw_convert<float>(_nanomsg.blocking_get()));
+ optional<string> progress = _nanomsg.receive (500);
+ if (progress) {
+ set_progress (raw_convert<float>(*progress));
+ }
}
}
}
};
std::vector<Drive> get_drives ();
+/** Unmount any mounted partitions on a drive.
+ * @return true on success, false on failure.
+ */
+bool unmount_drive (std::string drive);
#endif
name = _("Unknown");
}
- return String::compose("%1 (%2 GB) [%3]", name, gb, _internal_name);
+ return String::compose(_("%1 (%2 GB) [%3]"), name, gb, _internal_name);
}
#include "dcpomatic_log.h"
#include "config.h"
#include "exceptions.h"
+#include "dcpomatic_log.h"
#include <dcp/raw_convert.h>
#include <glib.h>
extern "C" {
#include <unistd.h>
#include <mntent.h>
#include <sys/types.h>
+#include <sys/mount.h>
#include <ifaddrs.h>
#include <netinet/in.h>
#include <arpa/inet.h>
return false;
}
-vector<Drive>
-get_drives ()
+vector<pair<string, string> >
+get_mounts (string prefix)
{
- vector<Drive> drives;
+ vector<pair<string, string> > mounts;
- using namespace boost::filesystem;
- list<string> mounted_devices;
std::ifstream f("/proc/mounts");
string line;
while (f.good()) {
getline(f, line);
vector<string> bits;
boost::algorithm::split (bits, line, boost::is_any_of(" "));
- if (bits.size() > 0 && boost::algorithm::starts_with(bits[0], "/dev/")) {
- mounted_devices.push_back(bits[0]);
- LOG_DISK("Mounted device %1", bits[0]);
+ if (bits.size() > 1 && boost::algorithm::starts_with(bits[0], prefix)) {
+ mounts.push_back(make_pair(bits[0], bits[1]));
+ LOG_DISK("Found mounted device %1 from prefix %2", bits[0], prefix);
}
}
+ return mounts;
+}
+
+vector<Drive>
+get_drives ()
+{
+ vector<Drive> drives;
+
+ using namespace boost::filesystem;
+ vector<pair<string, string> > mounted_devices = get_mounts("/dev/");
+
for (directory_iterator i = directory_iterator("/sys/block"); i != directory_iterator(); ++i) {
string const name = i->path().filename().string();
path device_type_file("/sys/block/" + name + "/device/type");
model = dcp::file_to_string("/sys/block/" + name + "/device/model");
boost::trim(*model);
} catch (...) {}
- BOOST_FOREACH (string j, mounted_devices) {
- if (boost::algorithm::starts_with(j, "/dev/" + name)) {
+ for (vector<pair<string, string> >::const_iterator j = mounted_devices.begin(); j != mounted_devices.end(); ++j) {
+ if (boost::algorithm::starts_with(j->first, "/dev/" + name)) {
mounted = true;
}
}
p /= "dcpomatic2";
return p;
}
+
+bool
+unmount_drive (string drive)
+{
+ vector<pair<string, string> > mounts = get_mounts (drive);
+ for (vector<pair<string, string> >::const_iterator i = mounts.begin(); i != mounts.end(); ++i) {
+ int const r = umount(i->second.c_str());
+ LOG_DISK("Tried to unmount %1 and got %2 and %3", i->second, r, errno);
+ if (r == -1) {
+ return false;
+ }
+ }
+ return true;
+}
+
p /= "2";
return p;
}
+
+bool
+unmount_device (string device)
+{
+ int const r = umount(device.c_str());
+ LOG_DISK("Tried to unmount %1 and got %2 and %3", device, r, errno);
+ return r == 0;
+
+}
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
using std::string;
using std::runtime_error;
+using boost::optional;
/** @param f File that we were trying to open */
OpenFileError::OpenFileError (boost::filesystem::path f, int error, Mode mode)
}
-CopyError::CopyError (string m, int n)
- : runtime_error (String::compose("%1 (%2)", m, n))
+CopyError::CopyError (string m, optional<int> n)
+ : runtime_error (String::compose("%1%2", m, n ? String::compose(" (%1)", *n) : ""))
, _message (m)
, _number (n)
{
}
+CommunicationFailedError::CommunicationFailedError ()
+ : CopyError (_("Lost communication between main and writer processes"))
+{
+
+}
+
VerifyError::VerifyError (string m, int n)
: runtime_error (String::compose("%1 (%2)", m, n))
, _message (m)
#include <libavutil/pixfmt.h>
}
#include <boost/filesystem.hpp>
+#include <boost/optional.hpp>
#include <stdexcept>
#include <cstring>
class CopyError : public std::runtime_error
{
public:
- CopyError (std::string s, int n);
+ CopyError (std::string s, boost::optional<int> n = boost::optional<int>());
virtual ~CopyError () throw () {}
std::string message () const {
return _message;
}
- int number () const {
+ boost::optional<int> number () const {
return _number;
}
private:
std::string _message;
- int _number;
+ boost::optional<int> _number;
};
+
+/** @class CommunicationFailedError
+ * @brief Communcation between dcpomatic2_disk and _disk_writer failed somehow.
+ */
+class CommunicationFailedError : public CopyError
+{
+public:
+ CommunicationFailedError ();
+};
+
+
/** @class VerifyError
* @brief An error which occurs when verifying a DCP that we copied to a distribution drive.
*/
#include "nanomsg.h"
#include "dcpomatic_log.h"
+#include "exceptions.h"
#include <nanomsg/nn.h>
#include <nanomsg/pair.h>
#include <stdexcept>
}
}
-void
-Nanomsg::blocking_send (string s)
+bool
+Nanomsg::send (string s, int timeout)
{
- int const r = nn_send (_socket, s.c_str(), s.length(), 0);
- if (r < 0) {
- throw runtime_error(String::compose("Could not send to nanomsg socket (%1)", errno));
- } else if (r != int(s.length())) {
- throw runtime_error("Could not send to nanomsg socket (message too big)");
+ if (timeout != 0) {
+ nn_setsockopt (_socket, NN_SOL_SOCKET, NN_SNDTIMEO, &timeout, sizeof(int));
}
-}
-bool
-Nanomsg::nonblocking_send (string s)
-{
- int const r = nn_send (_socket, s.c_str(), s.length(), NN_DONTWAIT);
+ int const r = nn_send (_socket, s.c_str(), s.length(), timeout ? 0 : NN_DONTWAIT);
if (r < 0) {
- if (errno == EAGAIN) {
+ if (errno == ETIMEDOUT || errno == EAGAIN) {
return false;
}
throw runtime_error(String::compose("Could not send to nanomsg socket (%1)", errno));
}
void
-Nanomsg::recv_and_parse (bool blocking)
+Nanomsg::recv_and_parse (int flags)
{
char* buf = 0;
- int const received = nn_recv (_socket, &buf, NN_MSG, blocking ? 0 : NN_DONTWAIT);
+ int const received = nn_recv (_socket, &buf, NN_MSG, flags);
if (received < 0)
{
- if (!blocking && errno == EAGAIN) {
+ if (errno == ETIMEDOUT || errno == EAGAIN) {
return;
}
- throw runtime_error ("Could not communicate with subprocess");
+ throw CommunicationFailedError ();
}
char* p = buf;
nn_freemsg (buf);
}
-string
-Nanomsg::blocking_get ()
+optional<string>
+Nanomsg::receive (int timeout)
{
+ if (timeout != 0) {
+ nn_setsockopt (_socket, NN_SOL_SOCKET, NN_RCVTIMEO, &timeout, sizeof(int));
+ }
+
optional<string> l = get_from_pending ();
if (l) {
return *l;
}
- recv_and_parse (true);
+ recv_and_parse (timeout ? 0 : NN_DONTWAIT);
- l = get_from_pending ();
+ return get_from_pending ();
if (!l) {
- throw runtime_error ("Could not communicate with subprocess");
+ throw CommunicationFailedError ();
}
return *l;
}
-
-optional<string>
-Nanomsg::nonblocking_get ()
-{
- optional<string> l = get_from_pending ();
- if (l) {
- return *l;
- }
-
- recv_and_parse (false);
- return get_from_pending ();
-}
public:
explicit Nanomsg (bool server);
- void blocking_send (std::string s);
- /** Try to send a message, returning true if successful, false
- * if we should try again (EAGAIN) or throwing an exception on any other
- * error.
+ /** Try to send a message, waiting for some timeout before giving up.
+ * @param timeout Timeout in milliseconds, or -1 for infinite timeout.
+ * @return true if the send happened, false if there was a timeout.
*/
- bool nonblocking_send (std::string s);
- std::string blocking_get ();
- boost::optional<std::string> nonblocking_get ();
+ bool send (std::string s, int timeout);
+
+ /** Try to receive a message, waiting for some timeout before giving up.
+ * @param timeout Timeout in milliseconds, or -1 for infinite timeout.
+ * @return Empty if the timeout was reached, otherwise the received string.
+ */
+ boost::optional<std::string> receive (int timeout);
private:
boost::optional<std::string> get_from_pending ();
- void recv_and_parse (bool blocking);
+ void recv_and_parse (int flags);
int _socket;
std::list<std::string> _pending;
#include "wx/wx_util.h"
#include "wx/job_manager_view.h"
#include "wx/drive_wipe_warning_dialog.h"
+#include "wx/try_unmount_dialog.h"
+#include "wx/message_dialog.h"
#include "lib/file_log.h"
#include "lib/dcpomatic_log.h"
#include "lib/util.h"
using std::exception;
using std::cout;
using std::cerr;
-using std::runtime_error;
using boost::shared_ptr;
+using boost::optional;
class DOMFrame : public wxFrame
{
~DOMFrame ()
{
- _nanomsg.blocking_send(DISK_WRITER_QUIT "\n");
+ _nanomsg.send(DISK_WRITER_QUIT "\n", 2000);
}
private:
{
DCPOMATIC_ASSERT (_drive->GetSelection() != wxNOT_FOUND);
DCPOMATIC_ASSERT (static_cast<bool>(_dcp_path));
+
+ Drive const& drive = _drives[_drive->GetSelection()];
+ if (drive.mounted()) {
+ TryUnmountDialog* d = new TryUnmountDialog(this, drive.description());
+ int const r = d->ShowModal ();
+ d->Destroy ();
+ if (r == wxID_OK) {
+ if (!_nanomsg.send(DISK_WRITER_UNMOUNT "\n", 2000)) {
+ throw CommunicationFailedError ();
+ }
+ if (!_nanomsg.send(drive.internal_name() + "\n", 2000)) {
+ throw CommunicationFailedError ();
+ }
+ optional<string> reply = _nanomsg.receive (2000);
+ if (!reply || *reply != DISK_WRITER_OK) {
+ MessageDialog* m = new MessageDialog (
+ this,
+ _("DCP-o-matic Disk Writer"),
+ wxString::Format(_("The drive %s could not be unmounted.\nClose any application that is using it, then try again."), std_to_wx(drive.description()))
+ );
+ m->ShowModal ();
+ m->Destroy ();
+ return;
+ }
+ }
+ }
+
+
DriveWipeWarningDialog* d = new DriveWipeWarningDialog (this, _drive->GetString(_drive->GetSelection()));
int const r = d->ShowModal ();
bool ok = r == wxID_OK && d->confirmed();
_drive->Clear ();
int re_select = wxNOT_FOUND;
int j = 0;
- _drives.clear ();
- BOOST_FOREACH (Drive i, get_drives()) {
- if (!i.mounted()) {
- _drives.push_back (i);
- }
- }
+ _drives = get_drives ();
BOOST_FOREACH (Drive i, _drives) {
wxString const s = std_to_wx(i.description());
if (s == current) {
#ifdef DCPOMATIC_LINUX
static PolkitAuthority* polkit_authority = 0;
#endif
-static boost::filesystem::path dcp_path;
-static std::string device;
static uint64_t const block_size = 4096;
static Nanomsg* nanomsg = 0;
+#define SHORT_TIMEOUT 100
+#define LONG_TIMEOUT 2000
+
static
void
count (boost::filesystem::path dir, uint64_t& total_bytes)
}
remaining -= this_time;
total_remaining -= this_time;
- nanomsg->blocking_send(String::compose(DISK_WRITER_PROGRESS "\n%1\n", (1 - float(total_remaining) / total)));
+ nanomsg->send(String::compose(DISK_WRITER_PROGRESS "\n%1\n", (1 - float(total_remaining) / total)), SHORT_TIMEOUT);
}
fclose (in);
digester.add (buffer, this_time);
remaining -= this_time;
total_remaining -= this_time;
- nanomsg->blocking_send(String::compose(DISK_WRITER_PROGRESS "\n%1\n", (1 - float(total_remaining) / total)));
+ nanomsg->send(String::compose(DISK_WRITER_PROGRESS "\n%1\n", (1 - float(total_remaining) / total)), SHORT_TIMEOUT);
}
ext4_fclose (&in);
}
}
+
static
void
-write ()
+write (boost::filesystem::path dcp_path, string device)
try
{
// ext4_dmask_set (DEBUG_ALL);
}
LOG_DISK_NC ("Opened partition");
- nanomsg->blocking_send(DISK_WRITER_FORMATTING "\n");
+ nanomsg->send(DISK_WRITER_FORMATTING "\n", SHORT_TIMEOUT);
r = ext4_mkfs(&fs, bd, &info, F_SET_EXT4);
if (r != EOK) {
}
ext4_device_unregister("ext4_fs");
- nanomsg->blocking_send(DISK_WRITER_OK "\n");
+ if (!nanomsg->send(DISK_WRITER_OK "\n", LONG_TIMEOUT)) {
+ throw CommunicationFailedError ();
+ }
} catch (CopyError& e) {
- LOG_DISK("CopyError: %1 %2", e.message(), e.number());
- nanomsg->blocking_send(String::compose(DISK_WRITER_ERROR "\n%1\n%2\n", e.message(), e.number()));
+ LOG_DISK("CopyError (from write): %1 %2", e.message(), e.number().get_value_or(0));
+ nanomsg->send(String::compose(DISK_WRITER_ERROR "\n%1\n%2\n", e.message(), e.number().get_value_or(0)), LONG_TIMEOUT);
} catch (VerifyError& e) {
- LOG_DISK("VerifyError: %1 %2", e.message(), e.number());
- nanomsg->blocking_send(String::compose(DISK_WRITER_ERROR "\n%1\n%2\n", e.message(), e.number()));
+ LOG_DISK("VerifyError (from write): %1 %2", e.message(), e.number());
+ nanomsg->send(String::compose(DISK_WRITER_ERROR "\n%1\n%2\n", e.message(), e.number()), LONG_TIMEOUT);
} catch (exception& e) {
- LOG_DISK("Exception: %1", e.what());
- nanomsg->blocking_send(String::compose(DISK_WRITER_ERROR "\n%1\n0\n", e.what()));
+ LOG_DISK("Exception (from write): %1", e.what());
+ nanomsg->send(String::compose(DISK_WRITER_ERROR "\n%1\n0\n", e.what()), LONG_TIMEOUT);
}
+struct Parameters
+{
+ boost::filesystem::path dcp_path;
+ std::string device;
+};
+
#ifdef DCPOMATIC_LINUX
static
void
-polkit_callback (GObject *, GAsyncResult* res, gpointer)
+polkit_callback (GObject *, GAsyncResult* res, gpointer data)
{
+ Parameters* parameters = reinterpret_cast<Parameters*> (data);
PolkitAuthorizationResult* result = polkit_authority_check_authorization_finish (polkit_authority, res, 0);
if (result && polkit_authorization_result_get_is_authorized(result)) {
- write ();
+ write (parameters->dcp_path, parameters->device);
}
+ delete parameters;
if (result) {
g_object_unref (result);
}
bool
idle ()
+try
{
using namespace boost::algorithm;
- optional<string> s = nanomsg->nonblocking_get ();
+ optional<string> s = nanomsg->receive (0);
if (!s) {
return true;
}
if (*s == DISK_WRITER_QUIT) {
exit (EXIT_SUCCESS);
- } else if (*s == DISK_WRITER_WRITE) {
- dcp_path = nanomsg->blocking_get();
- device = nanomsg->blocking_get();
+ } else if (*s == DISK_WRITER_UNMOUNT) {
+ /* XXX: should do Linux polkit stuff here */
+ optional<string> device = nanomsg->receive (LONG_TIMEOUT);
+ if (!device) {
+ throw CommunicationFailedError ();
+ }
+ if (unmount_drive(*device)) {
+ if (!nanomsg->send (DISK_WRITER_OK "\n", LONG_TIMEOUT)) {
+ throw CommunicationFailedError();
+ }
+ } else {
+ if (!nanomsg->send (DISK_WRITER_ERROR "\n", LONG_TIMEOUT)) {
+ throw CommunicationFailedError();
+ }
+ }
+ } else {
+ optional<string> dcp_path = nanomsg->receive(LONG_TIMEOUT);
+ optional<string> device = nanomsg->receive(LONG_TIMEOUT);
+ if (!dcp_path || !device) {
+ throw CommunicationFailedError();
+ }
/* Do some basic sanity checks; this is a bit belt-and-braces but it can't hurt... */
#ifdef DCPOMATIC_OSX
- if (!starts_with(device, "/dev/disk")) {
- LOG_DISK ("Will not write to %1", device);
- nanomsg->blocking_send(DISK_WRITER_ERROR "\nRefusing to write to this drive\n1\n");
+ if (!starts_with(*device, "/dev/disk")) {
+ LOG_DISK ("Will not write to %1", *device);
+ nanomsg->try_send(DISK_WRITER_ERROR "\nRefusing to write to this drive\n1\n", LONG_TIMEOUT);
return true;
}
#endif
#ifdef DCPOMATIC_LINUX
- if (!starts_with(device, "/dev/sd") && !starts_with(device, "/dev/hd")) {
- LOG_DISK ("Will not write to %1", device);
- nanomsg->blocking_send(DISK_WRITER_ERROR "\nRefusing to write to this drive\n1\n");
+ if (!starts_with(*device, "/dev/sd") && !starts_with(*device, "/dev/hd")) {
+ LOG_DISK ("Will not write to %1", *device);
+ nanomsg->send(DISK_WRITER_ERROR "\nRefusing to write to this drive\n1\n", LONG_TIMEOUT);
return true;
}
#endif
#ifdef DCPOMATIC_WINDOWS
- if (!starts_with(device, "\\\\.\\PHYSICALDRIVE")) {
- LOG_DISK ("Will not write to %1", device);
- nanomsg->blocking_send(DISK_WRITER_ERROR "\nRefusing to write to this drive\n1\n");
+ if (!starts_with(*device, "\\\\.\\PHYSICALDRIVE")) {
+ LOG_DISK ("Will not write to %1", *device);
+ nanomsg->try_send(DISK_WRITER_ERROR "\nRefusing to write to this drive\n1\n", LONG_TIMEOUT);
return true;
}
#endif
bool on_drive_list = false;
bool mounted = false;
for (auto const& i: get_drives()) {
- if (i.internal_name() == device) {
+ if (i.internal_name() == *device) {
on_drive_list = true;
mounted = i.mounted();
}
}
if (!on_drive_list) {
- LOG_DISK ("Will not write to %1 as it's not recognised as a drive", device);
- nanomsg->blocking_send(DISK_WRITER_ERROR "\nRefusing to write to this drive\n1\n");
+ LOG_DISK ("Will not write to %1 as it's not recognised as a drive", *device);
+ nanomsg->send(DISK_WRITER_ERROR "\nRefusing to write to this drive\n1\n", LONG_TIMEOUT);
return true;
}
if (mounted) {
- LOG_DISK ("Will not write to %1 as it's mounted", device);
- nanomsg->blocking_send(DISK_WRITER_ERROR "\nRefusing to write to this drive\n1\n");
+ LOG_DISK ("Will not write to %1 as it's mounted", *device);
+ nanomsg->send(DISK_WRITER_ERROR "\nRefusing to write to this drive\n1\n", LONG_TIMEOUT);
return true;
}
- LOG_DISK ("Here we go writing %1 to %2", dcp_path, device);
+ LOG_DISK ("Here we go writing %1 to %2", *dcp_path, *device);
#ifdef DCPOMATIC_LINUX
polkit_authority = polkit_authority_get_sync (0, 0);
PolkitSubject* subject = polkit_unix_process_new (getppid());
+ Parameters* parameters = new Parameters;
+ parameters->dcp_path = *dcp_path;
+ parameters->device = *device;
polkit_authority_check_authorization (
- polkit_authority, subject, "com.dcpomatic.write-drive", 0, POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION, 0, polkit_callback, 0
+ polkit_authority, subject, "com.dcpomatic.write-drive", 0, POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION, 0, polkit_callback, parameters
);
#else
- write ();
+ write (*dcp_path, *device);
#endif
}
+ return true;
+} catch (exception& e) {
+ LOG_DISK("Exception (from idle): %1", e.what());
return true;
}
--- /dev/null
+/*
+ Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include "try_unmount_dialog.h"
+#include "wx_util.h"
+#include "static_text.h"
+#include <wx/wx.h>
+
+TryUnmountDialog::TryUnmountDialog (wxWindow* parent, wxString description)
+ : wxDialog (parent, wxID_ANY, _("DCP-o-matic Disk Writer"))
+{
+ wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
+ wxStaticText* text = new StaticText (this, wxString::Format(_("The drive %s is mounted.\nIt must be unmounted before DCP-o-matic can write to it. Do you want to try to unmount it now?"), description));
+ sizer->Add (text, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
+
+ wxSizer* buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL);
+ if (buttons) {
+ sizer->Add(buttons, wxSizerFlags().Expand().DoubleBorder());
+ }
+
+ SetSizer (sizer);
+ sizer->Layout ();
+ sizer->SetSizeHints (this);
+}
+
--- /dev/null
+/*
+ Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include <wx/wx.h>
+
+class TryUnmountDialog : public wxDialog
+{
+public:
+ TryUnmountDialog (wxWindow* parent, wxString description);
+};
timeline_video_content_view.cc
timeline_view.cc
timing_panel.cc
+ try_unmount_dialog.cc
update_dialog.cc
verify_dcp_dialog.cc
video_panel.cc