Merge branch 'master' of gitlab.com:gambas/gambas

This commit is contained in:
gambix 2019-01-03 21:59:13 +01:00
commit 9dab549cf7
44 changed files with 390 additions and 73 deletions

View file

@ -1,9 +1,8 @@
# Gambas Project File 3.0
# Compiled with Gambas 3.6.90
Title=Movie player example
Startup=FMoviePlayer
Icon=video.png
Version=3.6.2
Version=3.11.90
VersionFile=1
Component=gb.image
Component=gb.gui

View file

@ -222,7 +222,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gambas3 3.11.90\n"
"POT-Creation-Date: 2018-12-27 16:14 UTC\n"
"POT-Creation-Date: 2019-01-03 09:04 UTC\n"
"PO-Revision-Date: 2018-12-14 16:16 UTC\n"
"Last-Translator: benoit <benoit@benoit-kubuntu>\n"
"Language: fr\n"
@ -1216,11 +1216,11 @@ msgstr "Auteur de la dernière publication distante"
msgid "Remote last commit date"
msgstr "Date de la dernière publication distante"
#: CWelcome.class:114
#: CWelcome.class:115
msgid "The Gambas font is published under the SIL Open Font License."
msgstr "La police Gambas est publiée sous licence « SIL Open Font License »."
#: CWelcome.class:114
#: CWelcome.class:115
msgid "This program is published under the GNU General Public License."
msgstr "Ce programme est publié sous la « Licence Publique Générale GNU »."

Binary file not shown.

View file

@ -221,10 +221,10 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: gambas3 3.11.90\n"
"POT-Creation-Date: 2019-01-01 22:43 UTC\n"
"PO-Revision-Date: 2019-01-01 17:03 UTC\n"
"Last-Translator: gian <gian@gian>\n"
"Project-Id-Version: gambas3 3.12.0\n"
"POT-Creation-Date: 2019-01-03 09:06 UTC\n"
"PO-Revision-Date: 2019-01-03 09:05 UTC\n"
"Last-Translator: benoit <benoit@benoit-kubuntu>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -1216,11 +1216,11 @@ msgstr "Autore dell'ultimo commit in remoto"
msgid "Remote last commit date"
msgstr "Data dell'ultimo commit in remoto"
#: CWelcome.class:115
#: CWelcome.class:114
msgid "The Gambas font is published under the SIL Open Font License."
msgstr "Il font Gambas è pubblicato sotto la licenza SIL Open Font."
#: CWelcome.class:115
#: CWelcome.class:114
msgid "This program is published under the GNU General Public License."
msgstr "Questo programma è pubblicato sotto la GNU General Public License."

View file

@ -2,7 +2,7 @@
Title=Gambas 3
Startup=Project
Icon=img/logo/logo-ide.png
Version=3.12.0
Version=3.12.90
VersionFile=1
Component=gb.image
Component=gb.gui.qt

View file

@ -6482,28 +6482,45 @@ End
Public Sub CompileTranslation(bForce As Boolean, Optional sLang As String)
Dim iPos As Integer
Dim sPath As String
Dim sTrans As String
Dim aLang As String[]
Dim dTrans As Date
Dim dPath As Date
If Not sLang Then
iPos = Project.Environment.Find("LANG=*", gb.Like)
If iPos >= 0 Then
sLang = Mid$(Project.Environment[iPos], 6)
Else
sLang = System.Language
Endif
sLang = Language.Find(sLang)
If sLang Then
aLang = [sLang]
Else
aLang = Language.GetAll(True)
Endif
sPath = Language.GetPath(sLang, "mo")
If Exist(sPath) And If Not bForce Then Return
' If Not sLang Then
' iPos = Project.Environment.Find("LANG=*", gb.Like)
' If iPos >= 0 Then
' sLang = Mid$(Project.Environment[iPos], 6)
' Else
' sLang = System.Language
' Endif
' sLang = Language.Find(sLang)
' Endif
For Each sLang In aLang
sTrans = File.SetExt(sPath, "po")
If Not Exist(sTrans) Then Return
Try Kill sPath
Shell "msgfmt -o " & Shell$(sPath) & " " & Shell(sTrans) Wait
sTrans = Language.GetPath(sLang, "po")
Try dTrans = Stat(sTrans).LastModified
If Error Then Continue
sPath = Language.GetPath(sLang, "mo")
If Not bForce Then
Try dPath = Stat(sPath).LastModified
If dPath And If dPath >= dTrans Then Continue
Endif
Try Kill sPath
Shell "msgfmt -o " & Shell$(sPath) & " " & Shell(sTrans) Wait
Next
End

View file

@ -240,14 +240,24 @@ Public Function FromName(sName As String) As String
End
Public Function GetAll() As String[]
Public Function GetAll(Optional bCurrentOnly As Boolean) As String[]
Dim aLang As New String[]
Dim sStr As String
For Each sStr In Name
aLang.Add(Name.Key)
Next
If bCurrentOnly Then
For Each sStr In Dir(Project.Dir &/ ".lang", "*.po")
aLang.Add(File.BaseName(sStr))
Next
Else
For Each sStr In Name
aLang.Add(Name.Key)
Next
Endif
aLang.Sort(gb.Language)

View file

@ -78,7 +78,6 @@ End
Public Sub dwgWelcome_Draw()
Dim hSvgLogo As SvgImage
Dim X, Y As Integer
Dim hDrawingArea As DrawingArea = $hObs.Object
Dim I, S As Integer
@ -110,7 +109,7 @@ Public Sub dwgWelcome_Draw()
Y += Paint.Font.Height
PaintText("http://gambas.sourceforge.net", 12, Y, TEXT_COLOR) 'Color.LightForeground)
Paint.Font = Font["-1,Bold"]
Paint.Font = Font["Bold"]
Y += Paint.Font.Height + 16
PaintText(("This program is published under the GNU General Public License.") & "\n" & ("The Gambas font is published under the SIL Open Font License."), 12, Y, Color.SelectedForeground)
@ -121,7 +120,7 @@ Public Sub dwgWelcome_Draw()
Endif
'Paint.DrawImage($hLogo, hDrawingArea.W - $hLogo.Width, -10 - Desktop.Scale)
Paint.DrawImage($hLogo, hDrawingArea.W - $hLogo.Width, 0)
Paint.DrawImage($hLogo, hDrawingArea.W - $hLogo.Width - Desktop.Scale, 0)
If $hTimer Then

View file

@ -1,4 +1,4 @@
[Component]
Key=gb.eval.highlight
Version=3.11.90
Version=3.12.0
Requires=gb.eval

View file

@ -1,7 +1,7 @@
# Gambas Project File 3.0
Title=gb.eval.highlight
Startup=Main
Version=3.11.90
Version=3.12.0
VersionFile=1
Component=gb.eval
Component=gb.net

View file

@ -50,8 +50,10 @@ Public Sub Main()
hHighlighter = TextHighlighter["gambas"]
TextHighlighter._Highlight = New Byte[]
hHighlighter.Run("Label:")
Print TextHighlighter._Highlight.Count
'Print hHighlighter.ToHTML(File.Load("src.txt"))
' TextHighlighter._Highlight = New Byte[]
' hHighlighter.Run("Label:")
' Print TextHighlighter._Highlight.Count
End

View file

@ -1,6 +1,6 @@
[Component]
Key=gb.form.mdi
Version=3.11.90
Version=3.12.0
Authors=Benoît Minisini
Needs=Form
Requires=gb.form,gb.settings

View file

@ -2,7 +2,7 @@
Title=Multiple document interface management
Startup=FMain
Icon=.hidden/control/workspace.png
Version=3.11.90
Version=3.12.0
VersionFile=1
Component=gb.image
Component=gb.gui

View file

@ -1,5 +1,5 @@
[Component]
Key=gb.form
Version=3.11.90
Version=3.12.90
Authors=Benoît Minisini
Needs=Form

View file

@ -1,13 +1,13 @@
# Gambas Project File 3.0
Title=More controls for graphical components
Startup=FBugFileView
Version=3.11.90
Startup=FTestDateChooser
Version=3.12.90
VersionFile=1
Component=gb.image
Component=gb.gui
Component=gb.settings
Authors="Benoît Minisini"
Environment="GB_GUI=gb.qt4"
Environment="GB_GUI=gb.gtk3"
TabSize=2
Translate=1
Language=en

View file

@ -17,3 +17,10 @@ Public Sub DateBox2_Change()
Debug DateBox2.Value
End
Public Sub Button1_Click()
DateBox1.Enabled = Not DateBox1.Enabled
DateBox2.Enabled = Not DateBox2.Enabled
End

View file

@ -17,7 +17,8 @@
Move(63,140,168,28)
}
{ txtYear SpinBox
Move(168,308,63,28)
Move(216,296,64,24)
Enabled = False
MinValue = 1600
MaxValue = 9999
Value = 2015
@ -27,4 +28,12 @@
Move(21,203,238,28)
Enabled = False
}
{ Button1 Button
Move(32,8,128,32)
Text = ("Enable")
}
{ TextBox1 TextBox
Move(64,256,136,32)
Enabled = False
}
}

View file

@ -0,0 +1,2 @@
' Gambas class file

View file

@ -0,0 +1,16 @@
# Gambas Form File 3.0
{ Form Form
MoveScaled(0,0,64,64)
{ ToolPanel1 ToolPanel
MoveScaled(4,6,24,24)
Count = 3
Index = 0
Text = ("Toolbar &0")
Index = 1
Text = ("Toolbar &1")
Index = 2
Text = ("Toolbar &2")
Index = 0
}
}

View file

@ -41,7 +41,7 @@ End
Public Sub btnTitle_Click()
Dim hParent As ToolPanelContainer = Me.Parent
Dim hParent As ToolPanelContainer = Me._Parent
hParent._Change
End

View file

@ -1,6 +1,10 @@
[Component]
Key=gb.map
<<<<<<< HEAD
Version=3.12.90
=======
Version=3.12.0
>>>>>>> 0266ca1f15c1d0a0d6027725d8b113bf3781779a
State=1
Authors=Fabien Bodard
Needs=Form,ImageIO

View file

@ -2,7 +2,11 @@
Title=gb.map
Startup=Form4
Icon=.hidden/control/mapview.png
<<<<<<< HEAD
Version=3.12.90
=======
Version=3.12.0
>>>>>>> 0266ca1f15c1d0a0d6027725d8b113bf3781779a
VersionFile=1
Component=gb.image
Component=gb.gui

View file

@ -6,5 +6,6 @@
Margin = True
{ MediaView1 MediaView
MoveScaled(4,5,38,30)
URL = "/home/benoit/Les Demoiselles de Rochefort (1967) - La Chanson de Maxence-atgHEhyJAnw.webm"
}
}

View file

@ -1,5 +1,5 @@
[Component]
Key=gb.net.pop3
Version=3.10.90
Version=3.11.90
Authors=sebikul <sebikul@gmail.com>,Fabien Bodard <gambas.fr@gmail.com>,Benoît Minisini <gambas@users.sourceforge.net>
Requires=gb.net,gb.mime

View file

@ -2,7 +2,7 @@
Title=gb.net.pop3
Startup=MTest
Icon=.hidden/control/pop3client.png
Version=3.10.90
Version=3.11.90
VersionFile=1
Component=gb.net
Component=gb.mime

View file

@ -1,5 +1,5 @@
[Component]
Key=gb.report2
Version=3.11.90
Version=3.12.90
Needs=Form
Requires=gb.form

View file

@ -2,7 +2,7 @@
Title=ReportsEvolution
Startup=Report13
Icon=.hidden/control/reportview.png
Version=3.11.90
Version=3.12.90
VersionFile=1
Component=gb.image
Component=gb.gui

View file

@ -1,4 +1,4 @@
[Component]
Key=gb.util.web
Version=3.11.90
Version=3.12.90
State=1

View file

@ -1,7 +1,7 @@
# Gambas Project File 3.0
Title=gb.util.web
Startup=MMain
Version=3.11.90
Version=3.12.90
VersionFile=1
TabSize=2
Language=fr

View file

@ -13,7 +13,13 @@ Public Function GetNullObject() As Object
End
Public Sub Main()
Dim hURL As URL
hURL = URL.FromString("http://localhost/guygle/find?query=ordre+de+travail+avec+interventions+dont+la+date+planifiée+est+comprise+entre+le+01%2F03%2F2017+et+31%2F03%2F2017+et+type+est+Campagne+dont+agence+est+AG.CIG.GONESSE&format=json&test#f5")
Print URL.Decode("ordre+de+travail+avec+interventions+dont+la+date+planifi%C3%A9e+est+comprise+entre+le+01%2F03%2F2017+et+31%2F03%2F2017+et+type+est+Campagne+dont+agence+est+AG.CIG.GONESSE")
Print hURL.Query["query"]
Print hURL.ToString()
End

View file

@ -2,7 +2,16 @@
Export
Static Public Sub Encode(Path As String) As String
Public Protocol As String
Public Host As String
Public Port As String
Public (User) As String
Public Password As String
Public Path As String
Public Query As UrlQuery
Public Hash As String
Static Public Sub Encode((Path) As String) As String
Dim iInd As Integer
Dim sRes As String
@ -23,7 +32,7 @@ Static Public Sub Encode(Path As String) As String
End
Static Public Sub Decode(Path As String) As String
Static Public Sub Decode((Path) As String) As String
Dim iInd As Integer
Dim sRes As String
@ -44,14 +53,135 @@ Static Public Sub Decode(Path As String) As String
End
Static Public Sub Quote(Path As String) As String
Static Public Sub Quote((Path) As String) As String
Return Encode(Path)
End
Static Public Sub UnQuote(Path As String) As String
Static Public Sub UnQuote((Path) As String) As String
Return Decode(Path)
End
Private Sub CreateUrl(sUrl As String) As URL
Dim iPos As Integer
Dim sTemp As String
Dim sIdent As String
iPos = InStr(sURL, ":")
If iPos Then
Protocol = Left(sURL, iPos - 1)
sURL = Mid$(sURL, iPos + 1)
Endif
If sURL Begins "//" Then
sURL = Mid$(sURL, 3)
iPos = InStr(sURL, "/")
If iPos = 0 Then
sTemp = sURL
sURL = ""
Else
sTemp = Left(sURL, iPos - 1)
sURL = Mid$(sURL, iPos)
Endif
iPos = InStr(sTemp, "@")
If iPos Then
sIdent = Left(sTemp, iPos - 1)
sTemp = Mid$(sTemp, iPos + 1)
iPos = InStr(sIdent, ":")
If iPos Then
User = Left(sIdent, iPos - 1)
Password = Mid$(sIdent, iPos + 1)
Else
User = sIdent
Endif
Endif
iPos = InStr(sTemp, ":")
If iPos Then
Host = Left(sTemp, iPos - 1)
Port = Mid(sTemp, iPos + 1)
Else
Host = sTemp
Endif
Endif
iPos = InStr(sURL, "#")
If iPos Then
Hash = Mid(sURL, iPos + 1)
sURL = Left(sURL, iPos - 1)
Endif
iPos = InStr(sURL, "?")
If iPos Then
Path = Left(sURL, iPos - 1)
Query = New URLQuery(Mid$(sURL, iPos + 1))
Else
Path = sURL
Endif
User = FromUrl(User)
Password = FromUrl(Password)
Host = FromUrl(Host)
Port = FromUrl(Port)
Path = FromUrl(Path)
Hash = FromUrl(Hash)
End
Public Sub _new(URL As String)
CreateUrl(URL)
End
Public Sub ToString() As String
Dim sURL As String
Dim sQuery As String
If Protocol Then sURL = Protocol & ":"
If Host Then
sUrl &= "//"
If User Or If Password Then
sUrl &= Url(User)
If Password Then sUrl &= ":" & Url(Password)
sUrl &= "@"
Endif
sUrl &= Url(Host)
If Port Then sUrl &= ":" & Url(Port)
Endif
If Path Then sUrl &/= Url(Path)
sQuery = Query.ToString()
If sQuery Then sUrl &= "?" & sQuery
If Hash Then sUrl &= "#" & Url(Hash)
Return sUrl
End
Static Public Sub FromString(URL As String) As URL
Return New URL(URL)
End

View file

@ -0,0 +1,113 @@
' Gambas class file
Export
Property Read Count As Integer
Property Read Keys As String[]
Private $cNull As New Collection
Private $cVal As New Collection
Public Sub _new(Query As String)
Dim sElt As String
Dim iPos As Integer
Dim sKey As String
Dim sValue As String
Dim cKey As New Collection
For Each sElt In Split(Query, "&")
iPos = InStr(sElt, "=")
If iPos Then
sKey = URL.Decode(Left(sElt, iPos - 1))
sValue = URL.Decode(Mid$(sElt, iPos + 1))
Else
sKey = sElt
sValue = ""
Endif
If Not sKey Then Continue
If cKey.Exist(sKey) Then Continue
If sValue Then
$cVal[sKey] = sValue
Else
$cNull[sKey] = True
Endif
Next
End
Public Sub Exist(Key As String) As Boolean
If $cNull.Exist(Key) Then Return True
If $cVal.Exist(Key) Then Return True
End
Public Sub _get(Key As String) As String
Return $cVal[Key]
End
Public Sub _put(Value As String, Key As String)
$cNull.Remove(Key)
$cVal.Remove(Key)
If Value Then
$cVal[Key] = Value
Else
$cNull[Key] = True
Endif
End
Public Sub ToString() As String
Dim aQuery As New String[]
Dim sVal As String
For Each sVal In $cVal
aQuery.Add(URL.Encode($cVal.Key) & "=" & URL.Encode(sVal))
Next
For Each $cNull
aQuery.Add(URL.Encode($cNull.Key))
Next
Return aQuery.Join("&")
End
Static Public Sub FromString(Query As String) As URLQuery
Return New URLQuery(Query)
End
Private Function Count_Read() As Integer
Return $cVal.Count + $cNull.Count
End
Private Function Keys_Read() As String[]
Dim aKeys As String[]
aKeys = New String[]
For Each $cVal
aKeys.Add($cVal.Key)
Next
For Each $cNull
aKeys.Add($cNull.Key)
Next
Return aKeys
End

View file

@ -1,4 +1,4 @@
[Component]
Key=gb.util
Version=3.11.90
Version=3.12.0
State=1

View file

@ -1,7 +1,7 @@
# Gambas Project File 3.0
Title=Gambas utilities
Startup=MMain
Version=3.11.90
Version=3.12.0
VersionFile=1
TabSize=2
Language=fr

View file

@ -11,8 +11,6 @@ Public Sub Before(sStr As String) As String
End
Public Sub Run(sStr As String) As String
Dim sSuff As String
@ -275,7 +273,6 @@ REMOVE_DOUBLE:
Endif
Wend
Return
End

View file

@ -1,6 +1,6 @@
[Component]
Key=gb.web.form
Version=3.11.90
Version=3.12.90
State=1
Authors=Benoît Minisini
Requires=gb.web,gb.util.web,gb.util

View file

@ -1,7 +1,7 @@
# Gambas Project File 3.0
Startup=Webform6
UseHttpServer=1
Version=3.11.90
Version=3.12.90
VersionFile=1
Component=gb.util
Component=gb.util.web

View file

@ -1,5 +1,5 @@
[Component]
Key=gb.web
Version=3.11.90
Version=3.12.90
Authors=Benoît Minisini
Include=gb.util.web

View file

@ -1,7 +1,7 @@
# Gambas Project File 3.0
Title=Web applications tools
Startup=Main
Version=3.11.90
Version=3.12.90
VersionFile=1
Component=gb.db
Component=gb.web

View file

@ -1,7 +1,7 @@
# Gambas Project File 3.0
Title=gb.net.curl
Startup=MMain
Version=3.11.90
Version=3.12.90
VersionFile=1
Component=gb.net
Component=gb.net.curl

View file

@ -1208,7 +1208,7 @@ int STRING_search(const char *ps, int ls, const char *pp, int lp, int is, bool r
pos = 0;
apos = 0;
if (!nocase || pp[0] == tolower(pp[0]))
if (!nocase) // || pp[0] == tolower(pp[0]))
{
p = memchr(right ? ps : ps + is, (uchar)pp[0], right ? ls : ls - is);
if (!p)

View file

@ -1,4 +1,4 @@
[Component]
Key=gb.jit
Version=3.11.90
Version=3.12.90
Authors=Benoît Minisini

View file

@ -1,7 +1,7 @@
# Gambas Project File 3.0
Title=Gambas JIT compiler support
Startup=Main
Version=3.11.90
Version=3.12.90
VersionFile=1
Authors="Benoît Minisini"
TabSize=2

View file

@ -144,8 +144,9 @@ typedef
#define OPT(_p, _n) ({ \
uchar _opt = 0; \
int _i; \
GB_VALUE *_param = &sp[-n+(_p)]; \
for (int _i = 0; _i < (_n); _i++) \
for (_i = 0; _i < (_n); _i++) \
{ \
if (((_i + (_p)) >= n) || _param->type == GB_T_VOID) \
_opt |= (1 << _i); \