[DEVELOPMENT ENVIRONMENT]
* NEW: Display subversion revision in the About dialog. git-svn-id: svn://localhost/gambas/trunk@1456 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
31af0cd0a1
commit
54112a5acb
@ -103,7 +103,7 @@
|
||||
Alignment = Align.TopNormal
|
||||
}
|
||||
{ lblVersion Label
|
||||
MoveScaled(32,0,14,7)
|
||||
MoveScaled(32,0,25,7)
|
||||
Font = Font["Bold,+6"]
|
||||
Background = Color.SelectedBackground
|
||||
Foreground = &H9FCFFF&
|
||||
|
@ -56,7 +56,7 @@ Public Sub Form_Open()
|
||||
chkSortRecent.Value = Settings["/FWelcome/SortRecent", False]
|
||||
FillRecent
|
||||
|
||||
lblVersion.Text = Project.Version 'Subst(("version &1"), Project.Version)
|
||||
lblVersion.Text = Project.Version
|
||||
lblVersion.Move(lblGambas.X + lblGambas.Font.Width(lblGambas.Text) + 4, lblGambas.Y)
|
||||
|
||||
If Project.GetRecentFiles().Count Then
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Gambas Form File 3.0
|
||||
|
||||
{ Form Form
|
||||
MoveScaled(0,2,69,66)
|
||||
MoveScaled(0,2,76,69)
|
||||
Background = Color.TextBackground
|
||||
Foreground = Color.TextForeground
|
||||
Text = ("Welcome to Gambas 3")
|
||||
@ -28,7 +28,7 @@
|
||||
Alignment = Align.TopNormal
|
||||
}
|
||||
{ lblVersion Label
|
||||
MoveScaled(29,1,13,5)
|
||||
MoveScaled(29,1,27,5)
|
||||
Font = Font["Bold,+6"]
|
||||
Background = Color.SelectedBackground
|
||||
Foreground = &H9FCFFF&
|
||||
|
@ -214,6 +214,9 @@ Private Sub InitVersion()
|
||||
aVer.Remove(aVer.Max)
|
||||
Version = aVer.Join(".")
|
||||
|
||||
sVer = VersionControl.GetVersion(Application.Path)
|
||||
If sVer Then Version &= " (r" & sVer & ")"
|
||||
|
||||
Catch
|
||||
|
||||
Version = "?"
|
||||
|
@ -254,3 +254,16 @@ Public Sub HasConflict() As Boolean
|
||||
Endif
|
||||
|
||||
End
|
||||
|
||||
|
||||
Public Sub GetVersion(sDir As String) As String
|
||||
|
||||
Dim sRes As String
|
||||
|
||||
If Exist(sDir &/ ".svn") Then
|
||||
Shell "cd " & Quote.Shell(sDir) & "; LC_ALL=C svn info" To sRes
|
||||
Try sRes = Scan(sRes, "*\nRevision: *\n*")[1]
|
||||
Return sRes
|
||||
Endif
|
||||
|
||||
End
|
||||
|
Loading…
x
Reference in New Issue
Block a user