summaryrefslogtreecommitdiff
path: root/src/wx/content_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-04-14 01:01:28 +0100
committerCarl Hetherington <cth@carlh.net>2016-05-18 11:50:29 +0100
commit65b331d32c383f3a9049f29bf03ab3fe3193b31a (patch)
tree3b27e0ca60742021094cee889a1c8d1ef4d75f8c /src/wx/content_panel.cc
parent6dd3777a0074f6f97c7f7286621006a1c14376e8 (diff)
Split audio; builds.
Diffstat (limited to 'src/wx/content_panel.cc')
-rw-r--r--src/wx/content_panel.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index ad4894897..36f0a6bb2 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -163,15 +163,14 @@ ContentPanel::selected_video ()
return vc;
}
-AudioContentList
+ContentList
ContentPanel::selected_audio ()
{
- AudioContentList ac;
+ ContentList ac;
BOOST_FOREACH (shared_ptr<Content> i, selected ()) {
- shared_ptr<AudioContent> t = dynamic_pointer_cast<AudioContent> (i);
- if (t) {
- ac.push_back (t);
+ if (i->audio) {
+ ac.push_back (i);
}
}
@@ -387,7 +386,7 @@ ContentPanel::setup_sensitivity ()
ContentList selection = selected ();
ContentList video_selection = selected_video ();
- AudioContentList audio_selection = selected_audio ();
+ ContentList audio_selection = selected_audio ();
_remove->Enable (!selection.empty() && _generally_sensitive);
_earlier->Enable (selection.size() == 1 && _generally_sensitive);
@@ -396,7 +395,7 @@ ContentPanel::setup_sensitivity ()
_video_panel->Enable (video_selection.size() > 0 && _generally_sensitive);
_audio_panel->Enable (audio_selection.size() > 0 && _generally_sensitive);
- _subtitle_panel->Enable (selection.size() == 1 && dynamic_pointer_cast<SubtitleContent> (selection.front()) && _generally_sensitive);
+ _subtitle_panel->Enable (selection.size() == 1 && selection.front()->subtitle && _generally_sensitive);
_timing_panel->Enable (selection.size() == 1 && _generally_sensitive);
}