From bbaebac32dc57aa82b437a9d3537ffffdb3bec1d Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Thu, 3 Apr 2014 23:04:49 +0100 Subject: [PATCH] Replaced "bitcoin:" URI prefix with "dogecoin:" --- src/qt/bitcoin.cpp | 4 ++-- src/qt/bitcoingui.cpp | 4 ++-- src/qt/guiutil.cpp | 12 ++++++------ src/qt/guiutil.h | 2 +- src/qt/openuridialog.cpp | 4 ++-- src/qt/paymentserver.cpp | 16 ++++++++-------- src/qt/paymentserver.h | 2 +- src/qt/recentrequeststablemodel.h | 2 +- src/qt/transactiondesc.cpp | 2 +- src/qt/walletmodel.cpp | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index e60a5f110..b6442ed59 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -416,7 +416,7 @@ void BitcoinApplication::initializeResult(int retval) } #ifdef ENABLE_WALLET // Now that initialization/startup is done, process any command-line - // bitcoin: URIs or payment requests: + // dogecoin: URIs or payment requests: connect(paymentServer, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)), window, SLOT(handlePaymentRequest(SendCoinsRecipient))); connect(window, SIGNAL(receivedURI(QString)), @@ -543,7 +543,7 @@ int main(int argc, char *argv[]) exit(0); // Start up the payment server early, too, so impatient users that click on - // bitcoin: links repeatedly have their payment requests routed to this process: + // dogecoin: links repeatedly have their payment requests routed to this process: app.createPaymentServer(); #endif diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 55e085b58..f6335b68c 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -240,7 +240,7 @@ void BitcoinGUI::createActions(bool fIsTestnet) tabGroup->addAction(sendCoinsAction); receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive"), this); - receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and bitcoin: URIs)")); + receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and dogecoin: URIs)")); receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip()); receiveCoinsAction->setCheckable(true); receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); @@ -311,7 +311,7 @@ void BitcoinGUI::createActions(bool fIsTestnet) usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels")); openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_FileIcon), tr("Open &URI..."), this); - openAction->setStatusTip(tr("Open a bitcoin: URI or payment request")); + openAction->setStatusTip(tr("Open a dogecoin: URI or payment request")); showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line options"), this); showHelpMessageAction->setStatusTip(tr("Show the Dogecoin Core help message to get a list with possible Dogecoin command-line options")); diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index d5ed397a8..735de358b 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -96,7 +96,7 @@ void setupAmountWidget(QLineEdit *widget, QWidget *parent) bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out) { - // return if URI is not valid or is no bitcoin: URI + // return if URI is not valid or is no dogecoin: URI if(!uri.isValid() || uri.scheme() != QString("bitcoin")) return false; @@ -156,13 +156,13 @@ bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out) bool parseBitcoinURI(QString uri, SendCoinsRecipient *out) { - // Convert bitcoin:// to bitcoin: + // Convert dogecoin:// to dogecoin: // - // Cannot handle this later, because bitcoin:// will cause Qt to see the part after // as host, + // Cannot handle this later, because dogecoin:// will cause Qt to see the part after // as host, // which will lower-case it (and thus invalidate the address). - if(uri.startsWith("bitcoin://", Qt::CaseInsensitive)) + if(uri.startsWith("dogecoin://", Qt::CaseInsensitive)) { - uri.replace(0, 10, "bitcoin:"); + uri.replace(0, 10, "dogecoin:"); } QUrl uriInstance(uri); return parseBitcoinURI(uriInstance, out); @@ -170,7 +170,7 @@ bool parseBitcoinURI(QString uri, SendCoinsRecipient *out) QString formatBitcoinURI(const SendCoinsRecipient &info) { - QString ret = QString("bitcoin:%1").arg(info.address); + QString ret = QString("dogecoin:%1").arg(info.address); int paramCount = 0; if (info.amount) diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index 52124ff20..7e8ddb4b6 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -36,7 +36,7 @@ namespace GUIUtil void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent); void setupAmountWidget(QLineEdit *widget, QWidget *parent); - // Parse "bitcoin:" URI into recipient object, return true on successful parsing + // Parse "dogecoin:" URI into recipient object, return true on successful parsing bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out); bool parseBitcoinURI(QString uri, SendCoinsRecipient *out); QString formatBitcoinURI(const SendCoinsRecipient &info); diff --git a/src/qt/openuridialog.cpp b/src/qt/openuridialog.cpp index 06189aeaf..0931cfc8f 100644 --- a/src/qt/openuridialog.cpp +++ b/src/qt/openuridialog.cpp @@ -16,7 +16,7 @@ OpenURIDialog::OpenURIDialog(QWidget *parent) : { ui->setupUi(this); #if QT_VERSION >= 0x040700 - ui->uriEdit->setPlaceholderText("bitcoin:"); + ui->uriEdit->setPlaceholderText("dogecoin:"); #endif } @@ -48,5 +48,5 @@ void OpenURIDialog::on_selectFileButton_clicked() if(filename.isEmpty()) return; QUrl fileUri = QUrl::fromLocalFile(filename); - ui->uriEdit->setText("bitcoin:?r=" + QUrl::toPercentEncoding(fileUri.toString())); + ui->uriEdit->setText("dogecoin:?r=" + QUrl::toPercentEncoding(fileUri.toString())); } diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index b0f236719..98130062f 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -47,7 +47,7 @@ using namespace boost; const int BITCOIN_IPC_CONNECT_TIMEOUT = 1000; // milliseconds -const QString BITCOIN_IPC_PREFIX("bitcoin:"); +const QString BITCOIN_IPC_PREFIX("dogecoin:"); const char* BITCOIN_REQUEST_MIMETYPE = "application/bitcoin-paymentrequest"; const char* BITCOIN_PAYMENTACK_MIMETYPE = "application/bitcoin-paymentack"; const char* BITCOIN_PAYMENTACK_CONTENTTYPE = "application/bitcoin-payment"; @@ -186,7 +186,7 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[]) if (arg.startsWith("-")) continue; - if (arg.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // bitcoin: URI + if (arg.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // dogecoin: URI { savedPaymentRequests.append(arg); @@ -273,7 +273,7 @@ PaymentServer::PaymentServer(QObject* parent, bool startLocalServer) : GOOGLE_PROTOBUF_VERIFY_VERSION; // Install global event filter to catch QFileOpenEvents - // on Mac: sent when you click bitcoin: links + // on Mac: sent when you click dogecoin: links // other OSes: helpful when dealing with payment request files (in the future) if (parent) parent->installEventFilter(this); @@ -290,7 +290,7 @@ PaymentServer::PaymentServer(QObject* parent, bool startLocalServer) : if (!uriServer->listen(name)) { // constructor is called early in init, so don't use "emit message()" here QMessageBox::critical(0, tr("Payment request error"), - tr("Cannot start bitcoin: click-to-pay handler")); + tr("Cannot start dogecoin: click-to-pay handler")); } else { connect(uriServer, SIGNAL(newConnection()), this, SLOT(handleURIConnection())); @@ -305,12 +305,12 @@ PaymentServer::~PaymentServer() } // -// OSX-specific way of handling bitcoin: URIs and +// OSX-specific way of handling dogecoin: URIs and // PaymentRequest mime types // bool PaymentServer::eventFilter(QObject *object, QEvent *event) { - // clicking on bitcoin: URIs creates FileOpen events on the Mac + // clicking on dogecoin: URIs creates FileOpen events on the Mac if (event->type() == QEvent::FileOpen) { QFileOpenEvent *fileEvent = static_cast(event); @@ -332,7 +332,7 @@ void PaymentServer::initNetManager() if (netManager != NULL) delete netManager; - // netManager is used to fetch paymentrequests given in bitcoin: URIs + // netManager is used to fetch paymentrequests given in dogecoin: URIs netManager = new QNetworkAccessManager(this); QNetworkProxy proxy; @@ -378,7 +378,7 @@ void PaymentServer::handleURIOrFile(const QString& s) return; } - if (s.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // bitcoin: URI + if (s.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // dogecoin: URI { #if QT_VERSION < 0x050000 QUrl uri(s); diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h index d84d09c57..80bdcbafe 100644 --- a/src/qt/paymentserver.h +++ b/src/qt/paymentserver.h @@ -5,7 +5,7 @@ #ifndef PAYMENTSERVER_H #define PAYMENTSERVER_H // This class handles payment requests from clicking on -// bitcoin: URIs +// dogecoin: URIs // // This is somewhat tricky, because we have to deal with // the situation where the user clicks on a link during diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h index d4cc5078a..b6c7a5390 100644 --- a/src/qt/recentrequeststablemodel.h +++ b/src/qt/recentrequeststablemodel.h @@ -53,7 +53,7 @@ private: Qt::SortOrder order; }; -/** Model for list of recently generated payment requests / bitcoin: URIs. +/** Model for list of recently generated payment requests / dogecoin: URIs. * Part of wallet model. */ class RecentRequestsTableModel: public QAbstractTableModel diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp index 4aebaa1e7..e5d0567ac 100644 --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -226,7 +226,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u strHTML += "" + tr("Transaction ID") + ": " + TransactionRecord::formatSubTxId(wtx.GetHash(), vout) + "
"; - // Message from normal bitcoin:URI (bitcoin:123...?message=example) + // Message from normal dogecoin:URI (dogecoin:D12...?message=example) foreach (const PAIRTYPE(string, string)& r, wtx.vOrderForm) if (r.first == "Message") strHTML += "
" + tr("Message") + ":
" + GUIUtil::HtmlEscape(r.second, true) + "
"; diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index eae448fee..db9b99fff 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -269,7 +269,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran rcp.paymentRequest.SerializeToString(&value); newTx->vOrderForm.push_back(make_pair(key, value)); } - else if (!rcp.message.isEmpty()) // Message from normal bitcoin:URI (bitcoin:123...?message=example) + else if (!rcp.message.isEmpty()) // Message from normal dogecoin:URI (dogecoin:D12...?message=example) newTx->vOrderForm.push_back(make_pair("Message", rcp.message.toStdString())); }