diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-01-05 23:17:16 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-01-05 23:17:16 +0000 |
| commit | d26296467bbf6bd1b2300dd862ce55fcd7f3d624 (patch) | |
| tree | 125284d4686aa58710ce841a77da9b0f762af857 /src/wx | |
| parent | 249ae25148213a2ab5d76980133182e7f2521524 (diff) | |
Add simple copy and paste for content settings (#1051).
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/content_panel.cc | 2 | ||||
| -rw-r--r-- | src/wx/content_panel.h | 2 | ||||
| -rw-r--r-- | src/wx/film_editor.h | 1 | ||||
| -rw-r--r-- | src/wx/paste_dialog.cc | 55 | ||||
| -rw-r--r-- | src/wx/paste_dialog.h | 36 | ||||
| -rw-r--r-- | src/wx/wscript | 1 |
6 files changed, 97 insertions, 0 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index 843f39280..8620fa3e0 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -266,6 +266,8 @@ ContentPanel::selection_changed () if (_timeline_dialog) { _timeline_dialog->set_selection (selected ()); } + + SelectionChanged (); } void diff --git a/src/wx/content_panel.h b/src/wx/content_panel.h index cf5782baa..475567d28 100644 --- a/src/wx/content_panel.h +++ b/src/wx/content_panel.h @@ -70,6 +70,8 @@ public: void add_file_clicked (); bool remove_clicked (bool hotkey); + boost::signals2::signal<void (void)> SelectionChanged; + private: void selection_changed (); void add_folder_clicked (); diff --git a/src/wx/film_editor.h b/src/wx/film_editor.h index 47b333519..576cd5ba1 100644 --- a/src/wx/film_editor.h +++ b/src/wx/film_editor.h @@ -43,6 +43,7 @@ public: void set_film (boost::shared_ptr<Film>); boost::signals2::signal<void (boost::filesystem::path)> FileChanged; + boost::signals2::signal<void (void)> SelectionChanged; /* Stuff for panels */ diff --git a/src/wx/paste_dialog.cc b/src/wx/paste_dialog.cc new file mode 100644 index 000000000..eade31490 --- /dev/null +++ b/src/wx/paste_dialog.cc @@ -0,0 +1,55 @@ +/* + Copyright (C) 2018 Carl Hetherington <cth@carlh.net> + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>. + +*/ + +#include "paste_dialog.h" + +PasteDialog::PasteDialog (wxWindow* parent, bool video, bool audio, bool subtitle) + : TableDialog (parent, _("Paste"), 1, 0, true) +{ + _video = new wxCheckBox (this, wxID_ANY, _("Paste video settings")); + _video->Enable (video); + add (_video); + _audio = new wxCheckBox (this, wxID_ANY, _("Paste audio settings")); + _audio->Enable (audio); + add (_audio); + _subtitle = new wxCheckBox (this, wxID_ANY, _("Paste subtitle settings")); + _subtitle->Enable (subtitle); + add (_subtitle); + + layout (); +} + +bool +PasteDialog::video () const +{ + return _video->GetValue (); +} + +bool +PasteDialog::audio () const +{ + return _audio->GetValue (); +} + +bool +PasteDialog::subtitle () const +{ + return _subtitle->GetValue (); +} diff --git a/src/wx/paste_dialog.h b/src/wx/paste_dialog.h new file mode 100644 index 000000000..204f421d8 --- /dev/null +++ b/src/wx/paste_dialog.h @@ -0,0 +1,36 @@ +/* + Copyright (C) 2018 Carl Hetherington <cth@carlh.net> + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>. + +*/ + +#include "table_dialog.h" + +class PasteDialog : public TableDialog +{ +public: + PasteDialog (wxWindow* parent, bool video, bool audio, bool subtitle); + + bool video () const; + bool audio () const; + bool subtitle () const; + +private: + wxCheckBox* _video; + wxCheckBox* _audio; + wxCheckBox* _subtitle; +}; diff --git a/src/wx/wscript b/src/wx/wscript index 7346f3a2f..86065731c 100644 --- a/src/wx/wscript +++ b/src/wx/wscript @@ -76,6 +76,7 @@ sources = """ name_format_editor.cc new_dkdm_folder_dialog.cc normal_job_view.cc + paste_dialog.cc player_config_dialog.cc player_information.cc playhead_to_timecode_dialog.cc |
