FileView: 'ShowDetailed' is now deprecated. Update documentation
[GB.FORM] * BUG: FileView: Setting 'ShowDetailed' to TRUE has now the same effect as setting 'View' to 'Detailed'. * NEW: FileView: 'ShowDetailed' is now deprecated. * BUG: Fix runtime deprecation messages. * NEW: Update documentation.
This commit is contained in:
parent
97e9ae0749
commit
fd8781cae4
8 changed files with 73 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Gambas Project File 3.0
|
# Gambas Project File 3.0
|
||||||
Title=More controls for graphical components
|
Title=More controls for graphical components
|
||||||
Startup=FTestTabPanel
|
Startup=FTestFileChooser
|
||||||
Icon=.hidden/icon.png
|
Icon=.hidden/icon.png
|
||||||
Version=3.18.90
|
Version=3.18.90
|
||||||
VersionFile=1
|
VersionFile=1
|
||||||
|
|
|
@ -41,7 +41,7 @@ Private Sub Animated_Write((Value) As Boolean)
|
||||||
Static bWarn As Boolean
|
Static bWarn As Boolean
|
||||||
|
|
||||||
If bWarn Then Return
|
If bWarn Then Return
|
||||||
Error "gb.form: warning: SwitchButton.Animated is deprecated."
|
Error "gb.form: warning: 'SwitchButton.Animated' is deprecated."
|
||||||
bWarn = True
|
bWarn = True
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
|
@ -143,12 +143,14 @@ End
|
||||||
|
|
||||||
Private Function ShowDetailed_Read() As Boolean
|
Private Function ShowDetailed_Read() As Boolean
|
||||||
|
|
||||||
|
Error "gb.form: warning: 'FileView.ShowDetailed' is deprecated. Use 'FileView.View' instead."
|
||||||
Return frmChooser.GetShowDetailed()
|
Return frmChooser.GetShowDetailed()
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
Private Sub ShowDetailed_Write(bShowDetailed As Boolean)
|
Private Sub ShowDetailed_Write(bShowDetailed As Boolean)
|
||||||
|
|
||||||
|
Error "gb.form: warning: 'FileView.ShowDetailed' is deprecated. Use 'FileView.View' instead."
|
||||||
frmChooser.SetShowDetailed(bShowDetailed)
|
frmChooser.SetShowDetailed(bShowDetailed)
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
|
@ -896,17 +896,17 @@ End
|
||||||
|
|
||||||
Private Function ShowDetailed_Read() As Boolean
|
Private Function ShowDetailed_Read() As Boolean
|
||||||
|
|
||||||
Return $hColumnView.Visible
|
Return View_Read() = Detailed
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
Private Sub ShowDetailed_Write(bDetailed As Boolean)
|
Private Sub ShowColumnView(bShow As Boolean)
|
||||||
|
|
||||||
Dim hOld As Control
|
Dim hOld As Control
|
||||||
|
|
||||||
If bDetailed = ShowDetailed_Read() Then Return
|
If bShow = $hColumnView.Visible Then Return
|
||||||
|
|
||||||
If bDetailed Then
|
If bShow Then
|
||||||
|
|
||||||
hOld = $hIconView
|
hOld = $hIconView
|
||||||
$hColumnView.Show
|
$hColumnView.Show
|
||||||
|
@ -928,6 +928,17 @@ Private Sub ShowDetailed_Write(bDetailed As Boolean)
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub ShowDetailed_Write(bDetailed As Boolean)
|
||||||
|
|
||||||
|
If bDetailed Then
|
||||||
|
View_Write(Detailed)
|
||||||
|
Else
|
||||||
|
View_Write(Normal)
|
||||||
|
Endif
|
||||||
|
|
||||||
|
End
|
||||||
|
|
||||||
Public Sub View_Select()
|
Public Sub View_Select()
|
||||||
|
|
||||||
Raise {Select}
|
Raise {Select}
|
||||||
|
@ -1661,24 +1672,58 @@ Private Sub View_Write(Value As Integer)
|
||||||
|
|
||||||
If Value = View_Read() Then Return
|
If Value = View_Read() Then Return
|
||||||
|
|
||||||
ShowPreview_Write(False)
|
Select Case Value
|
||||||
If Value = Detailed Then
|
|
||||||
ShowDetailed_Write(True)
|
Case Normal
|
||||||
Else
|
ShowPreview_Write(False)
|
||||||
iIconSize = GetIconSize()
|
iIconSize = GetIconSize()
|
||||||
ShowDetailed_Write(False)
|
ShowColumnView(False)
|
||||||
If Value = Compact Then
|
|
||||||
$hIconView.Orientation = Arrange.Horizontal
|
|
||||||
Else
|
|
||||||
$hIconView.Orientation = Arrange.Vertical
|
$hIconView.Orientation = Arrange.Vertical
|
||||||
If Value = Preview Then ShowPreview_Write(True)
|
|
||||||
Endif
|
Case Compact
|
||||||
|
ShowPreview_Write(False)
|
||||||
|
iIconSize = GetIconSize()
|
||||||
|
ShowColumnView(False)
|
||||||
|
$hIconView.Orientation = Arrange.Horizontal
|
||||||
|
|
||||||
|
Case Detailed
|
||||||
|
ShowPreview_Write(False)
|
||||||
|
ShowColumnView(True)
|
||||||
|
|
||||||
|
Case Preview
|
||||||
|
ShowPreview_Write(False)
|
||||||
|
iIconSize = GetIconSize()
|
||||||
|
ShowColumnView(False)
|
||||||
|
$hIconView.Orientation = Arrange.Vertical
|
||||||
|
ShowPreview_Write(True)
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
If Value <> Detailed Then
|
||||||
UpdateIconView
|
UpdateIconView
|
||||||
If iIconSize <> GetIconSize() Then
|
If iIconSize <> GetIconSize() Then
|
||||||
RefreshViewLater(True)
|
RefreshViewLater(True)
|
||||||
Endif
|
Endif
|
||||||
Endif
|
Endif
|
||||||
|
|
||||||
|
' ShowPreview_Write(False)
|
||||||
|
' If Value = Detailed Then
|
||||||
|
' ShowColumnView(True)
|
||||||
|
' Else
|
||||||
|
' iIconSize = GetIconSize()
|
||||||
|
' ShowColumnView(False)
|
||||||
|
' If Value = Compact Then
|
||||||
|
' $hIconView.Orientation = Arrange.Horizontal
|
||||||
|
' Else
|
||||||
|
' $hIconView.Orientation = Arrange.Vertical
|
||||||
|
' If Value = Preview Then ShowPreview_Write(True)
|
||||||
|
' Endif
|
||||||
|
' UpdateIconView
|
||||||
|
' If iIconSize <> GetIconSize() Then
|
||||||
|
' RefreshViewLater(True)
|
||||||
|
' Endif
|
||||||
|
' Endif
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
Private Sub UpdateIconView()
|
Private Sub UpdateIconView()
|
||||||
|
|
|
@ -16,7 +16,7 @@ Property Value As String
|
||||||
Property FixedOnly As Boolean
|
Property FixedOnly As Boolean
|
||||||
Property ShowStyle As Boolean
|
Property ShowStyle As Boolean
|
||||||
Property ShowPreview As Boolean
|
Property ShowPreview As Boolean
|
||||||
Property ShowLabel As Boolean '' Deprecated
|
Property ShowLabel As Boolean
|
||||||
Property ShowRelative As Boolean
|
Property ShowRelative As Boolean
|
||||||
|
|
||||||
'' Return or set if font preview is displayed
|
'' Return or set if font preview is displayed
|
||||||
|
@ -123,12 +123,14 @@ End
|
||||||
|
|
||||||
Private Function ShowLabel_Read() As Boolean
|
Private Function ShowLabel_Read() As Boolean
|
||||||
|
|
||||||
|
Error "gb.form: warning: 'FontChooser.ShowLabel' is deprecated."
|
||||||
Return frmChooser.IsShowLabel()
|
Return frmChooser.IsShowLabel()
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
Private Sub ShowLabel_Write(Value As Boolean)
|
Private Sub ShowLabel_Write(Value As Boolean)
|
||||||
|
|
||||||
|
Error "gb.form: warning: 'FontChooser.ShowLabel' is deprecated."
|
||||||
frmChooser.SetShowLabel(Value)
|
frmChooser.SetShowLabel(Value)
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
|
@ -710,7 +710,7 @@ End
|
||||||
|
|
||||||
Static Private Function List_Read() As String[]
|
Static Private Function List_Read() As String[]
|
||||||
|
|
||||||
Error "gb.form: warning: Stock.List is deprecated. Use Stock.Icons instead"
|
Error "gb.form: warning: 'Stock.List' is deprecated. Use 'Stock.Icons' instead"
|
||||||
Return Icons_Read()
|
Return Icons_Read()
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
|
@ -405,6 +405,10 @@ Public Sub SelectAll()
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
'' @{since 3.19}
|
||||||
|
''
|
||||||
|
'' Unselect the editor contents.
|
||||||
|
|
||||||
Public Sub Unselect()
|
Public Sub Unselect()
|
||||||
|
|
||||||
Dim hCtrl As Object = $hCtrl
|
Dim hCtrl As Object = $hCtrl
|
||||||
|
|
|
@ -434,7 +434,7 @@ End
|
||||||
Private Sub Animated_Write((Value) As Boolean)
|
Private Sub Animated_Write((Value) As Boolean)
|
||||||
|
|
||||||
If $bDeprecated Then Return
|
If $bDeprecated Then Return
|
||||||
Error "gb.form: Wizard.Animated is deprecated"
|
Error "gb.form: 'Wizard.Animated' is deprecated."
|
||||||
$bDeprecated = True
|
$bDeprecated = True
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
Loading…
Reference in a new issue