Commit graph

1522 commits

Author SHA1 Message Date
jtimon 53efb09e4c Discover some missing includes 2014-09-02 02:27:03 +02:00
Pieter Wuille 47eb76597e Serializer simplifications after IMPLEMENT_SERIALIZE overhaul 2014-09-01 22:00:19 +02:00
Pieter Wuille 2e731f24b5
Merge pull request #4737
31e9a83 Use CSizeComputer to avoid counting sizes in SerializationOp (Pieter Wuille)
84881f8 rework overhauled serialization methods to non-static (Kamil Domanski)
5d96b4a remove fields of ser_streamplaceholder (Kamil Domanski)
3d796f8 overhaul serialization code (Kamil Domanski)
2014-09-01 21:23:01 +02:00
Wladimir J. van der Laan 6f5d33b3d2
Update translations after update script improvements 2014-09-01 10:10:21 +02:00
Pieter Wuille 31e9a8384a Use CSizeComputer to avoid counting sizes in SerializationOp 2014-08-31 02:18:42 +02:00
Kamil Domanski 84881f8c47 rework overhauled serialization methods to non-static
Thanks to Pieter Wuille for most of the work on this commit.
I did not fixup the overhaul commit, because a rebase conflicted
with "remove fields of ser_streamplaceholder".
I prefer not to risk making a mistake while resolving it.
2014-08-31 02:16:17 +02:00
Kamil Domanski 3d796f8996 overhaul serialization code
The implementation of each class' serialization/deserialization is no longer
passed within a macro. The implementation now lies within a template of form:

template <typename T, typename Stream, typename Operation>
inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
    size_t nSerSize = 0;
    /* CODE */
    return nSerSize;
}

In cases when codepath should depend on whether or not we are just deserializing
(old fGetSize, fWrite, fRead flags) an additional clause can be used:
bool fRead = boost::is_same<Operation, CSerActionUnserialize>();

The IMPLEMENT_SERIALIZE macro will now be a freestanding clause added within
class' body (similiar to Qt's Q_OBJECT) to implement GetSerializeSize,
Serialize and Unserialize. These are now wrappers around
the "SerializationOp" template.
2014-08-31 02:14:20 +02:00
Ross Nicoll e84843c0db Broken addresses on command line no longer trigger testnet.
When passing a bitcoin: URI on the command line, invalid addresses do not incorrectly send the
user to the test network.
2014-08-30 09:39:59 +01:00
Jeff Garzik 309aa76d27
Merge pull request #4599 2014-08-29 15:23:13 -04:00
Philip Kaufmann fbe0fcae76 [Qt] minor watch-only changes
- use watch-only, not watchonly
- add back a tooltip hint when hovering addresses and attach
  "(watch-only)" at the end
2014-08-28 23:20:46 +02:00
Philip Kaufmann bbad683224 [Qt] simplify return code and return values in txtablemodel
- also move an added space in a string where it belongs
2014-08-28 23:14:11 +02:00
Philip Kaufmann 21f1516468 [Qt] add all used colors in txtablemodel to guiconstants
- add colors used in TX status decoration
2014-08-28 23:14:10 +02:00
Jeff Garzik 11a899445e
qt/splashscreen: #include version.h
Needed to build breakage reported by Arnavion on IRC:
qt/splashscreen.cpp: In constructor 'SplashScreen::SplashScreen(const QPixmap&, Qt::WindowFlags, bool)':
qt/splashscreen.cpp:33:98: error: 'FormatFullVersion' was not declared in this scope
2014-08-27 22:39:01 -04:00
Cozz Lovan 80daee0fb5 [Qt] Call checkBalanceChanged() periodically instead for every updated transaction 2014-08-26 19:18:33 +02:00
Wladimir J. van der Laan f30801afbd
qt: Add null check in setClientModel(0)
Don't clear tray icon menu if it was never created.
Necessary precaution after #4649.
2014-08-26 17:59:57 +02:00
Wladimir J. van der Laan d49b0876a4
Merge pull request #4673
1c5f0af [Qt] Add column Watch-only to transactions list (Cozz Lovan)
939ed97 Add boolean HaveWatchonly and signal NotifyWatchonlyChanged (Cozz Lovan)
2014-08-26 17:41:33 +02:00
Wladimir J. van der Laan b9bd6282c5
Merge pull request #4649
b197bf3 [Qt] disable tray interactions when client model set to 0 (Philip Kaufmann)
314fbd9 [Qt] use BitcoinGUI::DEFAULT_WALLET constant in bitcoin.cpp (Philip Kaufmann)
8ca6a16 [Qt] ensure all class attributes are init to 0 (Philip Kaufmann)
2014-08-26 17:39:16 +02:00
Wladimir J. van der Laan ad49c256c3 Split up util.cpp/h
Split up util.cpp/h into:

- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)

The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).

Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-26 13:25:22 +02:00
Wladimir J. van der Laan 6e5fd003e0 Move *Version() functions to version.h/cpp 2014-08-26 13:25:21 +02:00
Wladimir J. van der Laan 92b3d3630d
Merge pull request #4718
88fe88c gui: remove redundant numTransactions tracking (Wladimir J. van der Laan)
2014-08-23 09:30:47 +02:00
Gavin Andresen 335e3a5c95 Merge pull request #4717 from cozz/cozz8
[Qt] Revert overviewpage from QFormLayout to QVBoxLayout
2014-08-19 13:37:25 -04:00
Wladimir J. van der Laan e4731dd85c
qt: Use quint64 for formatServicesStr
`uint64_t` was causing a build error on some systems, as that type is
not known after including just the Qt headers.
2014-08-18 16:21:27 +02:00
Wladimir J. van der Laan 88fe88cf36
gui: remove redundant numTransactions tracking
This number was still tracked even though it's shown nowhere in the UI
anymore. It was originally removed because it didn't match the actual number of
records in the view (which contains outputs, not transactions) thus was
confusing people.
2014-08-18 10:28:26 +02:00
Cozz Lovan cb5fa86f42 [Qt] Revert overviewpage from QFormLayout to QVBoxLayout 2014-08-17 23:50:44 +02:00
Jeff Garzik beb36e800c ui_interface: remove unused NotifyBlocksChanged signal 2014-08-14 12:19:54 -04:00
Wladimir J. van der Laan 7accb7dbad
Merge pull request #4659
c4bae53 [Qt] move SubstituteFonts() above ToolTipToRichTextFilter (Philip Kaufmann)
2014-08-14 15:52:01 +02:00
ntrgn 8bfdc9acaa
qt: better looking trayicon
Github-Pull: #4678
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-08-12 13:16:01 +02:00
Cozz Lovan 1c5f0af0fd [Qt] Add column Watch-only to transactions list 2014-08-11 21:38:36 +02:00
Cozz Lovan 939ed97373 Add boolean HaveWatchonly and signal NotifyWatchonlyChanged 2014-08-11 18:47:02 +02:00
Wladimir J. van der Laan 3e089a00e7
Merge pull request #4668
9297763 [Qt] Add TRY_LOCK back to peertablemodel (Cozz Lovan)
2014-08-11 15:06:43 +02:00
Wladimir J. van der Laan 85af3856e7
Merge pull request #4622
c7f3876 URLs containing a / after the address no longer cause parsing errors. (Ross Nicoll)
2014-08-11 15:06:19 +02:00
Cozz Lovan 9297763dad [Qt] Add TRY_LOCK back to peertablemodel 2014-08-10 02:28:23 +02:00
Ross Nicoll c7f3876d4a URLs containing a / after the address no longer cause parsing errors. 2014-08-08 19:10:35 +01:00
Philip Kaufmann b197bf3270 [Qt] disable tray interactions when client model set to 0
- this prevents the ability to fiddle around with the system tray when
  already shutting down (e.g. on slow shutdowns because of a proxy delay)
- extends solution for #4360
2014-08-08 12:13:39 +02:00
Philip Kaufmann 314fbd9ac7 [Qt] use BitcoinGUI::DEFAULT_WALLET constant in bitcoin.cpp 2014-08-08 12:13:27 +02:00
Philip Kaufmann 8ca6a16176 [Qt] ensure all class attributes are init to 0
- in BitcoinGUI and UnitDisplayStatusBarControl
2014-08-08 12:13:26 +02:00
Philip Kaufmann c4bae53092 [Qt] move SubstituteFonts() above ToolTipToRichTextFilter
- doesn't belong to the ToolTipToRichTextFilter class so move it up
2014-08-08 11:04:35 +02:00
Philip Kaufmann 94e1b9e05b [Qt] re-work overviewpage UI
- ensure normal and watch-only stuff looks consistent
- simplify UI by removing unneeded UI layout elements
- change some comments to watch-only from watchonly
2014-08-08 09:58:58 +02:00
Cory Fields 292cc072f3 qt: fix unicode character display on osx when building with 10.7 sdk 2014-08-07 12:34:53 -04:00
Wladimir J. van der Laan e05d72055a
qt: bitcoin_en update after 8d0d512 2014-08-06 16:12:37 +02:00
Wladimir J. van der Laan 607758db93
Merge pull request #4631
a409467 more Bitcoin -> Bitcoin Core string changes (Philip Kaufmann)
2014-08-06 16:10:19 +02:00
Wladimir J. van der Laan 9db9257ac4
Merge pull request #4629
ead6737 [Qt] format ping times in peers tab as ms (Philip Kaufmann)
2014-08-06 15:48:01 +02:00
Philip Kaufmann a409467e14 more Bitcoin -> Bitcoin Core string changes 2014-08-04 21:09:38 +02:00
Philip Kaufmann ead6737b87 [Qt] format ping times in peers tab as ms
- also align ping times to the right
2014-08-04 19:23:57 +02:00
Wladimir J. van der Laan 8d0d512bde
Merge pull request #4606
bd0aa10 Replace the temporary file hack currently used to change Bitcoin-Qt's dock icon (OS X) with a buffer-based solution. (Doug)
2014-08-04 17:16:12 +02:00
Wladimir J. van der Laan 488a616439
qt: Demote ReportInvalidCertificate message to qDebug
Too spammy.
2014-08-04 16:41:42 +02:00
Philip Kaufmann a5b2d9c82e [Qt] tweak new peers tab in console window
- remove starting height as table header and replace with ping time
- remove columnResizingFixer
- add local address (if available) in detailed node view (on top of the
  right view below the remote address)
- remove some .c_str() by using QString::fromStdString()
- rename Address to Address/Hostname
- rename secs to just s for ping time
- use MODEL_UPDATE_DELAY from guiconstants.h for the peer refresh time
- make PeerTableModel::columnCount() return no hard-coded value
- remove and cleanup dup private: section in RPCConsole header
- add new defaults for column sizes
- remove behaviour which keeps disconnected peers selected and also remove
  code which keeps track of last selected peer stats
- add sync height to detail view
- add some additional NULL pointer checks for clientModel in
  rpcconsole.cpp
2014-08-04 15:46:18 +02:00
pryds 2b410c2fe1 Typo, and a few "Bitcoin" -> "Bitcoin Core"
Github-Pull: #4619
2014-08-04 10:30:59 +02:00
Wladimir J. van der Laan b4c61f878c
Merge pull request #4610
bdba2dd qt: Remove an obscure option no-one cares about (Wladimir J. van der Laan)
2014-08-03 17:08:57 +02:00
Wladimir J. van der Laan 9fcb410195
qt: Remove '0 BTC' placeholder from translation 2014-08-01 07:51:24 +02:00
Wladimir J. van der Laan c0e9548b63
qt: more watchonly -> watch-only 2014-07-31 17:19:05 +02:00
Wladimir J. van der Laan bd26fee10b
qt: Update some messages after suggestions by translators
- *cannot* is more common, thus preferred to *can not*
- Use *Watch-only* instead of *Watchonly* as one word
2014-07-31 16:58:23 +02:00
Wladimir J. van der Laan 84c5f77deb
English translation update
This is needed to add version 0.10.x on Transifex so that translation
can start.
2014-07-31 15:03:03 +02:00
Wladimir J. van der Laan bdba2dd000
qt: Remove an obscure option no-one cares about
Remove the "Display addresses" setting checkbox. It doesn't do what
the tooltip says, and seems kind of pointless in any case.

Fixes #4580.
2014-07-31 09:10:58 +02:00
Doug bd0aa10519 Replace the temporary file hack currently used to change Bitcoin-Qt's dock icon (OS X) with a buffer-based solution. 2014-07-30 16:04:40 -04:00
Philip Kaufmann d817187bdb [Qt] remove ProxySocksVersion from OptionID
- we only support SOCKS5, so remove it
2014-07-28 14:47:27 +02:00
Philip Kaufmann f65352a7d0 [Qt] small Qt-only include cleanup 2014-07-25 17:43:41 +02:00
Wladimir J. van der Laan 29eaa31694 ui: Make sure sendcoinsentry signals only connected once
Move signal connections to constructor where possible.
2014-07-23 17:58:47 +02:00
Wladimir J. van der Laan 2a05101efd qt: Remove unused functions from BitcoinUnits
Remove two functions that are now unused.
2014-07-23 17:58:46 +02:00
Wladimir J. van der Laan 91cce1732b qt: Use fixed-point arithmetic in amount spinbox
Fixes various issues and cleans up code

- Fixes issue #4500: Amount widget +/- has floating point rounding artifacts
- Amount box can now be emptied again, without clearing to 0

Also aligns the amount to the right, as in other places.
2014-07-23 17:58:46 +02:00
Wladimir J. van der Laan 3015e0bca6 Revert "UI to alert of respend attempt affecting wallet."
This reverts commit ada5a067c7.

Conflicts:
	src/qt/guiconstants.h
	src/wallet.h
2014-07-21 07:46:33 +02:00
Wladimir J. van der Laan ad26dc9c31 Revert "Formatting, spelling, comment fixes."
This reverts commit 7a19efe040.
2014-07-21 07:46:33 +02:00
Wladimir J. van der Laan 0de61e7585
qt: Move SplashFinished to after ClientModel/WalletModel creation
With a large wallet there was a noticable gap between hiding of the
splash and showing the main window.
2014-07-20 13:50:42 +02:00
Cozz Lovan 027dcdc792 [Qt] Fix thin space in URI 2014-07-20 04:17:02 +02:00
Whit J b9345f7d1c
qt: Make error message for failed export a little friendlier
Closes #4528.
2014-07-18 23:21:50 +02:00
Wladimir J. van der Laan 40d2d69223
Merge pull request #4167
7149499 Add comments re BitcoinUnits::formatWithUnit/formatHtmlWithUnit (Roy Badami)
f7d70c6 Remove unused fAlign argument from BitcoinUnits::format and friends (Roy Badami)
2e4fee2 Show bitcoin quantities with full precision, even in the presence of trailing zeros (Roy Badami)
7007402 Implement SI-style (thin space) thoudands separator (Roy Badami)
2014-07-18 13:59:26 +02:00
Wladimir J. van der Laan 773c1f297b
Merge pull request #4554
2d89ea9 build: fix whitespace in pkg-config variable (Cory Fields)
ab123ad build: allow linux and osx to build against static qt5 (Cory Fields)
2014-07-18 11:39:18 +02:00
Cory Fields ab123ad4d6 build: allow linux and osx to build against static qt5
This is the first part of a huge effort to rework the handling of dependencies.
To start, this change allows all supported platforms to build against a static
Qt. 5.2.1 and 5.3 have been successfully tested against osx64, win32, win64,
linux32, and linux64.

It also makes a small change to the windows config, to allow linking against
qt builds with or without built-in libjpeg/libpng/libpcre/libz.

The actual build processes to take advantage of these changes (for gitian and
pull-tester) are coming soon. Until then, this should be a no-op.
2014-07-17 22:13:40 -04:00
Cozz Lovan acd432b5b3 [Qt] Prevent balloon-spam after rescan 2014-07-18 03:39:00 +02:00
Wladimir J. van der Laan 33357b27a0
qt: Start core thread only when needed
Start the core thread only when needed for initialization
or shutdown.

Avoids a bit of overhead, and also avoids spamming two
log messages before logging is properly initialized.
2014-07-15 16:27:47 +02:00
Wladimir J. van der Laan c715ff52c7 ui: Replace some LogPrintfs with qDebug()
These are relatively unimportant messages, so don't need to be logged
without -debug=ui.
2014-07-15 10:26:50 +02:00
Wladimir J. van der Laan d4bed1a6d3
Merge pull request #4524
49d5712 qt: Ignore showNormalIfMinimized in initialization or shutdown (Wladimir J. van der Laan)
2014-07-14 11:33:30 +02:00
Wladimir J. van der Laan b5280c31db
Merge pull request #4518
76fd7b8 [Qt] Fix segfault when launched with -disablewallet (Cozz Lovan)
2014-07-14 11:08:29 +02:00
Wladimir J. van der Laan 49d57125f9
qt: Ignore showNormalIfMinimized in initialization or shutdown
Also get rid of ui_interface flag NOSHOWGUI. It's up to the GUI to
decide this.

Fixes #4360.
2014-07-14 10:49:12 +02:00
Cozz Lovan e3496da730 [Qt] Fix No such slot UnitDisplayStatusBarControl::onDisplayUnitsClicked 2014-07-13 08:36:40 +02:00
Cozz Lovan 76fd7b8c26 [Qt] Fix segfault when launched with -disablewallet 2014-07-13 07:43:01 +02:00
Ross Nicoll 509f926e80 Payment request parsing on startup now only changes network if a valid network name is specified. 2014-07-08 22:10:46 +01:00
Cozz Lovan d88af56011 Fee fixes 2014-07-08 05:09:19 +02:00
Roy Badami 7149499fd8 Add comments re BitcoinUnits::formatWithUnit/formatHtmlWithUnit 2014-07-07 22:28:11 +01:00
Roy Badami f7d70c603f Remove unused fAlign argument from BitcoinUnits::format and friends 2014-07-07 22:27:09 +01:00
Roy Badami 96df327834 Merge remote-tracking branch 'upstream/master'
Conflicts:
	src/qt/overviewpage.cpp
	src/qt/transactiondesc.cpp
2014-07-07 22:06:21 +01:00
Roy Badami 2e4fee2ac4 Show bitcoin quantities with full precision, even in the presence of trailing zeros 2014-07-07 21:00:58 +01:00
Wladimir J. van der Laan f748ff730b
Merge pull request #4045
a3e192a replaced MINE_ with ISMINE_ (JaSK)
53a2148 fixed bug where validateaddress doesn't display information (JaSK)
f28707a fixed bug in ListReceived() (JaSK)
519dd1c Added MINE_ALL = (spendable|watchonly) (JaSK)
23b0506 Fixed some stuff in TransactionDesc (JaSK)
80dda36 removed default argument values for ismine filter (JaSK)
d5087d1 Use script matching rather than destination matching for watch-only. (Pieter Wuille)
0fa2f88 added includedWatchonly argument to listreceivedbyaddress/...account (JaSK)
f87ba3d added includeWatchonly argument to 'gettransaction' because it affects balance calculation (JaSK)
a5c6c5d fixed tiny glitch and improved readability like laanwj suggested (JaSK)
d7d5d23 Added argument to listtransactions and listsinceblock to include watchonly addresses (JaSK)
952877e Showing 'involvesWatchonly' property for transactions returned by 'listtransactions' and 'listsinceblock'. It is only appended when the transaction involves a watchonly address. (JaSK)
83f3543 Added argument to listaccounts to include watchonly addresses (JaSK)
d4640d7 Added argument to getbalance to include watchonly addresses and fixed errors in balance calculation. (JaSK)
d2692f6 Watchonly transactions are marked in transaction history (JaSK)
ffd40da Watchonly balances are shown separately in gui. (JaSK)
2935b21 qt: Hide unspendable outputs in coin control (Wladimir J. van der Laan)
c898846 Add support for watch-only addresses (Pieter Wuille)
2014-07-07 16:06:28 +02:00
Wladimir J. van der Laan 4252f2928b
Merge pull request #4327
a339a37 error out, when we detect -socks argument (Philip Kaufmann)
0127a9b remove SOCKS4 support from core and GUI (Philip Kaufmann)
2014-07-07 12:45:28 +02:00
Wladimir J. van der Laan 88ae36bc06
Merge pull request #4466
ad87bc4 [Qt] Replace status bar unit icon with actual images (Cozz Lovan)
2014-07-07 10:42:53 +02:00
Wladimir J. van der Laan 642c8e75bc
Merge pull request #4399
674c070 [Qt] seed OpenSSL PNRG with Windows event data (Philip Kaufmann)
2014-07-07 10:31:33 +02:00
jtimon 209377a7cb Use GetBlockTime() more 2014-07-07 10:20:28 +02:00
Wladimir J. van der Laan 6654a87e7b
Merge pull request #4462
3d0e92d [Qt] remove dup includes in bitcoingui (Philip Kaufmann)
2014-07-07 10:16:31 +02:00
Wladimir J. van der Laan 4ea8f632fe
Merge pull request #4467
1f740dd Remove unused variable (R E Broadley)
2014-07-07 10:14:10 +02:00
Wladimir J. van der Laan 73ac7abd08 Move ui_interface to bitcoin_server.a
There is no need for it in the utility libraries or tools.
Put it in init.cpp, and in the tests separately (as they can't link init).
2014-07-07 09:58:56 +02:00
Wladimir J. van der Laan 509030344c qt: Pick translation messages only from necessary files
Utility libraries (common, util) as well as extra tools shouldn't be
parsed for translation messages, only the server and wallet part qualify
here.
2014-07-07 09:57:37 +02:00
Philip Kaufmann 0127a9be14 remove SOCKS4 support from core and GUI
- now we support SOCKS5 only
2014-07-07 08:15:14 +02:00
R E Broadley 1f740ddc4d Remove unused variable 2014-07-05 22:43:52 +07:00
Cozz Lovan ad87bc4de1 [Qt] Replace status bar unit icon with actual images 2014-07-05 17:18:26 +02:00
Philip Kaufmann 674c070e5d [Qt] seed OpenSSL PNRG with Windows event data
- see https://bitcointalk.org/index.php?topic=113496.msg1228193#msg1228193
  for the initial suggestion for this
- also ensure consistent debug.log message format
2014-07-04 17:16:36 +02:00
Philip Kaufmann 3d0e92dc83 [Qt] remove dup includes in bitcoingui 2014-07-04 16:51:25 +02:00
Gavin Andresen 21876d3831
Merge branch 'smartfee_wallet' 2014-07-03 15:50:24 -04:00
Gavin Andresen 13fc83c77b
Move fee policy out of core 2014-07-03 14:42:16 -04:00
Gavin Andresen b33d1f5ee5
Use fee/priority estimates in wallet CreateTransaction
The wallet now uses the mempool fee estimator with a new
command-line option: -txconfirmtarget (default: 1) instead
of using hard-coded fees or priorities.

A new bitcoind that hasn't seen enough transactions to estimate
will fall back to the old hard-coded minimum priority or
transaction fee.

-paytxfee option overrides -txconfirmtarget.

Relaying and mining code isn't changed.

For Qt, the coin control dialog now uses priority estimates to
label transaction priority (instead of hard-coded constants);
unspent outputs were consistently labeled with a much higher
priority than is justified by the free transactions actually
being accepted into blocks.

I did not implement any GUI for setting -txconfirmtarget; I would
suggest getting rid of the "Pay transaction fee" GUI and replace
it with either "target number of confirmations" or maybe
a "faster confirmation <--> lower fee" slider or select box.
2014-07-03 13:44:33 -04:00
Wladimir J. van der Laan 07b6c2b901
Merge pull request #4302
8969828 [Qt] New status bar Unit Display Control and related changes. (gubatron)
2014-07-03 17:47:58 +02:00