Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • AppImage
  • WorkSpace
  • cmake
  • evdev
  • exclamation-mark-completion
  • gb.chart2
  • gb.git
  • gb.joystick
  • gb.net.imap
  • gb.spreadsheet
  • gb.test
  • gb.test.tap
  • master
  • newdialogs
  • stable
  • 3.11.0
  • 3.11.1
  • 3.11.2
  • 3.11.3
  • 3.11.4
  • 3.12.0
  • 3.12.1
  • 3.12.2
  • 3.13.0
  • 3.14.0
  • 3.14.1
  • 3.14.2
  • 3.14.3
  • 3.15.0
  • 3.15.1
  • 3.15.2
  • 3.16.0
  • 3.16.1
  • 3.16.2
  • 3.16.3
  • 3.17.0
  • 3.17.1
  • 3.17.2
  • 3.17.3
  • 3.18.0
  • 3.18.1
  • 3.18.2
  • 3.18.3
  • 3.18.4
  • 3.19.0
  • 3.19.1
  • 3.19.2
  • 3.19.3
  • 3.19.4
  • 3.19.5
  • 3.19.6
  • 3.20.0
  • 3.20.1
  • 3.20.2
  • help
  • v1.9.44
  • v1.9.45
  • v1.9.46
  • v1.9.47
  • v1.9.48
  • v1.9.49
  • v1.9.50
  • v1.9.51
  • v1.9.90
  • v1.9.91
  • v1.9.92
  • v2.0.0
  • v2.1
  • v2.1.1
  • v2.10
  • v2.10.1
  • v2.10.2
  • v2.11
  • v2.11.1
  • v2.12
  • v2.13
  • v2.13.1
  • v2.14
  • v2.15
  • v2.15.1
  • v2.15.2
  • v2.16.0
  • v2.17.0
  • v2.18.0
  • v2.19.0
  • v2.2
  • v2.2.1
  • v2.20.0
  • v2.20.1
  • v2.20.2
  • v2.21.0
  • v2.22.0
  • v2.23.0
  • v2.23.1
  • v2.24.0
  • v2.3
  • v2.4
  • v2.4.1
  • v2.5
  • v2.6
  • v2.7
  • v2.8
  • v2.8.1
  • v2.8.2
  • v2.9
  • v2.9.0
  • v2.99.1
  • v2.99.2
  • v2.99.3
  • v2.99.4
  • v2.99.5
  • v2.99.6
  • v2.99.7
  • v3.0.0
  • v3.1.0
115 results

Target

Select target project
  • xmonader/gambas
  • gambas/gambas
  • gbWilly/gambas
  • dtardon/gambas
  • Davidmue/gambas
  • mmu_man/gambas
  • jguardon/gambas
  • tstueker/gambas
  • timsoft/gambas
  • yann64/gambas
  • Matthew-Collins/gambas
  • microhobby/gambas
  • ercoupeflyer/gambas
  • pebauer68/gambas
  • ptmarstech/gambas
  • christhal/gambas
  • tboege/gambas
  • christopherwoo/gambas
  • yusronarif/gambas
  • gen.braga/gambas
  • MelvinG24/gambas
  • Krischel/gambas
  • liang-wei/gambas
  • brucebruen/gambas
  • LibreDWG/gambas
  • SkyN9ne/gambas
  • zxMarce/gambas
  • lordheavy/gambas
  • ddabrahams76/gambas
  • GianluigiOr/gambas
  • rfc1394/gambas
  • wekan/gambas
  • bsteers4/gambas
  • fweimer-rh/gambas
  • CDCDCDCDCDCD/gambas
  • geekdu42/gambas
  • belmotek/gambas
  • jfrank1500/gambas
  • mfischerq/gambas
  • shiny0110/gambas
  • kk667788/gambas
  • bandali/gambas
  • 64sys/gambas
  • justlostintime/gambas
  • aleasto/gambas
  • bgermann/gambas
  • linusky/gambas
47 results
Select Git revision
  • AppImage
  • WorkSpace
  • cmake
  • evdev
  • exclamation-mark-completion
  • gb.chart2
  • gb.git
  • gb.joystick
  • gb.net.imap
  • gb.spreadsheet
  • gb.test
  • gb.test.tap
  • master
  • newdialogs
  • stable
  • 3.11.0
  • 3.11.1
  • 3.11.2
  • 3.11.3
  • 3.11.4
  • 3.12.0
  • 3.12.1
  • 3.12.2
  • 3.13.0
  • 3.14.0
  • 3.14.1
  • 3.14.2
  • 3.14.3
  • 3.15.0
  • 3.15.1
  • 3.15.2
  • 3.16.0
  • 3.16.1
  • 3.16.2
  • 3.16.3
  • 3.17.0
  • 3.17.1
  • 3.17.2
  • 3.17.3
  • 3.18.0
  • 3.18.1
  • 3.18.2
  • 3.18.3
  • 3.18.4
  • 3.19.0
  • 3.19.1
  • 3.19.2
  • 3.19.3
  • 3.19.4
  • 3.19.5
  • 3.19.6
  • 3.20.0
  • 3.20.1
  • 3.20.2
  • help
  • v1.9.44
  • v1.9.45
  • v1.9.46
  • v1.9.47
  • v1.9.48
  • v1.9.49
  • v1.9.50
  • v1.9.51
  • v1.9.90
  • v1.9.91
  • v1.9.92
  • v2.0.0
  • v2.1
  • v2.1.1
  • v2.10
  • v2.10.1
  • v2.10.2
  • v2.11
  • v2.11.1
  • v2.12
  • v2.13
  • v2.13.1
  • v2.14
  • v2.15
  • v2.15.1
  • v2.15.2
  • v2.16.0
  • v2.17.0
  • v2.18.0
  • v2.19.0
  • v2.2
  • v2.2.1
  • v2.20.0
  • v2.20.1
  • v2.20.2
  • v2.21.0
  • v2.22.0
  • v2.23.0
  • v2.23.1
  • v2.24.0
  • v2.3
  • v2.4
  • v2.4.1
  • v2.5
  • v2.6
  • v2.7
  • v2.8
  • v2.8.1
  • v2.8.2
  • v2.9
  • v2.9.0
  • v2.99.1
  • v2.99.2
  • v2.99.3
  • v2.99.4
  • v2.99.5
  • v2.99.6
  • v2.99.7
  • v3.0.0
  • v3.1.0
115 results
Show changes
Commits on Source (3)
......@@ -1571,7 +1571,7 @@ End
'' +Return value
'' The datatype of the symbol is returned, or [NULL] if the symbol is not found.
Public Function GetSymbolType(sSymbol As String, Optional bPoint As Boolean) As String
Public Function GetSymbolType(sSymbol As String, Optional bPoint As Boolean, Optional bSubr As Boolean) As String
Dim iLine As Integer
Dim iInd As Integer
......@@ -1582,6 +1582,8 @@ Public Function GetSymbolType(sSymbol As String, Optional bPoint As Boolean) As
$bLastStatic = False
$hSymbol = Null
If bSubr Then Goto LOOK_FOR_SUBR
If sSymbol = "ME" Then
Return Me.Name
Endif
......@@ -1675,6 +1677,8 @@ Public Function GetSymbolType(sSymbol As String, Optional bPoint As Boolean) As
' Look for subroutines
LOOK_FOR_SUBR:
If Not bPoint Then
$hSymbol = Project.Documentation.GetClassSymbols(".")[sSymbol]
If $hSymbol Then
......@@ -1879,9 +1883,9 @@ Public Function GetExpressionType(aExpr As String[], aType As Integer[], bPointA
If IsTypeSymbol(sPattern, aType[iInd]) Then
If Not sType Then
If iInd >= (aExpr.Count - 1) Then
sType = GetSymbolType(sPattern, bPointAfter)
sType = GetSymbolType(sPattern, bPointAfter, aType[iInd] = Highlight.Function)
Else
sType = GetSymbolType(sPattern, aExpr[iInd + 1] = ".")
sType = GetSymbolType(sPattern, aExpr[iInd + 1] = ".", aType[iInd] = Highlight.Function)
Endif
If $hSymbol Then
'$bLastStatic = FALSE
......
......@@ -2,13 +2,15 @@
Static Private $sText As String
Static Private $sDetail As String
Static Private $sTitle As String
Public Sub Run(sText As String, sDetail As String)
Public Sub Run(sText As String, sDetail As String, Optional sTitle As String)
Dim iBusy As Integer
$sText = sText
$sDetail = Trim(sDetail)
$sTitle = sTitle
iBusy = Application.Busy
Application.Busy = 0
......@@ -27,6 +29,8 @@ Public Sub Form_Open()
Dim DS As Integer = Desktop.Scale
If $sTitle Then Me.Title = $sTitle
lblError.Text = Html($sText)
If $sDetail Then
......
......@@ -6,16 +6,17 @@
Spacing = True
Margin = True
{ HBox2 HBox
MoveScaled(1,1,39,7)
MoveScaled(1,1,39,5)
Spacing = True
{ PictureBox1 PictureBox
MoveScaled(0,0,7,7)
Picture = Picture["icon:/huge/error"]
Stretch = True
MoveScaled(0,0,5,5)
Picture = Picture.Load("icon:/huge/warning")
Mode = PictureBox.Contain
}
{ lblError TextLabel
MoveScaled(11,1,25,5)
MoveScaled(9,1,25,3)
Expand = True
Alignment = Align.Normal
}
}
{ trmDetail TerminalView
......@@ -34,7 +35,7 @@
Spacing = True
{ btnOK Button
MoveScaled(9,0,16,4)
Text = ("OK")
Text = ("Close")
Default = True
Cancel = True
}
......
......@@ -2537,6 +2537,8 @@ Public Function Compile(Optional bAll As Boolean, Optional bNoDebug As Boolean,
Dim sLine As String
Dim sError As String
Dim hForm As Object
Dim aTransLog As String[]
Dim sFile As String
If Project.ReadOnly Then Return
If Project.Running Then Return 'TRUE
......@@ -2638,6 +2640,17 @@ Public Function Compile(Optional bAll As Boolean, Optional bNoDebug As Boolean,
Endif
UnlockIt()
If Localize Then
aTransLog = Dir(Project.Dir &/ ".lang", "*.log")
For Each sFile In aTransLog
sError &= RTrim(File.Load(Project.Dir &/ ".lang" &/ sFile)) & "\n\n"
Next
sError = Trim(sError)
If sError Then FCommandError.Run(("The translation tools return the following errors:"), sError, ("Translation errors"))
Endif
End
......@@ -6969,49 +6982,49 @@ Catch
End
Public Sub CompileTranslation(bForce As Boolean, Optional sLang As String)
Dim sPath As String
Dim sTrans As String
Dim aLang As String[]
Dim dTrans As Date
Dim dPath As Date
If sLang Then
aLang = [sLang]
Else
aLang = Language.GetAll(True)
Endif
' 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 = 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
' Public Sub CompileTranslation(bForce As Boolean, Optional sLang As String)
'
' Dim sPath As String
' Dim sTrans As String
' Dim aLang As String[]
' Dim dTrans As Date
' Dim dPath As Date
'
' If sLang Then
' aLang = [sLang]
' Else
' aLang = Language.GetAll(True)
' Endif
'
' ' 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 = 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
Public Sub InitTooltip(hTooltip As Control)
......
......@@ -724,7 +724,7 @@ End
Public Sub ShowError(sErr As String)
FVersionError.Run(sErr, $sLastResult)
FCommandError.Run(sErr, $sLastResult)
End
......
app/src/gambas3/img/module/class.png

751 B | W: 0px | H: 0px

app/src/gambas3/img/module/class.png

937 B | W: 0px | H: 0px

app/src/gambas3/img/module/class.png
app/src/gambas3/img/module/class.png
app/src/gambas3/img/module/class.png
app/src/gambas3/img/module/class.png
  • 2-up
  • Swipe
  • Onion skin
app/src/gambas3/img/module/module.png

497 B | W: 0px | H: 0px

app/src/gambas3/img/module/module.png

578 B | W: 0px | H: 0px

app/src/gambas3/img/module/module.png
app/src/gambas3/img/module/module.png
app/src/gambas3/img/module/module.png
app/src/gambas3/img/module/module.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -662,7 +662,8 @@ static void exit_files(void)
static void compile_lang(const char *file_po)
{
const char *file_mo;
const char *file_log;
char *file_mo;
time_t time_po, time_mo;
char *cmd;
int ret;
......@@ -671,8 +672,8 @@ static void compile_lang(const char *file_po)
if (time_po == ((time_t)-1))
return;
file_mo = FILE_set_ext(file_po, "mo");
file_mo = (char *)FILE_set_ext(file_po, "mo");
if (!main_compile_all)
{
......@@ -681,6 +682,9 @@ static void compile_lang(const char *file_po)
return;
}
file_mo = STR_copy(file_mo);
file_log = FILE_set_ext(file_po, "log");
unlink(file_log);
unlink(file_mo);
// Shell "msgfmt -o " & Shell$(sPath) & " " & Shell(sTrans) Wait
......@@ -690,14 +694,18 @@ static void compile_lang(const char *file_po)
fprintf(stderr, "running: %s\n", cmd);
}
else
cmd = STR_print("msgfmt -o %s %s >/dev/null 2>&1", file_mo, file_po);
cmd = STR_print("msgfmt -o %s %s > %s 2>&1", file_mo, file_po, file_log);
ret = system(cmd);
if (!WIFEXITED(ret) || WEXITSTATUS(ret))
ERROR_warning("unable to compile translation file with 'msgfmt': %s", file_po);
if (FILE_get_size(file_log) == 0)
unlink(file_log);
STR_free(cmd);
STR_free(file_mo);
}
......
......@@ -130,6 +130,7 @@ void FILE_chgrp(const char *path, const char *group);
bool FILE_exist(const char *path);
time_t FILE_get_time(const char *path);
size_t FILE_get_size(const char *path);
bool FILE_copy(const char *src, const char *dst);
#endif
......
......@@ -1114,6 +1114,16 @@ time_t FILE_get_time(const char *path)
return (time_t)-1L;
}
size_t FILE_get_size(const char *path)
{
struct stat info;
if (stat(path, &info) == 0)
return info.st_size;
else
return -1;
}
bool FILE_copy(const char *src, const char *dst)
{
int src_fd;
......