13
0
livetrax/libs/pbd/openuri.cc
Paul Davis 6ef5d85ae1 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
2010-03-16 15:33:04 +00:00

29 lines
492 B
C++

#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
}