projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use wx_ptr more.
[dcpomatic.git]
/
src
/
wx
/
kdm_cpl_panel.cc
diff --git
a/src/wx/kdm_cpl_panel.cc
b/src/wx/kdm_cpl_panel.cc
index 8bb73f783a473346a84463355eef96eabb182a00..1ddaa90cf5097159251bec6f4e56caf05efd5091 100644
(file)
--- a/
src/wx/kdm_cpl_panel.cc
+++ b/
src/wx/kdm_cpl_panel.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2015-202
0
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2015-202
1
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-18,27
+18,30
@@
*/
*/
+
+#include "dcpomatic_button.h"
#include "kdm_cpl_panel.h"
#include "kdm_cpl_panel.h"
-#include "wx_util.h"
#include "static_text.h"
#include "static_text.h"
-#include "
dcpomatic_button
.h"
-#include
"lib/warnings.h"
-
DCPOMATIC
_DISABLE_WARNINGS
+#include "
wx_util
.h"
+#include
<dcp/warnings.h>
+
LIBDCP
_DISABLE_WARNINGS
#include <libxml++/libxml++.h>
#include <libxml++/libxml++.h>
-
DCPOMATIC
_ENABLE_WARNINGS
+
LIBDCP
_ENABLE_WARNINGS
#include <libcxml/cxml.h>
#include <libcxml/cxml.h>
+
using std::vector;
using std::vector;
+
KDMCPLPanel::KDMCPLPanel (wxWindow* parent, vector<CPLSummary> cpls)
: wxPanel (parent, wxID_ANY)
, _cpls (cpls)
{
KDMCPLPanel::KDMCPLPanel (wxWindow* parent, vector<CPLSummary> cpls)
: wxPanel (parent, wxID_ANY)
, _cpls (cpls)
{
-
wxBoxSizer*
vertical = new wxBoxSizer (wxVERTICAL);
+
auto
vertical = new wxBoxSizer (wxVERTICAL);
/* CPL choice */
/* CPL choice */
-
wxBoxSizer*
s = new wxBoxSizer (wxHORIZONTAL);
- add_label_to_sizer (s, this, _("CPL"), true);
+
auto
s = new wxBoxSizer (wxHORIZONTAL);
+ add_label_to_sizer (s, this, _("CPL"), true
, 0, wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL
);
_cpl = new wxChoice (this, wxID_ANY);
s->Add (_cpl, 1, wxEXPAND);
_cpl_browse = new Button (this, _("Browse..."));
_cpl = new wxChoice (this, wxID_ANY);
s->Add (_cpl, 1, wxEXPAND);
_cpl_browse = new Button (this, _("Browse..."));
@@
-98,17
+101,14
@@
KDMCPLPanel::update_cpl_summary ()
void
KDMCPLPanel::cpl_browse_clicked ()
{
void
KDMCPLPanel::cpl_browse_clicked ()
{
-
wxFileDialog* d = new wxFileDialog
(this, _("Select CPL XML file"), wxEmptyString, wxEmptyString, "*.xml");
+
auto d = make_wx<wxFileDialog>
(this, _("Select CPL XML file"), wxEmptyString, wxEmptyString, "*.xml");
if (d->ShowModal() == wxID_CANCEL) {
if (d->ShowModal() == wxID_CANCEL) {
- d->Destroy ();
return;
}
boost::filesystem::path cpl_file (wx_to_std (d->GetPath ()));
boost::filesystem::path dcp_dir = cpl_file.parent_path ();
return;
}
boost::filesystem::path cpl_file (wx_to_std (d->GetPath ()));
boost::filesystem::path dcp_dir = cpl_file.parent_path ();
- d->Destroy ();
-
try {
/* XXX: hack alert */
cxml::Document cpl_document ("CompositionPlaylist");
try {
/* XXX: hack alert */
cxml::Document cpl_document ("CompositionPlaylist");