Use PBD::open_uri in about dialog to open website, should fix #6463
[ardour.git] / gtk2_ardour / transcode_video_dialog.cc
index 7917668d1b13a47f561762926105f1ca2222bcad..04c21b6140dd86bb714c318c24318c35787bb34a 100644 (file)
@@ -41,7 +41,6 @@
 #include "ardour_ui.h"
 #include "gui_thread.h"
 
-#include "utils.h"
 #include "opts.h"
 #include "transcode_video_dialog.h"
 #include "utils_videotl.h"
@@ -123,12 +122,15 @@ TranscodeVideoDialog::TranscodeVideoDialog (Session* s, std::string infile)
                aspect_checkbox.set_sensitive(false);
                bitrate_checkbox.set_sensitive(false);
        } else {
-               ffok = true;
                w = transcoder->get_width();
                h = transcoder->get_height();
                as = transcoder->get_audio();
                m_aspect = transcoder->get_aspect();
 
+               if (w > 0 && h > 0 && transcoder->get_fps() > 0 && transcoder->get_duration() > 0) {
+                       ffok = true;
+               }
+
                Table* t = manage (new Table (4, 2));
                t->set_spacings (4);
                options_box->pack_start (*t, true, true, 4);
@@ -179,17 +181,40 @@ TranscodeVideoDialog::TranscodeVideoDialog (Session* s, std::string infile)
        options_box->pack_start (*l, false, true, 4);
 
        video_combo.set_name ("PaddedButton");
-       video_combo.append_text(_("Reference From Current Location (Previously Transcoded Files Only)"));
-       if (ffok)  {
+
+       if (ffok) {
+               video_combo.append_text(_("Reference From Current Location (Previously Transcoded Files Only)"));
                video_combo.append_text(_("Import/Transcode Video to Session"));
                video_combo.set_active(1);
+               if (as.size() > 0) {
+                       video_combo.append_text(_("Do Not Import Video (Audio Import Only)"));
+                       audio_combo.set_sensitive(true);
+               } else {
+                       audio_combo.set_sensitive(false);
+               }
+               video_combo.set_sensitive(true);
+               transcode_button.set_sensitive(true);
+               path_entry.set_sensitive (true);
+               browse_button.set_sensitive (true);
+       } else if (as.size() > 0) {
+               video_combo.append_text(_("Do Not Import Video (Audio Import Only)"));
+               video_combo.set_active(0);
+               path_entry.set_text ("");
+
+               video_combo.set_sensitive(false);
+               audio_combo.set_sensitive(true);
+               transcode_button.set_sensitive(true);
+               path_entry.set_sensitive (false);
+               browse_button.set_sensitive (false);
        } else {
+               video_combo.append_text(_("Do Not Import Video"));
                video_combo.set_active(0);
+               path_entry.set_text ("");
                video_combo.set_sensitive(false);
                audio_combo.set_sensitive(false);
-       }
-       if (as.size() > 0) {
-               video_combo.append_text(_("Do Not Import Video (Audio Import Only)"));
+               transcode_button.set_sensitive(false);
+               path_entry.set_sensitive (false);
+               browse_button.set_sensitive (false);
        }
 
        options_box->pack_start (video_combo, false, false, 4);