Remove internal edit mode and add "content" tool.
[ardour.git] / gtk2_ardour / video_server_dialog.cc
index 6d9bb229781532b044cf6bdd503f326d5f3db4ef..4b3bf206e4dcc7e980b66c056e1b36bccca996c2 100644 (file)
@@ -101,7 +101,7 @@ VideoServerDialog::VideoServerDialog (Session* s)
 #endif
 
        std::string icsd_file_path;
-       if (find_file_in_search_path (PBD::Searchpath(Glib::getenv("PATH")), X_("harvid"), icsd_file_path)) {
+       if (find_file (PBD::Searchpath(Glib::getenv("PATH")), X_("harvid"), icsd_file_path)) {
                path_entry.set_text(icsd_file_path);
        }
 #ifdef PLATFORM_WINDOWS
@@ -109,11 +109,17 @@ VideoServerDialog::VideoServerDialog (Session* s)
                        &&  (ERROR_SUCCESS == RegQueryValueExA (key, "Install_Dir", 0, NULL, reinterpret_cast<LPBYTE>(tmp), &size))
                        )
        {
-               path_entry.set_text(g_build_filename(Glib::locale_to_utf8(tmp).c_str(), "harvid.exe", 0));
+               path_entry.set_text(g_build_filename(Glib::locale_to_utf8(tmp).c_str(), "harvid.exe", NULL));
        }
-       else if (program_files && Glib::file_test(g_build_filename(program_files, "harvid", "harvid.exe", 0), Glib::FILE_TEST_EXISTS))
+       else if ( (ERROR_SUCCESS == RegOpenKeyExA (HKEY_LOCAL_MACHINE, "Software\\RSS\\harvid", 0, KEY_READ | KEY_WOW64_32KEY, &key))
+                       &&  (ERROR_SUCCESS == RegQueryValueExA (key, "Install_Dir", 0, NULL, reinterpret_cast<LPBYTE>(tmp), &size))
+                       )
+       {
+               path_entry.set_text(g_build_filename(Glib::locale_to_utf8(tmp).c_str(), "harvid.exe", NULL));
+       }
+       else if (program_files && Glib::file_test(g_build_filename(program_files, "harvid", "harvid.exe", NULL), Glib::FILE_TEST_EXISTS))
        {
-               path_entry.set_text(g_build_filename(program_files, "harvid", "harvid.exe", 0));
+               path_entry.set_text(g_build_filename(program_files, "harvid", "harvid.exe", NULL));
        }
 #endif
        /* generic fallbacks to try */
@@ -123,8 +129,13 @@ VideoServerDialog::VideoServerDialog (Session* s)
        else {
                PBD::warning <<
                        string_compose(
-                       _("The external video server 'harvid' can not be found. The tool is included with the %1 releases from ardour.org, "
-                         "alternatively you can download it from http://x42.github.com/harvid/ or acquire it from your distribution."), PROGRAM_NAME)
+                                       _("The external video server 'harvid' can not be found.\n"
+                                               "The tool is included with the %1 releases from ardour.org, "
+                                               "alternatively you can download it from http://x42.github.com/harvid/ "
+                                               "or acquire it from your distribution.\n"
+                                               "\n"
+                                               "see also http://manual.ardour.org/video-timeline/setup/"
+                                        ), PROGRAM_NAME)
                        << endmsg;
        }