Commit Graph

110 Commits

Author SHA1 Message Date
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
fanquake 951f7d35d6 Fix Typo 2012-07-23 11:59:02 +08:00
Philip Kaufmann 41c938eede IPC-server hardening and update
- add IMPLEMENT_RANDOMIZE_STACK for ipcThread()
- log / print boost interprocess exceptions
- use MAX_URI_LENGTH in guiconstants.h (also used in qrcodedialog.cpp)
- remove unneeded includes and ipcShutdown() from qtipcserver.cpp
- fix a small mem-leak by deleting mq before re-using it
- make ipcThread() and ipcThread2() static functions
- add some more comments
2012-07-17 09:37:12 +02:00
Gavin Andresen 4060d64fc9 Fix Qt build on OSX
Compiling boost::interprocess::message_queue against
boost 1.50 macports with -arch i386 (how releases are built,
for minimum download size and maximum compatibility) is failing:

src/qt/qtipcserver.cpp:37: error: no matching function for call to ‘boost::interprocess::message_queue_t<boost::interprocess::offset_ptr<void, int, long unsigned int, 0u> >::timed_receive(char (*)[257], long unsigned int, size_t&, unsigned int&, boost::posix_time::ptime&)’

This is probably a boost or macports bug, but since interprocess::message_queue
is only used for URI support, which isn't implemented on OSX anyway, I fixed
the build by #ifdef'ing out that code.
2012-07-09 11:03:38 -04:00
Gavin Andresen 50fc02d063 Merge branch 'uri' of https://github.com/TheBlueMatt/bitcoin 2012-07-05 16:38:12 -04:00
Matt Corallo ad5f29b743 Revert "Disable bitcoin: URI handling on Windows for the 0.6 release"
This reverts commit 7b90edb5a6.
2012-06-15 17:19:13 +02:00
Wladimir J. van der Laan 7d72a8c36a Show command line options as dialog when opened from debug window
On Linux/Mac the command-line options were printed to stderr when the button
was pressed in the debug window, resulting in confusion. This is fixed
in this commit by adding a separate method.
2012-06-14 15:14:01 +02:00
Philip Kaufmann 9247134eab introduce a new StartShutdown() function, which starts a thread with Shutdown() if no GUI is used and calls uiInterface.QueueShutdown() if a GUI is used / all direct uiInterface.QueueShutdown() calls are replaced with Shutdown() - this ensures a clean GUI shutdown, even when catching a SIGTERM and allows the BitcoinGUI destructor to get called (which fixes a tray-icon issue and keeps the tray-icon until Bitcoin-Qt exits) 2012-06-12 07:21:03 +02:00
Philip Kaufmann 5d6b30271f move class HelpMessageBox to guiutil.cpp/.h / add button to show Bitcoin command-line options (in RPC Console -> Information) / resize Debug window a little to allow for a non-breaking display of the welcome message with non-english translation 2012-06-01 16:29:54 +02:00
Pieter Wuille 6e86c4700b Merge pull request #1363 from Diapolo/remove_strncasecmp
remove strncasecmp() + strnicmp() calls use boost::algorithm::istarts_with()
2012-05-20 12:26:43 -07:00
Wladimir J. van der Laan 239c11d0dd Make testcases build, prevent windows symbol collision 2012-05-20 10:44:50 +02:00
Wladimir J. van der Laan ab1b288fa7 Convert UI interface to boost::signals2.
- Signals now go directly from the core to WalletModel/ClientModel.
  - WalletModel subscribes to signals on CWallet: Prepares for multi-wallet support, by no longer assuming an implicit global wallet.
- Gets rid of noui.cpp, the few lines that were left are merged into init.cpp
- Rename wxXXX message flags to MF_XXX, to make them UI indifferent.
- ThreadSafeMessageBox no longer returns the value `4` which was never used, converted to void.
2012-05-20 10:44:50 +02:00
Wladimir J. van der Laan fe4a655042 Fine-grained UI updates
Gets rid of `MainFrameRepaint` in favor of specific update functions that tell the UI exactly what changed.

This improves the efficiency of various handlers. Also fixes problems with mined transactions not showing up until restart.

The following notifications were added:

- `NotifyBlocksChanged`: Block chain changed
- `NotifyKeyStoreStatusChanged`: Wallet status (encrypted, locked) changed.
- `NotifyAddressBookChanged`: Address book entry changed.
- `NotifyTransactionChanged`: Wallet transaction added, removed or updated.
- `NotifyNumConnectionsChanged`: Number of connections changed.
- `NotifyAlertChanged`: New, updated or cancelled alert. As this finally makes it possible for the UI to know when a new alert arrived, it can be shown as OS notification.

These notifications could also be useful for RPC clients. However, currently, they are ignored in bitcoind (in noui.cpp).

Also brings back polling with timer for numBlocks in ClientModel. This value updates so frequently during initial download that the number of signals clogs the UI thread and causes heavy CPU usage. And after initial block download, the value changes so rarely that a delay of half a second until the UI updates is unnoticable.
2012-05-20 10:41:54 +02:00
Philip Kaufmann 00fb08158d remove strncasecmp() + strnicmp() calls and replace that code via boost::algorithm::istarts_with() / do not call ipcInit() on Mac and Windows as this is unneeded currently 2012-05-20 00:48:34 +02:00
Jeff Garzik f9dd136a09 Revert "use _strnicmp (ISO C++) instead of deprecated strnicmp (POSIX) and add missing "#define strncasecmp _strnicmp" in init.cpp"
This reverts commit f4ac41806a.

Reason: breaks build.
2012-05-17 20:14:24 -04:00
Philip Kaufmann f4ac41806a use _strnicmp (ISO C++) instead of deprecated strnicmp (POSIX) and add missing "#define strncasecmp _strnicmp" in init.cpp 2012-05-17 23:20:47 +02:00
Philip Kaufmann 8b4d653663 allow translation of "options" used in the --help message / split translation of RPC console welcome message and remove the need to take care of "<br>" / remove some spaces in strings and misc other stuff related to translations 2012-05-17 15:49:00 +02:00