From 0c3e840700a915fc1476cef73c591048f688f81e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 12 Mar 2013 22:00:09 +0100 Subject: videotimline squashed 694 commits from http://gareus.org/gitweb/?p=ardour3.git --- gtk2_ardour/rc_option_editor.cc | 118 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) (limited to 'gtk2_ardour/rc_option_editor.cc') diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 7d290ede2f..d58ad2994c 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -809,6 +809,118 @@ private: PBD::ScopedConnection protocol_status_connection; }; +#ifdef WITH_VIDEOTIMELINE +class VideoTimelineOptions : public OptionEditorBox +{ +public: + VideoTimelineOptions (RCConfiguration* c) + : _rc_config (c) + , _show_xjadeo_setup_button (_("Show Video Monitor Option Dialog")) + , _show_video_export_info_button (_("Show Video Export Info before export")) + , _show_video_server_dialog_button (_("Show Video Server Startup Dialog")) + { + Table* t = manage (new Table (2, 6)); + t->set_spacings (4); + + Label* l = manage (new Label (_("Video Server URL:"))); + l->set_alignment (0, 0.5); + t->attach (*l, 0, 1, 0, 1, FILL); + t->attach (_video_server_url_entry, 1, 2, 0, 1, FILL); + Gtkmm2ext::UI::instance()->set_tip (_video_server_url_entry, + _("Base URL of the video-server including http prefix. This is usually 'http://hostname.example.org:1554/' and defaults to 'http://localhost:1554/' when the video-server is runing locally")); + + l = manage (new Label (_("Video Server Docroot:"))); + l->set_alignment (0, 0.5); + t->attach (*l, 0, 1, 1, 2, FILL); + t->attach (_video_server_docroot_entry, 1, 2, 1, 2); + Gtkmm2ext::UI::instance()->set_tip (_video_server_docroot_entry, + _("Local path to the video-server docroot. If the server runs remotely, it should point to a network mounted folder of the server's docroot or be left empty if it is unvailable. It is used for the local video-monitor and file-browsing when opening/adding a video file.")); + + t->attach (_show_xjadeo_setup_button, 0, 2, 3, 4); + _show_xjadeo_setup_button.signal_toggled().connect (sigc::mem_fun (*this, &VideoTimelineOptions::show_xjadeo_setup_toggled)); + Gtkmm2ext::UI::instance()->set_tip (_show_xjadeo_setup_button, + _("When enabled an option dialog is presented before opening the video monitor")); + + t->attach (_show_video_export_info_button, 0, 2, 4, 5); + _show_video_export_info_button.signal_toggled().connect (sigc::mem_fun (*this, &VideoTimelineOptions::show_video_export_info_toggled)); + Gtkmm2ext::UI::instance()->set_tip (_show_video_export_info_button, + _("When enabled an information window with details is displayed before the video-export dialog.")); + + t->attach (_show_video_server_dialog_button, 0, 2, 5, 6); + _show_video_server_dialog_button.signal_toggled().connect (sigc::mem_fun (*this, &VideoTimelineOptions::show_video_server_dialog_toggled)); + Gtkmm2ext::UI::instance()->set_tip (_show_video_server_dialog_button, + _("When enabled the video server is never launched automatically without confirmation")); + + _video_server_url_entry.signal_changed().connect (sigc::mem_fun(*this, &VideoTimelineOptions::server_url_changed)); + _video_server_url_entry.signal_activate().connect (sigc::mem_fun(*this, &VideoTimelineOptions::server_url_changed)); + _video_server_docroot_entry.signal_changed().connect (sigc::mem_fun(*this, &VideoTimelineOptions::server_docroot_changed)); + _video_server_docroot_entry.signal_activate().connect (sigc::mem_fun(*this, &VideoTimelineOptions::server_docroot_changed)); + + _box->pack_start (*t,true,true); + } + + void server_url_changed () + { + _rc_config->set_video_server_url (_video_server_url_entry.get_text()); + } + + void server_docroot_changed () + { + _rc_config->set_video_server_docroot (_video_server_docroot_entry.get_text()); + } + + void show_xjadeo_setup_toggled () + { + bool const x = _show_xjadeo_setup_button.get_active (); + _rc_config->set_video_monitor_setup_dialog (x); + } + + void show_video_export_info_toggled () + { + bool const x = _show_video_export_info_button.get_active (); + _rc_config->set_show_video_export_info (x); + } + + void show_video_server_dialog_toggled () + { + bool const x = _show_video_server_dialog_button.get_active (); + _rc_config->set_show_video_server_dialog (x); + } + + void parameter_changed (string const & p) + { + if (p == "video-server-url") { + _video_server_url_entry.set_text (_rc_config->get_video_server_url()); + } else if (p == "video-server-docroot") { + _video_server_docroot_entry.set_text (_rc_config->get_video_server_docroot()); + } else if (p == "video-monitor-setup-dialog") { + bool const x = _rc_config->get_video_monitor_setup_dialog(); + _show_xjadeo_setup_button.set_active (x); + } else if (p == "show-video-export-info") { + bool const x = _rc_config->get_show_video_export_info(); + _show_video_export_info_button.set_active (x); + } + } + + void set_state_from_config () + { + parameter_changed ("video-server-url"); + parameter_changed ("video-server-docroot"); + parameter_changed ("video-monitor-setup-dialog"); + parameter_changed ("show-video-export-info"); + parameter_changed ("how-video-server-dialog"); + } + +private: + RCConfiguration* _rc_config; + Entry _video_server_url_entry; + Entry _video_server_docroot_entry; + CheckButton _show_xjadeo_setup_button; + CheckButton _show_video_export_info_button; + CheckButton _show_video_server_dialog_button; +}; +#endif + /** A class which allows control of visibility of some editor components usign * a VisibilityGroup. The caller should pass in a `dummy' VisibilityGroup * which has the correct members, but with null widget pointers. This @@ -870,6 +982,7 @@ private: }; + RCOptionEditor::RCOptionEditor () : OptionEditor (Config, string_compose (_("%1 Preferences"), PROGRAM_NAME)) , _rc_config (Config) @@ -1711,6 +1824,11 @@ RCOptionEditor::RCOptionEditor () add_option (_("User interaction"), rm); +#ifdef WITH_VIDEOTIMELINE + /* VIDEO Timeline */ + add_option (_("Video"), new VideoTimelineOptions (_rc_config)); +#endif + /* INTERFACE */ add_option (S_("GUI"), -- cgit v1.2.3