[DEVELOPMENT ENVIRONMENT]
* BUG: Some fixes in the interaction between the hierarchy tree and the property sheet in the form editor. git-svn-id: svn://localhost/gambas/trunk@2320 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
026c739f3d
commit
a32c845caa
11 changed files with 453 additions and 393 deletions
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -718,6 +718,12 @@ Private Sub InsertProperty()
|
|||
|
||||
Catch
|
||||
|
||||
End
|
||||
|
||||
Private Sub CheckSampleCode() As Boolean
|
||||
|
||||
|
||||
|
||||
End
|
||||
|
||||
|
||||
|
@ -896,6 +902,12 @@ Public Sub Editors_KeyPress()
|
|||
Else If InStr(IDENT_CAR, Key.Text) Then
|
||||
|
||||
CheckCompletion("A")
|
||||
|
||||
Else If Key.Code = Key.Tab Then
|
||||
|
||||
If Not Editor.Selected Then
|
||||
If CheckSampleCode() Then Stop Event
|
||||
Endif
|
||||
|
||||
Endif
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Static Private $hForm As FForm 'FForm
|
||||
Static Private $cPict As New Collection
|
||||
|
||||
Private $bNoSelect As Boolean
|
||||
Private $bNoSelect As Integer
|
||||
|
||||
Private Sub GetForm() As Boolean
|
||||
|
||||
|
@ -127,9 +127,9 @@ Public Sub RefreshAll(Optional sKey As String, Optional bForce As Boolean)
|
|||
|
||||
'IF NOT Project.IsForm($hForm) THEN RETURN
|
||||
|
||||
If Not sKey Then
|
||||
Try sKey = $hForm.Master.Name
|
||||
Endif
|
||||
' If Not sKey Then
|
||||
' Try sKey = $hForm.Master.Name
|
||||
' Endif
|
||||
|
||||
If bForce Then $cPict.Clear
|
||||
|
||||
|
@ -139,13 +139,16 @@ Public Sub RefreshAll(Optional sKey As String, Optional bForce As Boolean)
|
|||
sepControl.Show
|
||||
lblMessage.Hide
|
||||
RefreshReadOnly
|
||||
SelectCurrent
|
||||
|
||||
If sKey Then
|
||||
Try tvwControl[sKey].Selected = True
|
||||
Try tvwControl[sKey].EnsureVisible
|
||||
Endif
|
||||
|
||||
$bNoSelect = False
|
||||
' If sKey Then
|
||||
' Object.Lock(tvwControl)
|
||||
' Try tvwControl[sKey].Selected = True
|
||||
' Object.Unlock(tvwControl)
|
||||
' Try tvwControl[sKey].EnsureVisible
|
||||
' Endif
|
||||
'
|
||||
' $bNoSelect = False
|
||||
|
||||
End
|
||||
|
||||
|
@ -154,9 +157,11 @@ Public Sub RefreshOne(sKey As String)
|
|||
If Not Me.Visible Then Return
|
||||
If GetForm() Then Return
|
||||
|
||||
Inc $bNoSelect
|
||||
tvwControl[sKey].Delete
|
||||
Dec $bNoSelect
|
||||
FillTree($hForm.Control[sKey])
|
||||
|
||||
SelectCurrent
|
||||
'TRY tvwControl[sKey].Selected = TRUE
|
||||
'TRY tvwControl[sKey].EnsureVisible
|
||||
|
||||
|
@ -217,13 +222,19 @@ Public Sub btnUp_Click()
|
|||
|
||||
End
|
||||
|
||||
Public Sub Select(sName As String)
|
||||
Public Sub SelectCurrent()
|
||||
|
||||
Dim sName As String
|
||||
|
||||
If Not $hForm Then Return
|
||||
Try sName = $hForm.Master.Name
|
||||
If Not sName Then sName = $hForm.Name
|
||||
|
||||
If tvwControl.Exist(sName) Then
|
||||
Try tvwControl[sName].EnsureVisible
|
||||
$bNoSelect = True
|
||||
Inc $bNoSelect
|
||||
tvwControl[sName].Selected = True
|
||||
$bNoSelect = False
|
||||
Dec $bNoSelect
|
||||
Endif
|
||||
|
||||
End
|
||||
|
@ -231,14 +242,14 @@ End
|
|||
|
||||
Public Sub tvwControl_Select()
|
||||
|
||||
If Not $bNoSelect Then
|
||||
If InStr(tvwControl.Current.Key, ".") Then
|
||||
tvwControl.MoveParent
|
||||
Try $hForm.SelectControl(tvwControl.Item.Text)
|
||||
Else
|
||||
Try $hForm.SelectControl(tvwControl.Current.Text)
|
||||
Endif
|
||||
Endif
|
||||
If $bNoSelect Then Return
|
||||
|
||||
If InStr(tvwControl.Current.Key, ".") Then
|
||||
tvwControl.MoveParent
|
||||
Try $hForm.SelectControl(tvwControl.Item.Text)
|
||||
Else
|
||||
Try $hForm.SelectControl(tvwControl.Current.Text)
|
||||
Endif
|
||||
|
||||
End
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ Private $sType As String
|
|||
Private $sOption As String
|
||||
Private $hEditor As Object
|
||||
Private $sOldVal As String
|
||||
Private $bFreeze As Boolean
|
||||
'Private $bFreeze As Boolean
|
||||
Private $bButton As Boolean
|
||||
Private $bIgnoreHide As Boolean
|
||||
Private $bIgnoreCancel As Boolean
|
||||
|
@ -93,6 +93,8 @@ Public Sub RefreshAll()
|
|||
' DIM sClassColor AS String
|
||||
' DIM hClass AS CClassInfo
|
||||
|
||||
Balloon.Hide(grdProperty)
|
||||
|
||||
Try $hForm = Project.ActiveForm
|
||||
If Error Or If Not $hForm Then
|
||||
HideAll
|
||||
|
@ -244,7 +246,7 @@ Public Sub RefreshAll()
|
|||
'VSplit1.Show
|
||||
|
||||
If Not $bMany Then
|
||||
FFormStack.Select($hObject.Name)
|
||||
FFormStack.SelectCurrent
|
||||
Endif
|
||||
|
||||
'If btnLock.Value Then
|
||||
|
@ -322,6 +324,7 @@ End
|
|||
|
||||
Public Function SaveProperty() As Boolean
|
||||
|
||||
Dim hTabStrip As TabStrip
|
||||
Dim vVal As Variant
|
||||
Dim hCtrl As CControl
|
||||
Dim sMsg As String
|
||||
|
@ -763,9 +766,9 @@ End
|
|||
Public Sub txtProperty_Change()
|
||||
|
||||
If $sLast = "Text" Then
|
||||
$bFreeze = True
|
||||
'$bFreeze = True
|
||||
SaveProperty
|
||||
$bFreeze = False
|
||||
'$bFreeze = False
|
||||
Endif
|
||||
|
||||
End
|
||||
|
@ -957,7 +960,8 @@ End
|
|||
|
||||
Public Sub txtProperty_LostFocus()
|
||||
|
||||
SaveProperty
|
||||
If SaveProperty() Then Return
|
||||
HideProperty
|
||||
|
||||
End
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
{ cmbProperty ComboBox
|
||||
MoveScaled(2,4,16,4)
|
||||
Visible = False
|
||||
Background = Color.TextBackground
|
||||
Ignore = True
|
||||
Text = ("")
|
||||
ReadOnly = True
|
||||
|
@ -53,11 +54,13 @@
|
|||
{ spnProperty SpinBox
|
||||
MoveScaled(2,9,14,4)
|
||||
Visible = False
|
||||
Background = Color.TextBackground
|
||||
Ignore = True
|
||||
}
|
||||
{ txtProperty TextBox
|
||||
MoveScaled(0,14,16,3)
|
||||
MoveScaled(2,14,16,3)
|
||||
Visible = False
|
||||
Background = Color.TextBackground
|
||||
Ignore = True
|
||||
Text = ("")
|
||||
Border = False
|
||||
|
@ -65,6 +68,7 @@
|
|||
{ btnProperty Button
|
||||
MoveScaled(16,14,3,3)
|
||||
Visible = False
|
||||
Background = Color.TextBackground
|
||||
Ignore = True
|
||||
Text = ("")
|
||||
Picture = Picture["img/16/points.png"]
|
||||
|
|
|
@ -1560,4 +1560,3 @@ Public Sub mnuEditConnection_Click()
|
|||
tvwProject_Activate
|
||||
|
||||
End
|
||||
|
||||
|
|
|
@ -786,7 +786,7 @@
|
|||
Expand = True
|
||||
Arrangement = Arrange.Vertical
|
||||
{ tabProperty TabStrip
|
||||
MoveScaled(0,0,26,37)
|
||||
MoveScaled(1,1,26,37)
|
||||
Expand = True
|
||||
Arrangement = Arrange.Fill
|
||||
Count = 2
|
||||
|
|
|
@ -1191,7 +1191,14 @@ Public Sub tabProject_Click()
|
|||
Inc Application.Busy
|
||||
$sVerCtrlStatus = VersionControl.Status()
|
||||
$sVerCtrlDiff = VersionControl.Diff(Project.Dir)
|
||||
edtDiff.Text = String$(76, "=") & "\n" & $sVerCtrlStatus & String$(76, "=") & "\n\n" & $sVerCtrlDiff
|
||||
If $sVerCtrlStatus Then
|
||||
edtDiff.Text = String$(76, "=") & "\n" & $sVerCtrlStatus & String$(76, "=") & "\n\n" & $sVerCtrlDiff
|
||||
edtDiff.Show
|
||||
lblNoDiff.Hide
|
||||
Else
|
||||
edtDiff.Hide
|
||||
lblNoDiff.Show
|
||||
Endif
|
||||
btnCommit.Enabled = Len($sVerCtrlStatus)
|
||||
btnRevert.Enabled = btnCommit.Enabled
|
||||
Dec Application.Busy
|
||||
|
@ -1211,11 +1218,19 @@ End
|
|||
|
||||
Public Sub btnUpdate_Click()
|
||||
|
||||
Dim bErr As Boolean
|
||||
|
||||
Inc Application.Busy
|
||||
VersionControl.Update
|
||||
bErr = VersionControl.Update()
|
||||
Project.Refresh
|
||||
Dec Application.Busy
|
||||
tabProject_Click
|
||||
|
||||
If bErr Then
|
||||
Message.Error(("Unable to update project from repository."))
|
||||
Else
|
||||
Message.Info(("Project has been updated from repository successfully."))
|
||||
Endif
|
||||
|
||||
End
|
||||
|
||||
|
|
|
@ -390,11 +390,16 @@
|
|||
Text = ("Changes since last commit")
|
||||
}
|
||||
{ edtDiff Editor
|
||||
MoveScaled(6,7,73,57)
|
||||
MoveScaled(5,6,73,57)
|
||||
Expand = True
|
||||
Highlight = Highlight.Diff
|
||||
ReadOnly = True
|
||||
}
|
||||
{ lblNoDiff TextLabel
|
||||
MoveScaled(3,8,80,5)
|
||||
Expand = True
|
||||
Text = ("There is no change to commit.")
|
||||
}
|
||||
{ HBox15 HBox
|
||||
MoveScaled(1,69,84,4)
|
||||
Spacing = True
|
||||
|
|
|
@ -1,50 +1,48 @@
|
|||
# Gambas Form File 3.0
|
||||
|
||||
{ Form Form
|
||||
MoveScaled(18,23,73,46)
|
||||
MoveScaled(18,23,81,46)
|
||||
Text = ("Save modified files")
|
||||
Icon = Picture["img/16/quit.png"]
|
||||
Icon = Picture["icon:/16/quit"]
|
||||
Resizable = False
|
||||
{ btnSave Button
|
||||
MoveScaled(1,40,17,5)
|
||||
Text = ("&All")
|
||||
Picture = Picture["icon:/medium/save"]
|
||||
}
|
||||
{ btnQuit Button
|
||||
MoveScaled(37,40,17,5)
|
||||
MoveScaled(63,7,17,5)
|
||||
Enabled = False
|
||||
Text = ("Continue")
|
||||
Picture = Picture["icon:/medium/play"]
|
||||
Default = True
|
||||
}
|
||||
{ btnCancel Button
|
||||
MoveScaled(55,40,17,5)
|
||||
MoveScaled(63,1,17,5)
|
||||
Text = ("Cancel")
|
||||
Picture = Picture["icon:/medium/close"]
|
||||
Cancel = True
|
||||
}
|
||||
{ Panel1 Panel
|
||||
MoveScaled(1,1,71,8)
|
||||
Arrangement = Arrange.Horizontal
|
||||
{ Image1 PictureBox
|
||||
MoveScaled(0,0,5,6)
|
||||
Picture = Picture["icon:/32/save"]
|
||||
Alignment = Align.Top
|
||||
}
|
||||
{ TextLabel1 TextLabel
|
||||
MoveScaled(7,0,56,6)
|
||||
Font = Font["Bold,+1"]
|
||||
Expand = True
|
||||
Text = ("These files have been modified.\nDo you want to save them?")
|
||||
}
|
||||
}
|
||||
{ lvwFile ListView
|
||||
MoveScaled(1,9,71,30)
|
||||
Mode = Select.Multiple
|
||||
}
|
||||
{ btnIgnore Button
|
||||
MoveScaled(19,40,17,5)
|
||||
Text = ("&None")
|
||||
{ btnIgnore ToggleButton
|
||||
MoveScaled(32,40,30,5)
|
||||
Text = ("Do ¬ save")
|
||||
Picture = Picture["icon:/medium/cancel"]
|
||||
Radio = True
|
||||
}
|
||||
{ btnSave ToggleButton
|
||||
MoveScaled(1,40,30,5)
|
||||
Text = ("Save &All")
|
||||
Picture = Picture["icon:/medium/save"]
|
||||
Radio = True
|
||||
}
|
||||
{ VBox1 VBox
|
||||
MoveScaled(1,1,61,38)
|
||||
Spacing = True
|
||||
{ TextLabel1 TextLabel
|
||||
MoveScaled(0,0,61,6)
|
||||
Font = Font["Bold,+1"]
|
||||
AutoResize = True
|
||||
Text = ("These files have been modified.<br>\nDo you want to save them?")
|
||||
}
|
||||
{ lvwFile ListView
|
||||
MoveScaled(3,10,44,21)
|
||||
Expand = True
|
||||
Mode = Select.Multiple
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue