diff --git a/app/src/gambas3/.project b/app/src/gambas3/.project index 1abf1d683..8fa69582e 100644 --- a/app/src/gambas3/.project +++ b/app/src/gambas3/.project @@ -31,7 +31,7 @@ Component=gb.signal Description="Integrated Development Environment for Gambas" Authors="Benoît Minisini\nFabien Bodard\nCharlie Reinl\nJosé Luis Redrejo\nRobert Rowe\nTobias Boege" Arguments=[["-L"],["-t","/home/benoit/gambas/git/master/app/src/gambas3"],["--help"]] -Environment="GB_GUI=gb.qt5\n GTK_DEBUG=interactive" +Environment="GB_GUI=gb.gtk3\n GTK_DEBUG=interactive" TabSize=2 Translate=1 Language=en diff --git a/app/src/gambas3/.src/Editor/Code/FTextEditor.class b/app/src/gambas3/.src/Editor/Code/FTextEditor.class index b0e84da0a..183e92491 100644 --- a/app/src/gambas3/.src/Editor/Code/FTextEditor.class +++ b/app/src/gambas3/.src/Editor/Code/FTextEditor.class @@ -65,6 +65,7 @@ Private $iShowPreview As Integer Private $hTimerPreview As Timer Private $sTempPreview As String Private $bMovePreviewOnReady As Boolean +Private $bPreviewReady As Boolean Public Sub _new(sPath As String, Optional bModule As Boolean) @@ -1941,8 +1942,10 @@ Public Sub Preview_Ready() If $bMovePreviewOnReady Then $bMovePreviewOnReady = False - $hPreview.ExecJavascript("goto_line(" & CStr($hEditor.Line) & ");") + Try $hPreview.ExecJavascript("goto_line(" & CStr($hEditor.Line) & ");") + If Error Then Error Error.Text Endif + $bPreviewReady = True End @@ -1959,6 +1962,8 @@ Private Sub RefreshPreview(Optional bReload As Boolean) If bReload Then + $bPreviewReady = False + Project.SetMessage(("Preview refresh...")) Select Case $iShowPreview @@ -2022,7 +2027,7 @@ Private Sub RefreshPreview(Optional bReload As Boolean) Else 'Debug $hEditor.Line - $hPreview.ExecJavascript("goto_line(" & CStr($hEditor.Line) & ");") + If $bPreviewReady Then $hPreview.ExecJavascript("goto_line(" & CStr($hEditor.Line) & ");") Endif @@ -2064,8 +2069,14 @@ Public Sub Preview_GotFocus() End -Public Sub splPreview_Resize() - - RefreshPreview +Public Sub Preview_Menu() + Stop Event + +End + +Public Sub Preview_Resize() + + RefreshPreview + End diff --git a/app/src/gambas3/.src/Help/HelpView.class b/app/src/gambas3/.src/Help/HelpView.class index 99c8f73f0..db5ae1cd5 100644 --- a/app/src/gambas3/.src/Help/HelpView.class +++ b/app/src/gambas3/.src/Help/HelpView.class @@ -8,20 +8,21 @@ Public Const _DrawWith As String = "WebView" Inherits WebView Event Ready +Event Resize -Property NoHeader As Boolean +Property NoHeader As Boolean Use $bNoHeader +Property NoMenu As Boolean Use $bNoMenu Private $hObs As Observer Private $hWatcher As Watcher Private $hSpinner As Spinner -Private $bNoHeader As Boolean Private $sNextUrl As String Private $hNotExist As Label Public Sub _new() $hObs = New Observer(Me) As "WebView" - $hWatcher = New Watcher(Me) As "WebView" + $hWatcher = New Watcher(Me) As "Watcher" $hSpinner = New Spinner(Me.Window) $hSpinner.Hide @@ -49,7 +50,7 @@ Private Sub ShowWaiting(bShow As Boolean) If bShow Then $hSpinner.Show - WebView_Move + Watcher_Move $hSpinner.Raise $hSpinner.Start Else @@ -89,7 +90,7 @@ End ' ' End -Public Sub WebView_Move() +Public Sub Watcher_Move() Dim hWin As Window @@ -104,9 +105,10 @@ Public Sub WebView_Move() End -Public Sub WebView_Resize() +Public Sub Watcher_Resize() - WebView_Move + Watcher_Move + Raise Resize End @@ -227,18 +229,6 @@ Public Sub WebView_Progress() End -Private Function NoHeader_Read() As Boolean - - Return $bNoHeader - -End - -Private Sub NoHeader_Write(Value As Boolean) - - $bNoHeader = Value - -End - Public Sub Stop() Super.Stop diff --git a/app/src/gambas3/markdown.js b/app/src/gambas3/markdown.js index 172cf130e..5a8ec1d7b 100644 --- a/app/src/gambas3/markdown.js +++ b/app/src/gambas3/markdown.js @@ -1,9 +1,11 @@ +var goto_line_timer; + function $(id) { return document.getElementById(id); } -function goto_line(line) +function do_goto_line(line) { var sel = [null, null, null]; var r1, r2; @@ -74,4 +76,11 @@ function goto_line(line) sel[2].style.display = 'block'; elt.scrollIntoView({block:'center'}); +} + +function goto_line(line) +{ + if (goto_line_timer) + clearTimeout(goto_line_timer); + goto_line_timer = setTimeout(function() { do_goto_line(line); goto_line_timer = undefined;}, 100); } \ No newline at end of file