diff --git a/app/src/gambas3/.lang/.pot b/app/src/gambas3/.lang/.pot index 4f73c8efa..26d23c935 100644 --- a/app/src/gambas3/.lang/.pot +++ b/app/src/gambas3/.lang/.pot @@ -328,19 +328,19 @@ msgid "Gambas reports" msgstr "" #: CProjectTree.class:290 FMain.form:937 FSearch.class:96 FSelectIcon.form:31 -#: Project.module:1601 +#: Project.module:1602 msgid "Project" msgstr "" -#: CProjectTree.class:293 Project.module:1604 +#: CProjectTree.class:293 Project.module:1605 msgid "Sources" msgstr "" -#: CProjectTree.class:296 Project.module:1607 +#: CProjectTree.class:296 Project.module:1608 msgid "Connections" msgstr "" -#: CProjectTree.class:305 Project.module:1616 +#: CProjectTree.class:305 Project.module:1617 msgid "Data" msgstr "" @@ -387,7 +387,7 @@ msgid "" "the GNU General Public License." msgstr "" -#: Design.module:229 Project.module:2067 +#: Design.module:229 Project.module:2068 msgid "in &1:&2." msgstr "" @@ -501,30 +501,30 @@ msgstr "" #: FCommit.form:91 FConflict.form:53 FConnectionEditor.form:340 #: FEditor.form:153 FForm.form:209 FIconEditor.form:102 FImageEditor.form:71 -#: FMenu.form:108 FOutput.form:58 FTextEditor.form:93 +#: FMenu.form:108 FOutput.form:63 FTextEditor.form:93 msgid "Cut" msgstr "" #: FCommit.form:97 FConflict.form:59 FConnectionEditor.form:117 #: FEditor.form:159 FForm.form:216 FIconEditor.form:110 FImageEditor.form:80 -#: FMenu.form:114 FOutput.form:65 FTextEditor.form:100 +#: FMenu.form:114 FOutput.form:70 FTextEditor.form:100 msgid "Copy" msgstr "" #: FCommit.form:103 FConflict.form:65 FConnectionEditor.form:361 #: FEditor.form:166 FForm.form:229 FIconEditor.form:118 FImageEditor.form:89 -#: FMenu.form:120 FOutput.form:72 FPasteTable.form:101 FTextEditor.form:107 +#: FMenu.form:120 FOutput.form:77 FPasteTable.form:101 FTextEditor.form:107 msgid "Paste" msgstr "" #: FCommit.form:109 FConflict.form:71 FConnectionEditor.form:368 #: FEditor.form:137 FForm.form:470 FIconEditor.form:86 FImageEditor.form:99 -#: FOption.form:632 FOutput.form:41 FTextEditor.form:76 +#: FOption.form:632 FOutput.form:46 FTextEditor.form:76 msgid "Undo" msgstr "" #: FCommit.form:115 FConflict.form:77 FConnectionEditor.form:375 -#: FEditor.form:144 FForm.form:480 FImageEditor.form:107 FOutput.form:48 +#: FEditor.form:144 FForm.form:480 FImageEditor.form:107 FOutput.form:53 #: FTextEditor.form:83 msgid "Redo" msgstr "" @@ -1003,7 +1003,7 @@ msgstr "" msgid "(No parent)" msgstr "" -#: FCreateFile.class:409 +#: FCreateFile.class:414 msgid "Cannot add file." msgstr "" @@ -1273,7 +1273,7 @@ msgid "Do you want to clear the expression list ?" msgstr "" #: FDebugInfo.class:530 FIconEditor.class:1413 FList.class:155 -#: FOption.class:618 FOutput.form:79 +#: FOption.class:618 FOutput.form:84 msgid "Clear" msgstr "" @@ -1313,11 +1313,11 @@ msgstr "" msgid "Select &All" msgstr "" -#: FEditor.form:185 FOutput.form:89 FTextEditor.form:126 +#: FEditor.form:185 FOutput.form:94 FTextEditor.form:126 msgid "Find next" msgstr "" -#: FEditor.form:192 FOutput.form:96 FTextEditor.form:133 +#: FEditor.form:192 FOutput.form:101 FTextEditor.form:133 msgid "Find previous" msgstr "" @@ -2833,7 +2833,7 @@ msgid "There is no CHANGELOG entry for this release." msgstr "" #: FMakeInstall.class:327 FPropertyProject.class:801 FSave.form:21 -#: Project.module:3071 +#: Project.module:3072 msgid "Continue" msgstr "" @@ -2957,7 +2957,7 @@ msgstr "" msgid "This menu is too deep !" msgstr "" -#: FMenu.class:942 Project.module:5055 +#: FMenu.class:942 Project.module:5056 msgid "modified" msgstr "" @@ -3377,30 +3377,42 @@ msgstr "" msgid "Do you really want to delete this snippet?" msgstr "" -#: FOutput.form:30 +#: FOutput.form:35 msgid "Console - Gambas" msgstr "" -#: FOutput.form:109 +#: FOutput.form:114 msgid "Undock console" msgstr "" -#: FOutput.form:116 +#: FOutput.form:121 msgid "Keep above" msgstr "" -#: FOutput.form:123 +#: FOutput.form:128 msgid "Clear console" msgstr "" -#: FOutput.form:152 +#: FOutput.form:157 msgid "Search..." msgstr "" -#: FOutput.form:163 +#: FOutput.form:171 msgid "Use system charset" msgstr "" +#: FOutput.form:186 +msgid "^C" +msgstr "" + +#: FOutput.form:192 +msgid "^Z" +msgstr "" + +#: FOutput.form:197 +msgid "^D" +msgstr "" + #: FOutput.class:32 msgid "" "Welcome to the Gambas console.\n" @@ -5567,210 +5579,210 @@ msgstr "" msgid "Cannot open project file :\n" msgstr "" -#: Project.module:1337 +#: Project.module:1338 msgid "The following classes have circular inheritance:" msgstr "" -#: Project.module:1498 +#: Project.module:1499 msgid "read-only" msgstr "" -#: Project.module:1500 +#: Project.module:1501 msgid "ALPHA VERSION, USE AT YOUR OWN RISK! :-)" msgstr "" -#: Project.module:1765 +#: Project.module:1766 msgid "Loading &1..." msgstr "" -#: Project.module:1814 +#: Project.module:1815 msgid "Cannot open a binary file." msgstr "" -#: Project.module:1847 +#: Project.module:1848 msgid "Cannot open file." msgstr "" -#: Project.module:1905 +#: Project.module:1906 msgid "File not found!" msgstr "" -#: Project.module:2007 +#: Project.module:2008 msgid "first" msgstr "" -#: Project.module:2009 +#: Project.module:2010 msgid "second" msgstr "" -#: Project.module:2011 +#: Project.module:2012 msgid "third" msgstr "" -#: Project.module:2013 +#: Project.module:2014 msgid "&1th" msgstr "" -#: Project.module:2063 +#: Project.module:2064 msgid "in form definition" msgstr "" -#: Project.module:2070 +#: Project.module:2071 msgid "in &1." msgstr "" -#: Project.module:2224 +#: Project.module:2225 msgid "" "Some project source files are in conflict.\n" "Please solve them if you want to compile the project." msgstr "" -#: Project.module:2228 +#: Project.module:2229 msgid "Compiling project" msgstr "" -#: Project.module:2242 +#: Project.module:2243 msgid "Nothing to do." msgstr "" -#: Project.module:2441 +#: Project.module:2442 msgid "File already exists." msgstr "" -#: Project.module:2474 +#: Project.module:2475 msgid "Directory already exists." msgstr "" -#: Project.module:2486 +#: Project.module:2487 msgid "Cannot link template file." msgstr "" -#: Project.module:2492 +#: Project.module:2493 msgid "Cannot copy template file." msgstr "" -#: Project.module:2690 +#: Project.module:2691 msgid "Making executable..." msgstr "" -#: Project.module:2734 +#: Project.module:2735 msgid "Cannot make executable." msgstr "" -#: Project.module:3070 +#: Project.module:3071 msgid "Some components are missing: &1" msgstr "" -#: Project.module:3287 +#: Project.module:3288 msgid "Cannot write project file." msgstr "" -#: Project.module:3319 +#: Project.module:3320 msgid "Unable to create desktop shortcut." msgstr "" -#: Project.module:3565 +#: Project.module:3566 msgid "The directory will be removed at the next commit." msgstr "" -#: Project.module:3582 +#: Project.module:3583 msgid "You must define a startup class or form!" msgstr "" -#: Project.module:3613 +#: Project.module:3614 msgid "Please type a name." msgstr "" -#: Project.module:3617 +#: Project.module:3618 msgid "This name contains a forbidden character:" msgstr "" -#: Project.module:3621 +#: Project.module:3622 msgid "The name cannot begins with a dot." msgstr "" -#: Project.module:3625 +#: Project.module:3626 msgid "This name is already used. Choose another one." msgstr "" -#: Project.module:3661 +#: Project.module:3662 msgid "" "A class name must begin with a letter or an underscore, followed by any " "letter or digit." msgstr "" -#: Project.module:3709 +#: Project.module:3710 msgid "Destination already exists" msgstr "" -#: Project.module:3915 +#: Project.module:3916 msgid "Unable to rename '&1'" msgstr "" -#: Project.module:4031 +#: Project.module:4032 msgid "Please type a project name." msgstr "" -#: Project.module:4039 +#: Project.module:4040 msgid "The project name cannot begin with a dot." msgstr "" -#: Project.module:4042 +#: Project.module:4043 msgid "Non-ASCII characters are forbidden in a project name." msgstr "" -#: Project.module:4043 +#: Project.module:4044 msgid "" "The following characters are forbidden in a project name: ? * / \\ SPACE" msgstr "" -#: Project.module:4050 +#: Project.module:4051 msgid "This project already exists." msgstr "" -#: Project.module:4053 +#: Project.module:4054 msgid "The project directory already exists." msgstr "" -#: Project.module:4055 +#: Project.module:4056 msgid "" "The project directory cannot be created because a file with the same name " "already exists." msgstr "" -#: Project.module:4102 +#: Project.module:4103 msgid "Create source package" msgstr "" -#: Project.module:4103 +#: Project.module:4104 msgid "Source packages" msgstr "" -#: Project.module:4380 +#: Project.module:4381 msgid "Cannot copy file &1." msgstr "" -#: Project.module:4429 +#: Project.module:4430 msgid "Cannot create link &1." msgstr "" -#: Project.module:4446 +#: Project.module:4447 msgid "Cannot move a directory inside itself." msgstr "" -#: Project.module:4514 +#: Project.module:4515 msgid "Cannot move file &1." msgstr "" -#: Project.module:5206 +#: Project.module:5207 msgid "Project cleanup..." msgstr "" -#: Project.module:5212 +#: Project.module:5213 msgid "Project files conversion..." msgstr "" -#: Project.module:5242 +#: Project.module:5243 msgid "Unable to convert &1" msgstr "" diff --git a/app/src/gambas3/.src/Debug/Design.module b/app/src/gambas3/.src/Debug/Design.module index 3f9c4d3d7..a25c930d1 100644 --- a/app/src/gambas3/.src/Debug/Design.module +++ b/app/src/gambas3/.src/Debug/Design.module @@ -995,6 +995,11 @@ Public Function IsRunning() As Boolean End +Public Sub GetProcess() As Process + + Return $hProcess + +End Public Sub Send(sStr As String) diff --git a/app/src/gambas3/.src/Debug/FOutput.class b/app/src/gambas3/.src/Debug/FOutput.class index d57c43440..b61d62c7a 100644 --- a/app/src/gambas3/.src/Debug/FOutput.class +++ b/app/src/gambas3/.src/Debug/FOutput.class @@ -221,7 +221,8 @@ End Public Sub OnProjectDebug() btnAbove.Visible = Project.Running And btnUndock.Value - Me.Stacking = If(Project.Running And btnAbove.Value, Window.Above, Window.Normal) + If btnUndock.Value Then Me.Stacking = If(Project.Running And btnAbove.Value, Window.Above, Window.Normal) + 'panControl.Visible = Project.Running End @@ -324,3 +325,16 @@ Public Sub btnSearch_Click() FSearch.WakeUp(False) End + + +Public Sub btnControl_Click() + + Design.Send(Chr$(Asc(Right$(Last.Text)) - 64)) + +End + +Public Sub btnCtrlD_Click() + + Print #Design.GetProcess(), Chr$(4); + +End diff --git a/app/src/gambas3/.src/Debug/FOutput.form b/app/src/gambas3/.src/Debug/FOutput.form index 2d31412ee..97425b4dc 100644 --- a/app/src/gambas3/.src/Debug/FOutput.form +++ b/app/src/gambas3/.src/Debug/FOutput.form @@ -109,12 +109,37 @@ } { sepCharset Separator MoveScaled(40,0,1,4) + Visible = False } { chkCharset CheckBox - MoveScaled(41,0,28,4) + MoveScaled(41,0,19,4) + Visible = False Expand = True + AutoResize = True Text = ("Use system charset") } + { panControl HBox + MoveScaled(64,0,14,4) + Visible = False + { sepControl Separator + MoveScaled(0,0,1,4) + Visible = False + } + { btnCtrlC ToolButton btnControl + Name = "btnCtrlC" + MoveScaled(1,0,4,4) + Text = ("^C") + } + { btnCtrlZ ToolButton btnControl + Name = "btnCtrlZ" + MoveScaled(5,0,4,4) + Text = ("^Z") + } + { btnCtrlD ToolButton + MoveScaled(9,0,4,4) + Text = ("^D") + } + } } { edtOutput Editor MoveScaled(1,9,38,39) diff --git a/app/src/gambas3/.src/Project.module b/app/src/gambas3/.src/Project.module index 62ed6df46..143600bc6 100644 --- a/app/src/gambas3/.src/Project.module +++ b/app/src/gambas3/.src/Project.module @@ -898,7 +898,7 @@ Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture Dim hProject As CProjectInfo Dim sLink As String Dim bExported As Boolean - + If iSize Then sPrefix = "icon:/" & iSize sLocalPrefix = "img/" & iSize @@ -931,6 +931,7 @@ Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture Else bConflict = VersionControl.InConflict(sPath) + sIcon = sPrefix &/ "file" sExt = File.Ext(sPath) diff --git a/app/src/gambas3/.src/Project/CProjectTree.class b/app/src/gambas3/.src/Project/CProjectTree.class index f3f88b382..ee4a54264 100644 --- a/app/src/gambas3/.src/Project/CProjectTree.class +++ b/app/src/gambas3/.src/Project/CProjectTree.class @@ -466,6 +466,7 @@ Private Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture Dim hPict As Picture Dim hStartup As Picture Dim sKey As String + Dim sCacheKey As String Dim bLink As Boolean Dim sIcon As String Dim sExt As String @@ -483,6 +484,7 @@ Private Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture Dim bAdded As Boolean Dim hProject As CProjectInfo Dim sLink As String + Dim bExported As Boolean If iSize Then sPrefix = "icon:/" & iSize @@ -515,7 +517,7 @@ Private Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture Else - bConflict = VersionControl.InConflict(sPath) + 'bConflict = VersionControl.InConflict(sPath) sIcon = sPrefix &/ "file" sExt = File.Ext(sPath) @@ -526,6 +528,9 @@ Private Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture sModule = sExt sIcon = sExt & "-" & iSize bStartup = File.BaseName(sPath) = $hInfo.Startup And Not bNoStartup + If sExt = "class" Or If sExt = "module" Then + bExported = Project.IsExported(sPath) + Endif Endif Case "jpg", "jpeg", "xpm", "bmp", "png", "gif" @@ -567,13 +572,13 @@ Private Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture End With If Left$(sIcon) = "/" Then - + Try hImage = Image.Load(sIcon) If hImage Then - If iSize Then - hImage = hImage.Stretch(hImage.Width * iSize / hImage.Height, iSize) - Else + If iSize Then + hImage = hImage.Stretch(hImage.Width * iSize / hImage.Height, iSize) + Else iSize = 32 If hImage.Height > iSize Then hImage = hImage.Stretch(hImage.Width * iSize / hImage.Height, iSize) @@ -581,10 +586,10 @@ Private Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture If hImage.Width > iSize Then hImage = hImage.Stretch(iSize, hImage.Height * iSize / hImage.Width) Endif - Endif - + Endif + 'hPict = hImage.Picture - Else + Else hImage = Picture[sPrefix &/ "image"].Image Endif @@ -592,29 +597,33 @@ Private Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture If bLocked Then hImage = AddEmblem(hImage, "icon:/32/lock") If bAdded Then hImage = AddEmblem(hImage, "icon:/32/add") - If bLink Then + If bLink Then hImage = AddLinkEmblem(hImage) Endif - + hPict = hImage.Picture Else - sKey = sIcon - If bLink Then sKey = File.Dir(sKey) &/ File.BaseName(sKey) & "-link" & ".png" - If bStartup Then sKey = File.Dir(sKey) &/ File.BaseName(sKey) & "-startup" & ".png" - If bConflict Then sKey = File.Dir(sKey) &/ File.BaseName(sKey) & "-conflict" & ".png" - If bLocked Then sKey = File.Dir(sKey) &/ File.BaseName(sKey) & "-locked" & ".png" - If bAdded Then sKey = File.Dir(sKey) &/ File.BaseName(sKey) & "-added" & ".png" - + sKey = File.Dir(sIcon) &/ File.BaseName(sIcon) & "-" + If bLink Then sKey &= "l" + If bStartup Then sKey &= "s" + If bConflict Then sKey &= "c" + If bLocked Then sKey &= "k" + If bAdded Then sKey &= "a" + If bExported Then sKey &= "x" + If Right(sKey) = "-" Then sKey = Left(sKey, -1) + sKey &= ".png" + 'hPict = NULL 'IF NOT bNoStartup THEN hPict = Picture[sKey] - - Try hPict = Picture[sKey] - If Not hPict Then - + + sCacheKey = Replace(sKey, "icon:/", "$/") + Try hPict = Picture[sCacheKey] + If Not hPict Then + If sModule Then - hImage = Project.MakeModuleIcon(sModule, iSize) + hImage = Project.MakeModuleIcon(sModule, iSize, bStartup, bExported) Else Try hImage = Picture[sIcon].Image If Error Then hImage = Picture[sPrefix &/ "file"].Image @@ -622,26 +631,26 @@ Private Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture 'If Not hPict Then hPict = Picture[sPrefix &/ "file"] 'If Not hPict Then hPict = Picture["img/16/unknown.png"] 'hPict = hPict.Copy() - - If bStartup Then hImage = AddEmblem(hImage, "icon:/32/play") + + 'If bStartup Then hImage = AddEmblem(hImage, "icon:/32/play") If bConflict Then hImage = AddEmblem(hImage, "icon:/32/warning") If bLocked Then hImage = AddEmblem(hImage, "icon:/32/lock") If bAdded Then hImage = AddEmblem(hImage, "icon:/32/add") - If iSize Then - hImage = hImage.Stretch(hImage.Width * iSize / hImage.Height, iSize) - Endif + If iSize Then + hImage = hImage.Stretch(hImage.Width * iSize / hImage.Height, iSize) + Endif - If bLink Then + If bLink Then hImage = AddLinkEmblem(hImage) Endif - - hPict = hImage.Picture - - If Not bNoStartup Then Picture[sKey] = hPict - Endif - + hPict = hImage.Picture + + If Not bNoStartup Then Picture[sCacheKey] = hPict + + Endif + Endif Return hPict diff --git a/app/src/gambas3/.src/Project/FCreateFile.class b/app/src/gambas3/.src/Project/FCreateFile.class index 453651832..f7572f1d0 100644 --- a/app/src/gambas3/.src/Project/FCreateFile.class +++ b/app/src/gambas3/.src/Project/FCreateFile.class @@ -216,11 +216,12 @@ Private Sub CreateFile() As Boolean Project.InsertSource(sName, "class", $sDir, sTemp, True, True) sTemp = Project.FORM_MAGIC & "\n\n" & - "{ " & sName & " " & UCase(Left(sType)) & Mid$(sType, 2) & "\n" & - " MoveScaled(0,0,68,64)\n" + "{ " & sName & " " & UCase(Left(sType)) & Mid$(sType, 2) & "\n" If sType = "form" Then + sTemp &= " MoveScaled(0,0,64,64)\n" + If chkDialog.Value Then sTemp &= " Resizable = False\n" " Arrangement = Arrange.Vertical\n" @@ -246,6 +247,10 @@ Private Sub CreateFile() As Boolean "}\n" Endif + Else If sType = "report" Then + + sTemp &= " #MoveScaled(0,0,64,64)\n" + Endif sTemp &= "}\n" diff --git a/app/src/gambas3/support.txt b/app/src/gambas3/support.txt index ed9fcbf3b..0d36270bd 100644 --- a/app/src/gambas3/support.txt +++ b/app/src/gambas3/support.txt @@ -1,6 +1,6 @@ 37 GNU/Linex 33 Radoslav Dejanovic -30 Maurizio Da Lio +32 Maurizio Da Lio 18 Kari Laine 16 DistroWatch.com 15 Yvick Miossec diff --git a/examples/examples/Misc/Console/.src/FConsole.class b/examples/examples/Misc/Console/.src/FConsole.class index 3c9b44df4..d9a9947f5 100644 --- a/examples/examples/Misc/Console/.src/FConsole.class +++ b/examples/examples/Misc/Console/.src/FConsole.class @@ -107,25 +107,27 @@ Static Private Function Normalize(sStr As String) As String Dim iCar As Integer Dim bEsc As Boolean - For iInd = 1 To Len(sStr) - - iCar = Asc(sStr, iInd) - - If iCar = 27 Then - bEsc = True - Continue - Endif - - If bEsc Then - If iCar < 32 Then bEsc = False - Continue - Endif - - If iCar < 32 And iCar <> 10 Then iCar = 32 - - sNorm = sNorm & Chr$(iCar) - - Next + ' For iInd = 1 To Len(sStr) + ' + ' iCar = Asc(sStr, iInd) + ' + ' If iCar = 27 Then + ' bEsc = True + ' Continue + ' Endif + ' + ' If bEsc Then + ' If iCar < 32 Then bEsc = False + ' Continue + ' Endif + ' + ' If iCar < 32 And iCar <> 10 Then iCar = 32 + ' + ' sNorm = sNorm & Chr$(iCar) + ' + ' Next + + sNorm = sStr If System.Charset = Desktop.Charset Then Return sNorm