Skip to content

Commit

Permalink
Update startup shortcuts (#1551)
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 authored Jul 25, 2017
1 parent 4df8a20 commit 8b7dffb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,15 +638,15 @@ boost::filesystem::path static StartupShortcutPath()
{
std::string chain = ChainNameFromCommandLine();
if (chain == CBaseChainParams::MAIN)
return GetSpecialFolderPath(CSIDL_STARTUP) / "Dash.lnk";
return GetSpecialFolderPath(CSIDL_STARTUP) / "Dash Core.lnk";
if (chain == CBaseChainParams::TESTNET) // Remove this special case when CBaseChainParams::TESTNET = "testnet4"
return GetSpecialFolderPath(CSIDL_STARTUP) / "Dash (testnet).lnk";
return GetSpecialFolderPath(CSIDL_STARTUP) / strprintf("Dash (%s).lnk", chain);
return GetSpecialFolderPath(CSIDL_STARTUP) / "Dash Core (testnet).lnk";
return GetSpecialFolderPath(CSIDL_STARTUP) / strprintf("Dash Core (%s).lnk", chain);
}

bool GetStartOnSystemStartup()
{
// check for Dash*.lnk
// check for "Dash Core*.lnk"
return boost::filesystem::exists(StartupShortcutPath());
}

Expand Down Expand Up @@ -738,8 +738,8 @@ boost::filesystem::path static GetAutostartFilePath()
{
std::string chain = ChainNameFromCommandLine();
if (chain == CBaseChainParams::MAIN)
return GetAutostartDir() / "dash.desktop";
return GetAutostartDir() / strprintf("dash-%s.lnk", chain);
return GetAutostartDir() / "dashcore.desktop";
return GetAutostartDir() / strprintf("dashcore-%s.lnk", chain);
}

bool GetStartOnSystemStartup()
Expand Down Expand Up @@ -778,13 +778,13 @@ bool SetStartOnSystemStartup(bool fAutoStart)
if (!optionFile.good())
return false;
std::string chain = ChainNameFromCommandLine();
// Write a dash.desktop file to the autostart directory:
// Write a dashcore.desktop file to the autostart directory:
optionFile << "[Desktop Entry]\n";
optionFile << "Type=Application\n";
if (chain == CBaseChainParams::MAIN)
optionFile << "Name=Dash\n";
optionFile << "Name=Dash Core\n";
else
optionFile << strprintf("Name=Bitcoin (%s)\n", chain);
optionFile << strprintf("Name=Dash Core (%s)\n", chain);
optionFile << "Exec=" << pszExePath << strprintf(" -min -testnet=%d -regtest=%d\n", GetBoolArg("-testnet", false), GetBoolArg("-regtest", false));
optionFile << "Terminal=false\n";
optionFile << "Hidden=false\n";
Expand Down

0 comments on commit 8b7dffb

Please sign in to comment.