mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 20:59:36 +02:00
favorites: add add/remove icons
git-svn-id: trunk@50812 -
This commit is contained in:
parent
873b3e4baa
commit
173aff6805
@ -145,6 +145,8 @@ begin
|
||||
if Assigned(FOrigOnPopup) then
|
||||
FOrigOnPopup(Sender);
|
||||
|
||||
if DropdownMenu.Images=nil then
|
||||
DropdownMenu.Images := IDEImages.Images_16;
|
||||
xM := DropdownMenu.Items;
|
||||
|
||||
xMIndex := 0;
|
||||
@ -164,9 +166,14 @@ begin
|
||||
xAddToFav := TFileNameMenuItem.Create(Self);
|
||||
xAddToFav.FileName := xProj.ProjectInfoFile;
|
||||
if not FavHandler.IsInFavoriteProjects(xProj.ProjectInfoFile) then
|
||||
xAddToFav.Caption := Format(sAddToFavoritesS, [xProj.ProjectInfoFile])
|
||||
else
|
||||
begin
|
||||
xAddToFav.Caption := Format(sAddToFavoritesS, [xProj.ProjectInfoFile]);
|
||||
xAddToFav.ImageIndex := IDEImages.LoadImage(16, 'laz_add');
|
||||
end else
|
||||
begin
|
||||
xAddToFav.Caption := Format(sRemoveFromFavoritesS, [xProj.ProjectInfoFile]);
|
||||
xAddToFav.ImageIndex := IDEImages.LoadImage(16, 'laz_delete');
|
||||
end;
|
||||
xAddToFav.OnClick := @mnuAddRemoveActiveProject;
|
||||
xM.Insert(xMIndex, xAddToFav);
|
||||
Inc(xMIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user