X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftry_unmount_dialog.cc;h=ddfaec5c09f60470d58a8f924f9ab26952c208c0;hb=e03f50c7d9c3d286fc60716c5d4bb913c2c1e0af;hp=44d9709191e87007ae7895fc838a852f67ba49b6;hpb=4e841ab275143ecbd8790c39ed332e5e346733f8;p=dcpomatic.git diff --git a/src/wx/try_unmount_dialog.cc b/src/wx/try_unmount_dialog.cc index 44d970919..ddfaec5c0 100644 --- a/src/wx/try_unmount_dialog.cc +++ b/src/wx/try_unmount_dialog.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2020 Carl Hetherington + Copyright (C) 2020-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,23 +18,32 @@ */ + +#include "static_text.h" #include "try_unmount_dialog.h" #include "wx_util.h" -#include "static_text.h" +#include +LIBDCP_DISABLE_WARNINGS #include +LIBDCP_ENABLE_WARNINGS + + +static int constexpr width = 300; + 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, wxEmptyString); + auto sizer = new wxBoxSizer (wxVERTICAL); + auto text = new StaticText (this, wxEmptyString, wxDefaultPosition, wxSize(width, -1)); sizer->Add (text, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER); text->SetLabelMarkup ( wxString::Format(_("The drive %s is mounted.\n\nIt must be unmounted before DCP-o-matic can write to it.\n\nShould DCP-o-matic try to unmount it now?"), description) ); + text->Wrap(width); - wxSizer* buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL); + auto buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL); if (buttons) { sizer->Add(buttons, wxSizerFlags().Expand().DoubleBorder()); }