mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-21 13:06:07 +02:00
Removed unit UITypes from LazUtils. Use System.UITypes instead. Try 2.
This commit is contained in:
parent
fb2fee81d2
commit
0f522e8d81
@ -6,7 +6,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
// LazUtils
|
// LazUtils
|
||||||
UITypes;
|
System.UITypes;
|
||||||
|
|
||||||
type
|
type
|
||||||
TLazMessageWorker = function(const aCaption, aMsg: string;
|
TLazMessageWorker = function(const aCaption, aMsg: string;
|
||||||
|
@ -16,8 +16,7 @@ unit PackageIntf;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Contnrs,
|
Classes, SysUtils, Contnrs, System.UITypes,
|
||||||
{$IF FPC_FULLVERSION >= 30200}System.{$ENDIF}UITypes,
|
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazConfigStorage, LazMethodList, LazLoggerBase,
|
LazConfigStorage, LazMethodList, LazLoggerBase,
|
||||||
// BuildIntf
|
// BuildIntf
|
||||||
|
@ -5,8 +5,7 @@ unit PackageLinkIntf;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Classes,
|
SysUtils, Classes, System.UITypes,
|
||||||
{$IF FPC_FULLVERSION >= 30200}System.{$ENDIF}UITypes,
|
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazFileUtils,
|
LazFileUtils,
|
||||||
// BuildIntf
|
// BuildIntf
|
||||||
|
@ -16,8 +16,7 @@ unit ProjectIntf;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Contnrs,
|
Classes, SysUtils, Contnrs, System.UITypes,
|
||||||
{$IF FPC_FULLVERSION >= 30200}System.{$ENDIF}UITypes,
|
|
||||||
// LazUtils
|
// LazUtils
|
||||||
FileUtil, LazFileUtils, LazFileCache, LazMethodList, AvgLvlTree,
|
FileUtil, LazFileUtils, LazFileCache, LazMethodList, AvgLvlTree,
|
||||||
// BuildIntf
|
// BuildIntf
|
||||||
|
@ -24,7 +24,7 @@ interface
|
|||||||
uses
|
uses
|
||||||
// RTL / FCL
|
// RTL / FCL
|
||||||
Classes, TypInfo, SysUtils, types, RtlConsts, variants, Contnrs, strutils, FGL,
|
Classes, TypInfo, SysUtils, types, RtlConsts, variants, Contnrs, strutils, FGL,
|
||||||
Math,
|
Math, System.UITypes,
|
||||||
// LCL
|
// LCL
|
||||||
LCLType, LCLIntf, LCLProc, Forms, Controls, ButtonPanel, Graphics,
|
LCLType, LCLIntf, LCLProc, Forms, Controls, ButtonPanel, Graphics,
|
||||||
StdCtrls, Buttons, Menus, ExtCtrls, ComCtrls, Dialogs, EditBtn, Grids, ValEdit,
|
StdCtrls, Buttons, Menus, ExtCtrls, ComCtrls, Dialogs, EditBtn, Grids, ValEdit,
|
||||||
@ -33,7 +33,7 @@ uses
|
|||||||
CheckBoxThemed,
|
CheckBoxThemed,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
FileUtil, StringHashList, LazMethodList, LazLoggerBase, LazUtilities, LazStringUtils,
|
FileUtil, StringHashList, LazMethodList, LazLoggerBase, LazUtilities, LazStringUtils,
|
||||||
GraphType, UITypes, FPCAdds, // for StrToQWord in older fpc versions
|
GraphType, FPCAdds, // for StrToQWord in older fpc versions
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
ObjInspStrConsts, PropEditUtils, TextTools,
|
ObjInspStrConsts, PropEditUtils, TextTools,
|
||||||
// Forms with .lfm files
|
// Forms with .lfm files
|
||||||
|
@ -113,7 +113,6 @@ begin
|
|||||||
D := T.Dependencies.AddUnit('StringHashList');
|
D := T.Dependencies.AddUnit('StringHashList');
|
||||||
D := T.Dependencies.AddUnit('TextStrings');
|
D := T.Dependencies.AddUnit('TextStrings');
|
||||||
D := T.Dependencies.AddUnit('Translations');
|
D := T.Dependencies.AddUnit('Translations');
|
||||||
D := T.Dependencies.AddUnit('UITypes');
|
|
||||||
D := T.Dependencies.AddInclude('unixfileutil.inc');
|
D := T.Dependencies.AddInclude('unixfileutil.inc');
|
||||||
D := T.Dependencies.AddInclude('unixlazfileutils.inc');
|
D := T.Dependencies.AddInclude('unixlazfileutils.inc');
|
||||||
D := T.Dependencies.AddInclude('unixlazutf8.inc');
|
D := T.Dependencies.AddInclude('unixlazutf8.inc');
|
||||||
@ -180,7 +179,6 @@ begin
|
|||||||
T := P.Targets.AddImplicitUnit('stringhashlist.pas');
|
T := P.Targets.AddImplicitUnit('stringhashlist.pas');
|
||||||
T := P.Targets.AddImplicitUnit('textstrings.pas');
|
T := P.Targets.AddImplicitUnit('textstrings.pas');
|
||||||
T := P.Targets.AddImplicitUnit('translations.pas');
|
T := P.Targets.AddImplicitUnit('translations.pas');
|
||||||
T := P.Targets.AddImplicitUnit('uitypes.pas');
|
|
||||||
T := P.Targets.AddImplicitUnit('utf8process.pp');
|
T := P.Targets.AddImplicitUnit('utf8process.pp');
|
||||||
|
|
||||||
// copy the compiled file, so the IDE knows how the package was compiled
|
// copy the compiled file, so the IDE knows how the package was compiled
|
||||||
|
@ -294,10 +294,6 @@
|
|||||||
<Filename Value="translations.pas"/>
|
<Filename Value="translations.pas"/>
|
||||||
<UnitName Value="Translations"/>
|
<UnitName Value="Translations"/>
|
||||||
</Item>
|
</Item>
|
||||||
<Item>
|
|
||||||
<Filename Value="uitypes.pas"/>
|
|
||||||
<UnitName Value="UITypes"/>
|
|
||||||
</Item>
|
|
||||||
<Item>
|
<Item>
|
||||||
<Filename Value="unixfileutil.inc"/>
|
<Filename Value="unixfileutil.inc"/>
|
||||||
<Type Value="Include"/>
|
<Type Value="Include"/>
|
||||||
|
@ -19,8 +19,7 @@ uses
|
|||||||
LazPasReadUtil, LazStringUtils, LazSysUtils, LazTracer, LazUnicode,
|
LazPasReadUtil, LazStringUtils, LazSysUtils, LazTracer, LazUnicode,
|
||||||
LazUTF16, LazUTF8, LazUtilities, LazUtilsStrConsts, LazVersion,
|
LazUTF16, LazUTF8, LazUtilities, LazUtilsStrConsts, LazVersion,
|
||||||
LConvEncoding, LCSVUtils, LookupStringList, Maps, Masks, ObjectLists,
|
LConvEncoding, LCSVUtils, LookupStringList, Maps, Masks, ObjectLists,
|
||||||
StringHashList, TextStrings, Translations, UITypes, UTF8Process,
|
StringHashList, TextStrings, Translations, UTF8Process, LazarusPackageIntf;
|
||||||
LazarusPackageIntf;
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -1,111 +0,0 @@
|
|||||||
unit UITypes
|
|
||||||
{$IF FPC_FULLVERSION >= 30200}
|
|
||||||
deprecated 'Use System.UITypes instead (available since FPC 3.2.0)';
|
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
uses
|
|
||||||
System.UITypes;
|
|
||||||
|
|
||||||
const
|
|
||||||
mtWarning = System.UITypes.TMsgDlgType.mtWarning;
|
|
||||||
mtError = System.UITypes.TMsgDlgType.mtError;
|
|
||||||
mtInformation = System.UITypes.TMsgDlgType.mtInformation;
|
|
||||||
mtConfirmation = System.UITypes.TMsgDlgType.mtConfirmation;
|
|
||||||
mtCustom = System.UITypes.TMsgDlgType.mtCustom;
|
|
||||||
|
|
||||||
mbYes = System.UITypes.TMsgDlgBtn.mbYes;
|
|
||||||
mbNo = System.UITypes.TMsgDlgBtn.mbNo;
|
|
||||||
mbOK = System.UITypes.TMsgDlgBtn.mbOK;
|
|
||||||
mbCancel = System.UITypes.TMsgDlgBtn.mbCancel;
|
|
||||||
mbAbort = System.UITypes.TMsgDlgBtn.mbAbort;
|
|
||||||
mbRetry = System.UITypes.TMsgDlgBtn.mbRetry;
|
|
||||||
mbIgnore = System.UITypes.TMsgDlgBtn.mbIgnore;
|
|
||||||
mbAll = System.UITypes.TMsgDlgBtn.mbAll;
|
|
||||||
mbNoToAll = System.UITypes.TMsgDlgBtn.mbNoToAll;
|
|
||||||
mbYesToAll = System.UITypes.TMsgDlgBtn.mbYesToAll;
|
|
||||||
mbHelp = System.UITypes.TMsgDlgBtn.mbHelp;
|
|
||||||
mbClose = System.UITypes.TMsgDlgBtn.mbClose;
|
|
||||||
|
|
||||||
type
|
|
||||||
// Message dialog related
|
|
||||||
TMsgDlgType = System.UITypes.TMsgDlgType;
|
|
||||||
TMsgDlgBtn = System.UITypes.TMsgDlgBtn;
|
|
||||||
TMsgDlgButtons = set of System.UITypes.TMsgDlgBtn;
|
|
||||||
|
|
||||||
// ModalResult
|
|
||||||
TModalResult = System.UITypes.TModalResult;
|
|
||||||
PModalResult = System.UITypes.PModalResult;
|
|
||||||
|
|
||||||
const
|
|
||||||
// Used for ModalResult
|
|
||||||
mrNone = System.UITypes.mrNone;
|
|
||||||
mrOK = System.UITypes.mrOK;
|
|
||||||
mrCancel = System.UITypes.mrCancel;
|
|
||||||
mrAbort = System.UITypes.mrAbort;
|
|
||||||
mrRetry = System.UITypes.mrRetry;
|
|
||||||
mrIgnore = System.UITypes.mrIgnore;
|
|
||||||
mrYes = System.UITypes.mrYes;
|
|
||||||
mrNo = System.UITypes.mrNo;
|
|
||||||
mrAll = System.UITypes.mrAll;
|
|
||||||
mrNoToAll = System.UITypes.mrNoToAll;
|
|
||||||
mrYesToAll = System.UITypes.mrYesToAll;
|
|
||||||
mrClose = System.UITypes.mrClose;
|
|
||||||
mrLast = System.UITypes.mrLast;
|
|
||||||
{$ELSE}
|
|
||||||
;
|
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
type
|
|
||||||
// Message dialog related
|
|
||||||
TMsgDlgType = (mtWarning, mtError, mtInformation, mtConfirmation, mtCustom);
|
|
||||||
TMsgDlgBtn = (mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry, mbIgnore,
|
|
||||||
mbAll, mbNoToAll, mbYesToAll, mbHelp, mbClose);
|
|
||||||
TMsgDlgButtons = set of TMsgDlgBtn;
|
|
||||||
|
|
||||||
// ModalResult
|
|
||||||
TModalResult = low(Integer)..high(Integer);
|
|
||||||
PModalResult = ^TModalResult;
|
|
||||||
|
|
||||||
const
|
|
||||||
// Used for ModalResult
|
|
||||||
mrNone = 0;
|
|
||||||
mrOK = mrNone + 1;
|
|
||||||
mrCancel = mrNone + 2;
|
|
||||||
mrAbort = mrNone + 3;
|
|
||||||
mrRetry = mrNone + 4;
|
|
||||||
mrIgnore = mrNone + 5;
|
|
||||||
mrYes = mrNone + 6;
|
|
||||||
mrNo = mrNone + 7;
|
|
||||||
mrAll = mrNone + 8;
|
|
||||||
mrNoToAll = mrNone + 9;
|
|
||||||
mrYesToAll = mrNone + 10;
|
|
||||||
mrClose = mrNone + 11;
|
|
||||||
mrLast = mrClose;
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
// String representation of ModalResult values
|
|
||||||
ModalResultStr: array[mrNone..mrLast] of shortstring = (
|
|
||||||
'mrNone',
|
|
||||||
'mrOk',
|
|
||||||
'mrCancel',
|
|
||||||
'mrAbort',
|
|
||||||
'mrRetry',
|
|
||||||
'mrIgnore',
|
|
||||||
'mrYes',
|
|
||||||
'mrNo',
|
|
||||||
'mrAll',
|
|
||||||
'mrNoToAll',
|
|
||||||
'mrYesToAll',
|
|
||||||
'mrClose');
|
|
||||||
|
|
||||||
|
|
||||||
implementation
|
|
||||||
|
|
||||||
end.
|
|
||||||
|
|
@ -28,11 +28,11 @@ uses
|
|||||||
{$IFDEF unix}
|
{$IFDEF unix}
|
||||||
cthreads,
|
cthreads,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Classes, SysUtils, math, CustApp,
|
Classes, SysUtils, Math, CustApp, System.UITypes,
|
||||||
Interfaces, // this includes the NoGUI widgetset
|
Interfaces, // this includes the NoGUI widgetset
|
||||||
// LazUtils
|
// LazUtils
|
||||||
Masks, LConvEncoding, FileUtil, LazFileUtils, LazLoggerBase, LazUtilities,
|
Masks, LConvEncoding, FileUtil, LazFileUtils, LazLoggerBase, LazUtilities,
|
||||||
LazUTF8, Laz2_XMLCfg, UITypes, LazStringUtils,
|
LazUTF8, Laz2_XMLCfg, LazStringUtils,
|
||||||
// LCL
|
// LCL
|
||||||
LCLPlatformDef, Forms,
|
LCLPlatformDef, Forms,
|
||||||
// Codetools
|
// Codetools
|
||||||
|
@ -62,9 +62,9 @@ const
|
|||||||
mrClose = System.UITypes.mrClose;
|
mrClose = System.UITypes.mrClose;
|
||||||
mrLast = System.UITypes.mrLast;
|
mrLast = System.UITypes.mrLast;
|
||||||
|
|
||||||
function GetModalResultStr(ModalResult: TModalResult): ShortString;
|
//function GetModalResultStr(ModalResult: TModalResult): ShortString;
|
||||||
deprecated 'Use the ModalResultStr array from unit System.UITypes directly.';
|
// deprecated 'Use the ModalResultStr array from unit System.UITypes directly.';
|
||||||
property ModalResultStr[ModalResult: TModalResult]: shortstring read GetModalResultStr;
|
//property ModalResultStr[ModalResult: TModalResult]: shortstring read GetModalResultStr;
|
||||||
|
|
||||||
const
|
const
|
||||||
// define aliases for Delphi compatibility
|
// define aliases for Delphi compatibility
|
||||||
|
@ -22,40 +22,40 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
// RTL + FCL
|
// RTL + FCL
|
||||||
Types, typinfo, Classes, SysUtils,
|
Types, TypInfo, Classes, SysUtils, System.UITypes,
|
||||||
// LCL
|
// LCL
|
||||||
LMessages, LResources, LCLIntf, InterfaceBase, LCLStrConsts, LCLType,
|
LMessages, LResources, LCLIntf, InterfaceBase, LCLStrConsts, LCLType,
|
||||||
Forms, Controls, Themes, Graphics, Buttons, ButtonPanel, StdCtrls,
|
Forms, Controls, Themes, Graphics, Buttons, ButtonPanel, StdCtrls,
|
||||||
ExtCtrls, LCLClasses, ClipBrd, Menus, LCLTaskDialog, DialogRes,
|
ExtCtrls, LCLClasses, ClipBrd, Menus, LCLTaskDialog, DialogRes,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
GraphType, UITypes, FileUtil, LazFileUtils, LazStringUtils, LazLoggerBase;
|
GraphType, FileUtil, LazFileUtils, LazStringUtils, LazLoggerBase;
|
||||||
|
|
||||||
type
|
type
|
||||||
// Aliases for types in UITypes.
|
// Aliases for types in UITypes.
|
||||||
TMsgDlgType = UITypes.TMsgDlgType;
|
TMsgDlgType = System.UITypes.TMsgDlgType;
|
||||||
TMsgDlgBtn = UITypes.TMsgDlgBtn;
|
TMsgDlgBtn = System.UITypes.TMsgDlgBtn;
|
||||||
TMsgDlgButtons = UITypes.TMsgDlgButtons;
|
TMsgDlgButtons = System.UITypes.TMsgDlgButtons;
|
||||||
|
|
||||||
const
|
const
|
||||||
// Aliases for enum values in UITypes.
|
// Aliases for enum values in UITypes.
|
||||||
mtWarning = UITypes.TMsgDlgType.mtWarning;
|
mtWarning = System.UITypes.TMsgDlgType.mtWarning;
|
||||||
mtError = UITypes.TMsgDlgType.mtError;
|
mtError = System.UITypes.TMsgDlgType.mtError;
|
||||||
mtInformation = UITypes.TMsgDlgType.mtInformation;
|
mtInformation = System.UITypes.TMsgDlgType.mtInformation;
|
||||||
mtConfirmation = UITypes.TMsgDlgType.mtConfirmation;
|
mtConfirmation = System.UITypes.TMsgDlgType.mtConfirmation;
|
||||||
mtCustom = UITypes.TMsgDlgType.mtCustom;
|
mtCustom = System.UITypes.TMsgDlgType.mtCustom;
|
||||||
|
|
||||||
mbYes = UITypes.TMsgDlgBtn.mbYes;
|
mbYes = System.UITypes.TMsgDlgBtn.mbYes;
|
||||||
mbNo = UITypes.TMsgDlgBtn.mbNo;
|
mbNo = System.UITypes.TMsgDlgBtn.mbNo;
|
||||||
mbOK = UITypes.TMsgDlgBtn.mbOK;
|
mbOK = System.UITypes.TMsgDlgBtn.mbOK;
|
||||||
mbCancel = UITypes.TMsgDlgBtn.mbCancel;
|
mbCancel = System.UITypes.TMsgDlgBtn.mbCancel;
|
||||||
mbAbort = UITypes.TMsgDlgBtn.mbAbort;
|
mbAbort = System.UITypes.TMsgDlgBtn.mbAbort;
|
||||||
mbRetry = UITypes.TMsgDlgBtn.mbRetry;
|
mbRetry = System.UITypes.TMsgDlgBtn.mbRetry;
|
||||||
mbIgnore = UITypes.TMsgDlgBtn.mbIgnore;
|
mbIgnore = System.UITypes.TMsgDlgBtn.mbIgnore;
|
||||||
mbAll = UITypes.TMsgDlgBtn.mbAll;
|
mbAll = System.UITypes.TMsgDlgBtn.mbAll;
|
||||||
mbNoToAll = UITypes.TMsgDlgBtn.mbNoToAll;
|
mbNoToAll = System.UITypes.TMsgDlgBtn.mbNoToAll;
|
||||||
mbYesToAll = UITypes.TMsgDlgBtn.mbYesToAll;
|
mbYesToAll = System.UITypes.TMsgDlgBtn.mbYesToAll;
|
||||||
mbHelp = UITypes.TMsgDlgBtn.mbHelp;
|
mbHelp = System.UITypes.TMsgDlgBtn.mbHelp;
|
||||||
mbClose = UITypes.TMsgDlgBtn.mbClose;
|
mbClose = System.UITypes.TMsgDlgBtn.mbClose;
|
||||||
|
|
||||||
// Combinations of buttons.
|
// Combinations of buttons.
|
||||||
mbYesNoCancel = [mbYes, mbNo, mbCancel];
|
mbYesNoCancel = [mbYes, mbNo, mbCancel];
|
||||||
|
@ -30,12 +30,12 @@ uses
|
|||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
// rtl
|
// rtl
|
||||||
Windows, shlobj, ShellApi, ActiveX, SysUtils, Classes, CommDlg,
|
Windows, shlobj, ShellApi, ActiveX, SysUtils, Classes, CommDlg,
|
||||||
|
{$ifdef DebugCommonDialogEvents}
|
||||||
|
System.UITypes,
|
||||||
|
{$endif}
|
||||||
// lcl
|
// lcl
|
||||||
LCLProc, LCLType, Dialogs, Controls, Graphics, Forms, Masks,
|
LCLProc, LCLType, Dialogs, Controls, Graphics, Forms, Masks,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
{$ifdef DebugCommonDialogEvents}
|
|
||||||
UITypes,
|
|
||||||
{$endif}
|
|
||||||
LazFileUtils, LazUTF8,
|
LazFileUtils, LazUTF8,
|
||||||
// ws
|
// ws
|
||||||
WSDialogs, WSLCLClasses, Win32Extra, Win32Int, InterfaceBase,
|
WSDialogs, WSLCLClasses, Win32Extra, Win32Int, InterfaceBase,
|
||||||
|
Loading…
Reference in New Issue
Block a user