diff --git a/src/core/UBApplicationController.cpp b/src/core/UBApplicationController.cpp index 2bb9aa8a..c9e241b9 100644 --- a/src/core/UBApplicationController.cpp +++ b/src/core/UBApplicationController.cpp @@ -473,23 +473,30 @@ void UBApplicationController::showTutorial() UBApplication::boardController->hide(); } - // it's needed not to duplicate webbrowser search in web mode. If I've breaked smbd's code let Ivan know - UBApplication::webController->show(UBWebController::Tutorial); + if (UBSettings::settings()->webUseExternalBrowser->get().toBool()) + { + showDesktop(true); + UBApplication::webController->show(UBWebController::Tutorial); - mMainWindow->webToolBar->hide(); - mMainWindow->boardToolBar->hide(); - mMainWindow->documentToolBar->hide(); - mMainWindow->tutorialToolBar->show(); + } + else{ + mMainWindow->webToolBar->hide(); + mMainWindow->boardToolBar->hide(); + mMainWindow->documentToolBar->hide(); + mMainWindow->tutorialToolBar->show(); - mMainMode = Tutorial; + mMainMode = Tutorial; - adaptToolBar(); + adaptToolBar(); - mUninoteController->hideWindow(); + mUninoteController->hideWindow(); - mirroringEnabled(false); - emit mainModeChanged(mMainMode); + UBApplication::webController->show(UBWebController::Tutorial); + + mirroringEnabled(false); + emit mainModeChanged(mMainMode); + } } @@ -539,7 +546,6 @@ void UBApplicationController::updateRequestFinished(int id, bool error) } else{ QString responseString = QString(mHttp->readAll()); - qDebug() << responseString; if (!responseString.isEmpty() && responseString.contains("version") && responseString.contains("url")){ mHttp->close(); downloadJsonFinished(responseString); diff --git a/src/web/UBWebController.cpp b/src/web/UBWebController.cpp index 15a1ab46..dd2bf32b 100644 --- a/src/web/UBWebController.cpp +++ b/src/web/UBWebController.cpp @@ -177,10 +177,8 @@ void UBWebController::tutorialWebInstance() QString tutorialPath = "/etc/Tutorial/tutorial" + language + "/index.html"; #if defined(Q_WS_MAC) tutorialHtmlIndexFile = QApplication::applicationDirPath()+ "/../Resources" + tutorialPath; -#elif defined(Q_WS_WIN) - tutorialHtmlIndexFile = QApplication::applicationDirPath()+ tutorialPath; #else - tutorialHtmlIndexFile = QApplication::applicationDirPath()+ tutorialPath; + tutorialHtmlIndexFile = QApplication::applicationDirPath() + tutorialPath; #endif QUrl currentUrl = QUrl::fromLocalFile(tutorialHtmlIndexFile);