summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-01-17 09:25:03 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-01-17 09:25:03 -0500
commitb9185d2c07c77eccf3679ac99f6b69f8fdd79c48 (patch)
tree088e82018dc35de290f5d2b61ce95891f946bf55 /gtk2_ardour/editor.cc
parentc0e6f8e4c324c3f44613949b59acd9e864ab263d (diff)
parent17309c41c3afde42af9cb5c11031bbfd1409cf89 (diff)
Merge branch 'master' into cairocanvas
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r--gtk2_ardour/editor.cc29
1 files changed, 2 insertions, 27 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 57ae65e9a5..2b430c8a40 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -47,6 +47,7 @@
#include "pbd/stacktrace.h"
#include <glibmm/miscutils.h>
+#include <glibmm/uriutils.h>
#include <gtkmm/image.h>
#include <gdkmm/color.h>
#include <gdkmm/bitmap.h>
@@ -3178,33 +3179,8 @@ Editor::convert_drop_to_paths (
}
for (vector<string>::iterator i = uris.begin(); i != uris.end(); ++i) {
-
if ((*i).substr (0,7) == "file://") {
-
- string const p = PBD::url_decode (*i);
-
- // scan forward past three slashes
-
- string::size_type slashcnt = 0;
- string::size_type n = 0;
- string::const_iterator x = p.begin();
-
- while (slashcnt < 3 && x != p.end()) {
- if ((*x) == '/') {
- slashcnt++;
- } else if (slashcnt == 3) {
- break;
- }
- ++n;
- ++x;
- }
-
- if (slashcnt != 3 || x == p.end()) {
- error << _("malformed URL passed to drag-n-drop code") << endmsg;
- continue;
- }
-
- paths.push_back (p.substr (n - 1));
+ paths.push_back (Glib::filename_from_uri (*i));
}
}
@@ -3213,7 +3189,6 @@ Editor::convert_drop_to_paths (
void
Editor::new_tempo_section ()
-
{
}