aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-07-18 16:50:17 +1000
committerGavin Andresen <gavinandresen@gmail.com>2013-08-22 11:05:45 +1000
commita73aa68b848f7fe41aa2e6a8721dbc7fdcfa8080 (patch)
tree53ac3ec549f9c13dcddf6878110e236605cf322f /src/qt/bitcoin.cpp
parenta2189fbaf65dd56c808dc7429b800e70d31178c3 (diff)
Rework when payment server is started
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index e4ca9e4387..52015b4751 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -197,6 +197,12 @@ int main(int argc, char *argv[])
QTranslator qtTranslatorBase, qtTranslator, translatorBase, translator;
initTranslations(qtTranslatorBase, qtTranslator, translatorBase, translator);
+ // Do this early as we don't want to bother initializing if we are just calling IPC
+ // ... but do it after creating app and setting up translations, so errors are
+ // translated properly.
+ if (PaymentServer::ipcSendCommandLine())
+ exit(0);
+
// Now that translations are initialized check for errors and allow a translatable error message
if (fMissingDatadir) {
QMessageBox::critical(0, QObject::tr("Bitcoin"),
@@ -208,15 +214,13 @@ int main(int argc, char *argv[])
return 1;
}
+ // Start up the payment server early, too, so impatient users that click on
+ // bitcoin: links repeatedly have their payment requests routed to this process:
+ PaymentServer* paymentServer = new PaymentServer(&app);
+
// User language is set up: pick a data directory
Intro::pickDataDirectory();
- // Do this early as we don't want to bother initializing if we are just calling IPC
- // ... but do it after creating app, so QCoreApplication::arguments is initialized:
- if (PaymentServer::ipcSendCommandLine())
- exit(0);
- PaymentServer* paymentServer = new PaymentServer(&app);
-
// Install global event filter that makes sure that long tooltips can be word-wrapped
app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));