Commit 69b174cd authored by Benoît Minisini's avatar Benoît Minisini

* Tag for 3.9.0.


git-svn-id: svn://localhost/gambas/tags/[email protected] 867c0c6c-44f3-4631-809d-bfa615b0a4ec
parents 61b6bd78 85e3b74f
......@@ -1488,7 +1488,11 @@ End
Public Sub Form_Close()
Project.AddRecentFile(Me)
If $bConsole Then
Project.DeleteFile(Path)
Else
Project.AddRecentFile(Me)
Endif
End
......
......@@ -4064,7 +4064,7 @@ Public Sub DeleteFile(sPath As String)
Try Kill sPath
Endif
VersionControl.RemoveFile(sPath)
If IsProjectPath(sPath) Then VersionControl.RemoveFile(sPath)
If bProject Then
......
# Gambas Project File 3.0
# Compiled with Gambas 3.9.90
Title=More controls for graphical components
Startup=FTestColorChooser
Startup=FTestFileView
Version=3.9.90
VersionFile=1
Component=gb.image
......
......@@ -52,7 +52,9 @@ End
Public Sub SetPath(sPath As String)
$sPath = sPath
$bPreview = False
RefreshPath
tabInfo_Click
End
......@@ -65,68 +67,92 @@ Private Sub RefreshPath()
Dim hLabel As Label
Dim W As Integer
Dim sAuth As String
Dim bShowImagePreview As Boolean
Dim bShowMediaPreview As Boolean
If hParent Then hData = hParent._RaiseData()
lblDir.Text = FormatPath(File.Dir($sPath))
If String.Len(lblDir.Text) >= 32 Then lblDir.Tooltip = lblDir.Text
With DirCache[File.Dir($sPath)].GetInfo(File.Name($sPath))
If hData Then
If Exist($sPath) Then
With DirCache[File.Dir($sPath)].GetInfo(File.Name($sPath))
lblType.Text = hData.Type
picIcon.Picture = hData.Icon
If hData Then
lblType.Text = hData.Type
picIcon.Picture = hData.Icon
Else
Else
If .Link Then
lblLabelType.Text = ("Symbolic link")
lblType.Text = .Link
lblType.Font.Italic = True
hMime = DesktopMime.FromFile($sPath)
Try picIcon.Picture = hMime.GetIcon(64).Picture
Else If IsDir($sPath) Then
picIcon.Picture = Picture["icon:/64/directory"]
lblType.Text = ("Directory")
Else If Component.IsLoaded("gb.desktop") Then
hMime = DesktopMime.FromFile($sPath)
If hMime Then
lblType.Text = String.UCaseFirst(hMime.GetComment())
If .Link Then
lblLabelType.Text = ("Symbolic link")
Else
lblLabelType.Text = ("Type")
Endif
If .Link Then
lblType.Text = .Link
lblType.Font.Italic = True
hMime = DesktopMime.FromFile($sPath)
Try picIcon.Picture = hMime.GetIcon(64).Picture
If Error Then Error "gb.form: unable to find icon for mimetype: "; hMime.GenericIcon
If hMime.Type Like "image/*" Then
tabInfo[TAB_IMAGE_PREVIEW].Visible = True
Else If $bMedia And If hMime.Type Like "audio/*" Then
tabInfo[TAB_MEDIA_PREVIEW].Visible = True
Else If IsDir($sPath) Then
picIcon.Picture = Picture["icon:/64/directory"]
lblType.Text = ("Directory")
Else If Component.IsLoaded("gb.desktop") Then
hMime = DesktopMime.FromFile($sPath)
If hMime Then
lblType.Text = String.UCaseFirst(hMime.GetComment())
Try picIcon.Picture = hMime.GetIcon(64).Picture
If Error Then Error "gb.form: unable to find icon for mimetype: "; hMime.GenericIcon
If hMime.Type Like "image/*" Then
bShowImagePreview = True
Else If $bMedia And If hMime.Type Like "audio/*" Then
bShowMediaPreview = True
Endif
Endif
Else If $aImgExt.Exist(File.Ext($sPath), gb.IgnoreCase) Then
picIcon.Picture = Picture["icon:/64/image"]
lblType.Text = ("Image")
bShowImagePreview = True
Else If $bMedia And If $aAudioExt.Exist(File.Ext($sPath), gb.IgnoreCase) Then
picIcon.Picture = Picture["icon:/64/audio"]
lblType.Text = ("Audio")
bShowMediaPreview = True
Endif
Else If $aImgExt.Exist(File.Ext($sPath), gb.IgnoreCase) Then
picIcon.Picture = Picture["icon:/64/image"]
lblType.Text = ("Image")
tabInfo[TAB_IMAGE_PREVIEW].Visible = True
Else If $bMedia And If $aAudioExt.Exist(File.Ext($sPath), gb.IgnoreCase) Then
picIcon.Picture = Picture["icon:/64/audio"]
lblType.Text = ("Audio")
tabInfo[TAB_MEDIA_PREVIEW].Visible = True
Endif
Endif
If IsDir($sPath) Then $hTask = New CTaskDirSize($sPath) As "Task"
$iSize = .Size
UpdateSize()
lblLastModified.Text = Format(.LastModified, gb.GeneralDate)
If IsDir($sPath) Then $hTask = New CTaskDirSize($sPath) As "Task"
$iSize = .Size
UpdateSize()
lblLastModified.Text = Format(.LastModified, gb.GeneralDate)
sAuth = .Auth
'sAuth = Left$(sAuth, 3) & " " & Mid$(sAuth, 4, 3) & " " & Right$(sAuth, 3)
lblAuth.Text = sAuth
lblUser.Text = .User
lblGroup.Text = .Group
End With
sAuth = .Auth
'sAuth = Left$(sAuth, 3) & " " & Mid$(sAuth, 4, 3) & " " & Right$(sAuth, 3)
lblAuth.Text = sAuth
lblUser.Text = .User
lblGroup.Text = .Group
Else
End With
lblLabelType.Text = ("Type")
lblType.Text = ""
lblLastModified.Text = ""
lblAuth.Text = ""
lblUser.Text = ""
lblGroup.Text = ""
lblSize.Text = ""
Endif
tabInfo[TAB_IMAGE_PREVIEW].Visible = bShowImagePreview
tabInfo[TAB_MEDIA_PREVIEW].Visible = bShowMediaPreview
For Each hLabel In panProperty.Children
If hLabel.Expand Then Continue
......@@ -300,7 +326,11 @@ Public Sub tabInfo_Click()
$hPreview = Image.Load($sPath)
imvPreview.Image = $hPreview
btnZoomFit.Value = True
If Not btnZoomFit.Value Then
btnZoomFit.Value = True
Else
btnZoomFit_Click
Endif
Endif
......@@ -310,12 +340,14 @@ Public Sub tabInfo_Click()
$bPreview = True
Component.Load("gb.media.form")
If Not $hViewer Then
Component.Load("gb.media.form")
$hViewer = New MediaView(tabInfo)
$hViewer.Expand = True
$hViewer.Border = False
$hViewer.Lower
Endif
$hViewer = New MediaView(tabInfo)
$hViewer.Expand = True
$hViewer.Border = False
$hViewer.Lower
$hViewer.URL = $sPath
$hViewer.Play
......
......@@ -25,3 +25,10 @@ Public Sub Button1_Click()
FileChooser1.Background = Color.Default
End
Public Sub FileChooser1_Change()
FileProperties1.Path = FileChooser1.SelectedPath
End
# Gambas Form File 3.0
{ Form Form
MoveScaled(0,0,109,84)
MoveScaled(0,0,142,84)
Arrangement = Arrange.Vertical
Spacing = True
Margin = True
......@@ -60,13 +60,15 @@
}
}
{ Panel1 HBox
MoveScaled(2,12,102,64)
MoveScaled(2,12,133,64)
#Translate = False
Expand = True
{ FileChooser1 FileChooser
MoveScaled(4,4,85,56)
MoveScaled(4,4,55,56)
Expand = True
Multi = True
}
{ FileProperties1 FileProperties
MoveScaled(62,4,52,36)
}
}
}
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