summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-03-27 23:28:27 +0100
committerCarl Hetherington <cth@carlh.net>2018-03-27 23:28:27 +0100
commit47c34c6c7c82396b62e101283cb25b8726dbaefd (patch)
tree2a4117899fcaddc7d5b9aae89315cecd145174c8 /src/wx
parent05502433d24e916bd99db3bac26b4903f961da06 (diff)
why_not in can_reference can just be a string rather than a list of strings.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/audio_panel.cc2
-rw-r--r--src/wx/content_sub_panel.cc7
-rw-r--r--src/wx/content_sub_panel.h2
-rw-r--r--src/wx/subtitle_panel.cc2
-rw-r--r--src/wx/video_panel.cc2
5 files changed, 6 insertions, 9 deletions
diff --git a/src/wx/audio_panel.cc b/src/wx/audio_panel.cc
index fd63abf6c..14d8db07e 100644
--- a/src/wx/audio_panel.cc
+++ b/src/wx/audio_panel.cc
@@ -267,7 +267,7 @@ AudioPanel::setup_sensitivity ()
dcp = dynamic_pointer_cast<DCPContent> (sel.front ());
}
- list<string> why_not;
+ string why_not;
bool const can_reference = dcp && dcp->can_reference_audio (why_not);
setup_refer_button (_reference, dcp, can_reference, why_not);
diff --git a/src/wx/content_sub_panel.cc b/src/wx/content_sub_panel.cc
index e0e0cd12b..92eb5a32f 100644
--- a/src/wx/content_sub_panel.cc
+++ b/src/wx/content_sub_panel.cc
@@ -42,7 +42,7 @@ ContentSubPanel::ContentSubPanel (ContentPanel* p, wxString name)
}
void
-ContentSubPanel::setup_refer_button (wxCheckBox* button, shared_ptr<DCPContent> dcp, bool can_reference, list<string> why_not) const
+ContentSubPanel::setup_refer_button (wxCheckBox* button, shared_ptr<DCPContent> dcp, bool can_reference, string why_not) const
{
button->Enable (can_reference);
@@ -50,10 +50,7 @@ ContentSubPanel::setup_refer_button (wxCheckBox* button, shared_ptr<DCPContent>
if (!dcp) {
s = _("No DCP selected.");
} else if (!can_reference) {
- s = _("Cannot reference this DCP. ");
- BOOST_FOREACH (string i, why_not) {
- s += std_to_wx(i) + wxT(" ");
- }
+ s = _("Cannot reference this DCP. ") + std_to_wx(why_not);
}
button->SetToolTip (s);
diff --git a/src/wx/content_sub_panel.h b/src/wx/content_sub_panel.h
index 44d5ee1a5..fb22b3a22 100644
--- a/src/wx/content_sub_panel.h
+++ b/src/wx/content_sub_panel.h
@@ -42,7 +42,7 @@ public:
protected:
- void setup_refer_button (wxCheckBox* button, boost::shared_ptr<DCPContent> dcp, bool can_reference, std::list<std::string> why_not) const;
+ void setup_refer_button (wxCheckBox* button, boost::shared_ptr<DCPContent> dcp, bool can_reference, std::string why_not) const;
ContentPanel* _parent;
wxSizer* _sizer;
diff --git a/src/wx/subtitle_panel.cc b/src/wx/subtitle_panel.cc
index 0b94b335f..5bba1ec2c 100644
--- a/src/wx/subtitle_panel.cc
+++ b/src/wx/subtitle_panel.cc
@@ -275,7 +275,7 @@ SubtitlePanel::setup_sensitivity ()
dcp = dynamic_pointer_cast<DCPContent> (sel.front ());
}
- list<string> why_not;
+ string why_not;
bool const can_reference = dcp && dcp->can_reference_subtitle (why_not);
setup_refer_button (_reference, dcp, can_reference, why_not);
diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc
index 294dd00e1..5fbe518c4 100644
--- a/src/wx/video_panel.cc
+++ b/src/wx/video_panel.cc
@@ -462,7 +462,7 @@ VideoPanel::setup_sensitivity ()
dcp = dynamic_pointer_cast<DCPContent> (sel.front ());
}
- list<string> why_not;
+ string why_not;
bool const can_reference = dcp && dcp->can_reference_video (why_not);
setup_refer_button (_reference, dcp, can_reference, why_not);