23 #include <sigc++/bind.h>
41 #ifdef PLATFORM_WINDOWS
53 , path_label (
_(
"Server Executable:"),
Gtk::ALIGN_LEFT)
54 , path_browse_button (
_(
"Browse"))
55 , docroot_label (
_(
"Server Docroot:"),
Gtk::ALIGN_LEFT)
56 , docroot_browse_button (
_(
"Browse"))
57 , listenport_adjustment (1554, 1025, 65536, 1, 10, 0)
58 , listenport_spinner (listenport_adjustment)
59 , cachesize_adjustment (256, 32, 32768, 1, 32, 0)
60 , cachesize_spinner (cachesize_adjustment)
61 , showagain_checkbox (
_(
"Don't show this dialog again. (Reset in Edit->Preferences)."))
65 set_name (
"VideoServerDialog");
67 set_skip_taskbar_hint (
true);
68 set_resizable (
false);
71 VBox* vbox = manage (
new VBox);
72 VBox* options_box = manage (
new VBox);
73 HBox* path_hbox = manage (
new HBox);
74 HBox* docroot_hbox = manage (
new HBox);
97 _(
"The external video server 'harvid' can not be found.\n"
98 "The tool is included with the %1 releases from ardour.org, "
99 "alternatively you can download it from http://x42.github.com/harvid/ "
100 "or acquire it from your distribution.\n"
102 "see also http://manual.ardour.org/video-timeline/setup/"
109 if ((docroot.empty() || docroot.at(docroot.length()-1) !=
'/')) { docroot +=
"/"; }
113 path_hbox->pack_start (
path_label,
false,
false, 3);
114 path_hbox->pack_start (
path_entry,
true,
true, 3);
121 l = manage (
new Label (
_(
"<b>Options</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false));
122 l->set_use_markup ();
123 options_box->pack_start (*l,
false,
true, 4);
125 Table* t = manage (
new Table (2, 3));
127 options_box->pack_start (*t,
true,
true, 4);
129 l = manage (
new Label (
_(
"Listen Address:")));
130 l->set_alignment (0, 0.5);
131 t->attach (*l, 0, 1, 0, 1, FILL);
134 l = manage (
new Label (
_(
"Listen Port:")));
135 l->set_alignment (0, 0.5);
136 t->attach (*l, 0, 1, 1, 2, FILL);
139 l = manage (
new Label (
_(
"Cache Size:")));
140 l->set_alignment (0, 0.5);
141 t->attach (*l, 0, 1, 2, 3, FILL);
145 _(
"%1 relies on an external video server for the videotimeline.\nThe server configured in Edit -> Preferences -> Video is not reachable.\nDo you want %1 to launch 'harvid' on this machine?"), PROGRAM_NAME)
146 , Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER,
false));
147 l->set_max_width_chars(80);
149 vbox->pack_start (*l,
true,
true, 4);
150 vbox->pack_start (*path_hbox,
false,
false);
151 if (
Config->get_video_advanced_setup()){
152 vbox->pack_start (*docroot_hbox,
false,
false);
154 #ifndef PLATFORM_WINDOWS
161 vbox->pack_start (*options_box,
false,
true);
163 get_vbox()->set_spacing (4);
164 get_vbox()->pack_start (*vbox,
false,
false);
171 show_all_children ();
172 add_button (Stock::CANCEL, RESPONSE_CANCEL);
173 add_button (Stock::EXECUTE, RESPONSE_ACCEPT);
189 Gtk::FileChooserDialog dialog(
_(
"Set Video Server Executable"), Gtk::FILE_CHOOSER_ACTION_OPEN);
192 dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
193 dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
195 int result = dialog.run();
197 if (result == Gtk::RESPONSE_OK) {
198 std::string filename = dialog.get_filename();
200 if (filename.length()) {
209 Gtk::FileChooserDialog dialog(
_(
"Server docroot"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
212 dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
213 dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
215 int result = dialog.run();
217 if (result == Gtk::RESPONSE_OK) {
218 std::string dirname = dialog.get_filename();
220 if (dirname.empty() || dirname.at(dirname.length()-1) != G_DIR_SEPARATOR) {
224 if (dirname.length()) {
const std::string root_path() const
Gtk::Button path_browse_button
Gtk::SpinButton cachesize_spinner
LIBPBD_API Transmitter warning
std::ostream & endmsg(std::ostream &ostr)
std::string get_docroot()
void open_docroot_dialog()
LIBARDOUR_API RCConfiguration * Config
Gtk::SpinButton listenport_spinner
Gtk::CheckButton showagain_checkbox
common functions used for video-file im/export
VideoServerDialog(ARDOUR::Session *)
Gtk::ComboBoxText listenaddr_combo
virtual void set_session(ARDOUR::Session *)
const SessionDirectory & session_directory() const
ARDOUR::Session * _session
std::string string_compose(const std::string &fmt, const T1 &o1)
Gtk::Button docroot_browse_button