From 6114fd8ae7b0e20c0869afc5b873d8c19d66b692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sat, 30 Jul 2022 18:09:24 +0200 Subject: [PATCH] Code, text and conflict editor: Use the 'gb.form.editor' new goto line panel instead of the custom one. [DEVELOPMENT ENVIRONMENT] * NEW: Code, text and conflict editor: Use the 'gb.form.editor' new goto line panel instead of the custom one. --- .../.src/Editor/Code/FConflictEditor.class | 6 +--- .../gambas3/.src/Editor/Code/FEditor.class | 8 ++--- .../.src/Editor/Code/FTextEditor.class | 6 +--- app/src/gambas3/.src/Editor/FGotoLine.class | 36 ------------------- app/src/gambas3/.src/Editor/FGotoLine.form | 31 ---------------- 5 files changed, 4 insertions(+), 83 deletions(-) delete mode 100644 app/src/gambas3/.src/Editor/FGotoLine.class delete mode 100644 app/src/gambas3/.src/Editor/FGotoLine.form diff --git a/app/src/gambas3/.src/Editor/Code/FConflictEditor.class b/app/src/gambas3/.src/Editor/Code/FConflictEditor.class index cc069148d..f7c53c948 100644 --- a/app/src/gambas3/.src/Editor/Code/FConflictEditor.class +++ b/app/src/gambas3/.src/Editor/Code/FConflictEditor.class @@ -492,11 +492,7 @@ End Public Sub mnuGotoLine_Click() - Dim iLine As Integer - - iLine = FGotoLine.Run($hEditor.Line + 1) - If iLine <= 0 Then Return - GotoCenter(iLine - 1) + $hEditor.ShowGotoPanel() End diff --git a/app/src/gambas3/.src/Editor/Code/FEditor.class b/app/src/gambas3/.src/Editor/Code/FEditor.class index c1ccf8fe5..0a8d11047 100644 --- a/app/src/gambas3/.src/Editor/Code/FEditor.class +++ b/app/src/gambas3/.src/Editor/Code/FEditor.class @@ -1310,12 +1310,8 @@ Public Sub mnuForm_Click() End Public Sub mnuGotoLine_Click() - - Dim iLine As Integer - - iLine = FGotoLine.Run($hEditor.Line + 1) - If iLine <= 0 Then Return - GotoCenter(iLine - 1, 0) + + $hEditor.ShowGotoPanel End diff --git a/app/src/gambas3/.src/Editor/Code/FTextEditor.class b/app/src/gambas3/.src/Editor/Code/FTextEditor.class index 7ea6ac1dc..6bb0d1f7d 100644 --- a/app/src/gambas3/.src/Editor/Code/FTextEditor.class +++ b/app/src/gambas3/.src/Editor/Code/FTextEditor.class @@ -579,11 +579,7 @@ End Public Sub mnuGotoLine_Click() - Dim iLine As Integer - - iLine = FGotoLine.Run($hEditor.Line + 1) - If iLine <= 0 Then Return - GotoCenter(iLine - 1) + $hEditor.ShowGotoPanel End diff --git a/app/src/gambas3/.src/Editor/FGotoLine.class b/app/src/gambas3/.src/Editor/FGotoLine.class deleted file mode 100644 index 380cab59b..000000000 --- a/app/src/gambas3/.src/Editor/FGotoLine.class +++ /dev/null @@ -1,36 +0,0 @@ -' Gambas class file - -Static Private $iLine As Integer - -Static Public Function Run(iLine As Integer) As Integer - - Dim hForm As FGotoLine - - $iLine = iLine - hForm = New FGotoLine - If hForm.ShowModal() Then Return $iLine - -End - -Public Sub Form_Open() - - txtLine.Text = CStr($iLine) - txtLine.SelectAll - txtLine.SetFocus - -End - -Public Sub btnOK_Click() - - Try $iLine = Val(txtLine.Text) - If Error Then Return - - Me.Close(True) - -End - -Public Sub btnCancel_Click() - - Me.Close - -End diff --git a/app/src/gambas3/.src/Editor/FGotoLine.form b/app/src/gambas3/.src/Editor/FGotoLine.form deleted file mode 100644 index d6fb1ba50..000000000 --- a/app/src/gambas3/.src/Editor/FGotoLine.form +++ /dev/null @@ -1,31 +0,0 @@ -# Gambas Form File 3.0 - -{ Form Form - MoveScaled(0,0,33,12) - Text = ("Go to line") - Resizable = False - { btnOK Button - MoveScaled(1,7,15,4) - Text = ("OK") - Default = True - } - { btnCancel Button - MoveScaled(17,7,15,4) - Text = ("Cancel") - Cancel = True - } - { HBox1 HBox - MoveScaled(1,1,31,4) - Spacing = True - { Label1 Label - MoveScaled(0,0,11,4) - AutoResize = True - Text = ("Go to line") - } - { txtLine TextBox - MoveScaled(13,0,15,4) - Expand = True - Alignment = Align.Right - } - } -}