Skip to content
Commits on Source (2)
This diff is collapsed.
......@@ -99,6 +99,10 @@ Public Sub _new()
[cmbToolbox, "/ToolboxSize", 0],
[btnSortProperty, "/SortProperties", 1],
[txtTabSize, "/DefaultTabSize", 2],
[btnFoldProc, "/Editor/CollapseByDefault", 0],
[btnWrapText, "/Editor/WrapTextByDefault", 0],
[btnTabIndent, "/Editor/TabIndentByDefault", 0],
[btnVersionControl, "/VersionControl/Enabled", 1],
[btnShowLimit, "/Editor/ProcedureLimit", 1],
[btnShowLineNumber, "/Editor/ShowLineNumbers", 0],
[btnShowChange, "/Editor/ShowChange", 1],
......@@ -107,9 +111,7 @@ Public Sub _new()
[btnShowIndent, "/Editor/ShowIndent", 1],
[btnShowPreview, "/Editor/ShowPreview", 0],
[btnFold, "/Editor/ShowExpand", 1],
[btnFoldProc, "/Editor/CollapseByDefault", 0],
[btnWrapText, "/Editor/WrapTextByDefault", 0],
[btnTabIndent, "/Editor/TabIndentByDefault", 0],
[btnInvertTheme, "/Editor/InvertTheme", 0],
[btnOutput, "/QuietExternalCommands", 0],
[btnUtility, "/UseUtilityWindows", 1],
[btnStartupLoad, "/RestoreFiles", 1],
......@@ -152,7 +154,6 @@ Public Sub _new()
Else
cmbTheme.Index = 0
Endif
chkInvertTheme.Value = Settings["/Editor/InvertTheme", 0]
panDownloadHelp.Visible = btnOfflineHelp.Value
......@@ -1378,9 +1379,17 @@ Public Sub Form_Activate()
End
Public Sub chkInvertTheme_Click()
Public Sub btnInvertTheme_Click()
Settings["/Editor/InvertTheme"] = chkInvertTheme.Value
Settings["/Editor/InvertTheme"] = btnInvertTheme.Value
RefreshEditor
End
Public Sub btnVersionControl_Click()
Settings["/VersionControl/Enabled"] = btnVersionControl.Value
VersionControl.Refresh
Project.Refresh
End
......@@ -31,7 +31,7 @@
MoveScaled(1,1,94,69)
Arrangement = Arrange.Vertical
Spacing = True
Count = 10
Count = 11
Border = True
Index = 0
Text = ("Identity")
......@@ -145,31 +145,107 @@
}
}
Index = 1
Text = ("Interface")
Picture = Picture["icon:/medium/menu"]
{ Label43 Label
MoveScaled(1,1,63,3)
Text = ("Projects")
Picture = Picture["icon:/medium/copy"]
{ Label67 Label
MoveScaled(0,1,63,3)
Font = Font["Bold"]
Text = ("Interface")
Text = ("Projects")
}
{ HBox11 HBox
{ HBox14 HBox
MoveScaled(1,5,66,4)
Spacing = True
Indent = True
{ Label12 Label
MoveScaled(0,0,18,4)
{ Label40 Label
MoveScaled(0,0,47,4)
Expand = True
Text = ("Icon theme")
Text = ("Default tab size")
}
{ cmbIconTheme ComboBox
MoveScaled(26,0,38,4)
ReadOnly = True
{ Panel3 HBox
MoveScaled(50,0,16,4)
Spacing = True
{ txtTabSize SpinBox
MoveScaled(0,0,6,4)
MinValue = 1
MaxValue = 16
Value = 2
}
{ Label3 Label
MoveScaled(8,0,8,4)
Expand = True
Text = ("space(s)")
}
}
}
{ HBox8 HBox
{ HBox53 HBox
MoveScaled(1,10,66,4)
Spacing = True
Indent = True
{ Label65 Label
MoveScaled(0,0,47,4)
Expand = True
Text = ("Indent with tab by default")
}
{ btnTabIndent SwitchButton
MoveScaled(50,0,8,4)
Animated = True
}
}
{ HBox35 HBox
MoveScaled(1,15,66,4)
Spacing = True
Indent = True
{ Label33 Label
MoveScaled(0,0,47,4)
Expand = True
Text = ("Automatic word wrap by default")
}
{ btnWrapText SwitchButton
MoveScaled(50,0,8,4)
Animated = True
}
}
{ HBox4 HBox
MoveScaled(1,20,66,4)
Visible = False
Spacing = True
Indent = True
{ Label17 Label
MoveScaled(0,0,47,4)
Expand = True
Text = ("Fold procedures by default")
}
{ btnFoldProc SwitchButton
MoveScaled(50,0,8,4)
Animated = True
}
}
{ HBox54 HBox
MoveScaled(1,25,66,4)
Spacing = True
Indent = True
{ Label68 Label
MoveScaled(0,0,47,4)
Expand = True
Text = ("Activate version control")
}
{ btnVersionControl SwitchButton
MoveScaled(50,0,8,4)
Animated = True
}
}
Index = 2
Text = ("Interface")
Picture = Picture["icon:/medium/menu"]
{ Label43 Label
MoveScaled(0,1,63,3)
Font = Font["Bold"]
Text = ("Interface")
}
{ HBox8 HBox
MoveScaled(1,5,66,4)
Spacing = True
Indent = True
{ Label2 Label
MoveScaled(0,0,42,4)
Expand = True
......@@ -181,7 +257,7 @@
}
}
{ HBox21 HBox
MoveScaled(1,15,66,4)
MoveScaled(1,10,66,4)
Spacing = True
Indent = True
{ Label21 Label
......@@ -195,7 +271,7 @@
}
}
{ HBox26 HBox
MoveScaled(1,20,66,4)
MoveScaled(1,15,66,4)
Spacing = True
Indent = True
{ Label15 Label
......@@ -209,7 +285,7 @@
}
}
{ HBox7 HBox
MoveScaled(1,25,66,4)
MoveScaled(1,20,66,4)
Spacing = True
Indent = True
{ Label1 Label
......@@ -224,7 +300,7 @@
}
}
{ HBox44 HBox
MoveScaled(1,30,66,4)
MoveScaled(1,25,66,4)
Spacing = True
Indent = True
{ Label53 Label
......@@ -238,7 +314,7 @@
}
}
{ HBox3 HBox
MoveScaled(1,35,66,4)
MoveScaled(1,30,66,4)
Spacing = True
Indent = True
{ Label10 Label
......@@ -252,7 +328,7 @@
}
}
{ HBox48 HBox
MoveScaled(1,40,66,4)
MoveScaled(1,35,66,4)
Spacing = True
Indent = True
{ Label58 Label
......@@ -266,7 +342,7 @@
}
}
{ HBox10 HBox
MoveScaled(1,45,66,4)
MoveScaled(1,40,66,4)
Spacing = True
Indent = True
{ Label16 Label
......@@ -280,12 +356,12 @@
}
}
{ Label57 Label
MoveScaled(1,51,63,3)
MoveScaled(1,46,63,3)
Font = Font["Bold"]
Text = ("Shortcuts")
}
{ Panel2 HBox
MoveScaled(2,55,39,4)
MoveScaled(2,50,39,4)
Indent = True
{ btnShortcut Button
MoveScaled(0,0,31,4)
......@@ -294,7 +370,7 @@
Picture = Picture["icon:/small/shortcut"]
}
}
Index = 2
Index = 3
Text = ("Fonts")
Picture = Picture["icon:/medium/font"]
{ Label42 Label
......@@ -303,7 +379,7 @@
Text = ("Fonts")
}
{ HBox6 HBox
MoveScaled(1,4,66,4)
MoveScaled(1,5,66,4)
Spacing = True
Indent = True
{ Label11 Label
......@@ -316,7 +392,7 @@
}
}
{ HBox45 HBox
MoveScaled(1,9,66,4)
MoveScaled(1,10,66,4)
Spacing = True
Indent = True
{ Label24 Label
......@@ -335,7 +411,7 @@
}
}
{ HBox19 HBox
MoveScaled(1,14,66,4)
MoveScaled(1,15,66,4)
Spacing = True
Indent = True
{ Label19 Label
......@@ -354,7 +430,7 @@
}
}
{ HBox23 HBox
MoveScaled(1,19,66,4)
MoveScaled(1,20,66,4)
Spacing = True
Indent = True
{ Label26 Label
......@@ -367,7 +443,7 @@
}
}
{ HBox24 HBox
MoveScaled(1,24,66,4)
MoveScaled(1,25,66,4)
Spacing = True
Indent = True
{ Label18 Label
......@@ -380,7 +456,7 @@
}
}
{ HBox46 HBox
MoveScaled(1,29,66,4)
MoveScaled(1,30,66,4)
Spacing = True
Indent = True
{ btnInstallFont Button
......@@ -389,11 +465,89 @@
Text = ("Install Gambas font for code edition") & "..."
}
}
Index = 3
Index = 4
Text = ("Theme")
Picture = Picture["icon:/medium/color"]
{ Label27 Label
MoveScaled(0,1,63,3)
Font = Font["Bold"]
Text = ("Theme")
}
{ HBox11 HBox
MoveScaled(1,5,65,4)
Spacing = True
Indent = True
{ Label12 Label
MoveScaled(0,0,18,4)
Expand = True
Text = ("Icon theme")
}
{ cmbIconTheme ComboBox
MoveScaled(20,0,45,4)
ReadOnly = True
}
}
{ HBox1 HBox
MoveScaled(1,10,65,4)
Indent = True
{ Label54 Label
MoveScaled(0,0,18,4)
Expand = True
Text = ("Color theme")
}
{ cmbTheme ComboBox
MoveScaled(20,0,32,4)
ReadOnly = True
}
{ Panel1 Panel
MoveScaled(52,0,1,4)
}
{ btnImport ToolButton
MoveScaled(53,0,4,4)
ToolTip = ("Import theme")
Picture = Picture["icon:/small/open"]
}
{ btnExport ToolButton
MoveScaled(57,0,4,4)
ToolTip = ("Export theme")
Picture = Picture["icon:/small/save"]
}
{ btnUndo ToolButton
MoveScaled(61,0,4,4)
ToolTip = ("Undo")
Picture = Picture["icon:/small/undo"]
}
}
{ HBox55 HBox
MoveScaled(1,15,66,4)
Spacing = True
Indent = True
{ Label69 Label
MoveScaled(0,0,47,4)
Expand = True
Text = ("Adapt colors to dark themes")
}
{ btnInvertTheme SwitchButton
MoveScaled(48,0,8,4)
Animated = True
}
}
{ svwTheme ScrollView
MoveScaled(1,34,64,29)
Foreground = Color.TextForeground
Expand = True
Arrangement = Arrange.Vertical
Spacing = True
Margin = True
Padding = 4
Border = False
ScrollBar = Scroll.Vertical
}
Index = 5
Text = ("Editor")
Picture = Picture["icon:/medium/edit"]
{ Label44 Label
MoveScaled(1,0,63,3)
MoveScaled(0,1,63,3)
Font = Font["Bold"]
Text = ("Editor")
}
......@@ -404,61 +558,8 @@
Spacing = True
Border = False
ScrollBar = Scroll.Vertical
{ HBox14 HBox
MoveScaled(0,0,66,4)
Spacing = True
Indent = True
{ Label40 Label
MoveScaled(0,0,47,4)
Expand = True
Text = ("Default tab size")
}
{ Panel3 HBox
MoveScaled(50,0,16,4)
Spacing = True
{ txtTabSize SpinBox
MoveScaled(0,0,6,4)
MinValue = 1
MaxValue = 16
Value = 2
}
{ Label3 Label
MoveScaled(8,0,8,4)
Expand = True
Text = ("space(s)")
}
}
}
{ HBox53 HBox
MoveScaled(0,5,66,4)
Spacing = True
Indent = True
{ Label65 Label
MoveScaled(0,0,47,4)
Expand = True
Text = ("Indent with tab by default")
}
{ btnTabIndent SwitchButton
MoveScaled(50,0,8,4)
Animated = True
}
}
{ HBox35 HBox
MoveScaled(0,10,66,4)
Spacing = True
Indent = True
{ Label33 Label
MoveScaled(0,0,47,4)
Expand = True
Text = ("Automatic word wrap by default")
}
{ btnWrapText SwitchButton
MoveScaled(50,0,8,4)
Animated = True
}
}
{ HBox38 HBox
MoveScaled(0,15,66,4)
MoveScaled(0,1,66,4)
Spacing = True
Indent = True
{ Label36 Label
......@@ -472,7 +573,7 @@
}
}
{ HBox17 HBox
MoveScaled(0,20,66,4)
MoveScaled(0,6,66,4)
Spacing = True
Indent = True
{ Label6 Label
......@@ -486,7 +587,7 @@
}
}
{ HBox16 HBox
MoveScaled(0,25,66,4)
MoveScaled(0,11,66,4)
Spacing = True
Indent = True
{ Label7 Label
......@@ -500,7 +601,7 @@
}
}
{ HBox15 HBox
MoveScaled(0,30,66,4)
MoveScaled(0,16,66,4)
Spacing = True
Indent = True
{ Label8 Label
......@@ -514,7 +615,7 @@
}
}
{ HBox42 HBox
MoveScaled(0,35,66,4)
MoveScaled(0,21,66,4)
Spacing = True
Indent = True
{ Label50 Label
......@@ -527,23 +628,8 @@
Animated = True
}
}
{ HBox4 HBox
MoveScaled(0,40,66,4)
Visible = False
Spacing = True
Indent = True
{ Label17 Label
MoveScaled(0,0,47,4)
Expand = True
Text = ("Fold procedures by default")
}
{ btnFoldProc SwitchButton
MoveScaled(50,0,8,4)
Animated = True
}
}
{ HBox18 HBox
MoveScaled(0,45,66,4)
MoveScaled(0,31,66,4)
Spacing = True
Indent = True
{ Label5 Label
......@@ -557,7 +643,7 @@
}
}
{ HBox29 HBox
MoveScaled(0,50,66,4)
MoveScaled(0,36,66,4)
Spacing = True
Indent = True
{ Label25 Label
......@@ -571,7 +657,7 @@
}
}
{ HBox51 HBox
MoveScaled(0,55,66,4)
MoveScaled(0,41,66,4)
Spacing = True
Indent = True
{ Label62 Label
......@@ -585,7 +671,7 @@
}
}
{ HBox20 HBox
MoveScaled(0,60,66,4)
MoveScaled(0,46,66,4)
Visible = False
Spacing = True
Indent = True
......@@ -600,61 +686,7 @@
}
}
}
Index = 4
Text = ("Theme")
Picture = Picture["icon:/medium/color"]
{ Label27 Label
MoveScaled(0,0,63,3)
Font = Font["Bold"]
Text = ("Theme")
}
{ HBox1 HBox
MoveScaled(1,4,65,4)
Indent = True
{ Label54 Label
MoveScaled(0,0,18,4)
Expand = True
Text = ("Color theme")
}
{ cmbTheme ComboBox
MoveScaled(20,0,32,4)
ReadOnly = True
}
{ Panel1 Panel
MoveScaled(52,0,1,4)
}
{ btnImport ToolButton
MoveScaled(53,0,4,4)
ToolTip = ("Import theme")
Picture = Picture["icon:/small/open"]
}
{ btnExport ToolButton
MoveScaled(57,0,4,4)
ToolTip = ("Export theme")
Picture = Picture["icon:/small/save"]
}
{ btnUndo ToolButton
MoveScaled(61,0,4,4)
ToolTip = ("Undo")
Picture = Picture["icon:/small/undo"]
}
}
{ chkInvertTheme CheckBox
MoveScaled(1,9,37,4)
Text = ("Adapt colors to dark themes")
}
{ svwTheme ScrollView
MoveScaled(1,15,64,38)
Foreground = Color.TextForeground
Expand = True
Arrangement = Arrange.Vertical
Spacing = True
Margin = True
Padding = 4
Border = False
ScrollBar = Scroll.Vertical
}
Index = 5
Index = 6
Text = ("Code formatting")
Picture = Picture["icon:/medium/wizard"]
{ Label52 Label
......@@ -779,7 +811,7 @@
Animated = True
}
}
Index = 6
Index = 7
Text = ("Code snippets")
Picture = Picture["icon:/medium/insert-text"]
{ Label47 Label
......@@ -844,7 +876,7 @@
}
}
}
Index = 7
Index = 8
Text = ("Background")
Picture = Picture["icon:/medium/image"]
{ Label14 Label
......@@ -864,7 +896,7 @@
MoveScaled(2,50,65,5)
ReadOnly = True
}
Index = 8
Index = 9
Text = ("Help & applications")
Picture = Picture["icon:/medium/help"]
{ Label46 Label
......@@ -998,7 +1030,7 @@
ReadOnly = True
}
}
Index = 9
Index = 10
Text = ("Source archives")
Picture = Picture["icon:/medium/archive"]
{ Label49 Label
......
......@@ -31,14 +31,17 @@ Public Enum ACCEPT_OURS = 1, ACCEPT_THEIRS = 2
Public Sub Refresh()
$bEnabled = True
If CVersionControlSubversion.Check() Then
$hVC = CVersionControlSubversion
Else If CVersionControlGit.Check() Then
$hVC = CVersionControlGit
Else
$hVC = CVersionControl
$bEnabled = False
$hVC = CVersionControl
$bEnabled = False
If Settings["/VersionControl/Enabled", 1] Then
If CVersionControlSubversion.Check() Then
$hVC = CVersionControlSubversion
$bEnabled = True
Else If CVersionControlGit.Check() Then
$hVC = CVersionControlGit
$bEnabled = True
Endif
Endif
$bAuth = False
......@@ -273,8 +276,8 @@ End
Public Sub CheckPaths()
If Not $bEnabled Then Return
Project.ResetFlags
If Not $bEnabled Then Return
$hVC.CheckPaths()
End
......
......@@ -24,6 +24,7 @@
10 Thierry Senges
10 Nando Favaro
9 Technical Racing Products
9 Gianluigi Gradaschi
9 David Losada
8 Mark Dootson
8 Two-Second Software
......@@ -32,9 +33,9 @@
8 Mohee Jarada
8 Hugo Sutherland
8 Phil Denby
8 Gianluigi Gradaschi
8 Evan Owen
8 Mario Carena
8 Christian Beck
8 Joel Barnett
7 John Laurence
7 Roy Jones
......@@ -111,6 +112,7 @@
3 Jean Charles Authier
3 Torsten Gaidies
3 Donald Montaine
3 Andy Wood
3 DaifNet
3 Alessandri Guzman Abad
2 Eloy Velázquez López
......@@ -133,6 +135,7 @@
2 Francisco Mora Sánchez
1 Louviaux
1 Cooke Dylan
1 Ľuboš Ilenčík
1 Leonardo Suárez Arce
1 Marco Iosif Constantinescu
1 Rodrigo Sanchez Reyes
......
......@@ -9,6 +9,8 @@ Static Public Const BETWEEN_BRACES_LEFT As String = "([{"
Static Public Const BETWEEN_BRACES_RIGHT As String = ")]}"
Public CloseBraces As Boolean
Public InsideStringEscape As Boolean
Public InsideStringDelim As String
'Private $bCanCloseBraces As Boolean
'Private $bCanCloseBracesComputed As Boolean
......@@ -41,6 +43,9 @@ Public Sub InsideString(hEditor As TextEditor) As Boolean
iLen = hEditor.Current.Length
sDelim = Me.STRING_DELIM
InsideStringEscape = False
InsideStringDelim = False
For I = 1 To hEditor.Column
sCar = String.Mid$(sLine, I, 1)
If sCar = sInside Then
......@@ -48,10 +53,14 @@ Public Sub InsideString(hEditor As TextEditor) As Boolean
Else If InStr(sDelim, sCar) Then
If Not sInside Then sInside = sCar
Else If sCar = "\\" Then
If sInside Then Inc I
If sInside Then
Inc I
InsideStringEscape = I > hEditor.Column
Endif
Endif
Next
InsideStringDelim = sInside
Return sInside
End
......@@ -95,6 +104,8 @@ Public Sub OnKeyPress(hEditor As TextEditor) As Boolean
Dim iPos As Integer
InsideStringEscape = False
iPos = InStr(Me.BRACES_OPEN, Key.Text)
If iPos And If CanCloseBraces(hEditor) Then
......@@ -111,11 +122,24 @@ Public Sub OnKeyPress(hEditor As TextEditor) As Boolean
If iPos Then
If String.Mid$(hEditor.Current.Text, hEditor.Column + 1, 1) = Key.Text Then
If Not InsideStringEscape And If String.Mid$(hEditor.Current.Text, hEditor.Column + 1, 1) = Key.Text Then
hEditor.Goto(hEditor.Column + 1, hEditor.Line)
Return True
Endif
If InStr(Me.STRING_DELIM, Key.Text) And If hEditor.Column < hEditor.Current.Length Then
If InsideStringEscape Then Return
If InsideStringDelim = Key.Text Then
hEditor.SaveCursor()
hEditor.Insert(Key.Text)
hEditor.Insert(Mid$(Me.BRACES_OPEN, iPos, 1))
hEditor.RestoreCursor()
hEditor.Goto(hEditor.Column + 1, hEditor.Line)
'$bCanCloseBracesComputed = False
Return True
Endif
Endif
Endif
'$bCanCloseBracesComputed = False
......
......@@ -60,6 +60,9 @@ Public Sub InsideString(hEditor As TextEditor) As Boolean
sLine = hEditor.Current.Text
iLen = hEditor.Current.Length
Me.InsideStringEscape = False
Me.InsideStringDelim = ""
For I = 1 To hEditor.Column
sCar = String.Mid$(sLine, I, 1)
If sCar = sInside Then
......@@ -70,10 +73,14 @@ Public Sub InsideString(hEditor As TextEditor) As Boolean
If sCar = "'" Then Return True
Endif
Else If sCar = "\\" Then
If sInside Then Inc I
If sInside Then
Inc I
Me.InsideStringEscape = I > hEditor.Column
Endif
Endif
Next
Me.InsideStringDelim = sInside
Return sInside
End
......