diff --git a/app/src/gambas3/.lang/.pot b/app/src/gambas3/.lang/.pot index b55911859..ae979ca79 100644 --- a/app/src/gambas3/.lang/.pot +++ b/app/src/gambas3/.lang/.pot @@ -286,7 +286,7 @@ msgstr "" msgid "Provides" msgstr "" -#: CInsertColor.class:106 FEditor.form:409 FTextEditor.form:342 +#: CInsertColor.class:106 FEditor.form:409 FTextEditor.form:350 msgid "Insert color" msgstr "" @@ -377,7 +377,7 @@ msgstr "" #: FReportCoordChooser.form:26 FReportPaddingChooser.form:75 FSave.form:28 #: FSaveProjectAs.form:59 FSearch.class:838 FSelectExtraFile.form:40 #: FSelectIcon.form:87 FSnippet.form:57 FTableChooser.form:68 FText.form:41 -#: FTextEditor.class:496 FTranslate.class:636 Project.module:424 +#: FTextEditor.class:498 FTranslate.class:636 Project.module:424 msgid "Cancel" msgstr "" @@ -509,41 +509,41 @@ msgstr "" #: FCommit.form:91 FConflict.form:53 FConnectionEditor.form:361 #: FEditor.form:144 FForm.form:228 FIconEditor.form:103 FImageEditor.form:71 -#: FMenu.form:107 FOutput.form:58 FTextEditor.form:93 +#: FMenu.form:107 FOutput.form:58 FTextEditor.form:101 msgid "Cut" msgstr "" #: FCommit.form:97 FConflict.form:59 FConnectionEditor.form:146 #: FEditor.form:150 FForm.form:235 FIconEditor.form:111 FImageEditor.form:80 -#: FMenu.form:113 FOutput.form:65 FTextEditor.form:100 +#: FMenu.form:113 FOutput.form:65 FTextEditor.form:108 msgid "Copy" msgstr "" #: FCommit.form:103 FConflict.form:65 FConnectionEditor.form:382 #: FEditor.form:157 FForm.form:248 FIconEditor.form:119 FImageEditor.form:89 -#: FMenu.form:119 FOutput.form:72 FPasteTable.form:101 FTextEditor.form:107 +#: FMenu.form:119 FOutput.form:72 FPasteTable.form:101 FTextEditor.form:115 msgid "Paste" msgstr "" #: FCommit.form:109 FConflict.form:71 FConnectionEditor.form:389 #: FEditor.form:128 FForm.form:211 FIconEditor.form:87 FImageEditor.form:99 -#: FOption.form:611 FOutput.form:41 FTextEditor.form:76 +#: FOption.form:611 FOutput.form:41 FTextEditor.form:84 msgid "Undo" msgstr "" #: FCommit.form:115 FConflict.form:77 FConnectionEditor.form:396 #: FEditor.form:135 FForm.form:218 FImageEditor.form:107 FOutput.form:48 -#: FTextEditor.form:83 +#: FTextEditor.form:91 msgid "Redo" msgstr "" #: FCommit.form:121 FConflict.form:83 FEditor.form:434 FMenu.form:129 -#: FTextEditor.form:301 +#: FTextEditor.form:309 msgid "Indent" msgstr "" #: FCommit.form:127 FConflict.form:89 FEditor.form:442 FMenu.form:135 -#: FTextEditor.form:308 +#: FTextEditor.form:316 msgid "Unindent" msgstr "" @@ -665,13 +665,13 @@ msgstr "" #: FConnectionEditor.form:101 FEditor.form:313 FForm.form:403 #: FIconEditor.form:72 FImageEditor.form:54 FMenu.class:64 -#: FTextEditor.form:219 +#: FTextEditor.form:227 msgid "Save" msgstr "" #: FConnectionEditor.form:109 FEditor.form:307 FForm.form:397 #: FHelpBrowser.form:67 FIconEditor.form:79 FImageEditor.form:62 -#: FTextEditor.form:213 FTranslate.class:730 +#: FTextEditor.form:221 FTranslate.class:730 msgid "Reload" msgstr "" @@ -1301,7 +1301,7 @@ msgstr "" msgid "Go to" msgstr "" -#: FEditor.form:99 FTextEditor.form:67 +#: FEditor.form:99 FTextEditor.form:68 msgid "Go to line..." msgstr "" @@ -1317,15 +1317,15 @@ msgstr "" msgid "&Startup class" msgstr "" -#: FEditor.form:167 FTextEditor.form:117 +#: FEditor.form:167 FTextEditor.form:125 msgid "Select &All" msgstr "" -#: FEditor.form:176 FOutput.form:89 FTextEditor.form:126 +#: FEditor.form:176 FOutput.form:89 FTextEditor.form:134 msgid "Find next" msgstr "" -#: FEditor.form:183 FOutput.form:96 FTextEditor.form:133 +#: FEditor.form:183 FOutput.form:96 FTextEditor.form:141 msgid "Find previous" msgstr "" @@ -1341,15 +1341,15 @@ msgstr "" msgid "&Watch expression" msgstr "" -#: FEditor.form:214 FTextEditor.form:142 +#: FEditor.form:214 FTextEditor.form:150 msgid "Advanced" msgstr "" -#: FEditor.form:218 FTextEditor.form:153 +#: FEditor.form:218 FTextEditor.form:161 msgid "Lower case" msgstr "" -#: FEditor.form:225 FTextEditor.form:146 +#: FEditor.form:225 FTextEditor.form:154 msgid "Upper case" msgstr "" @@ -1365,7 +1365,7 @@ msgstr "" msgid "Paste special..." msgstr "" -#: FEditor.form:259 FTextEditor.form:163 +#: FEditor.form:259 FTextEditor.form:171 msgid "Insert color..." msgstr "" @@ -1377,19 +1377,19 @@ msgstr "" msgid "Sort procedures..." msgstr "" -#: FEditor.form:277 FTextEditor.form:183 +#: FEditor.form:277 FTextEditor.form:191 msgid "View" msgstr "" -#: FEditor.form:281 FTextEditor.form:187 +#: FEditor.form:281 FTextEditor.form:195 msgid "No split" msgstr "" -#: FEditor.form:288 FTextEditor.form:194 +#: FEditor.form:288 FTextEditor.form:202 msgid "Horizontal split" msgstr "" -#: FEditor.form:295 FTextEditor.form:201 +#: FEditor.form:295 FTextEditor.form:209 msgid "Vertical split" msgstr "" @@ -1429,7 +1429,7 @@ msgstr "" msgid "Procedure list" msgstr "" -#: FEditor.class:2366 FIconEditor.class:2048 FTextEditor.class:496 +#: FEditor.class:2366 FIconEditor.class:2048 FTextEditor.class:498 msgid "" "The file has been modified.\n" "\n" @@ -1543,7 +1543,7 @@ msgstr "" msgid "Change into" msgstr "" -#: FForm.form:136 +#: FForm.form:136 FTextEditor.form:74 msgid "Open code" msgstr "" @@ -1659,7 +1659,7 @@ msgstr "" msgid "Menu editor..." msgstr "" -#: FForm.form:435 FTextEditor.form:251 +#: FForm.form:435 FTextEditor.form:259 msgid "Code" msgstr "" @@ -1892,7 +1892,7 @@ msgid "" "Do you want to save it ?" msgstr "" -#: FImageEditor.form:48 FTextEditor.form:229 +#: FImageEditor.form:48 FTextEditor.form:237 msgid "Text editor" msgstr "" @@ -4015,23 +4015,23 @@ msgstr "" msgid "Use a fixed font" msgstr "" -#: FTextEditor.form:169 +#: FTextEditor.form:177 msgid "Compress file" msgstr "" -#: FTextEditor.form:175 +#: FTextEditor.form:183 msgid "Uncompress file" msgstr "" -#: FTextEditor.class:691 +#: FTextEditor.class:693 msgid "The file has been compressed from &1 to &2 bytes (&3)." msgstr "" -#: FTextEditor.class:691 +#: FTextEditor.class:693 msgid "Original file has been saved in the Project folder." msgstr "" -#: FTextEditor.class:697 +#: FTextEditor.class:699 msgid "Unable to compress file." msgstr "" diff --git a/app/src/gambas3/.src/Component/CComponent.class b/app/src/gambas3/.src/Component/CComponent.class index 18e7f11fd..b06b4a1a2 100644 --- a/app/src/gambas3/.src/Component/CComponent.class +++ b/app/src/gambas3/.src/Component/CComponent.class @@ -1174,7 +1174,7 @@ Static Public Function GetClassSymbols(sClass As String) As Collection For Each sFamily In CFamily.List sPath = Project.FindPath(sClass & "." & sFamily) If Exist(sPath) Then - hPForm = Project.LoadFile(sPath) + Try hPForm = Project.LoadFile(sPath) Break Endif Next diff --git a/app/src/gambas3/.src/Editor/Code/FEditor.class b/app/src/gambas3/.src/Editor/Code/FEditor.class index b23b38b4a..60cf4b957 100644 --- a/app/src/gambas3/.src/Editor/Code/FEditor.class +++ b/app/src/gambas3/.src/Editor/Code/FEditor.class @@ -3111,7 +3111,7 @@ End Public Sub panToolBar_Configure() If $sModule Then - btnForm.Picture = Picture["img/16/" & $sModule & ".png"] + Action[".show-form"].Picture = Picture["img/16/" & $sModule & ".png"] btnForm.ToolTip = CModule[$sModule].Name btnForm.Show Else @@ -3356,6 +3356,7 @@ Public Sub mnuPretty_Click() Y = Editor.Line Editor.Begin If Not bSelected Then Editor.SelectAll + Print Editor.Selection.Text Editor.Insert(sNewText) Editor.Goto(Y, X) Editor.End diff --git a/app/src/gambas3/.src/Editor/Code/FEditor.form b/app/src/gambas3/.src/Editor/Code/FEditor.form index c29c73bb6..812e82166 100644 --- a/app/src/gambas3/.src/Editor/Code/FEditor.form +++ b/app/src/gambas3/.src/Editor/Code/FEditor.form @@ -21,7 +21,7 @@ Shortcut = "F2" } { mnuForm Menu - Action = ".code-form" + Action = ".show-form" Text = ("Open form") Picture = Picture["img/16/form.png"] Shortcut = "F12" @@ -458,11 +458,6 @@ Shortcut = "F9" Picture = "icon:/small/halt" } - { Action code-form - Text = "Open form" - Shortcut = "F12" - Picture = "img/16/form.png" - } { Action color Text = "Insert color..." Shortcut = "" @@ -560,7 +555,8 @@ Shortcut = "Ctrl+A" } { Action show-form - Text = "Form" + Text = "Open form" + Shortcut = "F12" Picture = "img/16/form.png" } { Action startup-class diff --git a/app/src/gambas3/.src/Editor/Other/FTextEditor.class b/app/src/gambas3/.src/Editor/Other/FTextEditor.class index 07d6ff53f..85ff6c87f 100644 --- a/app/src/gambas3/.src/Editor/Other/FTextEditor.class +++ b/app/src/gambas3/.src/Editor/Other/FTextEditor.class @@ -47,9 +47,11 @@ Public Sub _new(sPath As String, Optional bModule As Boolean) If bModule Then btnShowCode.Visible = True + mnuShowCode.Show Me.Name = File.BaseName(Path) Else btnShowCode.Visible = False + mnuShowCode.Hide Me.Name = File.Name(Path) Endif diff --git a/app/src/gambas3/.src/Editor/Other/FTextEditor.form b/app/src/gambas3/.src/Editor/Other/FTextEditor.form index 2c6e1b604..88d4d893e 100644 --- a/app/src/gambas3/.src/Editor/Other/FTextEditor.form +++ b/app/src/gambas3/.src/Editor/Other/FTextEditor.form @@ -12,6 +12,12 @@ Text = ("Go to line...") Shortcut = "Ctrl+G" } + { mnuShowCode Menu + Action = ".show-code" + Text = ("Open code") + Picture = Picture["img/16/class.png"] + Shortcut = "F12" + } { Menu3 Menu } { mnuUndo Menu @@ -358,6 +364,11 @@ Text = "Code" Picture = "img/16/class.png" } + { Action show-code + Text = "Open code" + Shortcut = "F12" + Picture = "img/16/class.png" + } { Action ucase Text = "Upper case" Shortcut = "Ctrl+Shift+U" diff --git a/app/src/gambas3/.src/Project.module b/app/src/gambas3/.src/Project.module index 1277f10df..0277026a7 100644 --- a/app/src/gambas3/.src/Project.module +++ b/app/src/gambas3/.src/Project.module @@ -2067,7 +2067,7 @@ Private Sub CompileError(sMsg As String) sErr = TranslateMessage(sMsg) - If hForm And If iLine >= hForm.Editor.Lines.Count Then + If hForm And If iLine > hForm.Editor.Lines.Count Then SetMessage(File.BaseName(sFile) & ": " & sErr & " " & ("in form definition")) sMsg = "" & sErr & " " & ("in form definition") Else If iLine >= 1 Then diff --git a/comp/src/gb.web/.src/WebPage.class b/comp/src/gb.web/.src/WebPage.class index 90dcef956..28cfcab21 100644 --- a/comp/src/gb.web/.src/WebPage.class +++ b/comp/src/gb.web/.src/WebPage.class @@ -5,7 +5,11 @@ Create Static Static Public Sub Main() - + Dim hObject As Object + + hObject = Application.Startup.AutoCreate() + If Not hObject Is WebPage Then Return + hObject.Render End diff --git a/comp/src/gb.web/.src/Webpage1.class b/comp/src/gb.web/.src/Webpage1.class index 0a5fa73ac..6cc783315 100644 --- a/comp/src/gb.web/.src/Webpage1.class +++ b/comp/src/gb.web/.src/Webpage1.class @@ -1,2 +1,3 @@ ' Gambas class file + diff --git a/comp/src/gb.web/.src/Webpage1.webpage b/comp/src/gb.web/.src/Webpage1.webpage index 69aadd204..6ebfc540d 100644 --- a/comp/src/gb.web/.src/Webpage1.webpage +++ b/comp/src/gb.web/.src/Webpage1.webpage @@ -1,6 +1,6 @@ - -
-