Skip to content

Commit

Permalink
Better shortcut (openethereum#3147)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkpar authored and gavofyork committed Nov 3, 2016
1 parent 3cb355d commit d1b9aa7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion nsis/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ section "install"

# Start Menu
createDirectory "$SMPROGRAMS\${COMPANYNAME}"
createShortCut "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk" "$INSTDIR\parity.exe" "ui" "$INSTDIR\logo.ico"
createShortCut "$SMPROGRAMS\${COMPANYNAME}\${APPNAME} Ethereum.lnk" "$INSTDIR\ptray.exe" "ui" "$INSTDIR\logo.ico"
createShortCut "$DESKTOP\${APPNAME} Ethereum.lnk" "$INSTDIR\ptray.exe" "ui" "$INSTDIR\logo.ico"

# Firewall remove rules if exists
SimpleFC::AdvRemoveRule "Parity incoming peers (TCP:30303)"
Expand Down
8 changes: 6 additions & 2 deletions windows/ptray/ptray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
UNREFERENCED_PARAMETER(lpCmdLine);

CreateMutex(0, FALSE, _T("Local\\ParityTray"));
if (GetLastError() == ERROR_ALREADY_EXISTS)
return -1;
if (GetLastError() == ERROR_ALREADY_EXISTS) {
// open the UI
OpenUI();
return 0;
}


LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadStringW(hInstance, IDC_PTRAY, szWindowClass, MAX_LOADSTRING);
Expand Down

0 comments on commit d1b9aa7

Please sign in to comment.