Browse Source

Fix for MSYS2 when opening web-files

merge-requests/365/head
eidheim 10 years ago
parent
commit
9e3b1f53c0
  1. 10
      src/project.cc

10
src/project.cc

@ -412,8 +412,11 @@ void ProjectMarkdown::compile_and_run() {
#ifdef __APPLE__ #ifdef __APPLE__
Terminal::get().process("open \""+uri+"\""); Terminal::get().process("open \""+uri+"\"");
#else #else
#ifdef __linux
uri="file://"+uri;
#endif
GError* error=NULL; GError* error=NULL;
gtk_show_uri(NULL, ("file://"+uri).c_str(), GDK_CURRENT_TIME, &error); gtk_show_uri(NULL, uri.c_str(), GDK_CURRENT_TIME, &error);
g_clear_error(&error); g_clear_error(&error);
#endif #endif
} }
@ -442,8 +445,11 @@ void ProjectHTML::compile_and_run() {
#ifdef __APPLE__ #ifdef __APPLE__
Terminal::get().process("open \""+uri+"\""); Terminal::get().process("open \""+uri+"\"");
#else #else
#ifdef __linux
uri="file://"+uri;
#endif
GError* error=NULL; GError* error=NULL;
gtk_show_uri(NULL, ("file://"+uri).c_str(), GDK_CURRENT_TIME, &error); gtk_show_uri(NULL, uri.c_str(), GDK_CURRENT_TIME, &error);
g_clear_error(&error); g_clear_error(&error);
#endif #endif
} }

Loading…
Cancel
Save