From 546947d967aadb562222b82a810046e32d8a8ecd Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Tue, 24 May 2016 01:35:28 -0300 Subject: [PATCH] Show compilation progress (BASIC -> C++) in the status bar. The only indication that the program was being compiled was the "..." on the status area. Now, if you hit F5 (or F11) and your program is still being compiled to C++, you will see a progress indicator on the bottom status line. Also: - Display "Start typing to search for text in this help page" upon invoking the help system (the search functionality is already built-in). --- source/global/version.bas | 2 +- source/ide/ide_methods.bas | 59 +++++++++++++++++++++++++++----------- 2 files changed, 44 insertions(+), 17 deletions(-) diff --git a/source/global/version.bas b/source/global/version.bas index bce1b0565..b8a0481c4 100644 --- a/source/global/version.bas +++ b/source/global/version.bas @@ -3,5 +3,5 @@ DIM SHARED BuildNum AS STRING Version$ = "1.000" 'BuildNum format is YYYYMMDD/id, where id is a ever-increasing 'integer. If you make a change, update the date and increase the id! -BuildNum$ = "20160507/14" +BuildNum$ = "20160524/15" diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index f540c16cb..a01e5e319 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -91,11 +91,28 @@ IF ASC(idecommand$) = 3 THEN 'request next line (compiler->ide) idecompiledline$ = idegetline(idecompiledline) ide = 4 idereturn$ = idecompiledline$ + + 'Update compilation progress on the status bar + IF IdeSystem <> 3 AND ideautorun <> 0 THEN + status.progress$ = str2$(INT((idecompiledline * 100) / iden)) + status.progress$ = STRING$(3 - LEN(status.progress$), 32) + status.progress$ + "%)" + IF prepass THEN + status.progress$ = "Step 1/2 (" + status.progress$ + ELSE + status.progress$ = "Step 2/2 (" + status.progress$ + END IF + IdeInfo = status.progress$ + END IF + UpdateIdeInfo + EXIT FUNCTION END IF IF iCHANGED THEN iCHECKLATER = 1 END IF 'ideexit END IF 'not on screen + ELSE + IF IdeSystem <> 3 THEN IdeInfo = "" + UpdateIdeInfo END IF 'idecompiledline 20 THEN a$ = string$(3, 250) + RIGHT$(a$, 17) - a$ = "[" + a$ + "](DELETE=next)" + IF IdeSystem = 3 THEN + a$ = "" + IF LEN(Help_Search_Str) THEN + a$ = Help_Search_Str + IF LEN(a$) > 20 THEN a$ = string$(3, 250) + RIGHT$(a$, 17) + a$ = "[" + a$ + "](DELETE=next)" + IdeInfo = a$ + ELSE + IdeInfo = "Start typing to search for text in this help page" + END IF + ELSE + IdeInfo = "" END IF - IdeInfo$ = a$ + UpdateIdeInfo + ELSE + Help_Search_Str = "" END IF IF IdeSystem = 2 THEN 'override cursor position @@ -920,16 +947,6 @@ DO SCREEN , , 3, 0 END IF - - IF IdeSystem <> 3 THEN IdeInfo$ = "" - - 'show info message (if any) - a$ = IdeInfo$ - IF LEN(a$) > 60 THEN a$ = LEFT$(a$, 57) + string$(3, 250) - IF LEN(a$) < 60 THEN a$ = a$ + SPACE$(60 - LEN(a$)) - COLOR 0, 3: LOCATE idewy + idesubwindow, 2 - PRINT a$; - LOCATE , , 1 @@ -12611,5 +12628,15 @@ SUB AddQuickNavHistory(LineNumber&) QuickNavHistory(QuickNavTotal) = LineNumber& END SUB +SUB UpdateIdeInfo + 'show info message (if any) + a$ = IdeInfo + IF LEN(a$) > 60 THEN a$ = LEFT$(a$, 57) + string$(3, 250) + IF LEN(a$) < 60 THEN a$ = a$ + SPACE$(60 - LEN(a$)) + COLOR 0, 3: LOCATE idewy + idesubwindow, 2 + PRINT a$; + PCOPY 3, 0 +END SUB + '$INCLUDE:'wiki\wiki_methods.bas'