[DEVELOPMENT ENVIRONMENT]
* OPT: Delay the welcome dialog project list layouting as much as possible. git-svn-id: svn://localhost/gambas/trunk@5159 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
e33d728ac3
commit
1756d43796
4 changed files with 56 additions and 18 deletions
|
@ -533,7 +533,7 @@ msgstr ""
|
|||
msgid "No terminal emulator found."
|
||||
msgstr ""
|
||||
|
||||
#: FAbout.form:21 FWelcome.class:50
|
||||
#: FAbout.form:21 FWelcome.class:53
|
||||
msgid "About Gambas..."
|
||||
msgstr ""
|
||||
|
||||
|
@ -2633,15 +2633,15 @@ msgstr ""
|
|||
msgid "Sort history"
|
||||
msgstr ""
|
||||
|
||||
#: FMain.class:571 FOpenProject.form:116 FWelcome.form:38
|
||||
#: FMain.class:571 FOpenProject.form:116 FWelcome.form:39
|
||||
msgid "Sort by date"
|
||||
msgstr ""
|
||||
|
||||
#: FMain.class:571 FOpenProject.form:125 FWelcome.form:45
|
||||
#: FMain.class:571 FOpenProject.form:125 FWelcome.form:46
|
||||
msgid "Sort by name"
|
||||
msgstr ""
|
||||
|
||||
#: FMain.class:571 FOpenProject.form:133 FWelcome.form:51
|
||||
#: FMain.class:571 FOpenProject.form:133 FWelcome.form:52
|
||||
msgid "Sort by path"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2871,7 +2871,7 @@ msgstr ""
|
|||
msgid "The packages have been successfully created."
|
||||
msgstr ""
|
||||
|
||||
#: FMakeInstall.class:299 FSave.class:28 FWelcome.class:51
|
||||
#: FMakeInstall.class:299 FSave.class:28 FWelcome.class:54
|
||||
msgid "Quit"
|
||||
msgstr ""
|
||||
|
||||
|
@ -3076,7 +3076,7 @@ msgstr ""
|
|||
msgid "Recent"
|
||||
msgstr ""
|
||||
|
||||
#: FOpenProject.form:148 FWelcome.class:49
|
||||
#: FOpenProject.form:148 FWelcome.class:52
|
||||
msgid "Examples"
|
||||
msgstr ""
|
||||
|
||||
|
@ -4306,19 +4306,19 @@ msgstr ""
|
|||
msgid "The 'msgmerge' command has failed"
|
||||
msgstr ""
|
||||
|
||||
#: FWelcome.form:30
|
||||
#: FWelcome.form:31
|
||||
msgid "Welcome to Gambas 3"
|
||||
msgstr ""
|
||||
|
||||
#: FWelcome.class:46
|
||||
#: FWelcome.class:49
|
||||
msgid "New project..."
|
||||
msgstr ""
|
||||
|
||||
#: FWelcome.class:47
|
||||
#: FWelcome.class:50
|
||||
msgid "Open project..."
|
||||
msgstr ""
|
||||
|
||||
#: FWelcome.class:48
|
||||
#: FWelcome.class:51
|
||||
msgid "Recent projects"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -260,6 +260,9 @@ Private Function IdealHeight_Read() As Integer
|
|||
Endif
|
||||
|
||||
$iIdealH = H
|
||||
|
||||
'Debug File.Name($sPath);; $iIdealW;; $iIdealH
|
||||
|
||||
Return H
|
||||
|
||||
End
|
||||
|
@ -303,7 +306,6 @@ End
|
|||
|
||||
Public Sub ProjectItem_BeforeArrange()
|
||||
|
||||
If Not Me.Visible Then Return
|
||||
Me.H = Me.IdealHeight
|
||||
|
||||
End
|
||||
|
|
|
@ -40,6 +40,9 @@ Public Sub Form_Open()
|
|||
Dim sFont As String
|
||||
Dim hCtrl As CCoolButton
|
||||
|
||||
Settings.Read(Me)
|
||||
Me.Center
|
||||
|
||||
sFont = "Bold"
|
||||
W = panButton.ClientW
|
||||
|
||||
|
@ -69,9 +72,6 @@ Public Sub Form_Open()
|
|||
|
||||
'$hWelcome = New CWelcome(dwgWelcome)
|
||||
|
||||
Settings.Read(Me)
|
||||
Me.Center
|
||||
|
||||
End
|
||||
|
||||
|
||||
|
@ -436,7 +436,6 @@ Private Sub FillRecent()
|
|||
'Dim bHighlight As Boolean
|
||||
Dim sTitle As String
|
||||
Dim sLastTitle As String
|
||||
Dim Y As Integer
|
||||
Dim hDrawingArea As DrawingArea
|
||||
|
||||
If lstRecent.Count And If Not CRecentFile.OutOfDate Then Return
|
||||
|
@ -462,14 +461,15 @@ Private Sub FillRecent()
|
|||
.Font = Font["Bold"]
|
||||
.H = .Font.Height + If(sLastTitle, 16, 8)
|
||||
.Foreground = Color.SelectedBackground
|
||||
Y += .H
|
||||
'Y += .H
|
||||
End With
|
||||
sLastTitle = sTitle
|
||||
Endif
|
||||
|
||||
hProjectItem = New ProjectItem(lstRecent) As "ProjectItem"
|
||||
hProjectItem.Y = Y
|
||||
Y += hProjectItem.H
|
||||
Object.Lock(hProjectItem)
|
||||
'hProjectItem.Y = Y
|
||||
'Y += hProjectItem.H
|
||||
'If bHighlight Then hProjectItem.Background = Color.LightBackground
|
||||
'bHighlight = Not bHighlight
|
||||
If Not hFirst Then hFirst = hProjectItem
|
||||
|
@ -484,6 +484,8 @@ Private Sub FillRecent()
|
|||
|
||||
Dec Application.Busy
|
||||
|
||||
timLayout.Trigger
|
||||
|
||||
End
|
||||
|
||||
Private Sub FillExample()
|
||||
|
@ -522,6 +524,7 @@ Private Sub FillExample()
|
|||
hProjectItem = New ProjectItem(lstExample) As "ProjectItem"
|
||||
'If bHighlight Then hProjectItem.Background = Color.LightBackground
|
||||
'bHighlight = Not bHighlight
|
||||
Object.Lock(hProjectItem)
|
||||
hProjectItem.Path = Project.EXAMPLES_DIR &/ sExample
|
||||
hProjectItem.Group = sGroup
|
||||
|
||||
|
@ -532,6 +535,8 @@ Private Sub FillExample()
|
|||
Object.Unlock(lstExample)
|
||||
|
||||
Dec Application.Busy
|
||||
|
||||
timLayout.Trigger
|
||||
|
||||
End
|
||||
|
||||
|
@ -566,3 +571,31 @@ Public Sub dwgTitle_Draw()
|
|||
Draw.RichText(sText, 8, 0, Draw.W - 16, Draw.H - 16, Align.TopLeft)
|
||||
|
||||
End
|
||||
|
||||
Public Sub timLayout_Timer()
|
||||
|
||||
Dim hList As ListContainer
|
||||
Dim hCtrl As Control
|
||||
Dim hProjectItem As ProjectItem
|
||||
|
||||
If $iRecent = LIST_RECENT Then
|
||||
hList = lstRecent
|
||||
Else
|
||||
hList = lstExample
|
||||
Endif
|
||||
|
||||
hList.Lock
|
||||
|
||||
For Each hCtrl In hList.Children
|
||||
|
||||
If hCtrl Is ProjectItem Then
|
||||
hProjectItem = hCtrl
|
||||
Object.Unlock(hProjectItem)
|
||||
hProjectItem.ProjectItem_BeforeArrange
|
||||
Endif
|
||||
|
||||
Next
|
||||
|
||||
hList.Unlock
|
||||
|
||||
End
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
MoveScaled(1,1,66,21)
|
||||
Visible = False
|
||||
}
|
||||
{ timLayout #Timer
|
||||
#MoveScaled(72,14)
|
||||
}
|
||||
{ Panel1 Panel
|
||||
MoveScaled(19,23,14,0)
|
||||
Visible = False
|
||||
|
|
Loading…
Reference in a new issue