From 9fe86dadadbe53b49cb6c7d1825f9a5d36e64763 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sat, 10 Oct 2015 12:09:21 +0200 Subject: [PATCH] Find Document is finished and now works on all platforms. --- README.md | 6 +++--- src/window.cc | 12 ++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ed0e918..81badf0 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,10 @@ towards libclang with speed and ease of use in mind. * Platform independent * Fast and responsive (written in C++) * Syntax highlighting (even C++11/14, and more than 100 other file types) -* (Obj)C(++) warnings and errors on the fly -* (Obj)C(++) Fix-its +* C++ warnings and errors on the fly +* C++ Fix-its * Automated CMake processing -* Fast (Obj)C(++) autocomletion (even external libraries) +* Fast C++ autocomletion (including external libraries) * Keyword and buffer autocomletion for other file types * Tooltips showing type information and doxygen documentation * Refactoring across files diff --git a/src/window.cc b/src/window.cc index e83986c..c62ad72 100644 --- a/src/window.cc +++ b/src/window.cc @@ -323,8 +323,16 @@ void Window::create_menu() { if(query==documentation_search->second.queries.end()) query=documentation_search->second.queries.find("@any"); - if(query!=documentation_search->second.queries.end()) - Singleton::terminal()->execute("open \""+query->second+token_query+"\""); + if(query!=documentation_search->second.queries.end()) { + std::string uri=query->second+token_query; +#ifdef __APPLE__ + Singleton::terminal()->execute("open \""+uri+"\""); +#else + GError* error=NULL; + gtk_show_uri(NULL, uri.c_str(), GDK_CURRENT_TIME, &error); + g_clear_error(&error); +#endif + } } } }