mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 16:40:48 +02:00
Favorites: Add "header" for group of items in dropdown list of the "Open..." toolbar button
This commit is contained in:
parent
5deb19a52d
commit
a4e0a11847
@ -164,7 +164,7 @@ end;
|
|||||||
|
|
||||||
procedure TOpenFileFavToolButton.RefreshMenu(Sender: TObject);
|
procedure TOpenFileFavToolButton.RefreshMenu(Sender: TObject);
|
||||||
var
|
var
|
||||||
xM, xSep: TMenuItem;
|
xM, xSep, xHeader: TMenuItem;
|
||||||
xFavoriteFile: string;
|
xFavoriteFile: string;
|
||||||
xMI, xAddToFav: TFileNameMenuItem;
|
xMI, xAddToFav: TFileNameMenuItem;
|
||||||
xProj: TLazProject;
|
xProj: TLazProject;
|
||||||
@ -210,10 +210,15 @@ begin
|
|||||||
|
|
||||||
if xMIndex > 0 then
|
if xMIndex > 0 then
|
||||||
begin
|
begin
|
||||||
|
// separator
|
||||||
xSep := TMenuItem.Create(Self);
|
xSep := TMenuItem.Create(Self);
|
||||||
xSep.Caption := '-';
|
xSep.Caption := cLineCaption;
|
||||||
xM.Insert(xMIndex, xSep);
|
xM.Insert(xMIndex, xSep);
|
||||||
Inc(xMIndex);
|
// header
|
||||||
|
xHeader := TMenuItem.Create(Self);
|
||||||
|
xHeader.Caption := sFavoritesHeaderS;
|
||||||
|
xHeader.Enabled := false;
|
||||||
|
xM.Insert(0, xHeader);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ unit favoritesstr;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
resourcestring
|
resourcestring
|
||||||
|
sFavoritesHeaderS = 'Favorites:';
|
||||||
sAddToFavoritesS = 'Add to favorites: %s';
|
sAddToFavoritesS = 'Add to favorites: %s';
|
||||||
sRemoveFromFavoritesS = 'Remove from favorites: %s';
|
sRemoveFromFavoritesS = 'Remove from favorites: %s';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user