mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 09:56:12 +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
|
if Assigned(FOrigOnPopup) then
|
||||||
FOrigOnPopup(Sender);
|
FOrigOnPopup(Sender);
|
||||||
|
|
||||||
|
if DropdownMenu.Images=nil then
|
||||||
|
DropdownMenu.Images := IDEImages.Images_16;
|
||||||
xM := DropdownMenu.Items;
|
xM := DropdownMenu.Items;
|
||||||
|
|
||||||
xMIndex := 0;
|
xMIndex := 0;
|
||||||
@ -164,9 +166,14 @@ begin
|
|||||||
xAddToFav := TFileNameMenuItem.Create(Self);
|
xAddToFav := TFileNameMenuItem.Create(Self);
|
||||||
xAddToFav.FileName := xProj.ProjectInfoFile;
|
xAddToFav.FileName := xProj.ProjectInfoFile;
|
||||||
if not FavHandler.IsInFavoriteProjects(xProj.ProjectInfoFile) then
|
if not FavHandler.IsInFavoriteProjects(xProj.ProjectInfoFile) then
|
||||||
xAddToFav.Caption := Format(sAddToFavoritesS, [xProj.ProjectInfoFile])
|
begin
|
||||||
else
|
xAddToFav.Caption := Format(sAddToFavoritesS, [xProj.ProjectInfoFile]);
|
||||||
|
xAddToFav.ImageIndex := IDEImages.LoadImage(16, 'laz_add');
|
||||||
|
end else
|
||||||
|
begin
|
||||||
xAddToFav.Caption := Format(sRemoveFromFavoritesS, [xProj.ProjectInfoFile]);
|
xAddToFav.Caption := Format(sRemoveFromFavoritesS, [xProj.ProjectInfoFile]);
|
||||||
|
xAddToFav.ImageIndex := IDEImages.LoadImage(16, 'laz_delete');
|
||||||
|
end;
|
||||||
xAddToFav.OnClick := @mnuAddRemoveActiveProject;
|
xAddToFav.OnClick := @mnuAddRemoveActiveProject;
|
||||||
xM.Insert(xMIndex, xAddToFav);
|
xM.Insert(xMIndex, xAddToFav);
|
||||||
Inc(xMIndex);
|
Inc(xMIndex);
|
||||||
|
Loading…
Reference in New Issue
Block a user