mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 15:59:14 +02:00
mrumenu: Add default value for MaxRecent. Add indexes to recent menu item default format mask.
git-svn-id: trunk@52793 -
This commit is contained in:
parent
d6634a6af5
commit
a625ed6a3f
@ -104,7 +104,7 @@ Type
|
|||||||
procedure ShowRecentFiles;
|
procedure ShowRecentFiles;
|
||||||
Published
|
Published
|
||||||
// Max. items to be kept in the list.
|
// Max. items to be kept in the list.
|
||||||
Property MaxRecent : Integer Read FMaxRecent write FMaxRecent;
|
Property MaxRecent : Integer Read FMaxRecent write FMaxRecent default 10;
|
||||||
// Menu item to create a submenu under. Existing items will be removed.
|
// Menu item to create a submenu under. Existing items will be removed.
|
||||||
Property MenuItem : TMenuItem Read FMIRecent Write SetMIRecent;
|
Property MenuItem : TMenuItem Read FMIRecent Write SetMIRecent;
|
||||||
// Popupmenu attached to a toolbar button. Existing items will be removed.
|
// Popupmenu attached to a toolbar button. Existing items will be removed.
|
||||||
@ -137,7 +137,7 @@ Resourcestring
|
|||||||
SErrFailedToCreateDir = 'Failed to create directory "%s"';
|
SErrFailedToCreateDir = 'Failed to create directory "%s"';
|
||||||
|
|
||||||
const
|
const
|
||||||
DEFAULT_MASK = '%d. %s';
|
DEFAULT_MASK = '%0:d. %1:s';
|
||||||
|
|
||||||
function MinimizeFileName(const AFileName:string; AMaxLen:integer) : string;
|
function MinimizeFileName(const AFileName:string; AMaxLen:integer) : string;
|
||||||
|
|
||||||
@ -443,6 +443,7 @@ constructor TMRUMenuManager.Create(AOwner: TComponent);
|
|||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
FRecent:=TStringList.Create;
|
FRecent:=TStringList.Create;
|
||||||
|
FMaxRecent := 10;
|
||||||
FMaxItemLength := 80;
|
FMaxItemLength := 80;
|
||||||
FMenuCaptionMask := DEFAULT_MASK;
|
FMenuCaptionMask := DEFAULT_MASK;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user