diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-01-08 16:25:42 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-01-09 11:54:16 +0100 |
| commit | 12d1abf033654727d6ab6278087ff7cfc65d63f6 (patch) | |
| tree | b920b3c3614fc91a1cb2a220972042e6318a6fd4 /src/wx | |
| parent | ad41d2dd987ffcd2068d9fbf4273108c9f796762 (diff) | |
Move ScopeGuard into libdcp.
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/content_panel.cc | 4 | ||||
| -rw-r--r-- | src/wx/controls.cc | 1 | ||||
| -rw-r--r-- | src/wx/fonts_dialog.cc | 1 | ||||
| -rw-r--r-- | src/wx/language_tag_widget.cc | 1 | ||||
| -rw-r--r-- | src/wx/region_subtag_widget.cc | 1 | ||||
| -rw-r--r-- | src/wx/screen_dialog.cc | 1 | ||||
| -rw-r--r-- | src/wx/screens_panel.cc | 8 | ||||
| -rw-r--r-- | src/wx/text_panel.cc | 4 | ||||
| -rw-r--r-- | src/wx/timeline.cc | 6 | ||||
| -rw-r--r-- | src/wx/timing_panel.cc | 1 |
10 files changed, 11 insertions, 17 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index 8a98bc1a4..1f54ae0cf 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -47,12 +47,12 @@ #include "lib/image_content.h" #include "lib/log.h" #include "lib/playlist.h" -#include "lib/scope_guard.h" #include "lib/string_text_file.h" #include "lib/string_text_file_content.h" #include "lib/text_content.h" #include "lib/video_content.h" #include <dcp/filesystem.h> +#include <dcp/scope_guard.h> #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/display.h> @@ -820,7 +820,7 @@ ContentPanel::set_selection (ContentList cl) { { _no_check_selection = true; - ScopeGuard sg = [this]() { _no_check_selection = false; }; + dcp::ScopeGuard sg = [this]() { _no_check_selection = false; }; auto content = _film->content (); for (size_t i = 0; i < content.size(); ++i) { diff --git a/src/wx/controls.cc b/src/wx/controls.cc index 0bb0960c8..097daf944 100644 --- a/src/wx/controls.cc +++ b/src/wx/controls.cc @@ -37,7 +37,6 @@ #include "lib/job.h" #include "lib/job_manager.h" #include "lib/player_video.h" -#include "lib/scope_guard.h" #include <dcp/cpl.h> #include <dcp/dcp.h> #include <dcp/reel.h> diff --git a/src/wx/fonts_dialog.cc b/src/wx/fonts_dialog.cc index f2c9de5cb..2fecdc086 100644 --- a/src/wx/fonts_dialog.cc +++ b/src/wx/fonts_dialog.cc @@ -25,7 +25,6 @@ #include "wx_util.h" #include "lib/content.h" #include "lib/font.h" -#include "lib/scope_guard.h" #include "lib/text_content.h" #include <dcp/filesystem.h> #include <dcp/warnings.h> diff --git a/src/wx/language_tag_widget.cc b/src/wx/language_tag_widget.cc index 17683daf1..2f6ad2b8a 100644 --- a/src/wx/language_tag_widget.cc +++ b/src/wx/language_tag_widget.cc @@ -23,7 +23,6 @@ #include "language_tag_dialog.h" #include "language_tag_widget.h" #include "wx_util.h" -#include "lib/scope_guard.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/wx.h> diff --git a/src/wx/region_subtag_widget.cc b/src/wx/region_subtag_widget.cc index 66bba2285..d2c99762a 100644 --- a/src/wx/region_subtag_widget.cc +++ b/src/wx/region_subtag_widget.cc @@ -24,7 +24,6 @@ #include "region_subtag_dialog.h" #include "region_subtag_widget.h" #include "wx_util.h" -#include "lib/scope_guard.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/wx.h> diff --git a/src/wx/screen_dialog.cc b/src/wx/screen_dialog.cc index 3b2a1bd85..0040ac31b 100644 --- a/src/wx/screen_dialog.cc +++ b/src/wx/screen_dialog.cc @@ -27,7 +27,6 @@ #include "table_dialog.h" #include "wx_util.h" #include "lib/compose.hpp" -#include "lib/scope_guard.h" #include "lib/util.h" #include <dcp/warnings.h> #include <dcp/exceptions.h> diff --git a/src/wx/screens_panel.cc b/src/wx/screens_panel.cc index 721f4f4cc..d3b1db77d 100644 --- a/src/wx/screens_panel.cc +++ b/src/wx/screens_panel.cc @@ -27,9 +27,9 @@ #include "wx_util.h" #include "lib/cinema.h" #include "lib/config.h" -#include "lib/scope_guard.h" #include "lib/screen.h" #include "lib/timer.h" +#include <dcp/scope_guard.h> using std::cout; @@ -258,7 +258,7 @@ ScreensPanel::add_cinema_clicked () try { _ignore_cinemas_changed = true; - ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; }; + dcp::ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; }; Config::instance()->add_cinema(cinema); } catch (FileError& e) { error_dialog(GetParent(), _("Could not write cinema details to the cinemas.xml file. Check that the location of cinemas.xml is valid in DCP-o-matic's preferences."), std_to_wx(e.what())); @@ -355,7 +355,7 @@ ScreensPanel::remove_cinema_clicked () for (auto const& cinema: cinemas_to_remove) { _ignore_cinemas_changed = true; - ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; }; + dcp::ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; }; for (auto screen: cinema->screens()) { _checked_screens.erase(screen); } @@ -717,7 +717,7 @@ bool ScreensPanel::notify_cinemas_changed() { _ignore_cinemas_changed = true; - ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; }; + dcp::ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; }; try { Config::instance()->changed(Config::CINEMAS); diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index 3b7973e30..78c024565 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -42,12 +42,12 @@ #include "lib/ffmpeg_subtitle_stream.h" #include "lib/film.h" #include "lib/job_manager.h" -#include "lib/scope_guard.h" #include "lib/string_text_file_content.h" #include "lib/string_text_file_decoder.h" #include "lib/subtitle_analysis.h" #include "lib/text_content.h" #include <dcp/filesystem.h> +#include <dcp/scope_guard.h> #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/spinctrl.h> @@ -813,7 +813,7 @@ TextPanel::try_to_load_analysis () } _loading_analysis = true; - ScopeGuard sg = [this]() { + dcp::ScopeGuard sg = [this]() { _loading_analysis = false; setup_sensitivity(); }; diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index 9af8c3b85..4683769d4 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -35,10 +35,10 @@ #include "lib/film.h" #include "lib/image_content.h" #include "lib/playlist.h" -#include "lib/scope_guard.h" #include "lib/text_content.h" #include "lib/timer.h" #include "lib/video_content.h" +#include <dcp/scope_guard.h> #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/graphics.h> @@ -161,7 +161,7 @@ Timeline::paint_labels () return; } - ScopeGuard sg = [gc]() { delete gc; }; + dcp::ScopeGuard sg = [gc]() { delete gc; }; int vsx, vsy; _labels_canvas->GetViewStart (&vsx, &vsy); @@ -189,7 +189,7 @@ Timeline::paint_main () return; } - ScopeGuard sg = [gc]() { delete gc; }; + dcp::ScopeGuard sg = [gc]() { delete gc; }; gc->SetAntialiasMode (wxANTIALIAS_DEFAULT); diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc index 98060bb87..55d9a5fbf 100644 --- a/src/wx/timing_panel.cc +++ b/src/wx/timing_panel.cc @@ -34,7 +34,6 @@ #include "lib/ffmpeg_content.h" #include "lib/film.h" #include "lib/image_content.h" -#include "lib/scope_guard.h" #include "lib/string_text_file_content.h" #include "lib/text_content.h" #include "lib/video_content.h" |
