projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: remove some unnecessary includes.
[dcpomatic.git]
/
src
/
wx
/
language_tag_widget.cc
diff --git
a/src/wx/language_tag_widget.cc
b/src/wx/language_tag_widget.cc
index 3df2b6914a7963e5ccded2e21a2adb7fc93f8eed..17683daf1e966bf35747cc7b66e75908aa0d18db 100644
(file)
--- a/
src/wx/language_tag_widget.cc
+++ b/
src/wx/language_tag_widget.cc
@@
-23,10
+23,11
@@
#include "language_tag_dialog.h"
#include "language_tag_widget.h"
#include "wx_util.h"
#include "language_tag_dialog.h"
#include "language_tag_widget.h"
#include "wx_util.h"
-#include "lib/warnings.h"
-DCPOMATIC_DISABLE_WARNINGS
+#include "lib/scope_guard.h"
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
#include <wx/wx.h>
-
DCPOMATIC
_ENABLE_WARNINGS
+
LIBDCP
_ENABLE_WARNINGS
using boost::optional;
using boost::optional;
@@
-55,21
+56,21
@@
LanguageTagWidget::LanguageTagWidget (wxWindow* parent, wxString tooltip, option
}
}
-LanguageTagWidget::~LanguageTagWidget
()
+LanguageTagWidget::~LanguageTagWidget()
{
{
- _language->Destroy
();
- _edit->Destroy
();
+ _language->Destroy();
+ _edit->Destroy();
}
void
LanguageTagWidget::edit ()
{
}
void
LanguageTagWidget::edit ()
{
- auto d =
new LanguageTagDialog
(_parent, _tag.get_value_or(dcp::LanguageTag("en")));
- d->ShowModal ();
-
set
(d->get());
-
Changed
(d->get());
- d->Destroy ();
+ auto d =
make_wx<LanguageTagDialog>
(_parent, _tag.get_value_or(dcp::LanguageTag("en")));
+ if (d->ShowModal() == wxID_OK) {
+
set
(d->get());
+
Changed
(d->get());
+ }
}
}