Skip to content

Commit abbc90c

Browse files
committed
FIX: cmd background color.
1 parent db61e22 commit abbc90c

File tree

5 files changed

+69
-74
lines changed

5 files changed

+69
-74
lines changed

src/flexpacket.lpi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<UseVersionInfo Value="True"/>
2424
<AutoIncrementBuild Value="True"/>
2525
<MinorVersionNr Value="4"/>
26-
<BuildNr Value="1927"/>
26+
<BuildNr Value="1931"/>
2727
<StringTable InternalName="flexpacket" ProductName="flexpacket" ProductVersion="0.4.0"/>
2828
</VersionInfo>
2929
<BuildModes>

src/flexpacket.lps

Lines changed: 53 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<CONFIG>
33
<ProjectSession>
44
<Version Value="12"/>
5-
<BuildModes Active="Debug"/>
5+
<BuildModes Active="Release"/>
66
<Units>
77
<Unit>
88
<Filename Value="flexpacket.lpr"/>
@@ -19,19 +19,19 @@
1919
<HasResources Value="True"/>
2020
<ResourceBaseClass Value="Form"/>
2121
<UnitName Value="UMain"/>
22-
<IsVisibleTab Value="True"/>
23-
<TopLine Value="257"/>
24-
<CursorPos X="5" Y="265"/>
22+
<TopLine Value="944"/>
23+
<CursorPos X="3" Y="961"/>
2524
<UsageCount Value="210"/>
2625
<Loaded Value="True"/>
2726
<LoadedDesigner Value="True"/>
2827
</Unit>
2928
<Unit>
3029
<Filename Value="uhostmode.pas"/>
3130
<IsPartOfProject Value="True"/>
32-
<EditorIndex Value="2"/>
33-
<TopLine Value="209"/>
34-
<CursorPos X="55" Y="248"/>
31+
<IsVisibleTab Value="True"/>
32+
<EditorIndex Value="3"/>
33+
<TopLine Value="494"/>
34+
<CursorPos X="41" Y="501"/>
3535
<UsageCount Value="214"/>
3636
<Loaded Value="True"/>
3737
</Unit>
@@ -80,10 +80,12 @@
8080
<ComponentName Value="TFTerminalSettings"/>
8181
<HasResources Value="True"/>
8282
<ResourceBaseClass Value="Form"/>
83-
<EditorIndex Value="-1"/>
84-
<TopLine Value="26"/>
85-
<CursorPos X="78" Y="47"/>
83+
<EditorIndex Value="1"/>
84+
<TopLine Value="52"/>
85+
<CursorPos X="57" Y="65"/>
8686
<UsageCount Value="207"/>
87+
<Loaded Value="True"/>
88+
<LoadedDesigner Value="True"/>
8789
</Unit>
8890
<Unit>
8991
<Filename Value="uresize.pas"/>
@@ -192,7 +194,7 @@
192194
<Filename Value="uansi.pas"/>
193195
<EditorIndex Value="-1"/>
194196
<CursorPos X="23" Y="93"/>
195-
<UsageCount Value="208"/>
197+
<UsageCount Value="207"/>
196198
</Unit>
197199
<Unit>
198200
<Filename Value="umap.pas"/>
@@ -201,158 +203,158 @@
201203
<ResourceBaseClass Value="Form"/>
202204
<EditorIndex Value="-1"/>
203205
<CursorPos Y="77"/>
204-
<UsageCount Value="68"/>
206+
<UsageCount Value="67"/>
205207
</Unit>
206208
<Unit>
207209
<Filename Value="/usr/lib/fpc/src/rtl/unix/classes.pp"/>
208210
<UnitName Value="Classes"/>
209211
<EditorIndex Value="-1"/>
210-
<UsageCount Value="12"/>
212+
<UsageCount Value="11"/>
211213
</Unit>
212214
<Unit>
213215
<Filename Value="/usr/lib/fpc/src/rtl/objpas/fgl.pp"/>
214216
<EditorIndex Value="-1"/>
215217
<TopLine Value="1632"/>
216218
<CursorPos Y="1657"/>
217-
<UsageCount Value="60"/>
219+
<UsageCount Value="59"/>
218220
</Unit>
219221
<Unit>
220222
<Filename Value="../../../not_me/lazarus/config_lazarus/onlinepackagemanager/packages/bgragames-master/bgtools.pas"/>
221223
<UnitName Value="bgTools"/>
222224
<EditorIndex Value="-1"/>
223225
<CursorPos X="30" Y="9"/>
224-
<UsageCount Value="60"/>
226+
<UsageCount Value="59"/>
225227
</Unit>
226228
<Unit>
227229
<Filename Value="../../../../fpcupdeluxe/config_lazarus/onlinepackagemanager/packages/cmdline/ucmdbox.pas"/>
228230
<UnitName Value="uCmdBox"/>
229-
<EditorIndex Value="1"/>
231+
<EditorIndex Value="2"/>
230232
<TopLine Value="1118"/>
231233
<CursorPos Y="1132"/>
232-
<UsageCount Value="10"/>
234+
<UsageCount Value="15"/>
233235
<Loaded Value="True"/>
234236
</Unit>
235237
</Units>
236238
<JumpHistory HistoryIndex="29">
237239
<Position>
238240
<Filename Value="umain.pas"/>
239-
<Caret Line="1056" Column="30" TopLine="1042"/>
241+
<Caret Line="830" Column="24" TopLine="812"/>
240242
</Position>
241243
<Position>
242244
<Filename Value="umain.pas"/>
243-
<Caret Line="118" Column="28" TopLine="108"/>
245+
<Caret Line="409" Column="48" TopLine="396"/>
244246
</Position>
245247
<Position>
246248
<Filename Value="umain.pas"/>
247-
<Caret Line="914" Column="20" TopLine="897"/>
249+
<Caret Line="430" Column="46" TopLine="412"/>
248250
</Position>
249251
<Position>
250252
<Filename Value="umain.pas"/>
251-
<Caret Line="948" Column="16" TopLine="930"/>
253+
<Caret Line="435" Column="46" TopLine="417"/>
252254
</Position>
253255
<Position>
254256
<Filename Value="umain.pas"/>
255-
<Caret Line="952" Column="31" TopLine="934"/>
257+
<Caret Line="764" Column="44" TopLine="746"/>
256258
</Position>
257259
<Position>
258260
<Filename Value="umain.pas"/>
259-
<Caret Line="988" Column="21" TopLine="970"/>
261+
<Caret Line="952" Column="39" TopLine="934"/>
260262
</Position>
261263
<Position>
262264
<Filename Value="umain.pas"/>
263-
<Caret Line="989" Column="21" TopLine="971"/>
265+
<Caret Line="267" Column="40" TopLine="257"/>
264266
</Position>
265267
<Position>
266268
<Filename Value="umain.pas"/>
267-
<Caret Line="118" Column="28" TopLine="108"/>
269+
<Caret Line="269" Column="34" TopLine="257"/>
268270
</Position>
269271
<Position>
270272
<Filename Value="umain.pas"/>
271-
<Caret Line="914" Column="20" TopLine="897"/>
273+
<Caret Line="279" Column="32" TopLine="262"/>
272274
</Position>
273275
<Position>
274276
<Filename Value="umain.pas"/>
275-
<Caret Line="960" Column="36" TopLine="942"/>
277+
<Caret Line="280" Column="38" TopLine="263"/>
276278
</Position>
277279
<Position>
278280
<Filename Value="umain.pas"/>
279-
<Caret Line="980" Column="27" TopLine="969"/>
281+
<Caret Line="291" Column="31" TopLine="274"/>
280282
</Position>
281283
<Position>
282-
<Filename Value="uhostmode.pas"/>
283-
<Caret Line="244" Column="38" TopLine="235"/>
284+
<Filename Value="umain.pas"/>
285+
<Caret Line="295" Column="26" TopLine="278"/>
284286
</Position>
285287
<Position>
286288
<Filename Value="umain.pas"/>
287-
<Caret Line="1018" Column="47" TopLine="999"/>
289+
<Caret Line="312" Column="26" TopLine="295"/>
288290
</Position>
289291
<Position>
290292
<Filename Value="umain.pas"/>
291-
<Caret Line="1019" Column="47" TopLine="1000"/>
293+
<Caret Line="316" Column="31" TopLine="299"/>
292294
</Position>
293295
<Position>
294296
<Filename Value="umain.pas"/>
295-
<Caret Line="1018" Column="47" TopLine="999"/>
297+
<Caret Line="430" Column="46" TopLine="412"/>
296298
</Position>
297299
<Position>
298300
<Filename Value="umain.pas"/>
299-
<Caret Line="965" Column="11" TopLine="955"/>
301+
<Caret Line="435" Column="46" TopLine="417"/>
300302
</Position>
301303
<Position>
302304
<Filename Value="umain.pas"/>
303-
<Caret Line="281" Column="28" TopLine="269"/>
305+
<Caret Line="764" Column="44" TopLine="746"/>
304306
</Position>
305307
<Position>
306308
<Filename Value="umain.pas"/>
307-
<Caret Line="259" TopLine="249"/>
309+
<Caret Line="952" Column="39" TopLine="934"/>
308310
</Position>
309311
<Position>
310312
<Filename Value="umain.pas"/>
311-
<Caret Line="269" TopLine="259"/>
313+
<Caret Line="277" Column="50" TopLine="266"/>
312314
</Position>
313315
<Position>
314316
<Filename Value="umain.pas"/>
315-
<Caret Line="956" Column="20" TopLine="952"/>
317+
<Caret Line="735" TopLine="724"/>
316318
</Position>
317319
<Position>
318320
<Filename Value="uhostmode.pas"/>
319-
<Caret Line="204" Column="110" TopLine="238"/>
321+
<Caret Line="130" Column="24" TopLine="118"/>
320322
</Position>
321323
<Position>
322324
<Filename Value="uhostmode.pas"/>
323-
<Caret Line="244" Column="38" TopLine="232"/>
325+
<Caret Line="139" Column="24" TopLine="119"/>
324326
</Position>
325327
<Position>
326328
<Filename Value="uhostmode.pas"/>
327-
<Caret Line="194" Column="69" TopLine="178"/>
329+
<Caret Line="370" Column="38" TopLine="326"/>
328330
</Position>
329331
<Position>
330-
<Filename Value="umain.pas"/>
331-
<Caret Line="976" Column="48" TopLine="967"/>
332+
<Filename Value="uhostmode.pas"/>
333+
<Caret Line="497" Column="24" TopLine="478"/>
332334
</Position>
333335
<Position>
334336
<Filename Value="uhostmode.pas"/>
335-
<Caret Line="246" Column="71" TopLine="235"/>
337+
<Caret Line="498" Column="24" TopLine="479"/>
336338
</Position>
337339
<Position>
338-
<Filename Value="umain.pas"/>
339-
<Caret Line="969" Column="13" TopLine="960"/>
340+
<Filename Value="uhostmode.pas"/>
341+
<Caret Line="504" Column="26" TopLine="485"/>
340342
</Position>
341343
<Position>
342344
<Filename Value="umain.pas"/>
343-
<Caret Line="93" Column="39" TopLine="93"/>
345+
<Caret Line="267" Column="69" TopLine="260"/>
344346
</Position>
345347
<Position>
346348
<Filename Value="umain.pas"/>
347-
<Caret Line="259" Column="53" TopLine="252"/>
349+
<Caret Line="262" Column="27" TopLine="301"/>
348350
</Position>
349351
<Position>
350352
<Filename Value="umain.pas"/>
351-
<Caret Line="265" Column="7" TopLine="248"/>
353+
<Caret Line="263" Column="27" TopLine="263"/>
352354
</Position>
353355
<Position>
354-
<Filename Value="../../../../fpcupdeluxe/config_lazarus/onlinepackagemanager/packages/cmdline/ucmdbox.pas"/>
355-
<Caret Line="1132" TopLine="1118"/>
356+
<Filename Value="umain.pas"/>
357+
<Caret Line="262" Column="27" TopLine="262"/>
356358
</Position>
357359
</JumpHistory>
358360
<RunParams>

src/flexpacket.res

0 Bytes
Binary file not shown.

src/uhostmode.pas

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ procedure THostmode.ReceiveData;
177177
else
178178
begin
179179
if Length(Text) > 0 then
180-
ChannelBuffer[Channel] := ChannelBuffer[Channel] + #27'[34m' + Text + #13#27'[0m';
180+
ChannelBuffer[Channel] := ChannelBuffer[Channel] + #27'[34m' + Text + #27'[0m'#13#10;
181181
end;
182182
end;
183183
2: // Error
@@ -191,7 +191,7 @@ procedure THostmode.ReceiveData;
191191
SetCallsign;
192192
end;
193193
if Length(Text) > 0 then
194-
ChannelBuffer[Channel] := ChannelBuffer[Channel] + #10#27'[31m' + '>>> ERROR: ' + Text + #27'[0m'#10;
194+
ChannelBuffer[Channel] := ChannelBuffer[Channel] + #13#10#27'[31m' + '>>> ERROR: ' + Text + #27'[0m'#13#10;
195195
end;
196196
end;
197197
3: // Link Status
@@ -201,7 +201,7 @@ procedure THostmode.ReceiveData;
201201
Text := ReceiveDataUntilZero;
202202
if Length(Text) > 0 then
203203
begin
204-
ChannelBuffer[Channel] := ChannelBuffer[Channel] + #10#27'[32m' + '>>> LINK STATUS: ' + Text + #27'[0m'#10;
204+
ChannelBuffer[Channel] := ChannelBuffer[Channel] + #13#10#27'[32m' + '>>> LINK STATUS: ' + Text + #27'[0m'#13#10;
205205
LinkStatus := DecodeLinkStatus(Text);
206206
ChannelStatus[channel][6] := LinkStatus[0]; // Status Text CONNECTED, DISCONNECTED, etc
207207
ChannelStatus[channel][7] := LinkStatus[1]; // Call of the other station
@@ -213,19 +213,19 @@ procedure THostmode.ReceiveData;
213213
begin
214214
Text := ReceiveDataUntilZero;
215215
if Length(Text) > 0 then
216-
ChannelBuffer[0] := ChannelBuffer[0] + Text + #10;
216+
ChannelBuffer[0] := ChannelBuffer[0] + Text + #13#10;
217217
end;
218218
5: // Monitor Header
219219
begin
220220
Text := ReceiveDataUntilZero;
221221
if Length(Text) > 0 then
222-
ChannelBuffer[0] := ChannelBuffer[0] + Text + #10;
222+
ChannelBuffer[0] := ChannelBuffer[0] + Text + #13#10;
223223
end;
224224
6: // Monitor Daten
225225
begin
226226
Text := ReceiveStringData;
227227
if Length(Text) > 0 then
228-
ChannelBuffer[0] := ChannelBuffer[0] + Text + #10;
228+
ChannelBuffer[0] := ChannelBuffer[0] + Text + #13#10;
229229
end;
230230
7: // Info Answer
231231
begin

src/umain.pas

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -260,29 +260,25 @@ procedure TFMain.FMainInit(Sender: TObject);
260260
FPConfig.Channel[i].Parent := PSSChannel;
261261
FPConfig.Channel[i].Left := 4;
262262
FPConfig.Channel[i].Width := PSChannelSplitter.Width;
263-
FPConfig.Channel[i].Font.Color := clWhite;
263+
FPConfig.Channel[i].Font.Color := FPConfig.TerminalFontColor;
264264
FPConfig.Channel[i].Font.Pitch := fpFixed;
265265
FPConfig.Channel[i].Font.Name := 'Courier New';
266266
FPConfig.Channel[i].Font.Style := [fsBold];
267267
FPConfig.Channel[i].Font.Size := FontSize;
268-
FPConfig.Channel[i].BackGroundColor := clBlack;
268+
FPConfig.Channel[i].BackGroundColor := FPConfig.TerminalBGColor;
269+
FPConfig.Channel[i].TextColor(FPConfig.TerminalFontColor);
270+
FPConfig.Channel[i].TextBackground(FPConfig.TerminalBGColor);
269271
FPConfig.Channel[i].Visible := False;
270272
FPConfig.Channel[i].Anchors := [akLeft,akRight,akTop,akBottom];
271273

272274
FPConfig.Connected[i] := False;
273275
FPConfig.Download[i].Enabled := False;
274276
end;
275277

276-
// workaround!!
277-
// When TRichMemo receives text for the first time, the TRichMemo is displayed
278-
// automatically even if Visible=False. This behavior is annoying during
279-
// operation. Therefore we force this behavior when starting the software so
280-
// that it does not annoy us later.
281-
for i := FPConfig.MaxChannels downto 0 do
282-
AddTextToMemo(i, #13);
283-
284278
// change some parameters only for the monitor
285279
FPConfig.Channel[0].Font.Color := clGreen;
280+
FPConfig.Channel[0].TextBackground(clWhite);
281+
FPConfig.Channel[0].TextColor(clGreen);
286282
FPConfig.Channel[0].BackGroundColor := clWhite;
287283

288284
// init MTx Memo
@@ -737,10 +733,7 @@ procedure TFMain.FormDestroy(Sender: TObject);
737733
ClosePipe('flexpacketaprspipe');
738734

739735
if MIEnableTNC.Checked then
740-
begin
741-
Hostmode.Connected := False;
742-
Hostmode.Terminate;
743-
end;
736+
Hostmode.Free;
744737
except
745738
end;
746739
end;
@@ -997,8 +990,8 @@ procedure TFMain.SendStringCommand(const Channel, Code: byte; const Command: str
997990
cmd := UpperCase(Command);
998991

999992
case Code of
1000-
1: AddTextToMemo(Channel, #27'[96m' + cmd + #13#27'[0m');
1001-
0: AddTextToMemo(Channel, #27'[32m' + cmd + #13#27'[0m');
993+
1: AddTextToMemo(Channel, #27'[96m' + cmd + #13#10#27'[0m');
994+
0: AddTextToMemo(Channel, #27'[32m' + cmd + #13#10#27'[0m');
1002995
end;
1003996

1004997
if (MIEnableKISS.Checked) and (Length(cmd) > 0) then

0 commit comments

Comments
 (0)