From: Carl Hetherington Date: Mon, 5 Nov 2012 15:23:17 +0000 (+0000) Subject: GUI tweaks. X-Git-Tag: v2.0.48~1559 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=62df6543cdeaa945afb4e0ea182da06102bea4ef;p=dcpomatic.git GUI tweaks. --- diff --git a/src/wx/dci_name_dialog.cc b/src/wx/dci_name_dialog.cc index bb6c25807..6927d6c9e 100644 --- a/src/wx/dci_name_dialog.cc +++ b/src/wx/dci_name_dialog.cc @@ -43,7 +43,7 @@ DCINameDialog::DCINameDialog (wxWindow* parent, shared_ptr film) _territory = new wxTextCtrl (this, wxID_ANY); table->Add (_territory, 1, wxEXPAND); - add_label_to_sizer (table, this, "Rating (e.g. 15"); + add_label_to_sizer (table, this, "Rating (e.g. 15)"); _rating = new wxTextCtrl (this, wxID_ANY); table->Add (_rating, 1, wxEXPAND); diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index e2a31d8d4..703059780 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -57,6 +57,7 @@ using boost::shared_ptr; FilmEditor::FilmEditor (shared_ptr f, wxWindow* parent) : wxPanel (parent) , _film (f) + , _generally_sensitive (true) { _sizer = new wxFlexGridSizer (2, 4, 4); SetSizer (_sizer); @@ -506,6 +507,7 @@ FilmEditor::film_changed (Film::Property p) break; case Film::WITH_SUBTITLES: checked_set (_with_subtitles, _film->with_subtitles ()); + _subtitle_stream->Enable (_film->with_subtitles ()); _subtitle_scale->Enable (_film->with_subtitles ()); _subtitle_offset->Enable (_film->with_subtitles ()); _dcp_name->SetLabel (std_to_wx (_film->dcp_name ())); @@ -612,6 +614,8 @@ FilmEditor::set_film (shared_ptr f) void FilmEditor::set_things_sensitive (bool s) { + _generally_sensitive = s; + _name->Enable (s); _use_dci_name->Enable (s); _edit_dci_button->Enable (s); @@ -812,7 +816,11 @@ FilmEditor::with_subtitles_toggled (wxCommandEvent &) void FilmEditor::setup_subtitle_control_sensitivity () { - bool const h = _film ? _film->has_subtitles() : false; + bool h = false; + if (_generally_sensitive && _film) { + h = _film->has_subtitles(); + } + _with_subtitles->Enable (h); _subtitle_stream->Enable (h); _subtitle_offset->Enable (h); diff --git a/src/wx/film_editor.h b/src/wx/film_editor.h index 778988a0f..c5fe4b6cc 100644 --- a/src/wx/film_editor.h +++ b/src/wx/film_editor.h @@ -147,4 +147,6 @@ private: std::vector _formats; wxSizer* _sizer; + + bool _generally_sensitive; };