Skip to content
Commits on Source (3)
  • gambas's avatar
    Add three new color constants for syntax highlighting: Escape, Label and Constant. · a73c2ed4
    gambas authored
    [COMPILER]
    * NEW: Rename a macro constant to avoid a symbol clash when compiling the interpreter.
    
    [INTERPRETER]
    * NEW: Get rid of a macro trick in 'gbx_eval.h' header.
    
    [GB.EVAL]
    * NEW: Highlight: Add three new color constants for syntax highlighting: Escape, Label and Constant.
    * NEW: Rename some source files.
    * NEW: Rename some constants.
    * NEW: Gambas syntax highlighter now use the three new contants for escape characters in strings, for labels, and for language contants (True, False, Null, +Inf and -Inf).
    
    [GB.EVAL.HIGHLIGHT]
    * NEW: Support for the new syntax highlighting color constants.
    
    [GB.FORM.EDITOR]
    * NEW: Support for the new syntax highlighting color constants.
    a73c2ed4
  • gambas's avatar
    [DEVELOPMENT ENVIRONMENT] · 2374407b
    gambas authored
    * NEW: Update highlighting themes by defining the new color constants.
    * NEW: Update French translation.
    * BUG: Option dialog: The highlighting color panel now takes the editor font size into account.
    
    [GB.EVAL]
    * BUG: Fix string highlighting.
    2374407b
  • gambas's avatar
    FileChooser: After having uncompressed a file, calls the event loop before... · 7e392841
    gambas authored
    FileChooser: After having uncompressed a file, calls the event loop before refreshing the views so that the possible inotify events are processed.
    
    [GB.FORM]
    * NEW: FileChooser: After having uncompressed a file, calls the event loop before refreshing the views so that the possible inotify events are processed.
    7e392841
......@@ -222,7 +222,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gambas3 3.11.90\n"
"PO-Revision-Date: 2018-08-30 00:38 UTC\n"
"PO-Revision-Date: 2018-08-31 22:07 UTC\n"
"Last-Translator: benoit <benoit@benoit-kubuntu>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
......@@ -265,7 +265,7 @@ msgstr "Variables statiques"
msgid "Static methods"
msgstr "Méthodes statiques"
#: CClassInfo.class:606
#: CClassInfo.class:606 MTheme.module:6
msgid "Constants"
msgstr "Constantes"
......@@ -961,7 +961,7 @@ msgstr "ici"
msgid "IDE extensions"
msgstr "Extension de l'EDI"
#: CProjectList.class:543 CVersionControlGit.class:344 CWaitingAnimation.class:63 FColorChooser.form:68 FComponentChooser.form:98 FConflict.class:197 FConnectionEditor.class:470 FCrash.form:97 FCreateFile.form:204 FDebugExpr.form:46 FDebugInfo.form:267 FExportData.class:126 FFarmConfig.form:38 FFarmLogin.form:126 FFarmRegister.form:141 FFarmRequest.form:43 FFieldChooser.form:144 FFileProperty.class:144 FFontChooser.form:40 FGotoLine.form:23 FHelpBrowser.form:60 FImageOffsetSelection.form:33 FImageQuality.form:30 FImageResize.form:49 FImageRotate.form:32 FList.form:128 FMain.class:245 FMakeInstall.class:345 FMenu.form:405 FNewConnection.form:319 FNewTable.form:86 FNewTranslation.form:21 FOption.class:766 FPasteSpecial.form:86 FPasteTable.form:105 FProjectChooser.form:73 FProjectProperty.form:929 FProjectVersion.class:211 FProxy.form:57 FPublish.class:273 FReportBorderChooser.form:48 FReportBoxShadowChooser.form:27 FReportBrushChooser.form:36 FReportCoordChooser.form:26 FReportPaddingChooser.form:75 FSave.form:28 FSaveProjectAs.form:81 FSearch.class:900 FSelectComponent.form:39 FSelectExtraFile.form:43 FSelectIcon.form:87 FSelectLibrary.form:66 FSnippet.form:57 FSoftwareFarm.class:545 FTableChooser.form:68 FText.form:41 FTranslate.class:652 FVersionControl.form:77 FWebFontChooser.form:129 Project.module:548 VersionControl.module:376
#: CProjectList.class:543 CVersionControlGit.class:344 CWaitingAnimation.class:63 FColorChooser.form:68 FComponentChooser.form:98 FConflict.class:197 FConnectionEditor.class:470 FCrash.form:97 FCreateFile.form:204 FDebugExpr.form:46 FDebugInfo.form:267 FExportData.class:126 FFarmConfig.form:38 FFarmLogin.form:126 FFarmRegister.form:141 FFarmRequest.form:43 FFieldChooser.form:144 FFileProperty.class:144 FFontChooser.form:40 FGotoLine.form:23 FHelpBrowser.form:60 FImageOffsetSelection.form:33 FImageQuality.form:30 FImageResize.form:49 FImageRotate.form:32 FList.form:128 FMain.class:245 FMakeInstall.class:345 FMenu.form:405 FNewConnection.form:319 FNewTable.form:86 FNewTranslation.form:21 FOption.class:771 FPasteSpecial.form:86 FPasteTable.form:105 FProjectChooser.form:73 FProjectProperty.form:929 FProjectVersion.class:211 FProxy.form:57 FPublish.class:273 FReportBorderChooser.form:48 FReportBoxShadowChooser.form:27 FReportBrushChooser.form:36 FReportCoordChooser.form:26 FReportPaddingChooser.form:75 FSave.form:28 FSaveProjectAs.form:81 FSearch.class:900 FSelectComponent.form:39 FSelectExtraFile.form:43 FSelectIcon.form:87 FSelectLibrary.form:66 FSnippet.form:57 FSoftwareFarm.class:545 FTableChooser.form:68 FText.form:41 FTranslate.class:652 FVersionControl.form:77 FWebFontChooser.form:129 Project.module:548 VersionControl.module:376
msgid "Cancel"
msgstr "Annuler"
......@@ -1765,7 +1765,7 @@ msgstr "Nouveau"
msgid "Remove query"
msgstr "Supprimer la requête"
#: FConnectionEditor.form:374 FDebugInfo.class:279 FImageProperty.form:378 FList.form:93 FMakeInstall.form:762 FOption.class:766 FOutput.form:54 FPublish.form:171
#: FConnectionEditor.form:374 FDebugInfo.class:279 FImageProperty.form:378 FList.form:93 FMakeInstall.form:762 FOption.class:771 FOutput.form:54 FPublish.form:171
msgid "Clear"
msgstr "Effacer"
......@@ -1781,7 +1781,7 @@ msgstr "Exporter vers un fichier CSV"
msgid "Export"
msgstr "Exporter"
#: FConnectionEditor.form:485 FForm.form:183 FList.form:65 FMain.form:1041 FMenu.form:101 FNewConnection.class:402 FOption.class:931 FSoftwareFarm.class:647 FTranslate.form:87
#: FConnectionEditor.form:485 FForm.form:183 FList.form:65 FMain.form:1041 FMenu.form:101 FNewConnection.class:402 FOption.class:936 FSoftwareFarm.class:647 FTranslate.form:87
msgid "Delete"
msgstr "Supprimer"
......@@ -4181,59 +4181,59 @@ msgstr "Fichiers thèmes de coloration de Gambas"
msgid "Export a theme file"
msgstr "Exporter un fichier thème"
#: FOption.class:414
#: FOption.class:416
msgid "Select a theme file"
msgstr "Choisissez un fichier thème"
#: FOption.class:444
#: FOption.class:446
msgid "You need to restart the application to see your changes."
msgstr "Vous devez redémarrer l'application pour que vos changements prennent effet."
#: FOption.class:766
#: FOption.class:771
msgid "Do you really want to clear the documentation cache?"
msgstr "Voulez-vous réellement vider le cache de la documentation ?"
#: FOption.class:775
#: FOption.class:780
msgid "Unable to clear documentation cache."
msgstr "Impossible de vider le cache de la documentation."
#: FOption.class:931
#: FOption.class:936
msgid "Do you really want to delete this snippet?"
msgstr "Voulez-vous vraiment supprimer ce fragment ?"
#: FOption.class:1118
#: FOption.class:1123
msgid "Do you really want to install the Gambas font to your personal font directory?"
msgstr "Voulez-vous vraiment installer la police Gambas dans votre répertoire personnel de polices ?"
#: FOption.class:1118 FSoftwareFarm.class:586
#: FOption.class:1123 FSoftwareFarm.class:586
msgid "Install"
msgstr "Installer"
#: FOption.class:1221
#: FOption.class:1226
msgid "Unable to download documentation."
msgstr "Impossible de télécharger la documentation."
#: FOption.class:1231
#: FOption.class:1236
msgid "Unable to uncompress documentation."
msgstr "Impossible de décompresser la documentation."
#: FOption.class:1240
#: FOption.class:1245
msgid "Unable to install documentation."
msgstr "Impossible d'installer la documentation."
#: FOption.class:1265
#: FOption.class:1270
msgid "Network is not available."
msgstr "Le réseau est indisponible."
#: FOption.class:1270
#: FOption.class:1275
msgid "Documentation is up to date."
msgstr "La documentation est à-jour."
#: FOption.class:1275
#: FOption.class:1280
msgid "A new documentation is available!"
msgstr "Une nouvelle documentation est disponible !"
#: FOption.class:1280 MHelp.module:904
#: FOption.class:1285 MHelp.module:904
msgid "Documentation is not available."
msgstr "La documentation n'est pas disponible."
......@@ -7105,6 +7105,10 @@ msgstr "Liste d'URIs"
msgid "Unknown format"
msgstr "Format inconnu"
#: MTheme.module:6
msgid "Characters"
msgstr "Caractères"
#: MTheme.module:6
msgid "Comments"
msgstr "Commentaires"
......@@ -7133,6 +7137,10 @@ msgstr "Mise en évidence"
msgid "Keywords"
msgstr "Mots-clés"
#: MTheme.module:6
msgid "Labels"
msgstr "Étiquettes"
#: MTheme.module:6
msgid "Normal text"
msgstr "Texte normal"
......
......@@ -32,7 +32,7 @@ Description="Integrated Development Environment for Gambas"
Authors="Benoît Minisini\nFabien Bodard\nCharlie Reinl\nJosé Luis Redrejo\nRobert Rowe\nTobias Boege"
Arguments=[["-t","/home/benoit/gambas/git/master/app/src/gambas3"]]
CurrentArgument=0
Environment="GB_GUI=gb.qt5\nGB_DB_DEBUG=1"
Environment="GB_DB_DEBUG=1"
TabSize=2
Translate=1
Language=en
......
......@@ -46,8 +46,6 @@ Public Sub FromString(sStyle As String)
Foreground = iColor
Else If sStr = "Bold" Then
Bold = True
' Else If sStr = "Italic" Then
' Italic = True
Else If sStr = "Underline" Then
Underline = True
Endif
......
......@@ -2,8 +2,8 @@
Public Const DEFAULT_THEME As String = "gambas"
Public ColorKeys As String[] = ["Background", "Normal", "Keyword", "Datatype", "Function", "Operator", "Symbol", "Number", "String", "Comment", "Help", "Preprocessor", "Breakpoint", "Current", "Selection", "Highlight", "CurrentLine", "Error"]
Public ColorNames As String[] = [("Background"), ("Normal text"), ("Keywords"), ("Data types"), ("Subroutines"), ("Operators"), ("Symbols"), ("Numbers"), ("Strings"), ("Comments"), ("Help"), ("Preprocessor"), ("Breakpoints"), ("Current line"), ("Selection"), ("Highlighting"), ("Editing line"), ("Errors")]
Public ColorKeys As String[] = ["Background", "Normal", "Keyword", "Constant", "Datatype", "Function", "Operator", "Symbol", "Label", "Number", "String", "Escape", "Comment", "Help", "Preprocessor", "Breakpoint", "Current", "Selection", "Highlight", "CurrentLine", "Error"]
Public ColorNames As String[] = [("Background"), ("Normal text"), ("Keywords"), ("Constants"), ("Data types"), ("Subroutines"), ("Operators"), ("Symbols"), ("Labels"), ("Numbers"), ("Strings"), ("Characters"), ("Comments"), ("Help"), ("Preprocessor"), ("Breakpoints"), ("Current line"), ("Selection"), ("Highlighting"), ("Editing line"), ("Errors")]
Private $cDefault As Collection
......@@ -24,6 +24,7 @@ Public Function ReadSettings(hSettings As Settings, sParent As String, Optional
Dim cColor As New Collection
Dim sKey As String
Dim sColor As String
Dim aColor As String[]
For Each sKey In ColorKeys
If bDefault Then
......@@ -34,6 +35,17 @@ Public Function ReadSettings(hSettings As Settings, sParent As String, Optional
cColor[sKey] = sColor
Next
For Each sKey In ColorKeys
Do
sColor = cColor[sKey]
If Not sColor Then Break
If Left(sColor) = "#" Then Break
aColor = Split(sColor)
aColor[0] = cColor[aColor[0]]
cColor[sKey] = aColor.Join()
Loop
Next
Return cColor
End
......
......@@ -234,10 +234,12 @@ End
Private Sub RefreshStyle()
Dim hHBox As HBox
Dim H As Integer
'panTheme.Background = CStyle[$cCurrent["Background"]].Foreground
H = Max(Project.GetEditorFont().Height + Desktop.Scale * 2, Desktop.Scale * 4)
For Each hHBox In svwTheme.Children
hHBox.H = H
hHBox.Children[0].Refresh
Next
......@@ -251,10 +253,10 @@ Private Sub RefreshEditor()
If $bNoChange Then Return
RefreshStyle
Settings["/Editor/Font"] = txtEditorFont.Value
RefreshStyle
MTheme.WriteSettings(Settings, "Highlight", $cCurrent)
Settings["/Editor/Font"] = txtEditorFont.Value
Project.InitWebView
Project.RefreshBreakpointPicture
......@@ -592,6 +594,7 @@ Public Sub dwgStyle_Draw()
Dim iBackground As Integer
Dim bInvert As Boolean
Dim iBg As Integer
Dim D As Integer
sName = MTheme.ColorNames[MTheme.ColorKeys.Find(sKey)]
bInvert = Settings["/Editor/InvertTheme", 0]
......@@ -600,7 +603,7 @@ Public Sub dwgStyle_Draw()
If Color[iBg].Value < 128 Then bInvert = False
Endif
Paint.Font = Font[txtEditorFont.Value]
Paint.Font = Project.GetEditorFont()
If hStyle.Underline Then Paint.Font.Underline = True
If MTheme.IsBackgroundStyle(sKey) Then
......@@ -621,12 +624,14 @@ Public Sub dwgStyle_Draw()
Paint.FillRect(0, 0, hDraw.W, hDraw.H, iBackground)
D = Desktop.Scale
If hStyle.Bold Then
Paint.Background = Color.SetAlpha(iForeground, 128)
Paint.DrawText(sName, 5, 0, hDraw.Width - 8, hDraw.Height, Align.Normal)
Paint.DrawText(sName, D + 1, 0, hDraw.Width - D * 2, hDraw.Height, Align.Normal)
Endif
Paint.Background = iForeground
Paint.DrawText(sName, 4, 0, hDraw.Width - 8, hDraw.Height, Align.Normal)
Paint.DrawText(sName, D, 0, hDraw.Width - D * 2, hDraw.Height, Align.Normal)
End
......
......@@ -17,4 +17,7 @@ CurrentLine="#FFEFCF"
Error="#028078,Underline"
Help="#FFD480,Bold"
Preprocessor="#FF00FF,Bold"
Escape="String,Underline"
Label="Normal,Underline"
Constant="Number"
......@@ -17,3 +17,6 @@ CurrentLine="#F9E7FF"
Error="#008000,Underline"
Help="#BF7FFF,Bold,Italic"
Preprocessor="#0000FF,Bold"
Escape="String,Underline"
Label="Normal,Underline"
Constant="Number"
......@@ -17,4 +17,7 @@ Selection="#1F5F97"
Highlight="#001F5F"
CurrentLine="#00376F"
Error="#D96D6D"
Escape="String,Underline"
Label="Normal,Underline"
Constant="Number"
......@@ -17,3 +17,6 @@ CurrentLine="#E7FFE7"
Error="#800080,Underline"
Help="#805500,Bold,Italic"
Preprocessor="#FF8000,Bold"
Escape="String,Underline"
Label="Normal,Underline"
Constant="Number"
......@@ -17,4 +17,6 @@ Selection="#BEEBFF"
Highlight="#9FFF3F"
CurrentLine="#E7F7FF"
Error="#BF0303,Underline"
Escape="String,Underline"
Label="Normal,Underline"
Constant="Number"
......@@ -17,4 +17,7 @@ CurrentLine="#303030"
Error="#C00000,Underline"
Help="#BF7FFF,Bold,Italic"
Preprocessor="#00C000,Bold"
Escape="String,Underline"
Label="Normal,Underline"
Constant="Number"
......@@ -17,4 +17,7 @@ Selection="#000014"
Highlight="#065565"
CurrentLine="#003846"
Error="#EF5454"
Escape="String,Underline"
Label="Normal,Underline"
Constant="Number"
......@@ -17,3 +17,6 @@ CurrentLine="#E7F3FF"
Error="#BF0303,Underline"
Help="#888786,Bold,Italic"
Preprocessor="#006E28,Bold"
Escape="String,Underline"
Label="Normal,Underline"
Constant="Number"
......@@ -17,4 +17,7 @@ CurrentLine="#00376F"
Error="#808000"
Help="#5FBF5F,Bold"
Preprocessor="#FF0000,Bold"
Escape="String,Underline"
Label="Normal,Underline"
Constant="Number"
......@@ -17,3 +17,6 @@ CurrentLine="#FFE7E7"
Error="#008000,Underline"
Help="#FF8000,Bold,Italic"
Preprocessor="#0000FF,Bold"
Escape="String,Underline"
Label="Normal,Underline"
Constant="Number"
......@@ -17,4 +17,7 @@ CurrentLine="#E7F3FF"
Error="#808000,Underline"
Help="#7FBFFF,Bold"
Preprocessor="#00C000,Bold"
Escape="String,Underline"
Label="Normal,Underline"
Constant="Number"
......@@ -17,3 +17,6 @@ CurrentLine="#E7F3FF"
Error="#004040,Underline"
Help="#008800,Bold,Italic"
Preprocessor="#808000,Bold"
Escape="String,Underline"
Label="Normal,Underline"
Constant="Number"
......@@ -17,4 +17,7 @@ Selection="#8BDFA0"
Highlight="#9FFF3F"
CurrentLine="#CADFC3"
Error="#BF0303,Underline"
Escape="String,Underline"
Label="Normal,Underline"
Constant="Number"
# Gambas Project File 3.0
Title=gb.eval.highlight
Startup=Init
Startup=Main
Version=3.11.90
VersionFile=1
Component=gb.eval
......