Skip to content

Commit 861a1e0

Browse files
royqh1979@gmail.comroyqh1979@gmail.com
royqh1979@gmail.com
authored and
royqh1979@gmail.com
committed
work save
1 parent 04ecf5b commit 861a1e0

File tree

6 files changed

+24
-10
lines changed

6 files changed

+24
-10
lines changed

Lang/Chinese.lng

+1
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,7 @@ Ver=1
10001000
60038=ϵͳȱʡӦ�ó���
10011001
60039=�޷��򿪺�ʶ��ͼ���ļ�"%s"����ת����ico��ʽ�����³��ԡ�
10021002
60040=��ע�⣺Dev-C++ֻ�ܴ�48x48�����´�С��ICO��ʽͼƬ
1003+
60041=ֻ��
10031004

10041005
61001=���ܴ��ļ� %s
10051006
61002=���ܱ����ļ� %s

Lang/English.lng

+1
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,7 @@ Ver=1
999999
60038=Default Application
10001000
60039=Can't open the icon file "%s"
10011001
60040=Note: Dev C++ can only open icon no bigger than 48x48
1002+
60041=Readonly
10021003

10031004
61001=Cannot open file %s
10041005
61002=Cannot save file %s

NEWS.txt

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
Version 6.7.6
2-
3-
- fix: parse error when double quotes not correctly closed
4-
- fix: parse error when single quotes not correctly closed
5-
- fix: show inherited members button of the class browser doesn't work
6-
71
Version 6.7.5 AUGUST 2021
82

93
- add: blend mode for debug cpu window
104
- change: use msys2 x86_64 gcc compiler instead of TDM-GCC-64, becuause the gdb distributed with TDM can't correctly handle path with non-ascii characters.
115
- fix: clear local panel when debugger stops.
6+
- fix: parse error when double quotes not correctly closed
7+
- fix: parse error when single quotes not correctly closed
8+
- fix: show inherited members button of the class browser doesn't work
9+
- enhancement: open system header files in readonly mode
1210

1311
Version 6.7.4 AUGUST 2021
1412

Source/Editor.pas

+16-3
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,10 @@ constructor TEditor.Create(const Filename: AnsiString; Encoding:TFileEncodingTyp
477477
InitParser;
478478
end;
479479

480+
if (fParser.IsSystemHeaderFile(filename)) then begin
481+
text.ReadOnly := true;
482+
UpdateCaption('');
483+
end;
480484

481485
// Function parameter tips
482486
fFunctionTip := TCodeToolTip.Create(Application);
@@ -1333,8 +1337,10 @@ procedure TEditor.UpdateCaption(const NewCaption: AnsiString);
13331337
begin
13341338
caption:=NewCaption;
13351339
if caption = '' then begin
1336-
if fText.Modified then
1337-
caption := ExtractFileName(fFileName) + ' [*]'
1340+
if fText.ReadOnly then
1341+
caption := ExtractFileName(fFileName) + ' [' + Lang[ID_MSG_READONLY]+ ']'
1342+
else if fText.Modified then
1343+
caption := ExtractFileName(fFileName) + ' [*]'
13381344
else
13391345
caption := ExtractFileName(fFileName);
13401346
end;
@@ -1994,7 +2000,10 @@ procedure TEditor.EditorKeyPress(Sender: TObject; var Key: Char);
19942000
if not Assigned(fText.Highlighter) then
19952001
Exit;
19962002

1997-
if (Key in fText.IdentChars) then begin
2003+
if fText.ReadOnly then
2004+
Exit;
2005+
2006+
if (Key in fText.IdentChars) then begin
19982007
inc(fLastIdCharPressed);
19992008
if devCodeCompletion.Enabled and devCodeCompletion.ShowCompletionWhileInput then begin
20002009
if fLastIdCharPressed=1 then begin
@@ -2135,6 +2144,10 @@ procedure TEditor.EditorKeyDown(Sender: TObject; var Key: Word; Shift: TShiftSta
21352144
if not Assigned(fText.Highlighter) then
21362145
Exit;
21372146

2147+
if fText.ReadOnly then
2148+
Exit;
2149+
2150+
21382151
// See if we can undo what has been inserted by HandleSymbolCompletion
21392152
case (Key) of
21402153
VK_CONTROL: begin

Source/LangIDs.inc

+1
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,7 @@ const
10801080
ID_MSG_DEFAULT_APPLICATION = 60038;
10811081
ID_MSG_COULDNOTOPENICON = 60039;
10821082
ID_MSG_OPENICON = 60040;
1083+
ID_MSG_READONLY = 60041;
10831084

10841085
ID_ERR_OPENFILE = 61001;
10851086
ID_ERR_SAVEFILE = 61002;

Source/Version.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ interface
3232

3333
// exe properties
3434
DEVCPP = 'Red Panda Dev-C++';
35-
DEVCPP_VERSION = '6.7.6';
35+
DEVCPP_VERSION = '6.7.5';
3636

3737
// delimiters
3838
DEV_INTERNAL_OPEN = '$__DEV_INTERNAL_OPEN';

0 commit comments

Comments
 (0)