[GB.DESKTOP]

* BUG: Fix the name of some public functions arguments.


git-svn-id: svn://localhost/gambas/trunk@5274 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2012-11-01 16:41:57 +00:00
parent 4eca4c3576
commit fdcf978fd8
4 changed files with 77 additions and 12 deletions

View file

@ -132,6 +132,69 @@ GetIcon
m
Image
[(Size)i]
#DesktopMime
C
Weight
v
i
Type
v
s
Pattern
v
s
Magic
v
String[]
GenericIcon
v
s
IsSuffix
v
b
_compare
m
i
(Other)DesktopMime;
GetIcon
m
Image
[(Size)i]
GetApplications
m
DesktopFile[]
Refresh
M
Exist
M
b
(Type)s
FromFile
M
DesktopMime
(Path)s
_get
M
DesktopMime
(Type)s
_next
M
DesktopMime
_exit
M
#DesktopWatcher
C

View file

@ -1,5 +1,6 @@
Desktop
DesktopFile
DesktopMime
DesktopWatcher
DesktopWindow
_DesktopVirtual

View file

@ -27,9 +27,10 @@ SearchString=True
File[1]=".src/Desktop.class:324.46"
File[2]=".src/DesktopWindow.class:280.2"
File[3]=".src/Main.module:0.0"
Active=4
File[4]=".src/DesktopFile.class:276.2"
Count=4
Active=5
File[5]=".src/DesktopMime.class:285.32"
Count=5
[Watches]
Count=0

View file

@ -21,7 +21,7 @@ Public Magic As New String[] ''Magic strings for binary t
Public GenericIcon As String ''Generic icons in case no other was found
Public IsSuffix As Boolean ''Return true if the pattern is a suffix
Public Function _Compare(Other As DesktopMime) As Integer
Public Function _compare(Other As DesktopMime) As Integer
Return Comp(Pattern, Other.Pattern, gb.IgnoreCase)
@ -250,13 +250,13 @@ End
'
''Return The Mime info of a file
Static Public Function FromFile(sFile As String) As DesktopMime
Static Public Function FromFile(Path As String) As DesktopMime
Dim aMInfo As DesktopMime[]
Dim sFileName As String = File.Name(sFile)
Dim sFileName As String = File.Name(Path)
'Dim hMInfo As DesktopMime
If Exist(sFile) Then
If Exist(Path) Then
If $aMimesSuffix.Count = 0 Then LoadMimeDatabase
aMInfo = FindByExt(LCase(sFileName))
@ -274,7 +274,7 @@ Static Public Function FromFile(sFile As String) As DesktopMime
Endif
' For Each hMInfo In aMInfo
' TestMagic(sFile, hMInfo)
' TestMagic(Path, hMInfo)
' Next
If aMInfo.Count > 0 Then Return aMInfo[0]
@ -283,10 +283,10 @@ Static Public Function FromFile(sFile As String) As DesktopMime
End
''Return the desktopmime for a given type mime.
Static Public Function _get(sType As String) As DesktopMime
Static Public Function _get(Type As String) As DesktopMime
If $aMimesSpecial.Count = 0 Then LoadMimeDatabase
Return TypeToMInfo[sType]
Return TypeToMInfo[Type]
End
@ -302,7 +302,7 @@ Static Public Sub Refresh()
End
Static Public Function _Next() As DesktopMime
Static Public Function _next() As DesktopMime
If $aMimesSuffix.Count = 0 Then LoadMimeDatabase
If Not $aCurMimes Then $aCurMimes = $aMimesSuffix
@ -332,8 +332,8 @@ Static Public Sub _exit()
End
''Return if a TypeMime exist in the database
Static Public Sub Exist(sType As String) As Boolean
Static Public Sub Exist(Type As String) As Boolean
Return TypeToMInfo.Exist(sType)
Return TypeToMInfo.Exist(Type)
End