terminal/src/propsheet
Malcolm Smith 601286ac69
Find icon from shortcut target if shortcut doesn't specify it (#6277)
Implements what I was suggesting in #6266 where if a shortcut doesn't
specify an icon, the shortcut target full path is used before searching
for a matching executable in the path.

## References

Found due to not getting the right icon in conhost from the Yori
installer.  It's fixed in the installer from
5af366b6a5
for all current users of conhost though, so this PR is just trying to
minimize surprises for the next guy.

## Detailed Description of the Pull Request / Additional comments

I know conhost and shortcut settings aren't really the team's focus
which is why I'm doing this.  I understand though if there's a better
way or there are factors that I hadn't considered.  Note that the path
searching code is used when programs are launched without using a
shortcut, and it will match if the working directory of the shortcut is
the directory containing the executable.

## Validation Steps Performed

Created a shortcut that didn't specify an icon to a binary that wasn't
in the path, and verified that the icon in the upper left of the console
window could resolve correctly when opening the shortcut.  I'm not aware
of a way to get into this path (of launching via a shortcut to a command
line process) without replacing the system conhost, which is what I did
to verify it.  In order to diagnose it, I used hardcoded DebugBreak()
since even ImageFileExecutionOptions didn't like running against conhost-
is there are better way to debug and test these cases without being so
invasive on the system?

Closes #6266
2020-06-01 17:19:05 +00:00
..
ColorControl.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
ColorControl.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
ColorsPage.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
ColorsPage.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
console.cpp ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
console.def Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
console.dll.mui.lci Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
console.h Rename propsheet/TerminalPage to propsheet/TerminalPropsheetPage (#5882) 2020-05-14 01:49:20 +00:00
console.man Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
console.rc Prevent "Options" propsheet from reverting cursor shape settings (#2663) 2019-09-09 14:45:05 +00:00
console.Resources.man Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
dbcs.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
dialogs.h Give cursor radio buttons their own sequential IDs in propsheet (#6231) 2020-05-28 14:16:10 -07:00
dll.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
font.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
fontdlg.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
fontdlg.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
globals.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
globals.h Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
init.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
LayoutPage.cpp Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
LayoutPage.h Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
menu.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
misc.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
OptionsPage.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
OptionsPage.h Prevent "Options" propsheet from reverting cursor shape settings (#2663) 2019-09-09 14:45:05 +00:00
precomp.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
precomp.h Remove global namespaced min/max and replace it with STL min/max (#4173) 2020-01-10 13:27:05 +00:00
preview.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
product.pbxproj Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
propsheet.vcxproj Rename propsheet/TerminalPage to propsheet/TerminalPropsheetPage (#5882) 2020-05-14 01:49:20 +00:00
propsheet.vcxproj.filters Combined changes to make the build work again (see inside) (#2945) 2019-09-30 10:39:55 -07:00
PropSheetHandler.cpp Find icon from shortcut target if shortcut doesn't specify it (#6277) 2020-06-01 17:19:05 +00:00
registry.cpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
sources Rename propsheet/TerminalPage to propsheet/TerminalPropsheetPage (#5882) 2020-05-14 01:49:20 +00:00
strid.mc Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
TerminalPropsheetPage.cpp Rename propsheet/TerminalPage to propsheet/TerminalPropsheetPage (#5882) 2020-05-14 01:49:20 +00:00
TerminalPropsheetPage.h Rename propsheet/TerminalPage to propsheet/TerminalPropsheetPage (#5882) 2020-05-14 01:49:20 +00:00
util.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
windowsshell.manifest Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00