vtl: make "Remove Video" insensitive if N/A
This commit is contained in:
parent
67704f8de2
commit
6b480bb2f7
@ -3559,6 +3559,8 @@ ARDOUR_UI::remove_video ()
|
||||
node = new XMLNode(X_("Videomonitor"));
|
||||
_session->add_extra_xml(*node);
|
||||
stop_video_server();
|
||||
|
||||
editor->set_close_video_sensitive(false);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -137,7 +137,7 @@ ARDOUR_UI::install_actions ()
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (main_actions, X_("CloseVideo"), _("Remove Video"),
|
||||
sigc::mem_fun (*this, &ARDOUR_UI::remove_video));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act->set_sensitive (false);
|
||||
act = ActionManager::register_action (main_actions, X_("ExportVideo"), _("Export To Video File"),
|
||||
sigc::mem_fun (*editor, &PublicEditor::export_video));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
@ -925,6 +925,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||
Glib::RefPtr<Gtk::Action> xjadeo_zoom_100;
|
||||
void set_xjadeo_proc ();
|
||||
void toggle_xjadeo_proc (int state=-1);
|
||||
void set_close_video_sensitive (bool onoff);
|
||||
void set_xjadeo_sensitive (bool onoff);
|
||||
void set_xjadeo_viewoption (int);
|
||||
void toggle_xjadeo_viewoption (int what, int state=-1);
|
||||
|
@ -773,6 +773,15 @@ Editor::set_group_tabs ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::set_close_video_sensitive (bool onoff)
|
||||
{
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Main"), X_("CloseVideo"));
|
||||
if (act) {
|
||||
act->set_sensitive (onoff);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::set_xjadeo_sensitive (bool onoff)
|
||||
{
|
||||
|
@ -296,6 +296,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi
|
||||
virtual void edit_notes (TimeAxisViewItem&) = 0;
|
||||
|
||||
virtual void queue_visual_videotimeline_update () = 0;
|
||||
virtual void set_close_video_sensitive (bool) = 0;
|
||||
virtual void toggle_ruler_video (bool) = 0;
|
||||
virtual void toggle_xjadeo_proc (int) = 0;
|
||||
virtual void toggle_xjadeo_viewoption (int, int) = 0;
|
||||
|
@ -465,6 +465,7 @@ VideoTimeLine::video_file_info (std::string filename, bool local)
|
||||
video_server_url, translated_filename(),
|
||||
video_file_fps, _duration, _start_offset, video_aspect_ratio)) {
|
||||
warning << _("Parsing video file info failed. Is the Video Server running? Is the file readable by the Video Server? Does the docroot match? Is it a video file?") << endmsg;
|
||||
GuiUpdate("video-unavailable");
|
||||
return false;
|
||||
}
|
||||
video_duration = _duration * _session->nominal_frame_rate() / video_file_fps;
|
||||
@ -531,6 +532,7 @@ VideoTimeLine::video_file_info (std::string filename, bool local)
|
||||
#endif
|
||||
}
|
||||
VtlUpdate();
|
||||
GuiUpdate("video-available");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -591,6 +593,10 @@ VideoTimeLine::gui_update(std::string const & t) {
|
||||
editor->toggle_xjadeo_viewoption(6, 1);
|
||||
} else if (t == "xjadeo-window-letterbox-off") {
|
||||
editor->toggle_xjadeo_viewoption(6, 0);
|
||||
} else if (t == "video-available") {
|
||||
editor->set_close_video_sensitive(true);
|
||||
} else if (t == "video-unavailable") {
|
||||
editor->set_close_video_sensitive(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user