Commit graph

1226 commits

Author SHA1 Message Date
Philip Kaufmann
e23a121afe remove obsolete BackupWallet() entry in wallet.h 2012-05-03 11:30:52 +02:00
Philip Kaufmann
65c2ad687f add a clear all button to the sign message page 2012-05-03 09:23:37 +02:00
Matt Corallo
234db30d66 Update to require IE 5.1 as it is required on mingw64.
We already require XP, this just fixes Mingw64 build.
2012-05-02 20:21:43 -04:00
Jeff Garzik
ca97bde8ff Merge pull request #1171 from Diapolo/fix_compiler_warn
fix 2 compiler warnings
2012-05-01 15:02:41 -07:00
Jeff Garzik
024fa1cb44 EvalScript(): cast to avoid signed/unsigned warning 2012-05-01 17:57:12 -04:00
Jeff Garzik
061a001590 ThreadSocketHandler2(): cast to avoid signed/unsigned warning 2012-05-01 17:54:52 -04:00
Jeff Garzik
10ab9c2f42 OpenBlockFile(): cast to eliminate signed/unsigned comparison warning
nFile's null value is -1.  Cast that to unsigned int, to avoid warning.

Additionally, avoid nFile==0 because the first valid value is 1.
2012-05-01 17:50:33 -04:00
Jeff Garzik
24de922636 CDiskTxPos, CInPoint, COutPoint: cast null value (-1) to unsigned int
to eliminate signed/unsigned comparison warnings
2012-05-01 17:49:17 -04:00
Jeff Garzik
e19ccfa657 Merge pull request #1177 from laanwj/2012_05_remove_duplicate_securestring
remove duplicate definition of SecureString in util.h
2012-05-01 10:05:00 -07:00
Wladimir J. van der Laan
6d25b0e99a Merge pull request #1172 from Diapolo/serialize_h_rem_typedef
remove unused typedef in serialize.h
2012-05-01 09:52:38 -07:00
Wladimir J. van der Laan
3ee5f8aac3 remove duplicate definition of SecureString in util.h
SecureString was moved to allocators.h in commit 6cb6d62347
2012-05-01 18:49:50 +02:00
Philip Kaufmann
aab1f950aa small translation-file handling / loading changes and re-work comments to be clearer 2012-05-01 17:54:07 +02:00
Philip Kaufmann
1c94f88d5e fix compiler warning "suggest parentheses around assignment used as truth
value [-Wparentheses]" in util.cpp
2012-05-01 11:41:04 +02:00
Philip Kaufmann
f8e4d43be7 fix compiler warning "suggest explicit braces to avoid ambiguous "else"
[-Wparentheses]" in net.cpp
2012-05-01 11:40:08 +02:00
Philip Kaufmann
00d971e1e7 remove references to bitcoin-wx from comment in init.cpp 2012-05-01 01:59:54 +02:00
Philip Kaufmann
810b4fad7d remove unused typedef in serialize.h 2012-05-01 01:56:47 +02:00
Gavin Andresen
be8651dde7 Check earlier for blocks with duplicate transactions. Fixes #1167 2012-04-30 11:08:07 -04:00
Wladimir J. van der Laan
ec4997d48f Merge pull request #1139 from Diapolo/messagepage
change button tooltip on sign message page for copy to clipboard...
2012-04-29 04:35:27 -07:00
Wladimir J. van der Laan
6974aff668 Fix critical UI performance issue (#1154) 2012-04-29 13:25:05 +02:00
Gavin Andresen
0acbe31cfc Update openssl version 2012-04-27 12:45:49 -04:00
Gavin Andresen
2c31cfc271 Bump version numbers for 0.6.1rc1 2012-04-27 10:14:33 -04:00
Gavin Andresen
dfead66eac Merge pull request #1151 from freewil/listsinceblock-blockhash
listsinceblock: rpc param blockid -> blockhash
2012-04-26 15:37:12 -07:00
Gavin Andresen
27d4b53a5c Merge pull request #1150 from gavinandresen/NOPCH
Remove unused -DNOPCH
2012-04-26 15:36:33 -07:00
Gavin Andresen
b2997dc043 Merge pull request #1152 from freewil/remove-strange-debug
remove strange debug message from listsinceblock
2012-04-26 15:36:15 -07:00
Pieter Wuille
287ce61dc2 Merge pull request #1146 from drizztbsd/posix-include
We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)
2012-04-26 15:25:56 -07:00
freewil
42ce57687a remove strange debug message from listsinceblock 2012-04-26 13:12:44 -04:00
freewil
fdb204abb1 listsinceblock: rpc param blockid -> blockhash
This is more consistent with the rest of the labeling seen
by the user when accessing the rpc commands.
2012-04-26 12:48:33 -04:00
Gavin Andresen
9e71a5cd23 Define TEST_DATA_DIR so unit tests can be run from any current working directory 2012-04-26 11:20:44 -04:00
Gavin Andresen
08e663d7e2 Undo part of c2e8c8ac to fix issue#1148 2012-04-26 10:18:35 -04:00
Gavin Andresen
cfc45319fe Remove unused -DNOPCH 2012-04-25 19:40:44 -04:00
Pieter Wuille
83743ed681 Make lsn_reset ("detach databases") optional and off by default.
Add an option -detachdb (and entry in OptionDialog), without which no
lsn_reset is called on addr.dat and blkindex.dat. That means these
files cannot be moved to a new environment, but shutdown can be
significantly faster. The wallet file is always lsn_reset'ed.

-detachdb corresponds to the old behaviour, though it is off by
default now to speed up shutdowns.
2012-04-26 00:31:54 +02:00
Timothy Redaelli
5e9dc15360 We should include netinet/in.h to use sockaddr_in (POSIX.1-2001) 2012-04-25 14:07:24 +02:00
Jeff Garzik
c2e8c8acd8 Merge pull request #1140 from jgarzik/sign-compare
Address many more sign comparison warnings
2012-04-23 21:33:29 -07:00
Jeff Garzik
735a60698c Change signed->unsigned at 3 code sites
This resolves signed/unsigned comparison warnings.
2012-04-23 14:14:36 -04:00
Jeff Garzik
5aa0b23825 CBlock::WriteToDisk() properly checks ftell(3) for error return
Rather than storing ftell(3)'s return value -- a long -- in an
unsigned int, we store and check a properly typed temp.  Then, assured a
non-negative value, we store in nBlockPosRet.
2012-04-23 14:14:36 -04:00
Jeff Garzik
1d8c7a9557 Add casts for unavoidable signed/unsigned comparisons
At these code sites, it is preferable to cast rather than change
a variable's type.
2012-04-23 14:14:36 -04:00
Jeff Garzik
c0a0a93d02 Test ScriptSigArgsExpected() for error, before accumulating return value 2012-04-23 14:14:36 -04:00
Jeff Garzik
7bd9c3a3cf SigOp and orphan-tx constants and counts are always unsigned.
Fixes several sign-comparison warnings.
2012-04-23 14:14:03 -04:00
Jeff Garzik
faf705a42a Prefer 'unsigned int' for loop index variables tested against ::size()
C++ STL ::size() generally returns unsigned, which implies that "int idx"
style of loop variable will generate a signed-vs-unsigned comparison warning
when testing the loop exit condition "idx < blah.size()"

Update areas of the bitcoin code where loop variables may be more properly and
correctly defined as unsigned.
2012-04-22 13:22:39 -04:00
Philip Kaufmann
a2d0fcbe38 change button tooltip on sign message page for copy to clipboard as it was missleading 2012-04-22 19:02:52 +02:00
Pieter Wuille
f4203de302 Make GetDataDir return absolute paths 2012-04-22 17:38:47 +02:00
Pieter Wuille
1d740055da -loadblock to load from an external blk000?.dat file 2012-04-22 03:09:35 +02:00
Pieter Wuille
457661f640 Merge pull request #1124 from sipa/rpcobj3
extension of #1103: encapsulate mapCommands in CRPCTable
2012-04-21 16:49:32 -07:00
Pieter Wuille
7dbe393629 Merge pull request #1131 from laanwj/2012_04_hexstr
Integrate @JoelKatz's optimized ToHex (#562) into current HexStr function
2012-04-21 16:47:02 -07:00
Pieter Wuille
d5eb41fa08 Merge pull request #1129 from laanwj/2012_04_opcodes
Add explicit numeric constant value for all opcodes
2012-04-21 16:43:31 -07:00
Gavin Andresen
8449a8788a Data-drive script evaluation unit tests. 2012-04-21 19:35:39 -04:00
Pieter Wuille
6a7a42be16 Merge pull request #1126 from drizztbsd/master
Fix build with gcc 4.7
2012-04-21 15:13:29 -07:00
Wladimir J. van der Laan
88dc2d6c6a Integrate @JoelKatz's optimized ToHex (#562) into current HexStr function 2012-04-21 20:37:50 +02:00
Wladimir J. van der Laan
b6c837cbe1 Remove no-longer used UI hints in bitcoin core
The Qt UI has its own associated structures for temporary transaction state / cache.
2012-04-21 18:21:19 +02:00
Wladimir J. van der Laan
cdcc319c2d change type of various bare chars to bool that are only used as bool (and never serialized) 2012-04-21 18:16:11 +02:00
Wladimir J. van der Laan
7be8b2ff9c Add explicit numeric constant value for all opcodes
- Easier for debugging (what opcode was 0x... again?)
- Clarifies that the opcodes are set in stone in the protocol, and signals that it is impossible to insert opcodes in between.
2012-04-21 10:34:18 +02:00
Pieter Wuille
e46704dd90 Expose CRPCTable via bitcoinrpc.h for testing 2012-04-21 01:37:34 +02:00
Pieter Wuille
9862229d4d Encapsulate mapCommands in class CRPCTable 2012-04-21 01:20:05 +02:00
Jeff Garzik
dc42bf52c1 Encapsulate RPC command dispatch in an array of CRPCCommand's 2012-04-21 01:20:05 +02:00
Wladimir J. van der Laan
00b9c0f4b2 Merge pull request #1122 from dlitz/unsigned-char-fix
Unsigned char fix & fix undefined phexdigits[255]
2012-04-20 10:18:45 -07:00
Timothy Redaelli
9553c35d89 Add missing includes. (Fix bulding under GCC 4.7) 2012-04-20 12:50:57 +02:00
Pieter Wuille
c73ba23eb5 gettransaction RPC for non-wallet transactions
Works for wallet transactions, memory-pool transaction and block chain
transactions.

Available for all:
 * txid
 * version
 * locktime
 * size
 * coinbase/inputs/outputs
 * confirmations

Available only for wallet transactions:
 * amount
 * fee
 * details
 * blockindex

Available for wallet transactions and block chain transactions:
 * blockhash
 * time
2012-04-18 23:42:07 +02:00
R E Broadley
871c3557bf Added ability to respond to signals during Block Loading stage. 2012-04-18 12:30:24 +01:00
Dwayne C. Litzenberger
8c8e8c2e93 Fix bugs on 'unsigned char' platforms.
In ISO C++, the signedness of 'char' is undefined.  On some platforms (e.g.
ARM), 'char' is an unsigned type, but some of the code relies on 'char' being
signed (as it is on x86).  This is indicated by compiler warnings like this:

 bignum.h: In constructor 'CBigNum::CBigNum(char)':
 bignum.h:81:59: warning: comparison is always true due to limited range of data type [-Wtype-limits]

 util.cpp: In function 'bool IsHex(const string&)':
 util.cpp:427:28: warning: comparison is always false due to limited range of data type [-Wtype-limits]

In particular, IsHex erroneously returned true regardless of the input
characters, as long as the length of the string was a positive multiple of 2.

Note: For testing, it's possible using GCC to force char to be unsigned by
adding the -funsigned-char parameter to xCXXFLAGS.
2012-04-18 00:33:32 -04:00
Dwayne C. Litzenberger
a6fa147c8d Fix phexdigits[255] is undefined. 2012-04-18 00:33:32 -04:00
Pieter Wuille
559fc3c610 Add missing breaks in optionmodel's switch case 2012-04-17 23:27:59 +02:00
Pieter Wuille
031eae7864 Merge pull request #1114 from sipa/lesssync
Reduce sync frequency for blkindex.dat
2012-04-17 14:23:31 -07:00
Pieter Wuille
0a83c0fcef Fix tests after recent refactors 2012-04-17 20:37:47 +02:00
Pieter Wuille
c23617fef3 Merge remote-tracking branch 'jgarzik/mempool' 2012-04-17 20:12:48 +02:00
Pieter Wuille
caeddc5d37 Merge pull request #1117 from sipa/deadlockfix
Fix potential deadlock
2012-04-17 11:05:02 -07:00
Pieter Wuille
6b6aaa1698 Further reduce header dependencies
This commit removes the dependency of serialize.h on PROTOCOL_VERSION,
and makes this parameter required instead of implicit. This is much saner,
as it makes the places where changing a version number can have an
influence obvious.
2012-04-17 20:03:42 +02:00
Jeff Garzik
ccd65d4261 Move proto version to version.h. Reduce header deps a bit more. 2012-04-17 20:02:38 +02:00
Jeff Garzik
9eace6b113 Move CWalletDB code to new walletdb module.
In addition to standard code separation, this change opens the door
to fixing several include inter-dependencies.
2012-04-17 20:00:55 +02:00
Pieter Wuille
ed6d0b5f85 Remove headers.h 2012-04-17 20:00:55 +02:00
Gavin Andresen
b97d54355e Merge pull request #1106 from jgarzik/sign-compare
Fix many sign-comparison warnings found in bitcoin codebase
2012-04-17 10:55:56 -07:00
Gavin Andresen
e873dc654c Merge pull request #1115 from laanwj/2012_04_cleanupmisc
Delete unused, unreachable and commented code, add missing initializer
2012-04-17 10:12:33 -07:00
Pieter Wuille
c581cc16bb Fix potential deadlock
Conflict:
* cs_main in ProcessMessages() (before calling ProcessMessages)
* cs_vSend in CNode::BeginMessage
versus:
* cs_vSend in ThreadMessageHandler2 (before calling SendMessages)
* cs_main in SendMessages

Even though cs_vSend is a try_lock, if it succeeds simultaneously with
the locking of cs_main in ProcessMessages(), it could cause a deadlock.
2012-04-17 18:50:52 +02:00
Jeff Garzik
ce8c93498a main.cpp: replace tabs with spaces
Sometimes they sneak in through the 'vi' door
2012-04-17 12:31:51 -04:00
Jeff Garzik
8bff8ac079 AlreadyHave(): only hold lock during mapTransactions access 2012-04-17 12:30:00 -04:00
Wladimir J. van der Laan
7fa3ad83a9 Remove unused and unreachable code 2012-04-17 18:28:02 +02:00
Wladimir J. van der Laan
4941aad657 Add forgotten initializer 2012-04-17 18:27:55 +02:00
Pieter Wuille
8f2b50f178 Reduce sync frequency for blkindex.dat
Since auto-remove-db-logs was enabled, each time a CTxDB was closed
outside of the initial download window, it causes a checkpoint + log
cleanup. This is overkill, so reduce the sync frequency to once per
minute at most.
2012-04-17 18:27:18 +02:00
Jeff Garzik
dd21ce5f1b Merge pull request #1094 from jgarzik/already-have-locking
Locking fix for AlreadyHave()
2012-04-17 09:23:49 -07:00
Jeff Garzik
ea9627979e Bump PROTOCOL_VERSION to 60001, thereby enabling BIP31 2012-04-17 12:16:46 -04:00
Jeff Garzik
865a0c1674 Merge pull request #1081 from jgarzik/pong
BIP 0031: pong message
2012-04-17 08:51:17 -07:00
Wladimir J. van der Laan
7a5452ffb3 Merge pull request #1092 from laanwj/2012_04_sendcoins_setlabelfix
When sending coins, set label when selecting address that already has a label
2012-04-16 05:41:39 -07:00
Wladimir J. van der Laan
088a13331b Merge pull request #1091 from Diapolo/GUI-BlockDL
revert to default OS theme for progressbar (fix #1071)
2012-04-16 00:55:37 -07:00
Jeff Garzik
9fb89c26f3 Fix misc. minor sign-comparison warnings 2012-04-15 17:00:20 -04:00
Jeff Garzik
0dd710acb6 CNode's nHeaderStart may be negative, so change its type 2012-04-15 16:59:48 -04:00
Jeff Garzik
c3fad8350b serialize.h: CAutoFile's read and write may take size_t nSize 2012-04-15 16:59:09 -04:00
Jeff Garzik
3a78f82a78 Fix sign-compare warnings: netbase's Lookup* max-solutions may be unsigned 2012-04-15 16:58:32 -04:00
Jeff Garzik
c376ac359e Fix loop index var types, fixing many minor sign comparison warnings
foo.size() typically returns an unsigned integral type; make loop variables
match those types' signedness.
2012-04-15 16:52:09 -04:00
Jeff Garzik
ab9dc75a18 The string class returns string::npos, when find() fails.
Noticed when sign-comparison warnings were enabled.
2012-04-15 16:47:24 -04:00
Jeff Garzik
ca4c4c53a8 CTxMemPool: add helper methods, to reduce global mempool.mapTx accesses 2012-04-15 14:43:19 -04:00
Jeff Garzik
d01903e751 CTxMemPool: encapsulate AcceptToMemoryPool 2012-04-15 14:43:19 -04:00
Jeff Garzik
8e45ed66dd CTxMemPool: encapsulate AddToMemoryPoolUnchecked(), RemoveFromMemoryPool(),
and nPooledTx
2012-04-15 14:42:52 -04:00
Jeff Garzik
235507ae48 New class CTxMemPool, encapsulating TX memory pool data members 2012-04-15 14:41:27 -04:00
Jeff Garzik
5a701eb7ea Merge pull request #1104 from laanwj/2012_04_clang
Enable and fix most compilation warnings
2012-04-15 11:39:15 -07:00
Jeff Garzik
fced2231f8 Merge pull request #1084 from dooglus/validate_secret
importprivkey doesn't check that it is given a private key
2012-04-15 09:25:29 -07:00
Wladimir J. van der Laan
9ea8e60a0c Merge pull request #1097 from laanwj/2012_04_runawayexception
Show a message box when runaway exception happens
2012-04-15 09:22:26 -07:00
Wladimir J. van der Laan
da7bbd9dfd fix warnings: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] 2012-04-15 13:40:14 +02:00
Wladimir J. van der Laan
6642ffb761 fix warnings: '&&' within '||' [-Wlogical-op-parentheses] 2012-04-15 13:40:14 +02:00
Wladimir J. van der Laan
2e120f28e0 fix warnings: delete called on 'XX' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor] 2012-04-15 13:40:14 +02:00
Wladimir J. van der Laan
11cd416525 fix warnings: unused variable 'XX' [-Wunused-variable] 2012-04-15 13:40:14 +02:00
Wladimir J. van der Laan
76d8170ce8 fix warnings: enumeration values 'XX' not handled in switch [-Wswitch-enum] 2012-04-15 13:40:14 +02:00
Wladimir J. van der Laan
87207a2e08 fix warnings: 'XX' defined as a struct here but previously declared as a class [-Wmismatched-tags] 2012-04-15 13:40:14 +02:00
Wladimir J. van der Laan
8add7822ce fix warnings: array subscript is of type 'char' [-Wchar-subscripts] 2012-04-15 13:40:14 +02:00
Wladimir J. van der Laan
1f29d399f4 work around issue in boost::program_options that prevents from compiling in clang 2012-04-15 13:40:14 +02:00
Wladimir J. van der Laan
f9f625fb32 enable all warnings except invalid-offsetof, sign-compare, unused-parameter 2012-04-15 13:40:14 +02:00
Luke Dashjr
2eb665c634 Bugfix: Check that QRcode_encodeString didn't return NULL (error)
Without this, any error will segfault Bitcoin-Qt
2012-04-14 21:00:27 -04:00
Wladimir J. van der Laan
a7a0c7a1bf Show a message box when runaway exception happens
This is more clear to users than when the program simply disappears (usually during initialization). It still logs the message to the console and debug log as well.
2012-04-14 18:35:42 +02:00
Jeff Garzik
22014c31e5 Merge pull request #1093 from jgarzik/tx-opt
Database micro-optimization for "tx" network message
2012-04-14 08:50:43 -07:00
Wladimir J. van der Laan
46ba858817 Merge pull request #1089 from laanwj/2012_04_translationupdate
Update translations for bitcoin core
2012-04-13 23:47:50 -07:00
Wladimir J. van der Laan
3fddc8effc Update translations for bitcoin core
- Move scripts/qt to share/qt, to clean up toplevel directories
- Update english ts file which is used to source messages for Transifex
- In extract_strings_qt.py use a glob *.h *.cpp, this is safe now that the Wx UI files are removed
2012-04-14 08:46:16 +02:00
Wladimir J. van der Laan
b970067298 Do not show green tick unless all known blocks are downloaded (fixes #921) 2012-04-14 08:21:22 +02:00
Jeff Garzik
8deb9822e4 Locking fix for AlreadyHave()
Access to mapTransactions[] must be guarded by cs_mapTransactions lock.

Also, reformat long lines to make the switch statement more readable.
2012-04-13 18:24:55 -04:00
Jeff Garzik
9925d34a49 Database micro-optimization for "tx" network message
Open database once per "tx" message, rather than multiple times,
in the case of orphan transaction presence.

As a side effect, a now-unused CTransaction::AcceptToMemoryPool()
variant is removed.
2012-04-13 17:48:15 -04:00
Wladimir J. van der Laan
2d67195ed2 Set label when selecting an address that already has a label. Fixes #1080. 2012-04-13 21:08:46 +02:00
Philip Kaufmann
e72c6a1830 revert to default OS theme for progressbar / fix small glitches in bitcoingui.cpp 2012-04-13 18:25:56 +02:00
Wladimir J. van der Laan
6b8e7eefcc Add missing tooltip and key shortcut in settings dialog (#1088 without line break part) 2012-04-13 09:16:46 +02:00
Gavin Andresen
c3c203ccd9 Merge pull request #1087 from sipa/fix_1086
Fix #1086: add /testnet to passed datadir
2012-04-12 18:22:15 -07:00
Pieter Wuille
7a743148c9 Fix #1086: add /testnet to passed datadir 2012-04-13 03:11:14 +02:00
Jeff Garzik
8b09cd3a4d Replace several network protocol version numbers with named constants
stored in version.h.

Also, a minor CAddress code reformat while we're in there, fixing
some incorrect indentation.
2012-04-12 20:07:49 -04:00
Chris Moore
b3a6e613fc CBitcoinSecret::SetString() now calls IsValid() to make sure it was passed something with the correct version. 2012-04-12 13:13:08 -07:00
Gavin Andresen
b7dc02381f Merge pull request #1041 from gavinandresen/listtransactionsfix
Bug fix listtransactions from/count handling.
2012-04-12 12:20:51 -07:00
Wladimir J. van der Laan
181400c3d5 make text in about box selectable (fixes #1055) 2012-04-12 20:55:38 +02:00
Philip Kaufmann
7261945eb5 enable wordWrap on lblQRCode / small code comment change 2012-04-12 20:34:06 +02:00
Philip Kaufmann
b1a99c3a1f limit length of generated URI to 255 chars to prevent a DoS against the QR-Code dialog 2012-04-12 20:34:06 +02:00
Philip Kaufmann
1e8c62b29c updated to reflect pull-request suggestions / renamed some GUI elements 2012-04-12 20:34:05 +02:00
Philip Kaufmann
9e0dba8c17 fixed amount part of URI in QR-Codes / removed (no label) string if we have NO label / coding style updates / removed an unused variable 2012-04-12 20:34:04 +02:00
Jeff Garzik
460b66b14b Remove obsolete Win32 AffinityBugWorkaround()
Reference miner exists for testnet-in-a-box type situations, and as a
reference.  We don't care enough about highly optimized internal
mining to keep workarounds like this.
2012-04-12 13:24:00 -04:00
Jeff Garzik
b87c0fc440 version.h: separate client, net sections. Move more constants to this file.
* move PROTOCOL_VERSION to version.h

* move CLIENT_VERSION* to version.h, make available past cpp stage

* clearly separate client, network version portions of version.h
2012-04-12 12:23:58 -04:00
Jeff Garzik
93e447b631 BIP 0031: pong message
Add a pong message that is sent in reply to a ping. It echoes back a nonce
field that is now added to the ping message. Send a nonce of zero in ping
messages.

Original author: Mike Hearn @ Google

Modified Mike's change to introduce a mild form of protocol documentation in
version.h.
2012-04-12 12:11:56 -04:00
Gavin Andresen
940e22fd81 Fix OSX build errors. 2012-04-12 11:14:46 -04:00
Wladimir J. van der Laan
4ac24cf59e Merge pull request #855 from sje397/ToggleHide
Toggle UI hide
2012-04-11 23:02:18 -07:00
Pieter Wuille
ee12c3d60c Use filesystem::path instead of manual string tinkering
Where possible, use boost::filesystem::path instead of std::string or
char* for filenames. This avoids a lot of manual string tinkering, in
favor of path::operator/.

GetDataDir is also reworked significantly, it now only keeps two cached
directory names (the network-specific data dir, and the root data dir),
which are decided through a parameter instead of pre-initialized global
variables.

Finally, remove the "upgrade from 0.1.5" case where a debug.log in the
current directory has to be removed.
2012-04-11 22:30:23 +02:00
Wladimir J. van der Laan
bcaa5f1c04 Merge pull request #1083 from laanwj/2012_04_connectionicon
Make 4th bar of connection icon green
2012-04-11 11:06:26 -07:00
Gavin Andresen
2232717cba Remove path.make_preferred() calls, and fix compiler error in bitcoinrpc RE: boost::system 2012-04-11 14:00:48 -04:00
Wladimir J. van der Laan
5ca4f13b87 by popular request, make 4th bar of connection icon green 2012-04-11 19:59:15 +02:00
Pieter Wuille
4577167170 Fix build.h dependencies
For Qt builds, the build.h file is moved to build/build.h. For regular
builds, it is moved to obj/build.h. This allows the Qt build to be done
in a different directory than the source, and without interfering with
other builds.
2012-04-11 14:04:42 +02:00
Pieter Wuille
702764f53b Merge pull request #1054 from sipa/buildinfo
Build identification strings
2012-04-10 13:31:12 -07:00
Wladimir J. van der Laan
b56772e5df Merge pull request #1046 from laanwj/2012_04_rpcporterror
Show error message instead of exception crash when unable to bind RPC port
2012-04-10 13:14:47 -07:00
Pieter Wuille
a20c0d0f67 Build identification strings
All client version information is moved to version.cpp, which optionally
(-DHAVE_BUILD_INFO) includes build.h. build.h is automatically generated
on supporting platforms via contrib/genbuild.sh, using git describe.

The git export-subst attribute is used to put the commit id statically
in version.cpp inside generated archives, and this value is used if no
build.h is present.

The gitian descriptors are modified to use git archive instead of a
copy, to create the src/ directory in the output. This way,
src/src/version.cpp will contain the static commit id. To prevent
gitian builds from getting the "-dirty" marker in their git-describe
generated identifiers, no touching of files or running sed on the
makefile is performed anymore. This does not seem to influence
determinism.
2012-04-10 18:16:53 +02:00
sje397
86d5634941 Toggle main window hide on tray icon click
- converted openBictoinAction to toggleHideAction
- put GUIUtil functions into a namespace instead of a class
- put window-related functions together in optionsdialog

Reasoning:
- toggle is more typical behaviour
- it's more functional
- better UX

The typical issue with toggling visibility is that when a window
is obscured by other windows but in the 'shown' state, hiding it
isn't what you want. I've added an 'isObscured' function to GUIUtil
that checks several pixels in the window to see if they are visible
on the desktop so that an obscured but shown window can be raised.

Conflicts:

	src/qt/guiutil.cpp
	src/qt/guiutil.h
2012-04-11 00:07:32 +10:00
Pieter Wuille
1a275bac2b Merge pull request #1052 from sipa/scopedlocks
Use scoped locks instead of CRITICAL_BLOCK
2012-04-09 13:25:17 -07:00
Gavin Andresen
1044391135 Merge branch 'filesystem' of https://github.com/Diapolo/bitcoin 2012-04-09 10:41:59 -04:00
Pieter Wuille
f342dac1cb Do not report spurious deadlocks caused by TRY_LOCK 2012-04-09 01:59:57 +02:00
Pieter Wuille
908037fe16 Support for parametrized locks in deadlock detector 2012-04-09 01:59:57 +02:00
Pieter Wuille
f8dcd5ca6f Use scoped locks instead of CRITICAL_BLOCK 2012-04-09 01:59:46 +02:00
Luke Dashjr
fa2544e79f Bugfix: Replace "URL" with "URI" where we aren't actually working with URLs 2012-04-06 12:53:37 -04:00
Wladimir J. van der Laan
3e34352222 Show error message instead of exception crash when unable to bind RPC port
Fixes issue #875
2012-04-06 18:41:23 +02:00
Philip Kaufmann
42c63d3ad2 fixed small error in bitcoinrpc.cpp 2012-04-06 15:31:28 +02:00
Philip Kaufmann
36949554ab updated util.cpp to use make_preferred() 2012-04-06 15:29:20 +02:00
Philip Kaufmann
93fb7489a7 updated bitcoinrpc.cpp to use make_preferred() and removed double inclusion of boost/filesystem.hpp 2012-04-06 15:29:19 +02:00
Philip Kaufmann
9c24588e73 updated db.cpp to use make_preferred() 2012-04-06 15:29:18 +02:00