From 26d0949282155e11a18b9d57c4d827a35d8ce7a8 Mon Sep 17 00:00:00 2001 From: gambas Date: Sat, 9 Apr 2022 23:41:54 +0200 Subject: [PATCH] Help browser: Correctly handle project help links in online mode. [DEVELOPMENT ENVIRONMENT] * BUG: Help browser: Correctly handle project help links in online mode. --- app/src/gambas3/.src/Help/HelpBrowser.class | 10 ++++++++-- app/src/gambas3/.src/Project.module | 6 ------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/gambas3/.src/Help/HelpBrowser.class b/app/src/gambas3/.src/Help/HelpBrowser.class index 1510cf4d3..ff166eace 100644 --- a/app/src/gambas3/.src/Help/HelpBrowser.class +++ b/app/src/gambas3/.src/Help/HelpBrowser.class @@ -121,6 +121,12 @@ Public Sub WebView_NewView() End +Private Sub GetHelpView() As HelpView + + Return Object.Parent(Me) + +End + Private Sub HandleSpecialURL() Dim hWin As Window @@ -129,11 +135,11 @@ Private Sub HandleSpecialURL() If $sNextUrl Begins "gambas://" Then - MHelp.ManageSpecialLink(Me, $sNextUrl) + MHelp.ManageSpecialLink(GetHelpView(), $sNextUrl) Else If $sNextUrl Begins "wiki://" Then - If MHelp.MakeOffline(Me, $sNextUrl, $bNoHeader) Then + If MHelp.MakeOffline(GetHelpView(), $sNextUrl, $bNoHeader) Then hWin = Me.Window $hNotExist.Move(Me.ScreenX - hWin.ScreenX + Desktop.Scale, Me.ScreenY - hWin.ScreenY + Me.Height - $hNotExist.H - Desktop.Scale) $hNotExist.Show diff --git a/app/src/gambas3/.src/Project.module b/app/src/gambas3/.src/Project.module index 54da5b6a2..13ac695be 100644 --- a/app/src/gambas3/.src/Project.module +++ b/app/src/gambas3/.src/Project.module @@ -257,14 +257,10 @@ End Public Sub InitWebView() - Static bInit As Boolean - 'Dim sPath As String Dim hDefaultFont As Font Dim hFixedFont As Font - If bInit Then Return - ' If Not WebSettings.Cache.Path Then ' sPath = "~/.cache" ' Try Mkdir sPath @@ -300,8 +296,6 @@ Public Sub InitWebView() WebSettings.Fonts.Fixed = hFixedFont.Name WebSettings.Fonts.DefaultFixedSize = hFixedFont.Size - bInit = True - End Public Sub Main()