summaryrefslogtreecommitdiff
path: root/src/wx/timeline.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-07-10 22:41:48 +0100
committerCarl Hetherington <cth@carlh.net>2014-07-10 22:41:48 +0100
commita8af9a0b57b853b8a8cd8fa35adb3fc967d59ee7 (patch)
tree9493b374153de99bc220138361420c5abe85b16e /src/wx/timeline.cc
parent8d58a7c5f4320ad5c111e336c45e44d6b51ab509 (diff)
Add has_subtitles method to SubtitleContent; tidy up timeline display a bit.
Diffstat (limited to 'src/wx/timeline.cc')
-rw-r--r--src/wx/timeline.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index 534f4eda7..fc3aefdaa 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -22,6 +22,7 @@
#include <boost/weak_ptr.hpp>
#include "lib/film.h"
#include "lib/playlist.h"
+#include "lib/image_content.h"
#include "film_editor.h"
#include "timeline.h"
#include "wx_util.h"
@@ -173,7 +174,7 @@ private:
gc->StrokePath (path);
gc->FillPath (path);
- wxString name = wxString::Format (wxT ("%s [%s]"), std_to_wx (cont->path_summary()).data(), type().data());
+ wxString name = wxString::Format (wxT ("%s [%s]"), std_to_wx (cont->summary()).data(), type().data());
wxDouble name_width;
wxDouble name_height;
wxDouble name_descent;
@@ -241,10 +242,10 @@ private:
wxString type () const
{
- if (dynamic_pointer_cast<FFmpegContent> (content ())) {
- return _("video");
- } else {
+ if (dynamic_pointer_cast<ImageContent> (content ()) && content()->number_of_paths() == 1) {
return _("still");
+ } else {
+ return _("video");
}
}
@@ -435,7 +436,9 @@ Timeline::playlist_changed ()
if (dynamic_pointer_cast<AudioContent> (*i)) {
_views.push_back (shared_ptr<View> (new AudioContentView (*this, *i)));
}
- if (dynamic_pointer_cast<SubtitleContent> (*i)) {
+
+ shared_ptr<SubtitleContent> sc = dynamic_pointer_cast<SubtitleContent> (*i);
+ if (sc && sc->has_subtitles ()) {
_views.push_back (shared_ptr<View> (new SubtitleContentView (*this, *i)));
}
}