summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-07-15 14:29:00 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-07-15 14:29:00 -0400
commit15be15451592817731a271cd16d9b94c40c3023b (patch)
tree3583e4f9bc5a7c2b0e5be4fe5c5937cacef6943d /gtk2_ardour
parentf9549b6c5c56bc664a987c74d4491a143db6c4d6 (diff)
use g_unlink() rather than unlink() universally, requires <glib/gstdio.h> in several files
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_export_audio.cc6
-rw-r--r--gtk2_ardour/editor_videotimeline.cc4
-rw-r--r--gtk2_ardour/export_video_dialog.cc16
-rw-r--r--gtk2_ardour/sfdb_ui.cc4
-rw-r--r--gtk2_ardour/transcode_video_dialog.cc6
5 files changed, 23 insertions, 13 deletions
diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc
index 877a39e773..e40030d671 100644
--- a/gtk2_ardour/editor_export_audio.cc
+++ b/gtk2_ardour/editor_export_audio.cc
@@ -25,6 +25,8 @@
#include <gtkmm/messagedialog.h>
+#include <glib/gstdio.h>
+
#include "gtkmm2ext/choice.h"
#include "pbd/pthread_utils.h"
@@ -158,11 +160,11 @@ Editor::export_region ()
switch (ret) {
case Gtk::RESPONSE_ACCEPT:
- /* force unlink because the backend code will
+ /* force ::g_unlink because the backend code will
go wrong if it tries to open an existing
file for writing.
*/
- ::unlink (path.c_str());
+ ::g_unlink (path.c_str());
break;
default:
return;
diff --git a/gtk2_ardour/editor_videotimeline.cc b/gtk2_ardour/editor_videotimeline.cc
index 7395d767c7..5da8a295b7 100644
--- a/gtk2_ardour/editor_videotimeline.cc
+++ b/gtk2_ardour/editor_videotimeline.cc
@@ -20,6 +20,8 @@
#include <jack/types.h>
+#include <glib/gstdio.h>
+
#include "ardour/profile.h"
#include "ardour/rc_configuration.h"
#include "ardour/audio_track.h"
@@ -118,7 +120,7 @@ Editor::embed_audio_from_video (std::string path, framepos_t n)
import_status.all_done = true;
#endif
- unlink(path.c_str());
+ ::g_unlink(path.c_str());
}
void
diff --git a/gtk2_ardour/export_video_dialog.cc b/gtk2_ardour/export_video_dialog.cc
index ce85fad81e..d51fd60e2b 100644
--- a/gtk2_ardour/export_video_dialog.cc
+++ b/gtk2_ardour/export_video_dialog.cc
@@ -30,6 +30,8 @@
#include <sigc++/bind.h>
#include <libgen.h>
+#include <glib/gstdio.h>
+
#include "pbd/error.h"
#include "pbd/convert.h"
#include "gtkmm2ext/utils.h"
@@ -405,8 +407,8 @@ void
ExportVideoDialog::finished ()
{
if (aborted) {
- unlink(outfn_path_entry.get_text().c_str());
- unlink (insnd.c_str());
+ ::g_unlink(outfn_path_entry.get_text().c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
} else if (twopass && firstpass) {
firstpass = false;
@@ -416,9 +418,9 @@ ExportVideoDialog::finished ()
if (twopass_checkbox.get_active()) {
std::string outfn = outfn_path_entry.get_text();
std::string p2log = Glib::path_get_dirname (outfn) + G_DIR_SEPARATOR + "ffmpeg2pass";
- unlink (p2log.c_str());
+ ::g_unlink (p2log.c_str());
}
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_ACCEPT);
}
}
@@ -554,7 +556,7 @@ ExportVideoDialog::launch_export ()
audio_progress_connection.disconnect();
status->finish ();
if (status->aborted()) {
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
return;
}
@@ -571,14 +573,14 @@ ExportVideoDialog::encode_pass (int pass)
transcoder = new TranscodeFfmpeg(invid);
if (!transcoder->ffexec_ok()) {
/* ffmpeg binary was not found. TranscodeFfmpeg prints a warning */
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
return;
}
if (!transcoder->probe_ok()) {
/* video input file can not be read */
warning << _("Export Video: Video input file cannot be read.") << endmsg;
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
return;
}
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 482a3b61b7..f116041d03 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -31,6 +31,8 @@
#include <gtkmm/box.h>
#include <gtkmm/stock.h>
+
+#include <glib/gstdio.h>
#include <glibmm/fileutils.h>
#include "pbd/convert.h"
@@ -1487,7 +1489,7 @@ SoundFileOmega::check_link_status (const Session* s, const vector<string>& paths
goto out;
}
- unlink (tmpc);
+ ::g_unlink (tmpc);
}
ret = true;
diff --git a/gtk2_ardour/transcode_video_dialog.cc b/gtk2_ardour/transcode_video_dialog.cc
index fa5d447a3a..4d8b9b9f11 100644
--- a/gtk2_ardour/transcode_video_dialog.cc
+++ b/gtk2_ardour/transcode_video_dialog.cc
@@ -30,6 +30,8 @@
#include <sigc++/bind.h>
#include <libgen.h>
+#include <glib/gstdio.h>
+
#include "pbd/error.h"
#include "pbd/convert.h"
#include "gtkmm2ext/utils.h"
@@ -301,9 +303,9 @@ void
TranscodeVideoDialog::finished ()
{
if (aborted) {
- unlink(path_entry.get_text().c_str());
+ ::g_unlink(path_entry.get_text().c_str());
if (!audiofile.empty()) {
- unlink(audiofile.c_str());
+ ::g_unlink(audiofile.c_str());
}
Gtk::Dialog::response(RESPONSE_CANCEL);
} else {