blob: 7c51dc55e930c8b46987915897967af3c7890667 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
}
|