diff options
author | Robin Gareus <robin@gareus.org> | 2013-03-29 09:46:29 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-03-29 12:35:57 +0100 |
commit | 941898843ead9677792df9e10e6a545f29d43499 (patch) | |
tree | 0708126a736bece657148aa3122dcb1861c9b74e /gtk2_ardour/video_timeline.cc | |
parent | 0c2d95b08f1310533aa14604f7745be8681d10ec (diff) |
vtl: add close/remove video menu entry
Diffstat (limited to 'gtk2_ardour/video_timeline.cc')
-rw-r--r-- | gtk2_ardour/video_timeline.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gtk2_ardour/video_timeline.cc b/gtk2_ardour/video_timeline.cc index e214341d20..328d1311ac 100644 --- a/gtk2_ardour/video_timeline.cc +++ b/gtk2_ardour/video_timeline.cc @@ -153,12 +153,16 @@ VideoTimeLine::save_session () void VideoTimeLine::close_session () { + if (video_duration == 0) { + return; + } close_video_monitor(); save_session(); remove_frames(); video_filename = ""; - video_duration = 0L; + video_duration = 0; + GuiUpdate("set-xjadeo-sensitive-off"); } /** load settings from session */ @@ -171,6 +175,11 @@ VideoTimeLine::set_session (ARDOUR::Session *s) LocaleGuard lg (X_("POSIX")); XMLNode* node = _session->extra_xml (X_("Videotimeline")); + + if (!node || !node->property (X_("Filename"))) { + return; + } + if (node) { ARDOUR_UI::instance()->start_video_server((Gtk::Window*)0, false); @@ -210,7 +219,7 @@ VideoTimeLine::set_session (ARDOUR::Session *s) node = _session->extra_xml (X_("Videomonitor")); if (node) { const XMLProperty* prop = node->property (X_("active")); - if (prop->value() == "yes" && found_xjadeo() && !video_filename.empty() && local_file) { + if (prop && prop->value() == "yes" && found_xjadeo() && !video_filename.empty() && local_file) { open_video_monitor(false); } } |