Fix "Fill Track".
[ardour.git] / gtk2_ardour / export_video_dialog.cc
index 75986a72f59c3ce3f4c4287ea63260a01884bd43..98f5306ad073815363f26d3c48605921b90fc5e6 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <sigc++/bind.h>
 
-#include <glib/gstdio.h>
+#include "pbd/gstdio_compat.h"
 
 #include "pbd/error.h"
 #include "pbd/convert.h"
 #include "utils_videotl.h"
 #include "i18n.h"
 
-#ifdef COMPILER_MSVC
-#define rintf(x) round((x) + 0.5)
-#endif
-
 using namespace Gtk;
 using namespace std;
 using namespace PBD;
@@ -83,6 +79,7 @@ ExportVideoDialog::ExportVideoDialog ()
        , invid_browse_button (_("Browse"))
        , transcode_button (_("Export"))
        , abort_button (_("Abort"))
+       , progress_box (0)
        , scale_checkbox (_("Scale Video (W x H):"))
        , scale_aspect (_("Retain Aspect"))
        , width_adjustment (768, 128, 1920, 1, 16, 0)
@@ -486,7 +483,9 @@ ExportVideoDialog::apply_state (TimeSelection &tme, bool range)
        _suspend_dirty = false;
 
        show_all_children ();
-       progress_box->hide();
+       if (progress_box) {
+               progress_box->hide();
+       }
 }
 
 XMLNode&
@@ -533,22 +532,6 @@ ExportVideoDialog::on_show ()
        Dialog::on_show ();
 }
 
-bool
-ExportVideoDialog::on_focus_in_event (GdkEventFocus *ev)
-{
-       Dialog::on_focus_in_event (ev);
-       Gtkmm2ext::Keyboard::magic_widget_grab_focus ();
-       return true;
-}
-
-bool
-ExportVideoDialog::on_focus_out_event (GdkEventFocus *ev)
-{
-       Dialog::on_focus_out_event (ev);
-       Gtkmm2ext::Keyboard::magic_widget_drop_focus ();
-       return true;
-}
-
 void
 ExportVideoDialog::abort_clicked ()
 {
@@ -636,7 +619,7 @@ ExportVideoDialog::launch_export ()
        _session->add_extra_xml (get_state());
 
        std::string outfn = outfn_path_entry.get_text();
-       if (!confirm_video_outfn(outfn)) { return; }
+       if (!confirm_video_outfn(*this, outfn)) { return; }
 
        vbox->hide();
        cancel_button->hide();