summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index b70bb1ab9..d3cd951d8 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -23,6 +23,7 @@
#include "../dive.h"
#include "../divelist.h"
#include "../pref.h"
+#include "../helpers.h"
#include "modeldelegates.h"
#include "models.h"
#include "downloadfromdivecomputer.h"
@@ -267,7 +268,13 @@ void MainWindow::on_actionUserManual_triggered()
if(!helpView){
helpView = new QTextBrowser();
}
- helpView->setText(tr("HTML of Help menu here."));
+ QString searchPath = getSubsurfaceDataPath("Documentation");
+ if (searchPath != "") {
+ QUrl url(searchPath.append("/user-manual.html"));
+ helpView->setSource(url);
+ } else {
+ helpView->setText(tr("Cannot find the Subsurface manual"));
+ }
helpView->show();
}
@@ -500,7 +507,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
helpView->close();
helpView->deleteLater();
}
-
+
if (unsaved_changes() && (askSaveChanges() == FALSE)) {
event->ignore();
return;