[GB.FORM]
* BUG: FileProperties: Try again to really prevent it from crashing when no mimetype is available. git-svn-id: svn://localhost/gambas/trunk@6484 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
fdb7b01003
commit
fe8cbc3d0b
1 changed files with 7 additions and 6 deletions
|
@ -82,12 +82,13 @@ Private Sub RefreshPath()
|
|||
lblType.Text = ("Directory")
|
||||
Else If Component.IsLoaded("gb.desktop") Then
|
||||
hMime = DesktopMime.FromFile($sPath)
|
||||
Try 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
|
||||
tabInfo[TAB_PREVIEW].Visible = True
|
||||
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
|
||||
tabInfo[TAB_PREVIEW].Visible = True
|
||||
Endif
|
||||
Endif
|
||||
Else If $aImgExt.Exist(File.Ext($sPath), gb.IgnoreCase) Then
|
||||
picIcon.Picture = Picture["icon:/64/image"]
|
||||
|
|
Loading…
Reference in a new issue