Commit 46c63624 authored by Benoît Minisini's avatar Benoît Minisini

Menu editor: Double-clicking on a menu entry now automatically closes the menu...

Menu editor: Double-clicking on a menu entry now automatically closes the menu editor to open the Click event handler of that menu.

[DEVELOPMENT ENVIRONMENT]
* NEW: Menu editor: Double-clicking on a menu entry now automatically closes the menu editor to open the Click event handler of that menu.
* NEW: Translation dialog: The automatic translation now stops as soon as the translation program fails.
* NEW: Update common Spanish translation.
parent cce5b3eb
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -3152,10 +3152,16 @@ End
Public Sub Action_Activate((Key) As String) As Boolean
Dim hCurrent As CControl
Select Case Key
Case ".menu"
FMenu.Run(Me)
If FMenu.OpenEventHandlerFor Then
hCurrent = Control[FMenu.OpenEventHandlerFor]
If hCurrent Then GotoEventMethod(hCurrent, "Click")
Endif
Case ".delete"
DeleteSelection
......
' Gambas class file
Static Public OpenEventHandlerFor As String
Static Private $hForm As FForm
Static Private $aMenu As New CMenu[]
......@@ -13,6 +14,7 @@ Private $iIconSize As Integer
Static Public Sub Run(hForm As FForm)
$hForm = hForm
OpenEventHandlerFor = ""
FMenu.ShowModal()
End
......@@ -1115,3 +1117,13 @@ Public Sub btnInsertSeparator_Click()
InsertMenu(True, True)
End
Public Sub gvwMenu_Activate()
Try OpenEventHandlerFor = $aMenu[$iCurrent].Name
If Not Error Then
Me.Close()
If Not Me.Closed Then OpenEventHandlerFor = ""
Endif
End
......@@ -1748,6 +1748,8 @@ End
Public Sub mnuAutoTrans_Click()
Dim sText As String
If Message.Question(("Do you want to fill the translation automatically?"), ("Fill"), ("Cancel")) = 2 Then Return
Inc Application.Busy
......@@ -1757,7 +1759,13 @@ Public Sub mnuAutoTrans_Click()
If Not cvwTranslate.Item[1] Then
cvwTranslate.Item.Selected = True
cvwTranslate.Item.EnsureVisible
txtTranslate.Text = GetAutomaticTranslation(txtOrig.Text)
Wait
sText = GetAutomaticTranslation(txtOrig.Text)
If Not sText Then
Message.Warning(("Automatic translation has failed."))
Break
Endif
txtTranslate.Text = sText
Wait
Endif
cvwTranslate.MoveNext
......
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