mirror of https://gitlab.com/basile.b/dexed.git
messages, add protection against long lines bugging gtk2, close #351
This commit is contained in:
parent
fd20f544cb
commit
f7f1c4b856
|
@ -27,11 +27,12 @@ type
|
||||||
TCEMessagesOptions = class(TWritableLfmTextComponent)
|
TCEMessagesOptions = class(TWritableLfmTextComponent)
|
||||||
private
|
private
|
||||||
fFastDisplay: boolean;
|
fFastDisplay: boolean;
|
||||||
fMaxCount: Integer;
|
fMaxCount: integer;
|
||||||
fAutoSelect: boolean;
|
fAutoSelect: boolean;
|
||||||
fSingleClick: boolean;
|
fSingleClick: boolean;
|
||||||
fAutoDemangle: boolean;
|
fAutoDemangle: boolean;
|
||||||
fAlwaysFilter: boolean;
|
fAlwaysFilter: boolean;
|
||||||
|
fMaxLineLength: integer;
|
||||||
fFont: TFont;
|
fFont: TFont;
|
||||||
fMsgColors: array[TCEAppMessageKind] of TColor;
|
fMsgColors: array[TCEAppMessageKind] of TColor;
|
||||||
procedure setFont(value: TFont);
|
procedure setFont(value: TFont);
|
||||||
|
@ -39,6 +40,7 @@ type
|
||||||
property alwaysFilter: boolean read fAlwaysFilter write fAlwaysFilter;
|
property alwaysFilter: boolean read fAlwaysFilter write fAlwaysFilter;
|
||||||
property fastDisplay: boolean read fFastDisplay write fFastDisplay;
|
property fastDisplay: boolean read fFastDisplay write fFastDisplay;
|
||||||
property maxMessageCount: integer read fMaxCount write fMaxCount;
|
property maxMessageCount: integer read fMaxCount write fMaxCount;
|
||||||
|
property maxLineLength: integer read fMaxLineLength write fMaxLineLength default 4096;
|
||||||
property autoSelect: boolean read fAutoSelect write fAutoSelect;
|
property autoSelect: boolean read fAutoSelect write fAutoSelect;
|
||||||
property autoDemangle: boolean read fAutoDemangle write fAutoDemangle;
|
property autoDemangle: boolean read fAutoDemangle write fAutoDemangle;
|
||||||
property singleMessageClick: boolean read fSingleClick write fSingleClick;
|
property singleMessageClick: boolean read fSingleClick write fSingleClick;
|
||||||
|
@ -264,6 +266,7 @@ begin
|
||||||
fFont.Size := ScaleY(11,96);
|
fFont.Size := ScaleY(11,96);
|
||||||
fAutoSelect :=true;
|
fAutoSelect :=true;
|
||||||
fMaxCount := 1000;
|
fMaxCount := 1000;
|
||||||
|
fMaxLineLength:= 4096;
|
||||||
fMsgColors[amkBub] := $FCE7D2;
|
fMsgColors[amkBub] := $FCE7D2;
|
||||||
fMsgColors[amkWarn]:= $B3FFFF;
|
fMsgColors[amkWarn]:= $B3FFFF;
|
||||||
fMsgColors[amkErr] := $BDBDFF;
|
fMsgColors[amkErr] := $BDBDFF;
|
||||||
|
@ -879,10 +882,12 @@ begin
|
||||||
showWidget;
|
showWidget;
|
||||||
if not fAlwaysFilter then
|
if not fAlwaysFilter then
|
||||||
TreeFilterEdit1.Filter:='';
|
TreeFilterEdit1.Filter:='';
|
||||||
case fAutoDemangle of
|
if (value.length > fOptions.maxLineLength) and (fOptions.maxLineLength > 0) then
|
||||||
false: msg := value;
|
msg := value[1..fOptions.maxLineLength]
|
||||||
true: msg := demangle(value);
|
else
|
||||||
end;
|
msg := value;
|
||||||
|
if fAutoDemangle then
|
||||||
|
msg := demangle(msg);
|
||||||
if aKind = amkAuto then
|
if aKind = amkAuto then
|
||||||
aKind := guessMessageKind(msg);
|
aKind := guessMessageKind(msg);
|
||||||
if aCtxt = amcAutoCompile then
|
if aCtxt = amcAutoCompile then
|
||||||
|
|
Loading…
Reference in New Issue