Skip to content

Commit

Permalink
Update SbieView.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos committed Aug 12, 2023
1 parent 3b18c85 commit 0f1cab5
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions SandboxiePlus/SandMan/Views/SbieView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1871,8 +1871,12 @@ void CSbieView::UpdateStartMenu(CSandBoxPlus* pBoxEx)
QIcon Icon;
if(Link.IconIndex == -1)
Icon = theGUI->GetIcon("Internet");
else if (!Link.Icon.isEmpty())
Icon = LoadWindowsIcon(Link.Icon, Link.IconIndex);
else if (!Link.Icon.isEmpty()) {
if(QFile::exists(Link.Icon))
Icon = LoadWindowsIcon(Link.Icon, Link.IconIndex);
else
Icon = theGUI->GetIcon("File");
}
if (Icon.isNull()) Icon = m_IconProvider.icon(QFileInfo(Link.Target));
pAction->setIcon(Icon);
QString Command;
Expand Down Expand Up @@ -1933,8 +1937,12 @@ void CSbieView::UpdateRunMenu(const CSandBoxPtr& pBox)
QIcon Icon;
if(IconIndex == -1)
Icon = theGUI->GetIcon("Internet");
else if (!IconFile.isEmpty())
Icon = LoadWindowsIcon(IconFile, IconIndex);
else if (!IconFile.isEmpty()) {
if(QFile::exists(IconFile))
Icon = LoadWindowsIcon(IconFile, IconIndex);
else
Icon = theGUI->GetIcon("File");
}
if (Icon.isNull()) Icon = m_IconProvider.icon(QFileInfo(CmdFile));
pAction->setIcon(Icon);
pAction->setData(Entry["Command"].toString());
Expand Down

0 comments on commit 0f1cab5

Please sign in to comment.