Commit 4bad4bb2 authored by Benoît Minisini's avatar Benoît Minisini

Test suites dialog: Add keyboard shortcuts and fix some bugs.

[DEVELOPMENT ENVIRONMENT]
* NEW: Test suites dialog: Add keyboard shortcuts and fix some bugs.
parent 3737b089
......@@ -222,7 +222,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gambas3 3.14.90\n"
"PO-Revision-Date: 2020-05-25 09:46 UTC\n"
"PO-Revision-Date: 2020-05-25 10:20 UTC\n"
"Last-Translator: Benoît Minisini <[email protected]>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
......@@ -4363,7 +4363,7 @@ msgstr "Voulez-vous vraiment supprimer ce fragment ?"
#: FOption.class:1190
msgid "Do you really want to install the Gambas font into your personal font directory?"
msgstr "Voulez-vous vraiment installer la police Gambas dans votre répertoire personnel de polices ?"
msgstr "Voulez-vous vraiment installer la police « Gambas »\ndans votre répertoire personnel de polices ?"
#: FOption.class:1190 FSoftwareFarm.class:600
msgid "Install"
......
......@@ -2,17 +2,16 @@
Private $cSuites As New Collection
Private $bNoSelect As Boolean
Private $aOldSelection As New String[]
Public Sub btnClose_Click()
SaveSuites
Me.Close
End
Public Sub Form_Open()
Settings.Read(Me)
LoadTests
LoadSuites
......@@ -75,12 +74,21 @@ Private Sub LoadSuites()
Next
lvwSuite["$"].Selected = True
LoadTestWith
Try cmbTestWith.Index = hSettings["/TestSuites/TestWith", 0]
If Error Then cmbTestWith.Index = 0
If cmbTestWith.Index = 0 Then
lvwSuite.Key = "$"
Else
lvwSuite.Key = cmbTestWith.Text
Endif
Catch
Message.Error(("Unable to load test suites.") & "\n\n" & Error.Text)
End
Private Sub LoadTests()
......@@ -154,6 +162,10 @@ Public Sub lvwSuite_Select()
tvwSuite.MoveNext()
Wend
tvwSuite.MoveFirst()
tvwSuite.Key = tvwSuite.Item.Key
tvwSuite.Current.EnsureVisible()
End
Private Sub SuiteToSelection(sSuite As String) As String[]
......@@ -255,8 +267,6 @@ End
Public Sub tvwSuite_Select()
Dim bSelect As Boolean
Dim aSel As String[]
Dim sKey As String
Dim bBefore As Boolean
Dim aOld As String[]
......@@ -378,6 +388,10 @@ Private Sub SaveSuites()
hSettings["/TestSuites/Count"] = iCount
hSettings["/TestSuites/TestWith"] = cmbTestWith.Index
hSettings.Save
Catch
Message.Error(("Unable to save test suites.") & "\n\n" & Error.Text)
End
......@@ -418,3 +432,23 @@ Public Sub btnCopy_Click()
CreateSuite(lvwSuite.Key)
End
Public Sub Form_Close()
Settings.Write(Me)
SaveSuites
End
Public Sub Form_KeyPress()
Select Case Key.Code
Case Key["+"]
btnNew.Value = True
Case Key.Delete, Key["-"]
btnDelete.Value = True
Case Key["Z"]
If Key.Control Then btnReset.Value = True
End Select
End
......@@ -119,6 +119,7 @@
MoveScaled(25,0,16,4)
Text = ("Close")
Picture = Picture["icon:/small/close"]
Cancel = True
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment