Bug 1602196: Generate an icon for the ssb shortcut on windows. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D56773
This commit is contained in:
@@ -701,7 +701,7 @@ NS_IMETHODIMP
|
||||
nsWindowsShellService::CreateShortcut(nsIFile* aBinary,
|
||||
const nsTArray<nsString>& aArguments,
|
||||
const nsAString& aDescription,
|
||||
nsIFile* aTarget) {
|
||||
nsIFile* aIconFile, nsIFile* aTarget) {
|
||||
NS_ENSURE_ARG(aBinary);
|
||||
NS_ENSURE_ARG(aTarget);
|
||||
|
||||
@@ -725,6 +725,11 @@ nsWindowsShellService::CreateShortcut(nsIFile* aBinary,
|
||||
|
||||
link->SetArguments(arguments.get());
|
||||
|
||||
if (aIconFile) {
|
||||
nsString icon(aIconFile->NativePath());
|
||||
link->SetIconLocation(icon.get(), 0);
|
||||
}
|
||||
|
||||
RefPtr<IPersistFile> persist;
|
||||
hr = link->QueryInterface(IID_IPersistFile, getter_AddRefs(persist));
|
||||
NS_ENSURE_HRESULT(hr, NS_ERROR_FAILURE);
|
||||
|
||||
Reference in New Issue
Block a user