remove debug output
[ardour.git] / gtk2_ardour / utils.cc
index 68f4c834262c8d7cf92ecae278370fc6dcf42d97..60498b9fac3e3ceee40c663f01bd1a6ebda0709a 100644 (file)
@@ -26,7 +26,6 @@
 #include <cstring>
 #include <cctype>
 #include <cmath>
-#include <fstream>
 #include <list>
 #include <sys/stat.h>
 #include <gtkmm/rc.h>
@@ -54,6 +53,7 @@
 #include "rgb_macros.h"
 #include "gui_thread.h"
 #include "ui_config.h"
+#include "ardour_dialog.h"
 
 using namespace std;
 using namespace Gtk;
@@ -927,3 +927,23 @@ ARDOUR_UI_UTILS::windows_overlap (Gtk::Window *a, Gtk::Window *b)
        }
        return false;
 }
+
+bool
+ARDOUR_UI_UTILS::overwrite_file_dialog (Gtk::Window& parent, string title, string text)
+{
+       ArdourDialog dialog (parent, title, true);
+       Label label (text);
+
+       dialog.get_vbox()->pack_start (label, true, true);
+       dialog.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
+       dialog.add_button (_("Overwrite"), Gtk::RESPONSE_ACCEPT);
+       dialog.show_all ();
+
+       switch (dialog.run()) {
+       case RESPONSE_ACCEPT:
+               return true;
+       case RESPONSE_CANCEL:
+       default:
+               return false;
+       }
+}