[DEVELOPMENT ENVIRONMENT]

* NEW: New way of making source file icons.

[GB.DB.*]
* BUG: Forgot to add *.component files.


git-svn-id: svn://localhost/gambas/trunk@1927 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2009-04-11 07:12:16 +00:00
parent d48356d59d
commit 5b6b908f2b
14 changed files with 59 additions and 14 deletions

View file

@ -539,23 +539,36 @@ Private Sub AddLinkEmblem(hPict As Picture) As Picture
End
Private Sub MakeModuleIcon(sModule As String, Optional iSize As Integer = 16) As Picture
Private Sub MakeModuleIcon(sModule As String, Optional iSize As Integer) As Picture
Dim hPict As Picture
Dim hImage As Image
Dim hImageModule As Image
Dim sKey As String
If Not $hFileImage Then $hFileImage = Image.Load("icon:/" & iSize & "/file")
If Not $hFileImage Then $hFileImage = Picture["icon:/32/file"].Image
hImage = $hFileImage.Copy()
hImageModule = Image.Load("module" &/ sModule & ".png").Stretch(iSize, iSize)
hImage.Draw(hImageModule, 0, 0)
Return hImage.Picture
If iSize = 0 Then iSize = 16
sKey = "img/" & sModule & "-" & iSize & ".png"
hPict = Picture[sKey]
If Not hPict Then
hImage = $hFileImage.Stretch(iSize, iSize)
If iSize = 16 Then
hImageModule = Image.Load("img/module" &/ sModule & "-16.png")
Else
hImageModule = Image.Load("img/module" &/ sModule & ".png").Stretch(iSize, iSize)
Endif
hImage.Draw(hImageModule, 0, 0)
hPict = hImage.Picture
Picture[sKey] = hPict
Endif
Return hPict
End
Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture
Dim hImage As Image
@ -573,6 +586,7 @@ Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture
Dim iDim As Integer
Dim bConflict As Boolean
Dim hConflict As Image
Dim sModule As String
If iSize Then
sPrefix = "icon:/" & iSize
@ -600,11 +614,8 @@ Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture
Case "form", "class", "module", "webpage"
If File.Dir(sPath) = Project.Dir Then
If iSize > 16 Then
sIcon = "img/32" &/ sExt & ".png"
Else
sIcon = "img/16" &/ sExt & ".png"
Endif
sModule = sExt
sIcon = sExt & "-" & iSize
bStartup = File.BaseName(sPath) = Startup And Not bNoStartup
Endif
@ -684,7 +695,11 @@ Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture
Try hPict = Picture[sKey]
If Not hPict Then
hPict = Picture[sIcon]
If sModule Then
hPict = MakeModuleIcon(sModule, iSize)
Else
hPict = Picture[sIcon]
Endif
If Not hPict Then hPict = Picture[sPrefix &/ "file"]
If Not hPict Then hPict = Picture["img/16/unknown.png"]
hPict = hPict.Copy()

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 436 B

After

Width:  |  Height:  |  Size: 605 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 B

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,6 @@
[Component]
Key=gb.db.firebird
Author=Daniel Vostanikian
State=0
Require=gb.db

View file

@ -0,0 +1,6 @@
[Component]
Key=gb.db.odbc
Author=Andrea Bortolan,Benoît Minisini
State=0
Require=gb.db

View file

@ -0,0 +1,6 @@
[Component]
Key=gb.db.postgresql
Author=Benoît Minisini
State=0
Require=gb.db

View file

@ -0,0 +1,6 @@
[Component]
Key=gb.db.sqlite2
Author=Nigel Gerrard,Benoît Minisini
State=0
Require=gb.db

View file

@ -0,0 +1,6 @@
[Component]
Key=gb.db.sqlite3
Author=Nigel Gerrard,Benoît Minisini
State=0
Require=gb.db