mirror of https://gitlab.com/basile.b/dexed.git
make compatible with LCL version 2.2
This commit is contained in:
parent
fcad680170
commit
02fb0749c2
|
@ -10,7 +10,11 @@
|
|||
|
||||
## Bugs fixed
|
||||
|
||||
- GDB comm&nder: 5 empty arguments were passed to the main function called by libc. (#86)
|
||||
- GDB commander: 5 empty arguments were passed to the main function called by libc. (#86)
|
||||
|
||||
## Other
|
||||
|
||||
- can be build with Lazarus 2.2 but backward compatible 2.0
|
||||
|
||||
# v3.9.11
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<Version Value="12"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<CompatibilityMode Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="dexed"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
|
|
|
@ -9,7 +9,8 @@ uses
|
|||
ComCtrls, SynEditHighlighter, ExtCtrls, Menus, SynMacroRecorder, dialogs, LazFileUtils,
|
||||
SynPluginSyncroEdit, SynEdit, SynHighlighterMulti, AnchorDocking, u_dialogs,
|
||||
u_widget, u_interfaces, u_synmemo, u_dlang, u_common, u_dcd, u_observer,
|
||||
u_sharedres, u_controls, u_writableComponent, u_dsgncontrols, LMessages;
|
||||
u_sharedres, u_controls, u_writableComponent, u_dsgncontrols, LMessages,
|
||||
SynEditTypes;
|
||||
|
||||
type
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ interface
|
|||
|
||||
uses
|
||||
Classes, SysUtils, Graphics, SynEdit, SynEditMouseCmds, SynEditMiscClasses,
|
||||
SynEditKeyCmds, Menus, LCLProc,
|
||||
SynEditKeyCmds, Menus, LCLProc, SynEditTypes,
|
||||
u_interfaces, u_observer, u_common, u_writableComponent, u_synmemo,
|
||||
u_d2syn, u_txtsyn;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ object MainForm: TMainForm
|
|||
OnDropFiles = FormDropFiles
|
||||
OnResize = FormResize
|
||||
ShowHint = True
|
||||
LCLVersion = '2.0.10.0'
|
||||
LCLVersion = '2.2.0.1'
|
||||
object mainMenu: TMainMenu
|
||||
Top = 1
|
||||
object MenuItem1: TMenuItem
|
||||
|
|
|
@ -9,7 +9,7 @@ uses
|
|||
StdCtrls, AnchorDocking, AnchorDockStorage, AnchorDockOptionsDlg, Controls,
|
||||
Graphics, strutils, Dialogs, Menus, ActnList, ExtCtrls, process,
|
||||
{$IFDEF WINDOWS}Windows, {$ENDIF} XMLPropStorage, SynExportHTML,
|
||||
fpjson, jsonscanner, LCLIntf,
|
||||
fpjson, jsonscanner, LCLIntf, LCLVersion,
|
||||
u_common, u_ceproject, u_synmemo, u_writableComponent, u_simpleget, u_compilers,
|
||||
u_widget, u_messages, u_interfaces, u_editor, u_projinspect, u_ceprojeditor,
|
||||
u_search, u_miniexplorer, u_libman, u_libmaneditor, u_todolist, u_observer,
|
||||
|
@ -1725,7 +1725,11 @@ begin
|
|||
begin
|
||||
DockMaster.MakeDockSite(Self, [akBottom], admrpChild);
|
||||
DockMaster.OnShowOptions := @ShowAnchorDockOptions;
|
||||
{$if lcl_fullversion < 2020000}
|
||||
DockMaster.HeaderStyle := adhsPoints;
|
||||
{$else}
|
||||
DockMaster.HeaderStyle := 'Points';
|
||||
{$endif}
|
||||
DockMaster.HideHeaderCaptionFloatingControl := true;
|
||||
// makes widget dockable
|
||||
for i := 0 to fWidgList.Count-1 do
|
||||
|
|
|
@ -95,6 +95,9 @@ type
|
|||
procedure sendShortcuts;
|
||||
function anItemIsSelected: boolean;
|
||||
|
||||
protected
|
||||
procedure SetVisible(value: boolean); override;
|
||||
|
||||
public
|
||||
constructor create(TheOwner: TComponent); override;
|
||||
destructor destroy; override;
|
||||
|
@ -190,12 +193,12 @@ end;
|
|||
constructor TShortcutEditor.create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
propvalue := TEditableShortcut.Create;
|
||||
fObservers := TEditableShortCutSubject.create;
|
||||
fShortcuts := TShortCutCollection.create(self);
|
||||
fBackup := TShortCutCollection.create(self);
|
||||
propvalue := TEditableShortcut.Create;
|
||||
fObservers := TEditableShortCutSubject.create;
|
||||
fShortcuts := TShortCutCollection.create(self);
|
||||
fBackup := TShortCutCollection.create(self);
|
||||
|
||||
EntitiesConnector.addObserver(self);
|
||||
propedit.TIObject := propvalue;
|
||||
propedit.PropertyEditorHook.AddHandlerModified(@propeditModified);
|
||||
end;
|
||||
|
||||
|
@ -206,6 +209,13 @@ begin
|
|||
inherited;
|
||||
end;
|
||||
|
||||
procedure TShortcutEditor.SetVisible(value: boolean);
|
||||
begin
|
||||
inherited SetVisible(value);
|
||||
if value and propedit.TIObject.isNotAssigned then
|
||||
propedit.TIObject := propvalue;
|
||||
end;
|
||||
|
||||
procedure TShortcutEditor.updateScaling;
|
||||
begin
|
||||
if fHasScaled then
|
||||
|
|
|
@ -10,7 +10,7 @@ uses
|
|||
SynHighlighterLFM, SynEditHighlighter, SynEditMouseCmds, SynEditFoldedView,
|
||||
SynEditMarks, SynEditTypes, SynHighlighterJScript, SynBeautifier, dialogs,
|
||||
md5, Spin, LCLIntf, LazFileUtils, LMessages, SynHighlighterCpp, math,
|
||||
SynGutterMarks, SynGutterBase,
|
||||
SynGutterMarks, SynGutterBase, LCLVersion,
|
||||
//SynEditMarkupFoldColoring,
|
||||
Clipbrd, fpjson, jsonparser, LazUTF8, LazUTF8Classes, Buttons, StdCtrls,
|
||||
u_common, u_writableComponent, u_d2syn, u_txtsyn, u_dialogs,
|
||||
|
@ -839,7 +839,13 @@ begin
|
|||
begin
|
||||
// - CollapsedLineForFoldAtLine() does not handle the sub-folding.
|
||||
// - TextView visibility is increased so this is not the standard way of getting the infos.
|
||||
|
||||
{$if lcl_fullversion < 2020000}
|
||||
start := fMemo.TextView.CollapsedLineForFoldAtLine(i);
|
||||
{$else}
|
||||
start := TSynEditFoldedView(fMemo.TextViewsManager.SynTextViewByClass[TSynEditFoldedView]).CollapsedLineForFoldAtLine(i);
|
||||
{$endif}
|
||||
|
||||
if start.equals(-1) then
|
||||
continue;
|
||||
if start = prev then
|
||||
|
@ -871,7 +877,11 @@ begin
|
|||
itm := TFoldCache(fFolds.Items[i]);
|
||||
if not itm.isCollapsed then
|
||||
continue;
|
||||
{$if lcl_fullversion < 2020000}
|
||||
fMemo.TextView.FoldAtLine(itm.lineIndex-1);
|
||||
{$else}
|
||||
TSynEditFoldedView(fMemo.TextViewsManager.SynTextViewByClass[TSynEditFoldedView]).FoldAtLine(itm.lineIndex-1);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
fMemo.SelStart := fCaretPosition;
|
||||
|
@ -1153,7 +1163,12 @@ begin
|
|||
fTempFileName := GetTempDir(false) + 'temp_' + uniqueObjStr(self) + '.d';
|
||||
fFilename := newdocPageCaption;
|
||||
fModified := false;
|
||||
|
||||
{$if lcl_fullversion < 2020000}
|
||||
TextBuffer.AddNotifyHandler(senrUndoRedoAdded, @changeNotify);
|
||||
{$else}
|
||||
TextViewsManager.SynTextView[0].AddNotifyHandler(senrUndoRedoAdded, @changeNotify);
|
||||
{$endif}
|
||||
|
||||
Gutter.MarksPart.Visible:=false;
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@ interface
|
|||
|
||||
uses
|
||||
Classes, SysUtils, Graphics, LCLType, LCLIntf, LCLProc, Controls, ImgList,
|
||||
math, SynGutterBase, SynEditMiscClasses, SynEditMarks;
|
||||
LCLVersion, SynGutterBase, SynEditMiscClasses, SynEditMiscProcs,
|
||||
SynEditMarks, SynEditFoldedView, LazSynEditText;
|
||||
|
||||
type
|
||||
|
||||
|
@ -86,10 +87,20 @@ var
|
|||
markRect: TRect;
|
||||
mark : TSynEditMark;
|
||||
i, h, w : integer;
|
||||
{$if lcl_fullversion >= 2020000}
|
||||
iRange: TLineRange;
|
||||
{$endif}
|
||||
begin
|
||||
Result := False;
|
||||
aFirstCustomColumnIdx := 0;
|
||||
{$if lcl_fullversion < 2020000}
|
||||
i := FoldView.TextIndex[aScreenLine];
|
||||
{$else}
|
||||
aScreenLine := aScreenLine + ToIdx(GutterArea.TextArea.TopLine);
|
||||
i := ViewedTextBuffer.DisplayView.ViewToTextIndexEx(aScreenLine, iRange);
|
||||
if aScreenLine <> iRange.Top then
|
||||
exit;
|
||||
{$endif}
|
||||
if (i < 0) or (i >= TCustomSynEdit(SynEdit).Lines.Count) then
|
||||
exit;
|
||||
markLine := TCustomSynEdit(SynEdit).Marks.Line[i + 1];
|
||||
|
@ -146,6 +157,5 @@ end;
|
|||
|
||||
end.
|
||||
|
||||
|
||||
end.
|
||||
|
||||
|
|
Loading…
Reference in New Issue