Browse Source

[Qt, Linux] honor current network when creating autostart link

0.13
Philip Kaufmann 10 years ago
parent
commit
6cb4a52535
  1. 7
      src/qt/guiutil.cpp

7
src/qt/guiutil.cpp

@ -709,8 +709,13 @@ bool SetStartOnSystemStartup(bool fAutoStart) @@ -709,8 +709,13 @@ bool SetStartOnSystemStartup(bool fAutoStart)
// Write a bitcoin.desktop file to the autostart directory:
optionFile << "[Desktop Entry]\n";
optionFile << "Type=Application\n";
if (GetBoolArg("-testnet", false))
optionFile << "Name=Bitcoin (testnet)\n";
else if (GetBoolArg("-regtest", false))
optionFile << "Name=Bitcoin (regtest)\n";
else
optionFile << "Name=Bitcoin\n";
optionFile << "Exec=" << pszExePath << " -min\n";
optionFile << "Exec=" << pszExePath << strprintf(" -min -testnet=%d -regtest=%d\n", GetBoolArg("-testnet", false), GetBoolArg("-regtest", false));
optionFile << "Terminal=false\n";
optionFile << "Hidden=false\n";
optionFile.close();

Loading…
Cancel
Save