From 6cb4a5253551269db4ce6d853b39e61f9050a21e Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Sun, 15 Feb 2015 16:27:08 +0100 Subject: [Qt, Linux] honor current network when creating autostart link --- src/qt/guiutil.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/qt/guiutil.cpp') diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index d2dcdf6395..9db0a75971 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -653,7 +653,7 @@ bool SetStartOnSystemStartup(bool fAutoStart) #elif defined(Q_OS_LINUX) // Follow the Desktop Application Autostart Spec: -// http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html +// http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html boost::filesystem::path static GetAutostartDir() { @@ -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"; - optionFile << "Name=Bitcoin\n"; - optionFile << "Exec=" << pszExePath << " -min\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 << strprintf(" -min -testnet=%d -regtest=%d\n", GetBoolArg("-testnet", false), GetBoolArg("-regtest", false)); optionFile << "Terminal=false\n"; optionFile << "Hidden=false\n"; optionFile.close(); -- cgit v1.2.3