diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-16 15:33:04 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-16 15:33:04 +0000 |
commit | 6ef5d85ae1f2c500c4163cd1df580b3f26991c1e (patch) | |
tree | 15194a52bb72f036117fc4c87c193a4cbb64be8b /libs/pbd/openuri.cc | |
parent | 830911f6f9451d83a58043b3f9084d3caa164b7b (diff) |
changes from 2.X starting in march 2009 through oct 20 2009 (5826 inclusive)
git-svn-id: svn://localhost/ardour2/branches/3.0@6761 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/openuri.cc')
-rw-r--r-- | libs/pbd/openuri.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libs/pbd/openuri.cc b/libs/pbd/openuri.cc new file mode 100644 index 0000000000..7c51dc55e9 --- /dev/null +++ b/libs/pbd/openuri.cc @@ -0,0 +1,28 @@ +#ifdef WAF_BUILD +#include "libpbd-config.h" +#endif + +#include <string> +#include <glibmm/spawn.h> + +#include "pbd/openuri.h" + +bool +PBD::open_uri (const char* uri) +{ +#ifdef HAVE_GTK_OPEN_URI + GError* err; + return gtk_open_uri (0, uri, GDK_CURRENT_TIME, &err); +#else +#ifdef __APPLE__ + extern bool cocoa_open_url (const char*); + return cocoa_open_url (uri); +#else + std::string command = "xdg-open "; + command += uri; + Glib::spawn_command_line_async (command); + + return true; +#endif +#endif +} |