Replaced "bitcoin:" URI prefix with "dogecoin:"

This commit is contained in:
Ross Nicoll 2014-04-03 23:04:49 +01:00
parent a8a443c30e
commit bbaebac32d
No known key found for this signature in database
GPG key ID: 9142E5F7E533CE3B
10 changed files with 25 additions and 25 deletions

View file

@ -416,7 +416,7 @@ void BitcoinApplication::initializeResult(int retval)
} }
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
// Now that initialization/startup is done, process any command-line // 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)), connect(paymentServer, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)),
window, SLOT(handlePaymentRequest(SendCoinsRecipient))); window, SLOT(handlePaymentRequest(SendCoinsRecipient)));
connect(window, SIGNAL(receivedURI(QString)), connect(window, SIGNAL(receivedURI(QString)),
@ -543,7 +543,7 @@ int main(int argc, char *argv[])
exit(0); exit(0);
// Start up the payment server early, too, so impatient users that click on // 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(); app.createPaymentServer();
#endif #endif

View file

@ -240,7 +240,7 @@ void BitcoinGUI::createActions(bool fIsTestnet)
tabGroup->addAction(sendCoinsAction); tabGroup->addAction(sendCoinsAction);
receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive"), this); 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->setToolTip(receiveCoinsAction->statusTip());
receiveCoinsAction->setCheckable(true); receiveCoinsAction->setCheckable(true);
receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); 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")); 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 = 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 = 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")); showHelpMessageAction->setStatusTip(tr("Show the Dogecoin Core help message to get a list with possible Dogecoin command-line options"));

View file

@ -96,7 +96,7 @@ void setupAmountWidget(QLineEdit *widget, QWidget *parent)
bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out) 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")) if(!uri.isValid() || uri.scheme() != QString("bitcoin"))
return false; return false;
@ -156,13 +156,13 @@ bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out)
bool parseBitcoinURI(QString 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). // 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); QUrl uriInstance(uri);
return parseBitcoinURI(uriInstance, out); return parseBitcoinURI(uriInstance, out);
@ -170,7 +170,7 @@ bool parseBitcoinURI(QString uri, SendCoinsRecipient *out)
QString formatBitcoinURI(const SendCoinsRecipient &info) QString formatBitcoinURI(const SendCoinsRecipient &info)
{ {
QString ret = QString("bitcoin:%1").arg(info.address); QString ret = QString("dogecoin:%1").arg(info.address);
int paramCount = 0; int paramCount = 0;
if (info.amount) if (info.amount)

View file

@ -36,7 +36,7 @@ namespace GUIUtil
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent); void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent);
void setupAmountWidget(QLineEdit *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(const QUrl &uri, SendCoinsRecipient *out);
bool parseBitcoinURI(QString uri, SendCoinsRecipient *out); bool parseBitcoinURI(QString uri, SendCoinsRecipient *out);
QString formatBitcoinURI(const SendCoinsRecipient &info); QString formatBitcoinURI(const SendCoinsRecipient &info);

View file

@ -16,7 +16,7 @@ OpenURIDialog::OpenURIDialog(QWidget *parent) :
{ {
ui->setupUi(this); ui->setupUi(this);
#if QT_VERSION >= 0x040700 #if QT_VERSION >= 0x040700
ui->uriEdit->setPlaceholderText("bitcoin:"); ui->uriEdit->setPlaceholderText("dogecoin:");
#endif #endif
} }
@ -48,5 +48,5 @@ void OpenURIDialog::on_selectFileButton_clicked()
if(filename.isEmpty()) if(filename.isEmpty())
return; return;
QUrl fileUri = QUrl::fromLocalFile(filename); QUrl fileUri = QUrl::fromLocalFile(filename);
ui->uriEdit->setText("bitcoin:?r=" + QUrl::toPercentEncoding(fileUri.toString())); ui->uriEdit->setText("dogecoin:?r=" + QUrl::toPercentEncoding(fileUri.toString()));
} }

View file

@ -47,7 +47,7 @@
using namespace boost; using namespace boost;
const int BITCOIN_IPC_CONNECT_TIMEOUT = 1000; // milliseconds 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_REQUEST_MIMETYPE = "application/bitcoin-paymentrequest";
const char* BITCOIN_PAYMENTACK_MIMETYPE = "application/bitcoin-paymentack"; const char* BITCOIN_PAYMENTACK_MIMETYPE = "application/bitcoin-paymentack";
const char* BITCOIN_PAYMENTACK_CONTENTTYPE = "application/bitcoin-payment"; const char* BITCOIN_PAYMENTACK_CONTENTTYPE = "application/bitcoin-payment";
@ -186,7 +186,7 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
if (arg.startsWith("-")) if (arg.startsWith("-"))
continue; continue;
if (arg.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // bitcoin: URI if (arg.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // dogecoin: URI
{ {
savedPaymentRequests.append(arg); savedPaymentRequests.append(arg);
@ -273,7 +273,7 @@ PaymentServer::PaymentServer(QObject* parent, bool startLocalServer) :
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
// Install global event filter to catch QFileOpenEvents // 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) // other OSes: helpful when dealing with payment request files (in the future)
if (parent) if (parent)
parent->installEventFilter(this); parent->installEventFilter(this);
@ -290,7 +290,7 @@ PaymentServer::PaymentServer(QObject* parent, bool startLocalServer) :
if (!uriServer->listen(name)) { if (!uriServer->listen(name)) {
// constructor is called early in init, so don't use "emit message()" here // constructor is called early in init, so don't use "emit message()" here
QMessageBox::critical(0, tr("Payment request error"), QMessageBox::critical(0, tr("Payment request error"),
tr("Cannot start bitcoin: click-to-pay handler")); tr("Cannot start dogecoin: click-to-pay handler"));
} }
else { else {
connect(uriServer, SIGNAL(newConnection()), this, SLOT(handleURIConnection())); 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 // PaymentRequest mime types
// //
bool PaymentServer::eventFilter(QObject *object, QEvent *event) 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) if (event->type() == QEvent::FileOpen)
{ {
QFileOpenEvent *fileEvent = static_cast<QFileOpenEvent*>(event); QFileOpenEvent *fileEvent = static_cast<QFileOpenEvent*>(event);
@ -332,7 +332,7 @@ void PaymentServer::initNetManager()
if (netManager != NULL) if (netManager != NULL)
delete netManager; 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); netManager = new QNetworkAccessManager(this);
QNetworkProxy proxy; QNetworkProxy proxy;
@ -378,7 +378,7 @@ void PaymentServer::handleURIOrFile(const QString& s)
return; 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 #if QT_VERSION < 0x050000
QUrl uri(s); QUrl uri(s);

View file

@ -5,7 +5,7 @@
#ifndef PAYMENTSERVER_H #ifndef PAYMENTSERVER_H
#define PAYMENTSERVER_H #define PAYMENTSERVER_H
// This class handles payment requests from clicking on // This class handles payment requests from clicking on
// bitcoin: URIs // dogecoin: URIs
// //
// This is somewhat tricky, because we have to deal with // This is somewhat tricky, because we have to deal with
// the situation where the user clicks on a link during // the situation where the user clicks on a link during

View file

@ -53,7 +53,7 @@ private:
Qt::SortOrder order; 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. * Part of wallet model.
*/ */
class RecentRequestsTableModel: public QAbstractTableModel class RecentRequestsTableModel: public QAbstractTableModel

View file

@ -226,7 +226,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u
strHTML += "<b>" + tr("Transaction ID") + ":</b> " + TransactionRecord::formatSubTxId(wtx.GetHash(), vout) + "<br>"; strHTML += "<b>" + tr("Transaction ID") + ":</b> " + TransactionRecord::formatSubTxId(wtx.GetHash(), vout) + "<br>";
// 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) foreach (const PAIRTYPE(string, string)& r, wtx.vOrderForm)
if (r.first == "Message") if (r.first == "Message")
strHTML += "<br><b>" + tr("Message") + ":</b><br>" + GUIUtil::HtmlEscape(r.second, true) + "<br>"; strHTML += "<br><b>" + tr("Message") + ":</b><br>" + GUIUtil::HtmlEscape(r.second, true) + "<br>";

View file

@ -269,7 +269,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
rcp.paymentRequest.SerializeToString(&value); rcp.paymentRequest.SerializeToString(&value);
newTx->vOrderForm.push_back(make_pair(key, 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())); newTx->vOrderForm.push_back(make_pair("Message", rcp.message.toStdString()));
} }