diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-07-21 22:03:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-07-21 22:15:58 +0300 |
commit | 0db159ef0f611ba014c59e773a59661b92ab7fde (patch) | |
tree | 7fd3b318e213f2172ac6226b8fcc7b1a8db40f4a /src/gui/helpwindow.cpp | |
parent | 8e3f06edfa547e4a6f0f03e91e05eb1fdab29464 (diff) | |
download | plus-0db159ef0f611ba014c59e773a59661b92ab7fde.tar.gz plus-0db159ef0f611ba014c59e773a59661b92ab7fde.tar.bz2 plus-0db159ef0f611ba014c59e773a59661b92ab7fde.tar.xz plus-0db159ef0f611ba014c59e773a59661b92ab7fde.zip |
Add support for opening urls in system default browser.
Diffstat (limited to 'src/gui/helpwindow.cpp')
-rw-r--r-- | src/gui/helpwindow.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/helpwindow.cpp b/src/gui/helpwindow.cpp index c2b0d873f..f88394f82 100644 --- a/src/gui/helpwindow.cpp +++ b/src/gui/helpwindow.cpp @@ -38,6 +38,7 @@ #include "utils/gettext.h" #include "utils/langs.h" +#include "utils/process.h" #include "utils/translation/podict.h" #include "utils/translation/translationmanager.h" @@ -92,8 +93,15 @@ void HelpWindow::action(const gcn::ActionEvent &event) void HelpWindow::handleLink(const std::string &link, gcn::MouseEvent *event A_UNUSED) { - std::string helpFile = link; - loadHelp(helpFile); + if (!strStartWith(link, "http://")) + { + std::string helpFile = link; + loadHelp(helpFile); + } + else + { + openBrowser(link); + } } void HelpWindow::loadHelp(const std::string &helpFile) |