bug fixes, bumped version to 1.4.3 and advanced auto-indenter a bit
This commit is contained in:
parent
e0115ba2dc
commit
1b065c6f36
|
@ -114,8 +114,8 @@ IncludeVerInfo=1
|
||||||
AutoIncBuild=1
|
AutoIncBuild=1
|
||||||
MajorVer=1
|
MajorVer=1
|
||||||
MinorVer=4
|
MinorVer=4
|
||||||
Release=2
|
Release=3
|
||||||
Build=10
|
Build=0
|
||||||
Debug=0
|
Debug=0
|
||||||
PreRelease=0
|
PreRelease=0
|
||||||
Special=0
|
Special=0
|
||||||
|
@ -126,8 +126,8 @@ CodePage=1252
|
||||||
[Version Info Keys]
|
[Version Info Keys]
|
||||||
CompanyName=AMX Mod X Dev Team
|
CompanyName=AMX Mod X Dev Team
|
||||||
FileDescription=
|
FileDescription=
|
||||||
FileVersion=1.4.2.10
|
FileVersion=1.4.3.0
|
||||||
InternalName=gaben
|
InternalName=
|
||||||
LegalCopyright=AMX Mod X Dev Team
|
LegalCopyright=AMX Mod X Dev Team
|
||||||
LegalTrademarks=
|
LegalTrademarks=
|
||||||
OriginalFilename=
|
OriginalFilename=
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -636,6 +636,12 @@ begin
|
||||||
frmSettings.chkDontLoadFilesTwice.Checked := eConfig.ReadBool('Editor', 'DontLoadFilesTwice', True);
|
frmSettings.chkDontLoadFilesTwice.Checked := eConfig.ReadBool('Editor', 'DontLoadFilesTwice', True);
|
||||||
frmSettings.chkAutoIndent.Checked := eConfig.ReadBool('Editor', 'Auto-Indent', True);
|
frmSettings.chkAutoIndent.Checked := eConfig.ReadBool('Editor', 'Auto-Indent', True);
|
||||||
frmAutoIndent.chkIndentOpeningBrace.Checked := eConfig.ReadBool('Editor', 'IndentOpeningBrace', True);
|
frmAutoIndent.chkIndentOpeningBrace.Checked := eConfig.ReadBool('Editor', 'IndentOpeningBrace', True);
|
||||||
|
case eConfig.ReadInteger('Editor', 'IndentStyle', 0) of
|
||||||
|
0: frmAutoIndent.optTabs.Checked := True;
|
||||||
|
1: frmAutoIndent.optTwoSpaces.Checked := True;
|
||||||
|
2: frmAutoIndent.optSomethingElse.Checked := True;
|
||||||
|
end;
|
||||||
|
frmAutoIndent.txtSomethingElse.Text := eConfig.ReadString('Editor', 'IndentSomethingElse', '');
|
||||||
frmAutoIndent.chkUnindentPressingClosingBrace.Checked := eConfig.ReadBool('Editor', 'UnindentClosingBrace', True);
|
frmAutoIndent.chkUnindentPressingClosingBrace.Checked := eConfig.ReadBool('Editor', 'UnindentClosingBrace', True);
|
||||||
frmAutoIndent.chkUnindentLine.Checked := eConfig.ReadBool('Editor', 'UnindentEmptyLine', False);
|
frmAutoIndent.chkUnindentLine.Checked := eConfig.ReadBool('Editor', 'UnindentEmptyLine', False);
|
||||||
frmSettings.chkAUDisable.Checked := eConfig.ReadString('Editor', 'AutoDisable', '1500') <> '-1';
|
frmSettings.chkAUDisable.Checked := eConfig.ReadString('Editor', 'AutoDisable', '1500') <> '-1';
|
||||||
|
|
Binary file not shown.
|
@ -4,7 +4,8 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Windows, Messages, Classes, Graphics, Controls,
|
SysUtils, Windows, Messages, Classes, Graphics, Controls,
|
||||||
StdCtrls, ExtCtrls, Forms, TFlatCheckBoxUnit, TFlatButtonUnit;
|
StdCtrls, ExtCtrls, Forms, TFlatCheckBoxUnit, TFlatButtonUnit,
|
||||||
|
TFlatEditUnit, TFlatRadioButtonUnit;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmAutoIndent = class(TForm)
|
TfrmAutoIndent = class(TForm)
|
||||||
|
@ -13,6 +14,12 @@ type
|
||||||
chkUnindentPressingClosingBrace: TFlatCheckBox;
|
chkUnindentPressingClosingBrace: TFlatCheckBox;
|
||||||
chkUnindentLine: TFlatCheckBox;
|
chkUnindentLine: TFlatCheckBox;
|
||||||
chkIndentOpeningBrace: TFlatCheckBox;
|
chkIndentOpeningBrace: TFlatCheckBox;
|
||||||
|
pnlIndentStyle: TPanel;
|
||||||
|
optTwoSpaces: TFlatRadioButton;
|
||||||
|
optTabs: TFlatRadioButton;
|
||||||
|
Label1: TLabel;
|
||||||
|
optSomethingElse: TFlatRadioButton;
|
||||||
|
txtSomethingElse: TFlatEdit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -563,6 +563,13 @@ begin
|
||||||
eConfig.WriteBool('Editor', 'IndentOpeningBrace', frmAutoIndent.chkIndentOpeningBrace.Checked);
|
eConfig.WriteBool('Editor', 'IndentOpeningBrace', frmAutoIndent.chkIndentOpeningBrace.Checked);
|
||||||
eConfig.WriteBool('Editor', 'UnindentClosingBrace', frmAutoIndent.chkUnindentPressingClosingBrace.Checked);
|
eConfig.WriteBool('Editor', 'UnindentClosingBrace', frmAutoIndent.chkUnindentPressingClosingBrace.Checked);
|
||||||
eConfig.WriteBool('Editor', 'UnindentEmptyLine', frmAutoIndent.chkUnindentLine.Checked);
|
eConfig.WriteBool('Editor', 'UnindentEmptyLine', frmAutoIndent.chkUnindentLine.Checked);
|
||||||
|
if (frmAutoIndent.optTabs.Checked) then
|
||||||
|
eConfig.WriteInteger('Editor', 'IndentStyle', 0)
|
||||||
|
else if (frmAutoIndent.optTwoSpaces.Checked) then
|
||||||
|
eConfig.WriteInteger('Editor', 'IndentStyle', 1)
|
||||||
|
else
|
||||||
|
eConfig.WriteInteger('Editor', 'IndentStyle', 2);
|
||||||
|
eConfig.WriteString('Editor', 'IndentSomethingElse', frmAutoIndent.txtSomethingElse.Text);
|
||||||
eConfig.WriteBool('Editor', 'Disable_AC', frmSettings.chkDisableAC.Checked);
|
eConfig.WriteBool('Editor', 'Disable_AC', frmSettings.chkDisableAC.Checked);
|
||||||
eConfig.WriteBool('Editor', 'Disable_CT', frmSettings.chkDisableCT.Checked);
|
eConfig.WriteBool('Editor', 'Disable_CT', frmSettings.chkDisableCT.Checked);
|
||||||
eConfig.WriteBool('Editor', 'AutoHideCT', frmSettings.chkAutoHideCT.Checked);
|
eConfig.WriteBool('Editor', 'AutoHideCT', frmSettings.chkAutoHideCT.Checked);
|
||||||
|
@ -570,6 +577,7 @@ begin
|
||||||
eConfig.WriteString('Editor', 'AutoDisable', frmSettings.txtAUDisable.Text)
|
eConfig.WriteString('Editor', 'AutoDisable', frmSettings.txtAUDisable.Text)
|
||||||
else
|
else
|
||||||
eConfig.WriteString('Editor', 'AutoDisable', '-1');
|
eConfig.WriteString('Editor', 'AutoDisable', '-1');
|
||||||
|
|
||||||
{ Editor }
|
{ Editor }
|
||||||
if FileExists(sciPropertyLoader.FileName) then
|
if FileExists(sciPropertyLoader.FileName) then
|
||||||
sciPropertyLoader.Save;
|
sciPropertyLoader.Save;
|
||||||
|
@ -1006,8 +1014,14 @@ begin
|
||||||
if (Key = 13) and (frmSettings.chkAutoIndent.Checked) and (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') then begin
|
if (Key = 13) and (frmSettings.chkAutoIndent.Checked) and (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') then begin
|
||||||
if (sciEditor.LanguageManager.SelectedLanguage = 'Pawn') or (sciEditor.LanguageManager.SelectedLanguage = 'C++') then begin
|
if (sciEditor.LanguageManager.SelectedLanguage = 'Pawn') or (sciEditor.LanguageManager.SelectedLanguage = 'C++') then begin
|
||||||
eStr := Trim(RemoveStringsAndComments(sciEditor.Lines[sciEditor.GetCurrentLineNumber - 1], True, True));
|
eStr := Trim(RemoveStringsAndComments(sciEditor.Lines[sciEditor.GetCurrentLineNumber - 1], True, True));
|
||||||
if (Copy(eStr, Length(eStr), 1) = '{') and (frmAutoIndent.chkIndentOpeningBrace.Checked) then
|
if (Copy(eStr, Length(eStr), 1) = '{') and (frmAutoIndent.chkIndentOpeningBrace.Checked) then begin
|
||||||
sciEditor.SelText := #9;
|
if (frmAutoIndent.optTabs.Checked) then
|
||||||
|
sciEditor.SelText := #9
|
||||||
|
else if (frmAutoIndent.optTwoSpaces.Checked) then
|
||||||
|
sciEditor.SelText := ' '
|
||||||
|
else
|
||||||
|
sciEditor.SelText := frmAutoIndent.txtSomethingElse.Text;
|
||||||
|
end;
|
||||||
if (eStr = '') and (frmAutoIndent.chkUnindentLine.Checked) then begin
|
if (eStr = '') and (frmAutoIndent.chkUnindentLine.Checked) then begin
|
||||||
sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) - 1); // remove last indent..
|
sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) - 1); // remove last indent..
|
||||||
sciEditor.SelStart := sciEditor.SelStart + Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]); // and jump to last position
|
sciEditor.SelStart := sciEditor.SelStart + Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]); // and jump to last position
|
||||||
|
@ -1291,7 +1305,13 @@ begin
|
||||||
if (Key = '}') and (frmSettings.chkAutoIndent.Checked) then begin
|
if (Key = '}') and (frmSettings.chkAutoIndent.Checked) then begin
|
||||||
if (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') and (frmAutoIndent.chkUnindentPressingClosingBrace.Checked) then begin
|
if (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') and (frmAutoIndent.chkUnindentPressingClosingBrace.Checked) then begin
|
||||||
if (sciEditor.LanguageManager.SelectedLanguage = 'Pawn') or (sciEditor.LanguageManager.SelectedLanguage = 'C++') then begin
|
if (sciEditor.LanguageManager.SelectedLanguage = 'Pawn') or (sciEditor.LanguageManager.SelectedLanguage = 'C++') then begin
|
||||||
sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) - 1); // remove last indent..
|
// remove last indentation..
|
||||||
|
if (frmAutoIndent.optTabs.Checked)then
|
||||||
|
sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) - 1)
|
||||||
|
else if (frmAutoIndent.optTwoSpaces.Checked) then
|
||||||
|
sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) - 2)
|
||||||
|
else
|
||||||
|
sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) - Length(frmAutoIndent.txtSomethingElse.Text));
|
||||||
sciEditor.SelStart := sciEditor.SelStart + Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]); // and jump to last position
|
sciEditor.SelStart := sciEditor.SelStart + Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]); // and jump to last position
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -1519,7 +1539,7 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{ C++ Projects }
|
{ C++ Projects }
|
||||||
if frmClose.trvFiles.Items[i].Text = stlIDEs.Items[1].Caption then begin
|
if frmClose.trvFiles.Items[i].Text = stlIDEs.Strings[1] then begin
|
||||||
with frmClose.trvFiles.Items[i] do begin
|
with frmClose.trvFiles.Items[i] do begin
|
||||||
for k := 0 to Count - 1 do begin
|
for k := 0 to Count - 1 do begin
|
||||||
if frmClose.trvFiles.Checked[Item[k]] then begin
|
if frmClose.trvFiles.Checked[Item[k]] then begin
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user