summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-21 22:03:13 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-21 22:15:58 +0300
commit0db159ef0f611ba014c59e773a59661b92ab7fde (patch)
tree7fd3b318e213f2172ac6226b8fcc7b1a8db40f4a /src/gui
parent8e3f06edfa547e4a6f0f03e91e05eb1fdab29464 (diff)
downloadplus-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')
-rw-r--r--src/gui/helpwindow.cpp12
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)