diff options
author | sje397 <sje397@gmail.com> | 2012-02-14 23:14:43 +1100 |
---|---|---|
committer | sje397 <sje397@gmail.com> | 2012-02-15 23:29:59 +1100 |
commit | 4efbda3f257bd8e635715377d85862d322c57c4b (patch) | |
tree | b968cfa7ffcded317da62e8792ff1aa3dacb2c88 /src/qt/walletmodel.cpp | |
parent | 15b87b2ec40bdcbc7e8173c79b829fc0f550909e (diff) |
Added 'Backup Wallet' menu option
- icon from the LGPL Nuvola set (like the tick) - http://www.icon-king.com/projects/nuvola/
- include 'boost/version.hpp' in db.cpp so that the overwrite version of copy can be used
- catch exceptions in BackupWallet (e.g. filesystem_error thrown when trying to overwrite without the overwrite flag set)
- include db.h in walletmodel.cpp for BackupWallet function
- updated doc/assets-attribution.txt and contrib/debian/copyright with copyright info for new icon
Diffstat (limited to 'src/qt/walletmodel.cpp')
-rw-r--r-- | src/qt/walletmodel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index f028f10f6c..8344a653d5 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -5,6 +5,7 @@ #include "transactiontablemodel.h" #include "headers.h" +#include "db.h" // for BackupWallet #include <QTimer> #include <QSet> @@ -239,6 +240,11 @@ bool WalletModel::changePassphrase(const SecureString &oldPass, const SecureStri return retval; } +bool WalletModel::backupWallet(const QString &filename) +{ + return BackupWallet(*wallet, filename.toLocal8Bit().data()); +} + // WalletModel::UnlockContext implementation WalletModel::UnlockContext WalletModel::requestUnlock() { |