Commit Graph

126 Commits

Author SHA1 Message Date
Philip Kaufmann 08dd1b7be1 Qt: move paymentACK handling to paymentserver
- add new slot handlePaymentACK() to paymentserver, which handles
  paymentACK messages (currently we just display them)
- make paymentACK message a modal information dialog
- change some QObject::tr() to just tr()
- clarify the processPaymentRequest() error, when IsDust()
- small string change to prevent a tripple + usage with QString
2013-10-24 15:43:55 +02:00
Philip Kaufmann 95d4a2be95 paymentserver: style fixes / cleanup
- rename reportError() into message() to be in line with our default
  message() signal/slot naming (and can be used for all types of messages)
- rename some QStrings to not collide with message() function
- add a missing message for malformed URIs that IS also used in BitcoinGUI
- fix / extend some comments and misc style fixes
2013-10-19 16:27:04 +02:00
Philip Kaufmann d5f0ef54f8 several small Qt-related fixes
- make BitcoinGUI::showPaymentACK() use a reference for msg and use our
  own GUIUtil::HtmlEscape() function
- ensure QTimer usage in clientmodel is the same as in walletmodel
- remove an unneeded debug message in walletframe
- flag some parameters as unused in DebugMessageHandler()
- small code formatting changes
2013-09-28 19:32:34 +02:00
Gavin Andresen 881a85a22d Replace printf with LogPrintf / LogPrint 2013-09-18 20:39:25 +10:00
Gavin Andresen e51321fb75 Refactor: OutputDebugStringF -> LogPrint(category, ...) 2013-09-18 20:39:24 +10:00
Philip Kaufmann e664c3d70c Bitcoin-Qt: allow to differentiate Qt log entries from core
- prepend "Bitcoin-Qt" in front of debug.log entries, which come from Qt
- move DebugMessageHandler installation upwards to the event handler
  installation, which fits much better
2013-08-31 15:35:39 +02:00
Philip Kaufmann bdd0c59ab0 Bitcoin-Qt: fixes for using display unit from options
- extend PaymentServer with setOptionsModel() and rework initNetManager()
  to make use of that
- fix all other places in the code to use display unit from options and no
  hard-coded unit
2013-08-29 10:38:51 +02:00
Philip Kaufmann d9baa28f92 Bitcoin-Qt: add testnet check and icon to intro dialog 2013-08-24 15:20:37 +02:00
Gavin Andresen a41d5fe019 Payment Protocol: X509-validated payment requests
Add support for a Payment Protocol to Bitcoin-Qt.

Payment messages are protocol-buffer encoded and communicated over
http(s), so this adds a dependency on the Google protocol buffer
library, and requires Qt with OpenSSL support.
2013-08-22 16:18:25 +10:00
Gavin Andresen 47d0534368 Route qDebug() messages to debug.log 2013-08-22 11:05:45 +10:00
Gavin Andresen a73aa68b84 Rework when payment server is started 2013-08-22 11:05:45 +10:00
Philip Kaufmann a2189fbaf6 update SelectParamsFromCommandLine() handling/order
- move SelectParamsFromCommandLine() from init.cpp to bitcoin.cpp to allow
  to use TestNet() for Bitcoin-Qt instead of GetBoolArg("-testnet", false)
- change order in bitcoind.cpp to match bitcoin.cpp functionality
- hamonize error message strings for missing datadir and failing
  SelectParamsFromCommandLine() in bitcoin.cpp and bitcoind.cpp
- use TestNet() call in splashscreen.cpp
2013-08-22 11:05:45 +10:00
Gavin Andresen 050d2e953f Remove #define loop from util.h
Replace the loop macro with while (true). The #define caused
problems for Qt.
2013-07-31 14:06:44 +10:00
Philip Kaufmann 84ef729aa1 Bitcoin-Qt: fix QApplication includes to match our include defaults
- move all QApplication includes to top of included Qt headers
- undef our loop macro where it would cause compilation errors otherwise
2013-07-23 08:52:24 +02:00
Wladimir J. van der Laan be77b637fc qt: allow user to choose data directory
This adds an introduction screen that is shown when the client is first
started in which the user can choose a data directory.

It is also possible to force the intro screen to appear using command
line argument `-choosedatadir`.

The user is warned that the client will download and store 10Gb of data.
The intro screen shows how much space is available on the device that
contains the chosen directory and warns if this is less than the 10Gb.

To make it possible to translate the introduction dialog, the initialization
sequence is changed so that translations are
loaded before the data directory. This has the by-effect that it is
no longer possible to specify a language in bitcoin.conf inside the data
directory.
2013-06-16 10:21:41 +02:00
Cory Fields 13c84b3bd5 build: add global var for whether or not the gui is enabled 2013-06-04 03:54:14 -04:00
Jonas Schnelli 39fe9de6b2 Merge branch 'master' of git://github.com/bitcoin/bitcoin into prefsFix
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>

Conflicts:
	bitcoin-qt.pro
2013-06-03 15:18:41 +02:00
Jonas Schnelli f679b2900a MaxOSX: settings fixes (#2371)
- Launch-At-Startup implementation for mac
- Remove "Window" tab in settings

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-06-03 12:26:56 +02:00
Philip Kaufmann 80fccb0eb3 Bitcoin-Qt: setup testnet GUI directly
- this directly sets up all GUI elements that have testnet special-casing
  without first setting up main net stuff and changing afterwards (titles,
  icons etc.)
- also fixes 2 wrong icons shown during testnet usage on our toolbar
2013-06-02 17:40:28 +02:00
Wladimir J. van der Laan 50b4086a4a Merge pull request #2588 from Diapolo/GetBoolArg
remove GetBoolArg() fDefault parameter defaulting to false
2013-06-02 05:21:24 -07:00
Philip Kaufmann 3260b4c090 remove GetBoolArg() fDefault parameter defaulting to false
- explicitly set the default of all GetBoolArg() calls
- rework getarg_test.cpp and util_tests.cpp to cover this change
- some indentation fixes
- move macdockiconhandler.h include in bitcoin.cpp to the "our headers"
  section
2013-06-01 12:53:57 +02:00
Wladimir J. van der Laan 25c0cce7fb Qt5 compatibility
This commit squashes all the changes in the Qt5 branch
relative to master.

Backward compatibility with Qt4 is retained.

Original authors:

- Philip Kaufmann <phil.kaufmann@t-online.de>
- Jonas Schnelli <jonas.schnelli@include7.ch>
2013-06-01 11:05:08 +02:00
Gavin Andresen 33edd0a477 Merge pull request #2577 from gavinandresen/fee_bandaid
Treat dust outputs as non-standard, un-hardcode TX_FEE constants
2013-05-04 10:15:39 -07:00
Pieter Wuille f309cb76c2 Merge pull request #2606 from gavinandresen/threadfix
Exit cleanly if AppInit2 returns false
2013-05-04 07:43:15 -07:00
Gavin Andresen 000dc55181 Un-hardcode TX_FEE constants
Allow setting of MIN_TX_FEE / MIN_RELAY_TX_FEE with
-mintxfee / -mintxrelayfee

Default values are the same (0.0001 BTC).
2013-05-03 10:54:31 -04:00
Jonas Schnelli 367491df9d osx: show testnet icon in dock as early as possible
A green testnet splashscreen with a normal, orange dock icon looks strange and can confuse users.

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
2013-05-03 16:14:38 +02:00
Gavin Andresen d605bc4cd1 Exit cleanly if AppInit2 returns false
Bitcoin-Qt could core dump if application initialization failed in certain ways.

I double-fixed this:
1) qt/bitcoin.cpp now shuts down core threads cleanly if AppInit2 returns false
2) init.cpp now exits before StartNode() if strErrors is set (no reason to StartNode if we're just going to exit immediately anyway).

Tested by triggering all of the various ways AppInit2 can fail, either by passing bogus command-line arguments or just recompiling tweaked code to simulate failure.

This is a partial fix for #2480
2013-05-02 12:26:33 -04:00
Wladimir J. van der Laan af10e3f6ac Merge pull request #2526 from Diapolo/Qt_misc
Bitcoin-Qt: misc small changes
2013-04-23 09:27:30 -07:00
Wladimir J. van der Laan 72782f3b92 Merge pull request #2525 from laanwj/2013_04_metatypebool
qt: register metatype for bool*
2013-04-18 08:59:49 -07:00
Jonas Schnelli f9124587cc new splash screen
why:

- the current splash-screen has no referring to official images on - https://en.bitcoin.it/wiki/Promotional_graphics
- the current splash screen only exists in a low res jpg
- current splash screen looks dark and "hackish"
- new splash screen should generate positive, "trust-emotions".
- new splash screen gives the user infos about the running client.
- new splash screen can handle long messages (in a lot of - languages the text is cropped in current release)

- new size (x2) 400x312

- contains textual information about the client
- textinfos are dynamicly written to the pixmap

when -testnet is switch on, the splashscreen will show the bitcoin logo in testnet-color (as well as a text [testnet])

example: https://dl.dropbox.com/u/7383846/new_bitcoin_splash.png
2013-04-17 01:14:53 -07:00
Philip Kaufmann e9abeac204 bitcoin: use static QApplication:: instead of app. 2013-04-14 19:53:19 +02:00
Wladimir J. van der Laan e83a90f127 qt: register metatype for bool*
This allows the bool* type to be passed between threads.  Should solve issue #2402.
2013-04-14 18:50:40 +02:00
Gavin Andresen 723035bb68 Have Qt poll for shutdown requested, the QT way. 2013-04-03 19:58:47 -04:00
Gavin Andresen b31499ec72 Clean up shutdown process 2013-04-03 19:57:53 -04:00
Gavin Andresen c8c2fbe07f Shutdown cleanup prep-work
Create a boost::thread_group object at the qt/bitcoind main-loop level
that will hold pointers to all the main-loop threads.

This will replace the vnThreadsRunning[] array.

For testing, ported the BitcoinMiner threads to use its
own boost::thread_group.
2013-04-03 14:04:21 -04:00
Philip Kaufmann 1ce0448808 Bitcoin-Qt: only use qApp for Q(Core)Application::instance() 2013-04-02 17:33:48 +02:00
Eric Lombrozo 67155d9299 Minimal architectural changes necessary to support multiple wallets in bitcoin-qt
- This commit is a minimal restructuring necessary to support multiple wallets in the UI. Please see multiwallet-qt.txt for details.
2013-03-22 11:09:08 -07:00
Philip Kaufmann 32af5266cf Bitcoin-Qt: massive header and cpp cleanup
- try to enforce the same style to all Qt related files
- remove unneeded includes from the files
- add missing Q_OBJECT, QT_BEGIN_NAMESPACE / QT_END_NAMESPACE
- prepares for a pull-req to include Qt5 compatibility
2013-03-17 18:28:00 +01:00
Wladimir J. van der Laan 7ea7c94cf9 Merge pull request #2299 from gavinandresen/localsocketuri
Reimplement click-to-pay. Support OSX.
2013-02-23 23:47:31 -08:00
Pieter Wuille f7f3a96b74 Improve block database load error reporting 2013-02-17 23:25:42 +01:00
Gavin Andresen 8269a0953e Reimplement click-to-pay links. Add OSX support.
Switch to using Qt's QLocalServer/QLocalSocket to handle bitcoin
payment links (bitcoin:... URIs)

Reason for switch: the boost::interprocess mechanism seemed flaky,
and doesn't mesh as well with "The Qt Way"

qtipcserver.cpp/h is replaced by paymentserver.cpp/h

Click-to-pay now also works on OSX, with a custom Info.plist
that registers Bitcoin-Qt as a handler for bitcoin: URLs and
an event listener on the main QApplication that handles
QFileOpenEvents (Qt translates 'url clicked' AppleEvents into
QFileOpenEvents automagically).
2013-02-12 15:41:31 -05:00
Philip Kaufmann bb41a87d57 add InitMessage() to noui and use debug.log for GUI
- this pull adds an InitMessage() function to noui.cpp, which outputs init
  messages to debug.log (this allows to remove some printf() calls from
  init.cpp)
- change InitMessage() in bitcoin.cpp to also write init messages to
  debug.log to ensure nothting is missing in the log because of the
  removal of printf() calls in init.cpp
2013-01-11 22:57:22 +01:00
Philip Kaufmann 8ffbd6c378 Bitcoin-Qt: give testnet a unique IPC message queue name
- this prevents an interference with the IPC message queue (which is used
  for URI processing) when running a testnet and mainnet instance in
  parallel
- to check for testnet, I had to raise the ParseParameters() call in
  main() to the topmost position
2013-01-06 03:42:40 +01:00
Philip Kaufmann 15d8ff2029 rework ThreadSafeAskFee() / askFee() functions
- remove unused parameter from ThreadSafeAskFee(), which also results in
  the removal of an orphan translation-string
2012-12-04 21:35:41 +01:00
Philip Kaufmann 3675588a30 Bitcoin-Qt: remove obsolete modal flag from GUI APIs
- as we (can) supply the CClientUIInterface::MODAL flag via the style
  parameter, we don't need a separate bool for checking the modality
2012-12-03 13:24:42 +01:00
Philip Kaufmann 5350ea4171 update CClientUIInterface and remove orphan Wx stuff
- fix ThreadSafeMessageBox always displays error icon
- allow to specify MSG_ERROR / MSG_WARNING or MSG_INFORMATION without a
  custom caption / title
- allow to specify CClientUIInterface::ICON_ERROR / ICON_WARNING and
  ICON_INFORMATION (which is default) as message box icon
- remove CClientUIInterface::OK from ThreadSafeMessageBox-calls, as
  the OK button will be set as default, if none is specified
- prepend "Bitcoin - " to used captions
- rename BitcoinGUI::error() -> BitcoinGUI::message() and add function
  documentation
- change all style parameters and enum flags to unsigned
- update code to use that new API

- update Client- and WalletModel to use new BitcoinGUI::message() and
  rename the classes error() method into message()
- include the possibility to supply the wanted icon for messages from
  Client- and WalletModel via "style" parameter
2012-11-26 13:32:31 +01:00
Wladimir J. van der Laan 61fd72695f When datadir missing, show messagebox instead of printing error to stderr 2012-10-04 12:04:12 +02:00
Luke Dashjr bc8d832335 Abstract all IPC communication to qtipcserver 2012-08-24 16:59:27 +00:00
Luke Dashjr b49f1398a1 Bugfix: Correct English grammar regarding "'s" 2012-08-01 17:50:00 +00:00
Luke Dashjr 814efd6f1f Bugfix: Fix a variety of misspellings 2012-08-01 17:49:51 +00:00