X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Faudio_panel.cc;h=917775181eeb00d9a7cafb8a02ff533db527e470;hb=d11fa8639d52d2fd673724d21882268116da3458;hp=683751264c874f162878f038afa0aaa2cbb95695;hpb=df8f80913c8083c2d5d3408da6f8dd67193d890b;p=dcpomatic.git diff --git a/src/wx/audio_panel.cc b/src/wx/audio_panel.cc index 683751264..917775181 100644 --- a/src/wx/audio_panel.cc +++ b/src/wx/audio_panel.cc @@ -49,10 +49,10 @@ AudioPanel::AudioPanel (FilmEditor* e) grid->Add (_show, wxGBPosition (r, 0)); ++r; - add_label_to_grid_bag_sizer (grid, this, _("Audio Gain"), true, wxGBPosition (r, 0)); - _gain = new ContentSpinCtrl ( + add_label_to_grid_bag_sizer (grid, this, _("Gain"), true, wxGBPosition (r, 0)); + _gain = new ContentSpinCtrlDouble ( this, - new wxSpinCtrl (this), + new wxSpinCtrlDouble (this), AudioContentProperty::AUDIO_GAIN, boost::mem_fn (&AudioContent::audio_gain), boost::mem_fn (&AudioContent::set_audio_gain) @@ -64,7 +64,7 @@ AudioPanel::AudioPanel (FilmEditor* e) grid->Add (_gain_calculate_button, wxGBPosition (r, 3)); ++r; - add_label_to_grid_bag_sizer (grid, this, _("Audio Delay"), true, wxGBPosition (r, 0)); + add_label_to_grid_bag_sizer (grid, this, _("Delay"), true, wxGBPosition (r, 0)); _delay = new ContentSpinCtrl ( this, new wxSpinCtrl (this), @@ -78,7 +78,7 @@ AudioPanel::AudioPanel (FilmEditor* e) add_label_to_grid_bag_sizer (grid, this, _("ms"), false, wxGBPosition (r, 2)); ++r; - add_label_to_grid_bag_sizer (grid, this, _("Audio Stream"), true, wxGBPosition (r, 0)); + add_label_to_grid_bag_sizer (grid, this, _("Stream"), true, wxGBPosition (r, 0)); _stream = new wxChoice (this, wxID_ANY); grid->Add (_stream, wxGBPosition (r, 1)); _description = add_label_to_grid_bag_sizer (grid, this, "", false, wxGBPosition (r, 3)); @@ -88,6 +88,8 @@ AudioPanel::AudioPanel (FilmEditor* e) _sizer->Add (_mapping, 1, wxEXPAND | wxALL, 6); _gain->wrapped()->SetRange (-60, 60); + _gain->wrapped()->SetDigits (1); + _gain->wrapped()->SetIncrement (0.5); _delay->wrapped()->SetRange (-1000, 1000); _stream->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&AudioPanel::stream_changed, this)); @@ -134,11 +136,11 @@ AudioPanel::film_content_changed (int property) if (fcs) { vector > a = fcs->audio_streams (); for (vector >::iterator i = a.begin(); i != a.end(); ++i) { - _stream->Append (std_to_wx ((*i)->name), new wxStringClientData (std_to_wx (lexical_cast ((*i)->id ())))); + _stream->Append (std_to_wx ((*i)->name), new wxStringClientData (std_to_wx ((*i)->identifier ()))); } if (fcs->audio_stream()) { - checked_set (_stream, lexical_cast (fcs->audio_stream()->id ())); + checked_set (_stream, fcs->audio_stream()->identifier ()); setup_stream_description (); } } @@ -166,7 +168,7 @@ AudioPanel::gain_calculate_button_clicked () /* This appears to be necessary, as the change is not signalled, I think. */ - _gain->update_from_model (); + _gain->view_changed (); d->Destroy (); } @@ -206,7 +208,7 @@ AudioPanel::stream_changed () vector > a = fcs->audio_streams (); vector >::iterator i = a.begin (); string const s = string_client_data (_stream->GetClientObject (_stream->GetSelection ())); - while (i != a.end() && lexical_cast ((*i)->id ()) != s) { + while (i != a.end() && (*i)->identifier () != s) { ++i; }