diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-03-09 00:11:38 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-09 00:11:38 +0100 |
| commit | 80313b07095814f0178be70bc0651c1e052decea (patch) | |
| tree | 5ea002e29340ee342344affce277aa0cd941d7db /src/wx | |
| parent | 82f87c7711fb664b06b04d44792ed3820b3d1e01 (diff) | |
| parent | 04b5957318df591f56e0a5d39720df143dc8230d (diff) | |
Merge branch 'main' into v2.17.x
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/audio_panel.cc | 1 | ||||
| -rw-r--r-- | src/wx/dkdm_dialog.cc | 2 | ||||
| -rw-r--r-- | src/wx/dolby_doremi_certificate_panel.cc | 10 | ||||
| -rw-r--r-- | src/wx/full_config_dialog.cc | 6 | ||||
| -rw-r--r-- | src/wx/kdm_dialog.cc | 2 | ||||
| -rw-r--r-- | src/wx/timeline.cc | 45 | ||||
| -rw-r--r-- | src/wx/timeline.h | 3 |
7 files changed, 64 insertions, 5 deletions
diff --git a/src/wx/audio_panel.cc b/src/wx/audio_panel.cc index d7deeec41..34923fb02 100644 --- a/src/wx/audio_panel.cc +++ b/src/wx/audio_panel.cc @@ -196,6 +196,7 @@ AudioPanel::film_changed (FilmProperty property) case FilmProperty::AUDIO_PROCESSOR: _mapping->set_output_channels (_parent->film()->audio_output_names ()); setup_peak (); + setup_sensitivity(); break; case FilmProperty::VIDEO_FRAME_RATE: setup_description (); diff --git a/src/wx/dkdm_dialog.cc b/src/wx/dkdm_dialog.cc index 8da3090c5..82c2e3598 100644 --- a/src/wx/dkdm_dialog.cc +++ b/src/wx/dkdm_dialog.cc @@ -178,7 +178,7 @@ DKDMDialog::make_clicked () return; } - auto result = _output->make (kdms, film->name(), bind(&DKDMDialog::confirm_overwrite, this, _1)); + auto result = _output->make(kdms, film->dcp_name(), bind(&DKDMDialog::confirm_overwrite, this, _1)); if (result.first) { JobManager::instance()->add (result.first); } diff --git a/src/wx/dolby_doremi_certificate_panel.cc b/src/wx/dolby_doremi_certificate_panel.cc index d290535c2..4d8845402 100644 --- a/src/wx/dolby_doremi_certificate_panel.cc +++ b/src/wx/dolby_doremi_certificate_panel.cc @@ -117,11 +117,21 @@ static void try_ims(vector<Location>& locations, string prefix, string serial) { locations.push_back({ + String::compose("%1%2xxx/Dolby-IMS1000-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial), + String::compose("Dolby-IMS1000-%1.cert.sha256.pem", serial) + }); + + locations.push_back({ String::compose("%1%2xxx/Dolby-IMS2000-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial), String::compose("Dolby-IMS2000-%1.cert.sha256.pem", serial) }); locations.push_back({ + String::compose("%1%2xxx/cert_Dolby-IMS3000-%3-SMPTE.zip", prefix, serial.substr(0, 3), serial), + String::compose("cert_Dolby-IMS3000-%1-SMPTE.pem", serial) + }); + + locations.push_back({ String::compose("%1%2xxx/ims-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial), String::compose("ims-%1.cert.sha256.pem", serial) }); diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc index 66dbae63e..e3ea91224 100644 --- a/src/wx/full_config_dialog.cc +++ b/src/wx/full_config_dialog.cc @@ -52,7 +52,7 @@ #include "lib/config.h" #include "lib/cross.h" #include "lib/dcp_content_type.h" -#include "lib/emailer.h" +#include "lib/email.h" #include "lib/exceptions.h" #include "lib/filter.h" #include "lib/log.h" @@ -983,7 +983,7 @@ private: return; } - Emailer emailer( + Email email( wx_to_std(dialog.from()), { wx_to_std(dialog.to()) }, wx_to_std(_("DCP-o-matic test email")), @@ -991,7 +991,7 @@ private: ); auto config = Config::instance(); try { - emailer.send(config->mail_server(), config->mail_port(), config->mail_protocol(), config->mail_user(), config->mail_password()); + email.send(config->mail_server(), config->mail_port(), config->mail_protocol(), config->mail_user(), config->mail_password()); } catch (NetworkError& e) { error_dialog(_panel, std_to_wx(e.summary()), std_to_wx(e.detail().get_value_or(""))); return; diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc index c88a1ac40..5ab13b4ce 100644 --- a/src/wx/kdm_dialog.cc +++ b/src/wx/kdm_dialog.cc @@ -227,7 +227,7 @@ KDMDialog::make_clicked () return; } - auto result = _output->make (kdms, film->name(), bind (&KDMDialog::confirm_overwrite, this, _1)); + auto result = _output->make(kdms, film->dcp_name(), bind (&KDMDialog::confirm_overwrite, this, _1)); if (result.first) { JobManager::instance()->add (result.first); } diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index 4683769d4..38e9de4ee 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -109,6 +109,7 @@ Timeline::Timeline(wxWindow* parent, ContentPanel* cp, shared_ptr<Film> film, Fi _main_canvas->Bind (wxEVT_RIGHT_DOWN, boost::bind (&Timeline::right_down, this, _1)); _main_canvas->Bind (wxEVT_MOTION, boost::bind (&Timeline::mouse_moved, this, _1)); _main_canvas->Bind (wxEVT_SIZE, boost::bind (&Timeline::resized, this)); + _main_canvas->Bind (wxEVT_MOUSEWHEEL, boost::bind(&Timeline::mouse_wheel_turned, this, _1)); _main_canvas->Bind (wxEVT_SCROLLWIN_TOP, boost::bind (&Timeline::scrolled, this, _1)); _main_canvas->Bind (wxEVT_SCROLLWIN_BOTTOM, boost::bind (&Timeline::scrolled, this, _1)); _main_canvas->Bind (wxEVT_SCROLLWIN_LINEUP, boost::bind (&Timeline::scrolled, this, _1)); @@ -133,6 +134,50 @@ Timeline::Timeline(wxWindow* parent, ContentPanel* cp, shared_ptr<Film> film, Fi void +Timeline::mouse_wheel_turned(wxMouseEvent& event) +{ + auto const rotation = event.GetWheelRotation(); + + if (event.ControlDown()) { + /* On my mouse one click of the scroll wheel is 120, and it's -ve when + * scrolling the wheel towards me. + */ + auto const scale = rotation > 0 ? + (1.0 / (rotation / 90.0)) : + (-rotation / 90.0); + + int before_start_x; + int before_start_y; + _main_canvas->GetViewStart(&before_start_x, &before_start_y); + + auto const before_pps = _pixels_per_second.get_value_or(1); + auto const before_pos = _last_mouse_wheel_x && *_last_mouse_wheel_x == event.GetX() ? + *_last_mouse_wheel_time : + (before_start_x * _x_scroll_rate + event.GetX()) / before_pps; + + set_pixels_per_second(before_pps * scale); + setup_scrollbars(); + + auto after_left = std::max(0.0, before_pos * _pixels_per_second.get_value_or(1) - event.GetX()); + _main_canvas->Scroll(after_left / _x_scroll_rate, before_start_y); + _labels_canvas->Scroll(0, before_start_y); + Refresh(); + + if (!_last_mouse_wheel_x || *_last_mouse_wheel_x != event.GetX()) { + _last_mouse_wheel_x = event.GetX(); + _last_mouse_wheel_time = before_pos; + } + } else if (event.ShiftDown()) { + int before_start_x; + int before_start_y; + _main_canvas->GetViewStart(&before_start_x, &before_start_y); + auto const width = _main_canvas->GetSize().GetWidth(); + _main_canvas->Scroll(std::max(0.0, before_start_x - rotation * 100.0 / width), before_start_y); + } +} + + +void Timeline::update_playhead () { Refresh (); diff --git a/src/wx/timeline.h b/src/wx/timeline.h index 2485e835f..621609fa7 100644 --- a/src/wx/timeline.h +++ b/src/wx/timeline.h @@ -110,6 +110,7 @@ private: void set_pixels_per_track (int h); void zoom_all (); void update_playhead (); + void mouse_wheel_turned(wxMouseEvent& event); std::shared_ptr<TimelineView> event_to_view (wxMouseEvent &); TimelineContentViewList selected_views () const; @@ -143,6 +144,8 @@ private: int _pixels_per_track; bool _first_resize; wxTimer _timer; + boost::optional<int> _last_mouse_wheel_x; + boost::optional<double> _last_mouse_wheel_time; static double const _minimum_pixels_per_second; static int const _minimum_pixels_per_track; |
