summaryrefslogtreecommitdiff
path: root/gtk2_ardour/video_server_dialog.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2013-03-28 13:41:36 +0100
committerRobin Gareus <robin@gareus.org>2013-03-28 13:42:51 +0100
commita1429ed39f142ccf8cde558891cbe59ca97a9922 (patch)
tree12489269635ea4a6f17e4061e86ef8c709e152d3 /gtk2_ardour/video_server_dialog.cc
parente18b95b4f4c7a92be3146837835ecf0f8f3c9ba8 (diff)
vtl: simple/localhost mode.
Hide most of the setup complexity that is irrelevant when running the video-server on the same host as Ardour. Add an abstraction layer to the config which will become important later when /building in/ the video-server.
Diffstat (limited to 'gtk2_ardour/video_server_dialog.cc')
-rw-r--r--gtk2_ardour/video_server_dialog.cc24
1 files changed, 20 insertions, 4 deletions
diff --git a/gtk2_ardour/video_server_dialog.cc b/gtk2_ardour/video_server_dialog.cc
index 5809b9a7d4..ca70c11a0f 100644
--- a/gtk2_ardour/video_server_dialog.cc
+++ b/gtk2_ardour/video_server_dialog.cc
@@ -32,6 +32,7 @@
#include "ardour/session.h"
#include "video_server_dialog.h"
+#include "utils_videotl.h"
#include "i18n.h"
using namespace Gtk;
@@ -131,17 +132,23 @@ VideoServerDialog::VideoServerDialog (Session* s)
t->attach (*l, 0, 1, 2, 3, FILL);
t->attach (cachesize_spinner, 1, 2, 2, 3);
- l = manage (new Label (_("Ardour relies on an external Video Server for the videotimeline. The server configured in Edit -> Prefereces -> Video is not reachable. Do you want ardour to launch 'harvid' on this machine?"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
+ l = manage (new Label (_("Ardour relies on an external Video Server for the videotimeline.\nThe server configured in Edit -> Prefereces -> Video is not reachable.\nDo you want ardour to launch 'harvid' on this machine?"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
+ l->set_max_width_chars(80);
l->set_line_wrap();
- vbox->pack_start (*l, false, true, 4);
+ vbox->pack_start (*l, true, true, 4);
vbox->pack_start (*path_hbox, false, false);
- vbox->pack_start (*docroot_hbox, false, false);
+ if (Config->get_video_advanced_setup()){
+ vbox->pack_start (*docroot_hbox, false, false);
+ } else {
+ docroot_entry.set_text(X_("/"));
+ listenport_spinner.set_sensitive(false);
+ }
vbox->pack_start (*options_box, false, true);
get_vbox()->set_spacing (4);
get_vbox()->pack_start (*vbox, false, false);
get_vbox()->pack_start (showagain_checkbox, false, false);
- showagain_checkbox.set_active(false);
+ showagain_checkbox.set_active(!Config->get_show_video_server_dialog());
path_browse_button.signal_clicked().connect (sigc::mem_fun (*this, &VideoServerDialog::open_path_dialog));
docroot_browse_button.signal_clicked().connect (sigc::mem_fun (*this, &VideoServerDialog::open_docroot_dialog));
@@ -195,10 +202,19 @@ VideoServerDialog::open_docroot_dialog ()
if (result == Gtk::RESPONSE_OK) {
std::string dirname = dialog.get_filename();
+ if (dirname.empty() || dirname.at(dirname.length()-1) != G_DIR_SEPARATOR) {
+ dirname += "/";
+ }
+
if (dirname.length()) {
docroot_entry.set_text (dirname);
}
}
}
+std::string
+VideoServerDialog::get_docroot () {
+ return docroot_entry.get_text();
+}
+
#endif /* WITH_VIDEOTIMELINE */