mirror of https://gitlab.com/basile.b/dexed.git
remove support for Laz versions < 2.2
This commit is contained in:
parent
4eabd7e65b
commit
f2d18f718d
|
@ -3,18 +3,22 @@ program dexed;
|
|||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}//{$IFDEF UseCThreads}
|
||||
{$IFDEF UNIX}
|
||||
cthreads,
|
||||
{$ENDIF}//{$ENDIF}
|
||||
{$ENDIF}
|
||||
Interfaces, Forms, lazcontrols, runtimetypeinfocontrols, anchordockpkg,
|
||||
tachartlazaruspkg, u_sharedres, u_dexed_d, u_observer, u_libman,
|
||||
u_symstring, u_tools, u_dcd, u_main, u_writableComponent,
|
||||
u_inspectors, u_editoroptions, u_dockoptions, u_shortcutseditor, u_mru,
|
||||
u_processes, u_dialogs, u_dubprojeditor, u_controls, u_dfmt,
|
||||
u_lcldragdrop, u_stringrange, u_dlangmaps, u_projgroup, u_projutils,
|
||||
u_d2synpresets, u_dbgitf, u_ddemangle, u_dubproject,
|
||||
u_d2synpresets, u_dbgitf, u_ddemangle, u_dubproject, LCLVersion,
|
||||
u_halstead, u_diff, u_profileviewer, u_semver, u_term, u_simpleget,
|
||||
u_makeproject;
|
||||
u_makeproject;
|
||||
|
||||
{$if lcl_fullversion < 2020000}
|
||||
{$ERROR Lazarus version >= 2.2 required}
|
||||
{$endif}
|
||||
|
||||
{$R *.res}
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ begin
|
|||
HideHeaderCaptionForFloatingCheckBox.OnChange := @doChanged;
|
||||
FlattenHeadersCheckBox.OnChange := @doChanged;
|
||||
FilledHeadersCheckBox.OnChange := @doChanged;
|
||||
{$if lcl_fullversion >= 2020000}
|
||||
FloatingWindowsOnTop.Visible := false;
|
||||
{$endif}
|
||||
//
|
||||
HeaderStyleComboBox.OnChange := @doChanged;
|
||||
//
|
||||
|
|
|
@ -1747,23 +1747,13 @@ var
|
|||
s: TAnchorDockSplitter;
|
||||
h: TAnchorDockHostSite;
|
||||
begin
|
||||
|
||||
{$if lcl_fullversion >= 2020000}
|
||||
DockMaster.MainDockForm := self;
|
||||
{$endif}
|
||||
fDockingIsInitialized := true;
|
||||
|
||||
if not reset then
|
||||
begin
|
||||
DockMaster.MakeDockSite(Self, [akBottom], admrpChild);
|
||||
DockMaster.OnShowOptions := @ShowAnchorDockOptions;
|
||||
{$if lcl_fullversion < 2020000}
|
||||
{$WARNING It is deprecated to use Lazarus 2.0.z to build dexed}
|
||||
{$WARNING Support will be removed after Lazarus 2.2.2 release}
|
||||
DockMaster.HeaderStyle := adhsPoints;
|
||||
{$else}
|
||||
DockMaster.HeaderStyle := 'Points';
|
||||
{$endif}
|
||||
DockMaster.HideHeaderCaptionFloatingControl := true;
|
||||
// makes widget dockable
|
||||
for i := 0 to fWidgList.Count-1 do
|
||||
|
@ -3765,25 +3755,10 @@ begin
|
|||
layoutUpdateMenu;
|
||||
end;
|
||||
|
||||
{$if lcl_fullversion < 2020000}
|
||||
{$WARNING It is deprecated to use Lazarus 2.0.z to build dexed}
|
||||
{$WARNING Support will be removed after Lazarus 2.2.2 release}
|
||||
procedure TMainForm.updateFloatingWidgetOnTop(onTop: boolean);
|
||||
var
|
||||
widg: TDexedWidget;
|
||||
const
|
||||
fstyle: array[boolean] of TFormStyle = (fsNormal, fsStayOnTop);
|
||||
begin
|
||||
for widg in fWidgList do if widg.Parent.isAssigned and
|
||||
widg.Parent.Parent.isNotAssigned and widg.isDockable then
|
||||
TForm(widg.Parent).FormStyle := fstyle[onTop];
|
||||
end;
|
||||
{$else}
|
||||
procedure TMainForm.updateFloatingWidgetOnTop(onTop: boolean);
|
||||
begin
|
||||
DockMaster.FloatingWindowsOnTop := onTop;
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
procedure TMainForm.snapTopSplitterToMenu;
|
||||
var
|
||||
|
|
|
@ -391,7 +391,6 @@ type
|
|||
property syncroEdit: TSynPluginSyncroEdit read fSyncEdit;
|
||||
property isDSource: boolean read fIsDSource;
|
||||
property isTemporary: boolean read getIfTemp;
|
||||
property TextView;
|
||||
//
|
||||
property transparentGutter: boolean read fTransparentGutter write setGutterTransparent;
|
||||
property isProjectDescription: boolean read fIsProjectDescription write fIsProjectDescription;
|
||||
|
@ -846,15 +845,7 @@ 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}
|
||||
{$WARNING It is deprecated to use Lazarus 2.0.z to build dexed}
|
||||
{$WARNING Support will be removed after Lazarus 2.2.2 release}
|
||||
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
|
||||
|
@ -886,13 +877,7 @@ begin
|
|||
itm := TFoldCache(fFolds.Items[i]);
|
||||
if not itm.isCollapsed then
|
||||
continue;
|
||||
{$if lcl_fullversion < 2020000}
|
||||
{$WARNING It is deprecated to use Lazarus 2.0.z to build dexed}
|
||||
{$WARNING Support will be removed after Lazarus 2.2.2 release}
|
||||
fMemo.TextView.FoldAtLine(itm.lineIndex-1);
|
||||
{$else}
|
||||
TSynEditFoldedView(fMemo.TextViewsManager.SynTextViewByClass[TSynEditFoldedView]).FoldAtLine(itm.lineIndex-1);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
fMemo.SelStart := fCaretPosition;
|
||||
|
@ -1174,14 +1159,7 @@ begin
|
|||
fTempFileName := GetTempDir(false) + 'temp_' + uniqueObjStr(self) + '.d';
|
||||
fFilename := newdocPageCaption;
|
||||
fModified := false;
|
||||
|
||||
{$if lcl_fullversion < 2020000}
|
||||
{$WARNING It is deprecated to use Lazarus 2.0.z to build dexed}
|
||||
{$WARNING Support will be removed after Lazarus 2.2.2 release}
|
||||
TextBuffer.AddNotifyHandler(senrUndoRedoAdded, @changeNotify);
|
||||
{$else}
|
||||
TextViewsManager.SynTextView[0].AddNotifyHandler(senrUndoRedoAdded, @changeNotify);
|
||||
{$endif}
|
||||
|
||||
Gutter.MarksPart.Visible:=false;
|
||||
|
||||
|
|
|
@ -87,22 +87,14 @@ 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];
|
||||
{$WARNING It is deprecated to use Lazarus 2.0.z to build dexed}
|
||||
{$WARNING Support will be removed after Lazarus 2.2.2 release}
|
||||
{$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];
|
||||
|
|
|
@ -210,9 +210,7 @@ begin
|
|||
win := DockMaster.GetAnchorSite(self);
|
||||
if win.isAssigned then
|
||||
begin
|
||||
{$if lcl_fullversion >= 2020000}
|
||||
Show;
|
||||
{$endif}
|
||||
win.Show;
|
||||
win.BringToFront;
|
||||
end;
|
||||
|
|
Loading…
Reference in New Issue