diff options
| author | Eric Shaw Jr <[email protected]> | 2017-02-28 12:13:34 -0500 |
|---|---|---|
| committer | Eric Shaw Jr <[email protected]> | 2017-03-23 12:54:36 -0400 |
| commit | 9ab9e7d1b3b4a7eac46b4e4f273c68f4e737e5f7 (patch) | |
| tree | cf1b0ca40159e3a236649293fe52429c399a7068 /src/qt/guiutil.cpp | |
| parent | Merge #9701: Make bumpfee tests less fragile (diff) | |
| download | discoin-9ab9e7d1b3b4a7eac46b4e4f273c68f4e737e5f7.tar.xz discoin-9ab9e7d1b3b4a7eac46b4e4f273c68f4e737e5f7.zip | |
Add a button to open the config file in a text editor
Diffstat (limited to 'src/qt/guiutil.cpp')
| -rw-r--r-- | src/qt/guiutil.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index bb5b2d434..2c9d2b001 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -417,6 +417,22 @@ void openDebugLogfile() QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathDebug))); } +bool openBitcoinConf() +{ + boost::filesystem::path pathConfig = GetConfigFile(BITCOIN_CONF_FILENAME); + + /* 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))); +} + void SubstituteFonts(const QString& language) { #if defined(Q_OS_MAC) |