|
|
|
@ -421,12 +421,12 @@ bool openBitcoinConf()
@@ -421,12 +421,12 @@ bool openBitcoinConf()
|
|
|
|
|
|
|
|
|
|
/* Create the file */ |
|
|
|
|
boost::filesystem::ofstream configFile(pathConfig, std::ios_base::app); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!configFile.good()) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
configFile.close(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Open bitcoin.conf with the associated application */ |
|
|
|
|
return QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathConfig))); |
|
|
|
|
} |
|
|
|
@ -616,7 +616,7 @@ fs::path static StartupShortcutPath()
@@ -616,7 +616,7 @@ fs::path static StartupShortcutPath()
|
|
|
|
|
std::string chain = ChainNameFromCommandLine(); |
|
|
|
|
if (chain == CBaseChainParams::MAIN) |
|
|
|
|
return GetSpecialFolderPath(CSIDL_STARTUP) / "Kevacoin.lnk"; |
|
|
|
|
if (chain == CBaseChainParams::TESTNET) // Remove this special case when CBaseChainParams::TESTNET = "testnet4"
|
|
|
|
|
if (chain == CBaseChainParams::TESTNET) // Remove this special case when CBaseChainParams::TESTNET = "testnet5"
|
|
|
|
|
return GetSpecialFolderPath(CSIDL_STARTUP) / "Kevacoin (testnet).lnk"; |
|
|
|
|
return GetSpecialFolderPath(CSIDL_STARTUP) / strprintf("Kevacoin (%s).lnk", chain); |
|
|
|
|
} |
|
|
|
@ -785,7 +785,7 @@ LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef
@@ -785,7 +785,7 @@ LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef
|
|
|
|
|
if (listSnapshot == nullptr) { |
|
|
|
|
return nullptr; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// loop through the list of startup items and try to find the bitcoin app
|
|
|
|
|
for(int i = 0; i < CFArrayGetCount(listSnapshot); i++) { |
|
|
|
|
LSSharedFileListItemRef item = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(listSnapshot, i); |
|
|
|
@ -813,7 +813,7 @@ LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef
@@ -813,7 +813,7 @@ LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef
|
|
|
|
|
CFRelease(currentItemURL); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CFRelease(listSnapshot); |
|
|
|
|
return nullptr; |
|
|
|
|
} |
|
|
|
@ -824,7 +824,7 @@ bool GetStartOnSystemStartup()
@@ -824,7 +824,7 @@ bool GetStartOnSystemStartup()
|
|
|
|
|
if (bitcoinAppUrl == nullptr) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LSSharedFileListRef loginItems = LSSharedFileListCreate(nullptr, kLSSharedFileListSessionLoginItems, nullptr); |
|
|
|
|
LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, bitcoinAppUrl); |
|
|
|
|
|
|
|
|
@ -838,7 +838,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
@@ -838,7 +838,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
|
|
|
|
|
if (bitcoinAppUrl == nullptr) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LSSharedFileListRef loginItems = LSSharedFileListCreate(nullptr, kLSSharedFileListSessionLoginItems, nullptr); |
|
|
|
|
LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, bitcoinAppUrl); |
|
|
|
|
|
|
|
|
@ -850,7 +850,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
@@ -850,7 +850,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
|
|
|
|
|
// remove item
|
|
|
|
|
LSSharedFileListItemRemove(loginItems, foundItem); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CFRelease(bitcoinAppUrl); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
@ -1011,7 +1011,7 @@ void ClickableLabel::mouseReleaseEvent(QMouseEvent *event)
@@ -1011,7 +1011,7 @@ void ClickableLabel::mouseReleaseEvent(QMouseEvent *event)
|
|
|
|
|
{ |
|
|
|
|
Q_EMIT clicked(event->pos()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ClickableProgressBar::mouseReleaseEvent(QMouseEvent *event) |
|
|
|
|
{ |
|
|
|
|
Q_EMIT clicked(event->pos()); |
|
|
|
|