aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-07-15 15:12:01 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-07-15 15:12:17 +0200
commit19366be186a9a2efff1e6abfe8db59cd9f5f5843 (patch)
tree3abb4adeab1a4e86a08bb5bfe61dedf8be178a1c /src
parent249c6818f171b75930736872d61b0cdcda7e9832 (diff)
parenta35ee9633690fbadc001b2d8fe1dd3ebb852dc25 (diff)
Merge remote-tracking branch 'satoshi/qtui'
Conflicts (resolved by copying files from remote branch): .gitignore src/cryptopp/cpu.cpp src/cryptopp/cpu.h src/cryptopp/cryptlib.h src/cryptopp/iterhash.h src/cryptopp/misc.h src/cryptopp/secblock.h src/cryptopp/sha.cpp src/cryptopp/sha.h src/cryptopp/smartptr.h src/json/json_spirit_reader.cpp src/json/json_spirit_value.cpp src/json/json_spirit_writer.cpp
Diffstat (limited to 'src')
-rw-r--r--src/cryptopp/License.txt67
-rw-r--r--src/cryptopp/Readme.txt429
-rw-r--r--src/cryptopp/cpu.cpp6
-rw-r--r--src/cryptopp/cpu.h2
-rw-r--r--src/cryptopp/cryptlib.h4
-rw-r--r--src/cryptopp/iterhash.h2
-rw-r--r--src/cryptopp/misc.h4
-rw-r--r--src/cryptopp/obj/.gitignore2
-rw-r--r--src/cryptopp/secblock.h4
-rw-r--r--src/cryptopp/sha.cpp8
-rw-r--r--src/cryptopp/sha.h2
-rw-r--r--src/cryptopp/smartptr.h2
-rw-r--r--src/json/LICENSE.txt24
-rw-r--r--src/json/json_spirit_reader.cpp4
-rw-r--r--src/json/json_spirit_value.cpp2
-rw-r--r--src/json/json_spirit_writer.cpp4
-rw-r--r--src/makefile.linux-mingw111
-rw-r--r--src/makefile.mingw97
-rw-r--r--src/makefile.osx88
-rw-r--r--src/makefile.unix90
-rw-r--r--src/makefile.vc145
-rw-r--r--src/obj/.gitignore2
-rw-r--r--src/obj/nogui/.gitignore2
-rw-r--r--src/obj/test/.gitignore2
-rw-r--r--src/test/README21
-rw-r--r--src/test/test_bitcoin.cpp6
-rw-r--r--src/test/uint160_tests.cpp16
-rw-r--r--src/test/uint256_tests.cpp16
-rw-r--r--src/ui.cpp2964
-rw-r--r--src/ui.h350
-rw-r--r--src/uibase.cpp1008
-rw-r--r--src/uibase.h421
-rw-r--r--src/xpm/about.xpm665
-rw-r--r--src/xpm/addressbook16.xpm278
-rw-r--r--src/xpm/addressbook20.xpm282
-rw-r--r--src/xpm/bitcoin16.xpm219
-rw-r--r--src/xpm/bitcoin20.xpm160
-rw-r--r--src/xpm/bitcoin32.xpm232
-rw-r--r--src/xpm/bitcoin48.xpm277
-rw-r--r--src/xpm/bitcoin80.xpm292
-rw-r--r--src/xpm/check.xpm41
-rw-r--r--src/xpm/send16.xpm278
-rw-r--r--src/xpm/send16noshadow.xpm278
-rw-r--r--src/xpm/send20.xpm282
44 files changed, 9167 insertions, 22 deletions
diff --git a/src/cryptopp/License.txt b/src/cryptopp/License.txt
new file mode 100644
index 0000000000..fc3f054693
--- /dev/null
+++ b/src/cryptopp/License.txt
@@ -0,0 +1,67 @@
+Compilation Copyright (c) 1995-2009 by Wei Dai. All rights reserved.
+This copyright applies only to this software distribution package
+as a compilation, and does not imply a copyright on any particular
+file in the package.
+
+The following files are copyrighted by their respective original authors,
+and their use is subject to additional licenses included in these files.
+
+mars.cpp - Copyright 1998 Brian Gladman.
+
+All other files in this compilation are placed in the public domain by
+Wei Dai and other contributors.
+
+I would like to thank the following authors for placing their works into
+the public domain:
+
+Joan Daemen - 3way.cpp
+Leonard Janke - cast.cpp, seal.cpp
+Steve Reid - cast.cpp
+Phil Karn - des.cpp
+Andrew M. Kuchling - md2.cpp, md4.cpp
+Colin Plumb - md5.cpp
+Seal Woods - rc6.cpp
+Chris Morgan - rijndael.cpp
+Paulo Baretto - rijndael.cpp, skipjack.cpp, square.cpp
+Richard De Moliner - safer.cpp
+Matthew Skala - twofish.cpp
+Kevin Springle - camellia.cpp, shacal2.cpp, ttmac.cpp, whrlpool.cpp, ripemd.cpp
+
+Permission to use, copy, modify, and distribute this compilation for
+any purpose, including commercial applications, is hereby granted
+without fee, subject to the following restrictions:
+
+1. Any copy or modification of this compilation in any form, except
+in object code form as part of an application software, must include
+the above copyright notice and this license.
+
+2. Users of this software agree that any modification or extension
+they provide to Wei Dai will be considered public domain and not
+copyrighted unless it includes an explicit copyright notice.
+
+3. Wei Dai makes no warranty or representation that the operation of the
+software in this compilation will be error-free, and Wei Dai is under no
+obligation to provide any services, by way of maintenance, update, or
+otherwise. THE SOFTWARE AND ANY DOCUMENTATION ARE PROVIDED "AS IS"
+WITHOUT EXPRESS OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. IN NO EVENT WILL WEI DAI OR ANY OTHER CONTRIBUTOR BE LIABLE FOR
+DIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+4. Users will not use Wei Dai or any other contributor's name in any
+publicity or advertising, without prior written consent in each case.
+
+5. Export of this software from the United States may require a
+specific license from the United States Government. It is the
+responsibility of any person or organization contemplating export
+to obtain such a license before exporting.
+
+6. Certain parts of this software may be protected by patents. It
+is the users' responsibility to obtain the appropriate
+licenses before using those parts.
+
+If this compilation is used in object code form in an application
+software, acknowledgement of the author is not required but would be
+appreciated. The contribution of any useful modifications or extensions
+to Wei Dai is not required but would also be appreciated.
diff --git a/src/cryptopp/Readme.txt b/src/cryptopp/Readme.txt
new file mode 100644
index 0000000000..861c036c68
--- /dev/null
+++ b/src/cryptopp/Readme.txt
@@ -0,0 +1,429 @@
+Crypto++: a C++ Class Library of Cryptographic Schemes
+Version 5.6.0 (3/15/2009)
+
+Crypto++ Library is a free C++ class library of cryptographic schemes.
+Currently the library contains the following algorithms:
+
+ algorithm type name
+
+ authenticated encryption schemes GCM, CCM, EAX
+
+ high speed stream ciphers Panama, Sosemanuk, Salsa20, XSalsa20
+
+ AES and AES candidates AES (Rijndael), RC6, MARS, Twofish, Serpent,
+ CAST-256
+
+ IDEA, Triple-DES (DES-EDE2 and DES-EDE3),
+ other block ciphers Camellia, SEED, RC5, Blowfish, TEA, XTEA,
+ Skipjack, SHACAL-2
+
+ block cipher modes of operation ECB, CBC, CBC ciphertext stealing (CTS),
+ CFB, OFB, counter mode (CTR)
+
+ message authentication codes VMAC, HMAC, CMAC, CBC-MAC, DMAC,
+ Two-Track-MAC
+
+ SHA-1, SHA-2 (SHA-224, SHA-256, SHA-384, and
+ hash functions SHA-512), Tiger, WHIRLPOOL, RIPEMD-128,
+ RIPEMD-256, RIPEMD-160, RIPEMD-320
+
+ RSA, DSA, ElGamal, Nyberg-Rueppel (NR),
+ public-key cryptography Rabin, Rabin-Williams (RW), LUC, LUCELG,
+ DLIES (variants of DHAES), ESIGN
+
+ padding schemes for public-key PKCS#1 v2.0, OAEP, PSS, PSSR, IEEE P1363
+ systems EMSA2 and EMSA5
+
+ Diffie-Hellman (DH), Unified Diffie-Hellman
+ key agreement schemes (DH2), Menezes-Qu-Vanstone (MQV), LUCDIF,
+ XTR-DH
+
+ elliptic curve cryptography ECDSA, ECNR, ECIES, ECDH, ECMQV
+
+ insecure or obsolescent MD2, MD4, MD5, Panama Hash, DES, ARC4, SEAL
+algorithms retained for backwards 3.0, WAKE, WAKE-OFB, DESX (DES-XEX3), RC2,
+ compatibility and historical SAFER, 3-WAY, GOST, SHARK, CAST-128, Square
+ value
+
+Other features include:
+
+ * pseudo random number generators (PRNG): ANSI X9.17 appendix C, RandomPool
+ * password based key derivation functions: PBKDF1 and PBKDF2 from PKCS #5,
+ PBKDF from PKCS #12 appendix B
+ * Shamir's secret sharing scheme and Rabin's information dispersal algorithm
+ (IDA)
+ * fast multi-precision integer (bignum) and polynomial operations
+ * finite field arithmetics, including GF(p) and GF(2^n)
+ * prime number generation and verification
+ * useful non-cryptographic algorithms
+ + DEFLATE (RFC 1951) compression/decompression with gzip (RFC 1952) and
+ zlib (RFC 1950) format support
+ + hex, base-32, and base-64 coding/decoding
+ + 32-bit CRC and Adler32 checksum
+ * class wrappers for these operating system features (optional):
+ + high resolution timers on Windows, Unix, and Mac OS
+ + Berkeley and Windows style sockets
+ + Windows named pipes
+ + /dev/random, /dev/urandom, /dev/srandom
+ + Microsoft's CryptGenRandom on Windows
+ * A high level interface for most of the above, using a filter/pipeline
+ metaphor
+ * benchmarks and validation testing
+ * x86, x86-64 (x64), MMX, and SSE2 assembly code for the most commonly used
+ algorithms, with run-time CPU feature detection and code selection
+ * some versions are available in FIPS 140-2 validated form
+
+You are welcome to use it for any purpose without paying me, but see
+License.txt for the fine print.
+
+The following compilers are supported for this release. Please visit
+http://www.cryptopp.com the most up to date build instructions and porting notes.
+
+ * MSVC 6.0 - 2008
+ * GCC 3.3 - 4.3
+ * C++Builder 2009
+ * Intel C++ Compiler 9 - 11
+ * Sun Studio 12 (CC 5.9)
+
+*** Important Usage Notes ***
+
+1. If a constructor for A takes a pointer to an object B (except primitive
+types such as int and char), then A owns B and will delete B at A's
+destruction. If a constructor for A takes a reference to an object B,
+then the caller retains ownership of B and should not destroy it until
+A no longer needs it.
+
+2. Crypto++ is thread safe at the class level. This means you can use
+Crypto++ safely in a multithreaded application, but you must provide
+synchronization when multiple threads access a common Crypto++ object.
+
+*** MSVC-Specific Information ***
+
+On Windows, Crypto++ can be compiled into 3 forms: a static library
+including all algorithms, a DLL with only FIPS Approved algorithms, and
+a static library with only algorithms not in the DLL.
+(FIPS Approved means Approved according to the FIPS 140-2 standard.)
+The DLL may be used by itself, or it may be used together with the second
+form of the static library. MSVC project files are included to build
+all three forms, and sample applications using each of the three forms
+are also included.
+
+To compile Crypto++ with MSVC, open the "cryptest.dsw" (for MSVC 6 and MSVC .NET
+2003) or "cryptest.sln" (for MSVC .NET 2005) workspace file and build one or
+more of the following projects:
+
+cryptdll - This builds the DLL. Please note that if you wish to use Crypto++
+ as a FIPS validated module, you must use a pre-built DLL that has undergone
+ the FIPS validation process instead of building your own.
+dlltest - This builds a sample application that only uses the DLL.
+cryptest Non-DLL-Import Configuration - This builds the full static library
+ along with a full test driver.
+cryptest DLL-Import Configuration - This builds a static library containing
+ only algorithms not in the DLL, along with a full test driver that uses
+ both the DLL and the static library.
+
+To use the Crypto++ DLL in your application, #include "dll.h" before including
+any other Crypto++ header files, and place the DLL in the same directory as
+your .exe file. dll.h includes the line #pragma comment(lib, "cryptopp")
+so you don't have to explicitly list the import library in your project
+settings. To use a static library form of Crypto++, specify it as
+an additional library to link with in your project settings.
+In either case you should check the compiler options to
+make sure that the library and your application are using the same C++
+run-time libraries and calling conventions.
+
+*** DLL Memory Management ***
+
+Because it's possible for the Crypto++ DLL to delete objects allocated
+by the calling application, they must use the same C++ memory heap. Three
+methods are provided to achieve this.
+1. The calling application can tell Crypto++ what heap to use. This method
+ is required when the calling application uses a non-standard heap.
+2. Crypto++ can tell the calling application what heap to use. This method
+ is required when the calling application uses a statically linked C++ Run
+ Time Library. (Method 1 does not work in this case because the Crypto++ DLL
+ is initialized before the calling application's heap is initialized.)
+3. Crypto++ can automatically use the heap provided by the calling application's
+ dynamically linked C++ Run Time Library. The calling application must
+ make sure that the dynamically linked C++ Run Time Library is initialized
+ before Crypto++ is loaded. (At this time it is not clear if it is possible
+ to control the order in which DLLs are initialized on Windows 9x machines,
+ so it might be best to avoid using this method.)
+
+When Crypto++ attaches to a new process, it searches all modules loaded
+into the process space for exported functions "GetNewAndDeleteForCryptoPP"
+and "SetNewAndDeleteFromCryptoPP". If one of these functions is found,
+Crypto++ uses methods 1 or 2, respectively, by calling the function.
+Otherwise, method 3 is used.
+
+*** GCC-Specific Information ***
+
+A makefile is included for you to compile Crypto++ with GCC. Make sure
+you are using GNU Make and GNU ld. The make process will produce two files,
+libcryptopp.a and cryptest.exe. Run "cryptest.exe v" for the validation
+suite.
+
+*** Documentation and Support ***
+
+Crypto++ is documented through inline comments in header files, which are
+processed through Doxygen to produce an HTML reference manual. You can find
+a link to the manual from http://www.cryptopp.com. Also at that site is
+the Crypto++ FAQ, which you should browse through before attempting to
+use this library, because it will likely answer many of questions that
+may come up.
+
+If you run into any problems, please try the Crypto++ mailing list.
+The subscription information and the list archive are available on
+http://www.cryptopp.com. You can also email me directly by visiting
+http://www.weidai.com, but you will probably get a faster response through
+the mailing list.
+
+*** History ***
+
+1.0 - First public release. Withdrawn at the request of RSA DSI.
+ - included Blowfish, BBS, DES, DH, Diamond, DSA, ElGamal, IDEA,
+ MD5, RC4, RC5, RSA, SHA, WAKE, secret sharing, DEFLATE compression
+ - had a serious bug in the RSA key generation code.
+
+1.1 - Removed RSA, RC4, RC5
+ - Disabled calls to RSAREF's non-public functions
+ - Minor bugs fixed
+
+2.0 - a completely new, faster multiprecision integer class
+ - added MD5-MAC, HAVAL, 3-WAY, TEA, SAFER, LUC, Rabin, BlumGoldwasser,
+ elliptic curve algorithms
+ - added the Lucas strong probable primality test
+ - ElGamal encryption and signature schemes modified to avoid weaknesses
+ - Diamond changed to Diamond2 because of key schedule weakness
+ - fixed bug in WAKE key setup
+ - SHS class renamed to SHA
+ - lots of miscellaneous optimizations
+
+2.1 - added Tiger, HMAC, GOST, RIPE-MD160, LUCELG, LUCDIF, XOR-MAC,
+ OAEP, PSSR, SHARK
+ - added precomputation to DH, ElGamal, DSA, and elliptic curve algorithms
+ - added back RC5 and a new RSA
+ - optimizations in elliptic curves over GF(p)
+ - changed Rabin to use OAEP and PSSR
+ - changed many classes to allow copy constructors to work correctly
+ - improved exception generation and handling
+
+2.2 - added SEAL, CAST-128, Square
+ - fixed bug in HAVAL (padding problem)
+ - fixed bug in triple-DES (decryption order was reversed)
+ - fixed bug in RC5 (couldn't handle key length not a multiple of 4)
+ - changed HMAC to conform to RFC-2104 (which is not compatible
+ with the original HMAC)
+ - changed secret sharing and information dispersal to use GF(2^32)
+ instead of GF(65521)
+ - removed zero knowledge prover/verifier for graph isomorphism
+ - removed several utility classes in favor of the C++ standard library
+
+2.3 - ported to EGCS
+ - fixed incomplete workaround of min/max conflict in MSVC
+
+3.0 - placed all names into the "CryptoPP" namespace
+ - added MD2, RC2, RC6, MARS, RW, DH2, MQV, ECDHC, CBC-CTS
+ - added abstract base classes PK_SimpleKeyAgreementDomain and
+ PK_AuthenticatedKeyAgreementDomain
+ - changed DH and LUCDIF to implement the PK_SimpleKeyAgreementDomain
+ interface and to perform domain parameter and key validation
+ - changed interfaces of PK_Signer and PK_Verifier to sign and verify
+ messages instead of message digests
+ - changed OAEP to conform to PKCS#1 v2.0
+ - changed benchmark code to produce HTML tables as output
+ - changed PSSR to track IEEE P1363a
+ - renamed ElGamalSignature to NR and changed it to track IEEE P1363
+ - renamed ECKEP to ECMQVC and changed it to track IEEE P1363
+ - renamed several other classes for clarity
+ - removed support for calling RSAREF
+ - removed option to compile old SHA (SHA-0)
+ - removed option not to throw exceptions
+
+3.1 - added ARC4, Rijndael, Twofish, Serpent, CBC-MAC, DMAC
+ - added interface for querying supported key lengths of symmetric ciphers
+ and MACs
+ - added sample code for RSA signature and verification
+ - changed CBC-CTS to be compatible with RFC 2040
+ - updated SEAL to version 3.0 of the cipher specification
+ - optimized multiprecision squaring and elliptic curves over GF(p)
+ - fixed bug in MARS key setup
+ - fixed bug with attaching objects to Deflator
+
+3.2 - added DES-XEX3, ECDSA, DefaultEncryptorWithMAC
+ - renamed DES-EDE to DES-EDE2 and TripleDES to DES-EDE3
+ - optimized ARC4
+ - generalized DSA to allow keys longer than 1024 bits
+ - fixed bugs in GF2N and ModularArithmetic that can cause calculation errors
+ - fixed crashing bug in Inflator when given invalid inputs
+ - fixed endian bug in Serpent
+ - fixed padding bug in Tiger
+
+4.0 - added Skipjack, CAST-256, Panama, SHA-2 (SHA-256, SHA-384, and SHA-512),
+ and XTR-DH
+ - added a faster variant of Rabin's Information Dispersal Algorithm (IDA)
+ - added class wrappers for these operating system features:
+ - high resolution timers on Windows, Unix, and MacOS
+ - Berkeley and Windows style sockets
+ - Windows named pipes
+ - /dev/random and /dev/urandom on Linux and FreeBSD
+ - Microsoft's CryptGenRandom on Windows
+ - added support for SEC 1 elliptic curve key format and compressed points
+ - added support for X.509 public key format (subjectPublicKeyInfo) for
+ RSA, DSA, and elliptic curve schemes
+ - added support for DER and OpenPGP signature format for DSA
+ - added support for ZLIB compressed data format (RFC 1950)
+ - changed elliptic curve encryption to use ECIES (as defined in SEC 1)
+ - changed MARS key schedule to reflect the latest specification
+ - changed BufferedTransformation interface to support multiple channels
+ and messages
+ - changed CAST and SHA-1 implementations to use public domain source code
+ - fixed bug in StringSource
+ - optmized multi-precision integer code for better performance
+
+4.1 - added more support for the recommended elliptic curve parameters in SEC 2
+ - added Panama MAC, MARC4
+ - added IV stealing feature to CTS mode
+ - added support for PKCS #8 private key format for RSA, DSA, and elliptic
+ curve schemes
+ - changed Deflate, MD5, Rijndael, and Twofish to use public domain code
+ - fixed a bug with flushing compressed streams
+ - fixed a bug with decompressing stored blocks
+ - fixed a bug with EC point decompression using non-trinomial basis
+ - fixed a bug in NetworkSource::GeneralPump()
+ - fixed a performance issue with EC over GF(p) decryption
+ - fixed syntax to allow GCC to compile without -fpermissive
+ - relaxed some restrictions in the license
+
+4.2 - added support for longer HMAC keys
+ - added MD4 (which is not secure so use for compatibility purposes only)
+ - added compatibility fixes/workarounds for STLport 4.5, GCC 3.0.2,
+ and MSVC 7.0
+ - changed MD2 to use public domain code
+ - fixed a bug with decompressing multiple messages with the same object
+ - fixed a bug in CBC-MAC with MACing multiple messages with the same object
+ - fixed a bug in RC5 and RC6 with zero-length keys
+ - fixed a bug in Adler32 where incorrect checksum may be generated
+
+5.0 - added ESIGN, DLIES, WAKE-OFB, PBKDF1 and PBKDF2 from PKCS #5
+ - added key validation for encryption and signature public/private keys
+ - renamed StreamCipher interface to SymmetricCipher, which is now implemented
+ by both stream ciphers and block cipher modes including ECB and CBC
+ - added keying interfaces to support resetting of keys and IVs without
+ having to destroy and recreate objects
+ - changed filter interface to support non-blocking input/output
+ - changed SocketSource and SocketSink to use overlapped I/O on Microsoft Windows
+ - grouped related classes inside structs to help templates, for example
+ AESEncryption and AESDecryption are now AES::Encryption and AES::Decryption
+ - where possible, typedefs have been added to improve backwards
+ compatibility when the CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY macro is defined
+ - changed Serpent, HAVAL and IDEA to use public domain code
+ - implemented SSE2 optimizations for Integer operations
+ - fixed a bug in HMAC::TruncatedFinal()
+ - fixed SKIPJACK byte ordering following NIST clarification dated 5/9/02
+
+5.01 - added known answer test for X9.17 RNG in FIPS 140 power-up self test
+ - submitted to NIST/CSE, but not publicly released
+
+5.02 - changed EDC test to MAC integrity check using HMAC/SHA1
+ - improved performance of integrity check
+ - added blinding to defend against RSA timing attack
+
+5.03 - created DLL version of Crypto++ for FIPS 140-2 validation
+ - fixed vulnerabilities in GetNextIV for CTR and OFB modes
+
+5.0.4 - Removed DES, SHA-256, SHA-384, SHA-512 from DLL
+
+5.1 - added PSS padding and changed PSSR to track IEEE P1363a draft standard
+ - added blinding for RSA and Rabin to defend against timing attacks
+ on decryption operations
+ - changed signing and decryption APIs to support the above
+ - changed WaitObjectContainer to allow waiting for more than 64
+ objects at a time on Win32 platforms
+ - fixed a bug in CBC and ECB modes with processing non-aligned data
+ - fixed standard conformance bugs in DLIES (DHAES mode) and RW/EMSA2
+ signature scheme (these fixes are not backwards compatible)
+ - fixed a number of compiler warnings, minor bugs, and portability problems
+ - removed Sapphire
+
+5.2 - merged in changes for 5.01 - 5.0.4
+ - added support for using encoding parameters and key derivation parameters
+ with public key encryption (implemented by OAEP and DL/ECIES)
+ - added Camellia, SHACAL-2, Two-Track-MAC, Whirlpool, RIPEMD-320,
+ RIPEMD-128, RIPEMD-256, Base-32 coding, FIPS variant of CFB mode
+ - added ThreadUserTimer for timing thread CPU usage
+ - added option for password-based key derivation functions
+ to iterate until a mimimum elapsed thread CPU time is reached
+ - added option (on by default) for DEFLATE compression to detect
+ uncompressible files and process them more quickly
+ - improved compatibility and performance on 64-bit platforms,
+ including Alpha, IA-64, x86-64, PPC64, Sparc64, and MIPS64
+ - fixed ONE_AND_ZEROS_PADDING to use 0x80 instead 0x01 as padding.
+ - fixed encoding/decoding of PKCS #8 privateKeyInfo to properly
+ handle optional attributes
+
+5.2.1 - fixed bug in the "dlltest" DLL testing program
+ - fixed compiling with STLport using VC .NET
+ - fixed compiling with -fPIC using GCC
+ - fixed compiling with -msse2 on systems without memalign()
+ - fixed inability to instantiate PanamaMAC
+ - fixed problems with inline documentation
+
+5.2.2 - added SHA-224
+ - put SHA-256, SHA-384, SHA-512, RSASSA-PSS into DLL
+
+5.2.3 - fixed issues with FIPS algorithm test vectors
+ - put RSASSA-ISO into DLL
+
+5.3 - ported to MSVC 2005 with support for x86-64
+ - added defense against AES timing attacks, and more AES test vectors
+ - changed StaticAlgorithmName() of Rijndael to "AES", CTR to "CTR"
+
+5.4 - added Salsa20
+ - updated Whirlpool to version 3.0
+ - ported to GCC 4.1, Sun C++ 5.8, and Borland C++Builder 2006
+
+5.5 - added VMAC and Sosemanuk (with x86-64 and SSE2 assembly)
+ - improved speed of integer arithmetic, AES, SHA-512, Tiger, Salsa20,
+ Whirlpool, and PANAMA cipher using assembly (x86-64, MMX, SSE2)
+ - optimized Camellia and added defense against timing attacks
+ - updated benchmarks code to show cycles per byte and to time key/IV setup
+ - started using OpenMP for increased multi-core speed
+ - enabled GCC optimization flags by default in GNUmakefile
+ - added blinding and computational error checking for RW signing
+ - changed RandomPool, X917RNG, GetNextIV, DSA/NR/ECDSA/ECNR to reduce
+ the risk of reusing random numbers and IVs after virtual machine state
+ rollback
+ - changed default FIPS mode RNG from AutoSeededX917RNG<DES_EDE3> to
+ AutoSeededX917RNG<AES>
+ - fixed PANAMA cipher interface to accept 256-bit key and 256-bit IV
+ - moved MD2, MD4, MD5, PanamaHash, ARC4, WAKE_CFB into the namespace "Weak"
+ - removed HAVAL, MD5-MAC, XMAC
+
+5.5.1 - fixed VMAC validation failure on 32-bit big-endian machines
+
+5.5.2 - ported x64 assembly language code for AES, Salsa20, Sosemanuk, and Panama
+ to MSVC 2005 (using MASM since MSVC doesn't support inline assembly on x64)
+ - fixed Salsa20 initialization crash on non-SSE2 machines
+ - fixed Whirlpool crash on Pentium 2 machines
+ - fixed possible branch prediction analysis (BPA) vulnerability in
+ MontgomeryReduce(), which may affect security of RSA, RW, LUC
+ - fixed link error with MSVC 2003 when using "debug DLL" form of runtime library
+ - fixed crash in SSE2_Add on P4 machines when compiled with
+ MSVC 6.0 SP5 with Processor Pack
+ - ported to MSVC 2008, GCC 4.2, Sun CC 5.9, Intel C++ Compiler 10.0,
+ and Borland C++Builder 2007
+
+5.6 - added AuthenticatedSymmetricCipher interface class and Filter wrappers
+ - added CCM, GCM (with SSE2 assembly), EAX, CMAC, XSalsa20, and SEED
+ - added support for variable length IVs
+ - improved AES and SHA-256 speed on x86 and x64
+ - fixed incorrect VMAC computation on message lengths
+ that are >64 mod 128 (x86 assembly version is not affected)
+ - fixed compiler error in vmac.cpp on x86 with GCC -fPIC
+ - fixed run-time validation error on x86-64 with GCC 4.3.2 -O2
+ - fixed HashFilter bug when putMessage=true
+ - removed WORD64_AVAILABLE; compiler support for 64-bit int is now required
+ - ported to GCC 4.3, C++Builder 2009, Sun CC 5.10, Intel C++ Compiler 11
+
+Written by Wei Dai
diff --git a/src/cryptopp/cpu.cpp b/src/cryptopp/cpu.cpp
index d36d3253ae..3e46804212 100644
--- a/src/cryptopp/cpu.cpp
+++ b/src/cryptopp/cpu.cpp
@@ -1,11 +1,11 @@
// cpu.cpp - written and placed in the public domain by Wei Dai
-#include "cryptopp/pch.h"
+#include "pch.h"
#ifndef CRYPTOPP_IMPORTS
-#include "cryptopp/cpu.h"
-#include "cryptopp/misc.h"
+#include "cpu.h"
+#include "misc.h"
#include <algorithm>
#ifdef __GNUC__
diff --git a/src/cryptopp/cpu.h b/src/cryptopp/cpu.h
index 113b8a1f3b..7f01dad852 100644
--- a/src/cryptopp/cpu.h
+++ b/src/cryptopp/cpu.h
@@ -10,7 +10,7 @@
#else
-#include "cryptopp/config.h"
+#include "config.h"
#ifdef CRYPTOPP_MSVC6PP_OR_LATER
#include <emmintrin.h>
diff --git a/src/cryptopp/cryptlib.h b/src/cryptopp/cryptlib.h
index 1461af7b7b..15cd6dad67 100644
--- a/src/cryptopp/cryptlib.h
+++ b/src/cryptopp/cryptlib.h
@@ -79,8 +79,8 @@ and getting me started with this manual.
#ifndef CRYPTOPP_CRYPTLIB_H
#define CRYPTOPP_CRYPTLIB_H
-#include "cryptopp/config.h"
-#include "cryptopp/stdcpp.h"
+#include "config.h"
+#include "stdcpp.h"
NAMESPACE_BEGIN(CryptoPP)
diff --git a/src/cryptopp/iterhash.h b/src/cryptopp/iterhash.h
index 0e2a147728..2f5895e2d3 100644
--- a/src/cryptopp/iterhash.h
+++ b/src/cryptopp/iterhash.h
@@ -1,7 +1,7 @@
#ifndef CRYPTOPP_ITERHASH_H
#define CRYPTOPP_ITERHASH_H
-#include "cryptopp/secblock.h"
+#include "secblock.h"
NAMESPACE_BEGIN(CryptoPP)
diff --git a/src/cryptopp/misc.h b/src/cryptopp/misc.h
index 5258e2abca..de8037bf61 100644
--- a/src/cryptopp/misc.h
+++ b/src/cryptopp/misc.h
@@ -1,8 +1,8 @@
#ifndef CRYPTOPP_MISC_H
#define CRYPTOPP_MISC_H
-#include "cryptopp/cryptlib.h"
-#include "cryptopp/smartptr.h"
+#include "cryptlib.h"
+#include "smartptr.h"
#include <string.h> // for memcpy and memmove
#ifdef _MSC_VER
diff --git a/src/cryptopp/obj/.gitignore b/src/cryptopp/obj/.gitignore
new file mode 100644
index 0000000000..d6b7ef32c8
--- /dev/null
+++ b/src/cryptopp/obj/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/src/cryptopp/secblock.h b/src/cryptopp/secblock.h
index 6433f97349..2025757dbb 100644
--- a/src/cryptopp/secblock.h
+++ b/src/cryptopp/secblock.h
@@ -3,8 +3,8 @@
#ifndef CRYPTOPP_SECBLOCK_H
#define CRYPTOPP_SECBLOCK_H
-#include "cryptopp/config.h"
-#include "cryptopp/misc.h"
+#include "config.h"
+#include "misc.h"
#include <assert.h>
#if defined(CRYPTOPP_MEMALIGN_AVAILABLE) || defined(CRYPTOPP_MM_MALLOC_AVAILABLE) || defined(QNX)
diff --git a/src/cryptopp/sha.cpp b/src/cryptopp/sha.cpp
index 1ff6c0b45c..fd0b0a2596 100644
--- a/src/cryptopp/sha.cpp
+++ b/src/cryptopp/sha.cpp
@@ -5,14 +5,14 @@
// use "cl /EP /P /DCRYPTOPP_GENERATE_X64_MASM sha.cpp" to generate MASM code
-#include "cryptopp/pch.h"
+#include "pch.h"
#ifndef CRYPTOPP_IMPORTS
#ifndef CRYPTOPP_GENERATE_X64_MASM
-#include "cryptopp/sha.h"
-#include "cryptopp/misc.h"
-#include "cryptopp/cpu.h"
+#include "sha.h"
+#include "misc.h"
+#include "cpu.h"
NAMESPACE_BEGIN(CryptoPP)
diff --git a/src/cryptopp/sha.h b/src/cryptopp/sha.h
index 8d0dbfcac7..679081e8fa 100644
--- a/src/cryptopp/sha.h
+++ b/src/cryptopp/sha.h
@@ -1,7 +1,7 @@
#ifndef CRYPTOPP_SHA_H
#define CRYPTOPP_SHA_H
-#include "cryptopp/iterhash.h"
+#include "iterhash.h"
NAMESPACE_BEGIN(CryptoPP)
diff --git a/src/cryptopp/smartptr.h b/src/cryptopp/smartptr.h
index fa0daec3df..6b4040e999 100644
--- a/src/cryptopp/smartptr.h
+++ b/src/cryptopp/smartptr.h
@@ -1,7 +1,7 @@
#ifndef CRYPTOPP_SMARTPTR_H
#define CRYPTOPP_SMARTPTR_H
-#include "cryptopp/config.h"
+#include "config.h"
#include <algorithm>
NAMESPACE_BEGIN(CryptoPP)
diff --git a/src/json/LICENSE.txt b/src/json/LICENSE.txt
new file mode 100644
index 0000000000..797d5363b3
--- /dev/null
+++ b/src/json/LICENSE.txt
@@ -0,0 +1,24 @@
+The MIT License
+
+Copyright (c) 2007 - 2009 John W. Wilkinson
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/src/json/json_spirit_reader.cpp b/src/json/json_spirit_reader.cpp
index 3469bf17af..aa4f637226 100644
--- a/src/json/json_spirit_reader.cpp
+++ b/src/json/json_spirit_reader.cpp
@@ -3,8 +3,8 @@
// json spirit version 4.03
-#include "json/json_spirit_reader.h"
-#include "json/json_spirit_reader_template.h"
+#include "json_spirit_reader.h"
+#include "json_spirit_reader_template.h"
using namespace json_spirit;
diff --git a/src/json/json_spirit_value.cpp b/src/json/json_spirit_value.cpp
index 2d7236855d..44d2f06a01 100644
--- a/src/json/json_spirit_value.cpp
+++ b/src/json/json_spirit_value.cpp
@@ -5,4 +5,4 @@
// json spirit version 2.00
-#include "json/json_spirit_value.h"
+#include "json_spirit_value.h"
diff --git a/src/json/json_spirit_writer.cpp b/src/json/json_spirit_writer.cpp
index 32dfeb2c6c..d24a632cf3 100644
--- a/src/json/json_spirit_writer.cpp
+++ b/src/json/json_spirit_writer.cpp
@@ -3,8 +3,8 @@
// json spirit version 4.03
-#include "json/json_spirit_writer.h"
-#include "json/json_spirit_writer_template.h"
+#include "json_spirit_writer.h"
+#include "json_spirit_writer_template.h"
void json_spirit::write( const Value& value, std::ostream& os )
{
diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw
new file mode 100644
index 0000000000..3fb18ff28d
--- /dev/null
+++ b/src/makefile.linux-mingw
@@ -0,0 +1,111 @@
+# Copyright (c) 2009-2010 Satoshi Nakamoto
+# Distributed under the MIT/X11 software license, see the accompanying
+# file license.txt or http://www.opensource.org/licenses/mit-license.php.
+
+DEPSDIR:=/usr/i586-mingw32msvc
+
+INCLUDEPATHS= \
+ -I"$(DEPSDIR)/boost_1_43_0" \
+ -I"$(DEPSDIR)/db-4.7.25.NC/build_unix" \
+ -I"$(DEPSDIR)/openssl-1.0.0d/include" \
+ -I"$(DEPSDIR)/wxWidgets-2.9.1/lib/gcc_lib/mswud" \
+ -I"$(DEPSDIR)/wxWidgets-2.9.1/include" \
+ -I"$(DEPSDIR)/wxWidgets-2.9.1/lib/wx/include/i586-mingw32msvc-msw-unicode-static-2.9/" \
+ -I"$(DEPSDIR)"
+
+LIBPATHS= \
+ -L"$(DEPSDIR)/boost_1_43_0/stage/lib" \
+ -L"$(DEPSDIR)/db-4.7.25.NC/build_unix" \
+ -L"$(DEPSDIR)/openssl-1.0.0d" \
+ -L"$(DEPSDIR)/wxWidgets-2.9.1/lib"
+
+WXLIBS= -l wx_mswu-2.9-i586-mingw32msvc
+
+LIBS= \
+ -l boost_system-mt-s \
+ -l boost_filesystem-mt-s \
+ -l boost_program_options-mt-s \
+ -l boost_thread_win32-mt-s \
+ -l db_cxx \
+ -l ssl \
+ -l crypto
+
+DEFS=-D_MT -DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -DUSE_SSL
+DEBUGFLAGS=-g -D__WXDEBUG__
+CFLAGS=-O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
+HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
+ script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h
+
+bitcoin.exe: USE_UPNP:=1
+ ifdef USE_UPNP
+ INCLUDEPATHS += -I"$(DEPSDIR)/upnpc-exe-win32-20110215"
+ LIBPATHS += -L"$(DEPSDIR)/upnpc-exe-win32-20110215"
+ LIBS += -l miniupnpc -l iphlpapi
+ DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
+ endif
+
+bitcoind.exe: USE_UPNP:=0
+ ifdef USE_UPNP
+ INCLUDEPATHS += -I"$(DEPSDIR)/upnpc-exe-win32-20110215"
+ LIBPATHS += -L"$(DEPSDIR)/upnpc-exe-win32-20110215"
+ LIBS += -l miniupnpc -l iphlpapi
+ DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
+ endif
+
+LIBS += -l mingwthrd -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi
+
+OBJS= \
+ obj/util.o \
+ obj/script.o \
+ obj/db.o \
+ obj/net.o \
+ obj/irc.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/wallet.o \
+ obj/rpc.o \
+ obj/init.o \
+ cryptopp/obj/sha.o \
+ cryptopp/obj/cpu.o
+
+
+all: bitcoin.exe
+
+
+obj/%.o: %.cpp $(HEADERS)
+ i586-mingw32msvc-g++ -c $(CFLAGS) -DGUI -o $@ $<
+
+cryptopp/obj/%.o: cryptopp/%.cpp
+ i586-mingw32msvc-g++ -c $(CFLAGS) -O3 -DCRYPTOPP_DISABLE_ASM -o $@ $<
+
+obj/ui_res.o: ../share/ui.rc ../share/pixmaps/bitcoin.ico ../share/pixmaps/check.ico ../share/pixmaps/send16.bmp ../share/pixmaps/send16mask.bmp ../share/pixmaps/send16masknoshadow.bmp ../share/pixmaps/send20.bmp ../share/pixmaps/send20mask.bmp ../share/pixmaps/addressbook16.bmp ../share/pixmaps/addressbook16mask.bmp ../share/pixmaps/addressbook20.bmp ../share/pixmaps/addressbook20mask.bmp
+ i586-mingw32msvc-windres $(DEFS) $(INCLUDEPATHS) -o $@ -i $<
+
+bitcoin.exe: $(OBJS) obj/ui.o obj/uibase.o obj/ui_res.o
+ i586-mingw32msvc-g++ $(CFLAGS) -mwindows -Wl,--subsystem,windows -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
+
+
+obj/nogui/%.o: %.cpp $(HEADERS)
+ i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
+
+bitcoind.exe: $(OBJS:obj/%=obj/nogui/%) obj/ui_res.o
+ i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
+
+
+obj/test/%.o: obj/test/%.cpp $(HEADERS)
+ i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
+
+test_bitcoin.exe: obj/test/test_bitcoin.o
+ i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework-mt-s
+
+
+clean:
+ -rm -f obj/*.o
+ -rm -f obj/nogui/*.o
+ -rm -f obj/test/*.o
+ -rm -f cryptopp/obj/*.o
+ -rm -f test/*.o
+ -rm -f headers.h.gch
+ -rm -f bitcoin.exe
+ -rm -f bitcoind.exe
+ -rm -f test_bitcoin.exe
diff --git a/src/makefile.mingw b/src/makefile.mingw
new file mode 100644
index 0000000000..507833be48
--- /dev/null
+++ b/src/makefile.mingw
@@ -0,0 +1,97 @@
+# Copyright (c) 2009-2010 Satoshi Nakamoto
+# Distributed under the MIT/X11 software license, see the accompanying
+# file license.txt or http://www.opensource.org/licenses/mit-license.php.
+
+USE_UPNP:=0
+
+INCLUDEPATHS= \
+ -I"C:\boost-1.43.0-mgw" \
+ -I"C:\db-4.7.25.NC-mgw\build_unix" \
+ -I"C:\openssl-1.0.0d-mgw\include" \
+ -I"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib\mswud" \
+ -I"C:\wxWidgets-2.9.1-mgw\include"
+
+LIBPATHS= \
+ -L"C:\boost-1.43.0-mgw\stage\lib" \
+ -L"C:\db-4.7.25.NC-mgw\build_unix" \
+ -L"C:\openssl-1.0.0d-mgw" \
+ -L"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib"
+
+WXLIBS= \
+ -l wxmsw29ud_html -l wxmsw29ud_core -l wxmsw29ud_adv -l wxbase29ud -l wxtiffd -l wxjpegd -l wxpngd -l wxzlibd
+
+LIBS= \
+ -l boost_system-mgw45-mt-s-1_43 \
+ -l boost_filesystem-mgw45-mt-s-1_43 \
+ -l boost_program_options-mgw45-mt-s-1_43 \
+ -l boost_thread-mgw45-mt-s-1_43 \
+ -l db_cxx \
+ -l ssl \
+ -l crypto
+
+DEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -DUSE_SSL
+DEBUGFLAGS=-g -D__WXDEBUG__
+CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
+HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
+ script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h
+
+ifdef USE_UPNP
+ INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215"
+ LIBPATHS += -L"C:\upnpc-exe-win32-20110215"
+ LIBS += -l miniupnpc -l iphlpapi
+ DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
+endif
+
+LIBS += -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi
+
+OBJS= \
+ obj/util.o \
+ obj/script.o \
+ obj/db.o \
+ obj/net.o \
+ obj/irc.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/wallet.o \
+ obj/rpc.o \
+ obj/init.o \
+ cryptopp/obj/sha.o \
+ cryptopp/obj/cpu.o
+
+
+all: bitcoin.exe
+
+
+obj/%.o: %.cpp $(HEADERS)
+ g++ -c $(CFLAGS) -DGUI -o $@ $<
+
+cryptopp/obj/%.o: cryptopp/%.cpp
+ g++ -c $(CFLAGS) -O3 -DCRYPTOPP_X86_ASM_AVAILABLE -o $@ $<
+
+obj/ui_res.o: ../share/ui.rc ../share/pixmaps/bitcoin.ico ../share/pixmaps/check.ico ../share/pixmaps/send16.bmp ../share/pixmaps/send16mask.bmp ../share/pixmaps/send16masknoshadow.bmp ../share/pixmaps/send20.bmp ../share/pixmaps/send20mask.bmp ../share/pixmaps/addressbook16.bmp ../share/pixmaps/addressbook16mask.bmp ../share/pixmaps/addressbook20.bmp ../share/pixmaps/addressbook20mask.bmp
+ windres $(DEFS) $(INCLUDEPATHS) -o $@ -i $<
+
+bitcoin.exe: $(OBJS) obj/ui.o obj/uibase.o obj/ui_res.o
+ g++ $(CFLAGS) -mwindows -Wl,--subsystem,windows -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
+
+
+obj/nogui/%.o: %.cpp $(HEADERS)
+ g++ -c $(CFLAGS) -o $@ $<
+
+bitcoind.exe: $(OBJS:obj/%=obj/nogui/%) obj/ui_res.o
+ g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
+
+obj/test/%.o: obj/test/%.cpp $(HEADERS)
+ g++ -c $(CFLAGS) -o $@ $<
+
+test_bitcoin: obj/test/test_bitcoin.o
+ g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
+
+clean:
+ -del /Q bitcoin bitcoind test_bitcoin
+ -del /Q obj\*
+ -del /Q obj\nogui\*
+ -del /Q obj\test\*
+ -del /Q cryptopp\obj\*
+ -del /Q test\*.o
+ -del /Q headers.h.gch
diff --git a/src/makefile.osx b/src/makefile.osx
new file mode 100644
index 0000000000..784596b72d
--- /dev/null
+++ b/src/makefile.osx
@@ -0,0 +1,88 @@
+# Copyright (c) 2010 Laszlo Hanyecz
+# Distributed under the MIT/X11 software license, see the accompanying
+# file license.txt or http://www.opensource.org/licenses/mit-license.php.
+
+# Mac OS X makefile for bitcoin
+# Laszlo Hanyecz (solar@heliacal.net)
+
+CXX=llvm-g++
+DEPSDIR=/Users/macosuser/bitcoin/deps
+
+INCLUDEPATHS= \
+ -I"$(DEPSDIR)/include"
+
+LIBPATHS= \
+ -L"$(DEPSDIR)/lib"
+
+WXLIBS=$(shell $(DEPSDIR)/bin/wx-config --libs --static)
+
+USE_UPNP:=0
+
+LIBS= -dead_strip \
+ $(DEPSDIR)/lib/libdb_cxx-4.8.a \
+ $(DEPSDIR)/lib/libboost_system.a \
+ $(DEPSDIR)/lib/libboost_filesystem.a \
+ $(DEPSDIR)/lib/libboost_program_options.a \
+ $(DEPSDIR)/lib/libboost_thread.a \
+ $(DEPSDIR)/lib/libssl.a \
+ $(DEPSDIR)/lib/libcrypto.a
+
+DEFS=$(shell $(DEPSDIR)/bin/wx-config --cxxflags) -D__WXMAC_OSX__ -DNOPCH -DMSG_NOSIGNAL=0 -DUSE_SSL
+
+DEBUGFLAGS=-g -DwxDEBUG_LEVEL=0
+# ppc doesn't work because we don't support big-endian
+CFLAGS=-mmacosx-version-min=10.5 -arch i386 -arch x86_64 -O3 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
+HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
+ script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h
+
+OBJS= \
+ obj/util.o \
+ obj/script.o \
+ obj/db.o \
+ obj/net.o \
+ obj/irc.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/wallet.o \
+ obj/rpc.o \
+ obj/init.o \
+ cryptopp/obj/sha.o \
+ cryptopp/obj/cpu.o
+
+ifdef USE_UPNP
+ LIBS += $(DEPSDIR)/lib/libminiupnpc.a
+ DEFS += -DUSE_UPNP=$(USE_UPNP)
+endif
+
+
+all: bitcoin
+
+
+obj/%.o: %.cpp $(HEADERS)
+ $(CXX) -c $(CFLAGS) -DGUI -o $@ $<
+
+cryptopp/obj/%.o: cryptopp/%.cpp
+ $(CXX) -c $(CFLAGS) -O3 -DCRYPTOPP_DISABLE_ASM -o $@ $<
+
+bitcoin: $(OBJS) obj/ui.o obj/uibase.o
+ $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
+
+
+obj/nogui/%.o: %.cpp $(HEADERS)
+ $(CXX) -c $(CFLAGS) -o $@ $<
+
+bitcoind: $(OBJS:obj/%=obj/nogui/%)
+ $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
+
+obj/test/%.o: test/%.cpp $(HEADERS)
+ $(CXX) -c $(CFLAGS) -o $@ $<
+
+test_bitcoin: obj/test/test_bitcoin.o
+ $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework
+
+clean:
+ -rm -f bitcoin bitcoind test_bitcoin
+ -rm -f obj/*.o
+ -rm -f obj/nogui/*.o
+ -rm -f obj/test/*.o
+ -rm -f cryptopp/obj/*.o
diff --git a/src/makefile.unix b/src/makefile.unix
new file mode 100644
index 0000000000..bb26bf5edd
--- /dev/null
+++ b/src/makefile.unix
@@ -0,0 +1,90 @@
+# Copyright (c) 2009-2010 Satoshi Nakamoto
+# Distributed under the MIT/X11 software license, see the accompanying
+# file license.txt or http://www.opensource.org/licenses/mit-license.php.
+
+CXX=g++
+
+WXINCLUDEPATHS=$(shell wx-config --cxxflags)
+
+WXLIBS=$(shell wx-config --libs)
+
+USE_UPNP:=0
+
+DEFS=-DNOPCH -DFOURWAYSSE2 -DUSE_SSL
+
+# for boost 1.37, add -mt to the boost libraries
+LIBS= \
+ -Wl,-Bstatic \
+ -l boost_system \
+ -l boost_filesystem \
+ -l boost_program_options \
+ -l boost_thread \
+ -l db_cxx \
+ -l ssl \
+ -l crypto
+
+ifdef USE_UPNP
+ LIBS += -l miniupnpc
+ DEFS += -DUSE_UPNP=$(USE_UPNP)
+endif
+
+LIBS+= \
+ -Wl,-Bdynamic \
+ -l gthread-2.0 \
+ -l z \
+ -l dl \
+ -l pthread
+
+
+DEBUGFLAGS=-g -D__WXDEBUG__
+CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS)
+HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
+ script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h
+
+OBJS= \
+ obj/util.o \
+ obj/script.o \
+ obj/db.o \
+ obj/net.o \
+ obj/irc.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/wallet.o \
+ obj/rpc.o \
+ obj/init.o \
+ cryptopp/obj/sha.o \
+ cryptopp/obj/cpu.o
+
+
+all: bitcoin
+
+
+obj/%.o: %.cpp $(HEADERS)
+ $(CXX) -c $(CXXFLAGS) $(WXINCLUDEPATHS) -DGUI -o $@ $<
+
+cryptopp/obj/%.o: cryptopp/%.cpp
+ $(CXX) -c $(CXXFLAGS) -O3 -o $@ $<
+
+bitcoin: $(OBJS) obj/ui.o obj/uibase.o
+ $(CXX) $(CXXFLAGS) -o $@ $^ $(WXLIBS) $(LIBS)
+
+
+obj/nogui/%.o: %.cpp $(HEADERS)
+ $(CXX) -c $(CXXFLAGS) -o $@ $<
+
+bitcoind: $(OBJS:obj/%=obj/nogui/%)
+ $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
+
+obj/test/%.o: test/%.cpp $(HEADERS)
+ $(CXX) -c $(CFLAGS) -o $@ $<
+
+test_bitcoin: obj/test/test_bitcoin.o
+ $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework
+
+clean:
+ -rm -f bitcoin bitcoind test_bitcoin
+ -rm -f obj/*.o
+ -rm -f obj/nogui/*.o
+ -rm -f obj/test/*.o
+ -rm -f cryptopp/obj/*.o
+ -rm -f headers.h.gch
diff --git a/src/makefile.vc b/src/makefile.vc
new file mode 100644
index 0000000000..b25ba60c50
--- /dev/null
+++ b/src/makefile.vc
@@ -0,0 +1,145 @@
+# Copyright (c) 2009-2010 Satoshi Nakamoto
+# Distributed under the MIT/X11 software license, see the accompanying
+# file license.txt or http://www.opensource.org/licenses/mit-license.php.
+
+
+INCLUDEPATHS= \
+ /I"/boost" \
+ /I"/db/build_windows" \
+ /I"/openssl/include" \
+ /I"/wxwidgets/lib/vc_lib/mswu" \
+ /I"/wxwidgets/include" /
+ /I"/miniupnpc"
+
+LIBPATHS= \
+ /LIBPATH:"/boost/stage/lib" \
+ /LIBPATH:"/db/build_windows/Release" \
+ /LIBPATH:"/openssl/lib" \
+ /LIBPATH:"/wxwidgets/lib/vc_lib" \
+ /LIBPATH:"/miniupnpc/msvc/Release" \
+ /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib \
+ /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib \
+ /NODEFAULTLIB:msvcrtd.lib
+
+WXLIBS=wxmsw29u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib
+
+USE_UPNP=0
+
+DEFS=/DWIN32 /D__WXMSW__ /D_WINDOWS /DNOPCH /DNOMINMAX
+
+LIBS= \
+ libboost_system-vc100-mt.lib \
+ libboost_filesystem-vc100-mt.lib \
+ libboost_program_options-vc100-mt.lib \
+ libboost_thread-vc100-mt.lib \
+ libdb47s.lib \
+ libeay32.lib
+
+!IFDEF USE_UPNP
+LIBS=$(LIBS) miniupnpc.lib
+DEFS=$(DEFS) /DUSE_UPNP=$(USE_UPNP)
+!ENDIF
+
+LIBS=$(LIBS) \
+ kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib ws2_32.lib shlwapi.lib
+
+DEBUGFLAGS=/Os
+CFLAGS=/MD /c /nologo /EHsc /GR /Zm300 $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
+HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
+ script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h noui.h init.h wallet.h keystore.h
+
+OBJS= \
+ obj\util.obj \
+ obj\script.obj \
+ obj\db.obj \
+ obj\net.obj \
+ obj\irc.obj \
+ obj\keystore.obj \
+ obj\main.obj \
+ obj\wallet.obj \
+ obj\rpc.obj \
+ obj\init.obj
+
+CRYPTOPP_OBJS= \
+ cryptopp\obj\sha.obj \
+ cryptopp\obj\cpu.obj
+
+RC=../share
+
+
+all: bitcoin.exe
+
+
+.cpp{obj}.obj:
+ cl $(CFLAGS) /DGUI /Fo$@ %s
+
+obj\util.obj: $(HEADERS)
+
+obj\script.obj: $(HEADERS)
+
+obj\db.obj: $(HEADERS)
+
+obj\net.obj: $(HEADERS)
+
+obj\irc.obj: $(HEADERS)
+
+obj\keystore.obj: $(HEADERS)
+
+obj\main.obj: $(HEADERS)
+
+obj\wallet.obj: $(HEADERS)
+
+obj\rpc.obj: $(HEADERS)
+
+obj\init.obj: $(HEADERS)
+
+obj\ui.obj: $(HEADERS)
+
+obj\uibase.obj: $(HEADERS)
+
+cryptopp\obj\sha.obj: cryptopp\sha.cpp
+ cl $(CFLAGS) /O2 /DCRYPTOPP_DISABLE_ASM /Fo$@ %s
+
+cryptopp\obj\cpu.obj: cryptopp\cpu.cpp
+ cl $(CFLAGS) /O2 /DCRYPTOPP_DISABLE_ASM /Fo$@ %s
+
+obj\ui.res: $(RC)/ui.rc $(RC)/pixmaps/bitcoin.ico $(RC)/pixmaps/check.ico $(RC)/pixmaps/send16.bmp $(RC)/pixmaps/send16mask.bmp $(RC)/pixmaps/send16masknoshadow.bmp $(RC)/pixmaps/send20.bmp $(RC)/pixmaps/send20mask.bmp $(RC)/pixmaps/addressbook16.bmp $(RC)/pixmaps/addressbook16mask.bmp $(RC)/pixmaps/addressbook20.bmp $(RC)/pixmaps/addressbook20mask.bmp
+ rc $(INCLUDEPATHS) $(DEFS) /Fo$@ %s
+
+bitcoin.exe: $(OBJS) $(CRYPTOPP_OBJS) obj\ui.obj obj\uibase.obj obj\ui.res
+ link /nologo /SUBSYSTEM:WINDOWS /OUT:$@ $(LIBPATHS) $** $(WXLIBS) $(LIBS)
+
+
+.cpp{obj\nogui}.obj:
+ cl $(CFLAGS) /Fo$@ %s
+
+obj\nogui\util.obj: $(HEADERS)
+
+obj\nogui\script.obj: $(HEADERS)
+
+obj\nogui\db.obj: $(HEADERS)
+
+obj\nogui\net.obj: $(HEADERS)
+
+obj\nogui\irc.obj: $(HEADERS)
+
+obj\nogui\keystore.obj: $(HEADERS)
+
+obj\nogui\main.obj: $(HEADERS)
+
+obj\nogui\wallet.obj: $(HEADERS)
+
+obj\nogui\rpc.obj: $(HEADERS)
+
+obj\nogui\init.obj: $(HEADERS)
+
+bitcoind.exe: $(OBJS:obj\=obj\nogui\) $(CRYPTOPP_OBJS) obj\ui.res
+ link /nologo /OUT:$@ $(LIBPATHS) $** $(LIBS)
+
+
+clean:
+ -del /Q obj\*
+ -del /Q obj\nogui\*
+ -del /Q cryptopp\obj\*
+ -del /Q *.ilk
+ -del /Q *.pdb
diff --git a/src/obj/.gitignore b/src/obj/.gitignore
new file mode 100644
index 0000000000..d6b7ef32c8
--- /dev/null
+++ b/src/obj/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/src/obj/nogui/.gitignore b/src/obj/nogui/.gitignore
new file mode 100644
index 0000000000..d6b7ef32c8
--- /dev/null
+++ b/src/obj/nogui/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/src/obj/test/.gitignore b/src/obj/test/.gitignore
new file mode 100644
index 0000000000..d6b7ef32c8
--- /dev/null
+++ b/src/obj/test/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/src/test/README b/src/test/README
new file mode 100644
index 0000000000..77f7faa815
--- /dev/null
+++ b/src/test/README
@@ -0,0 +1,21 @@
+The sources in this directory are unit test cases. Boost includes a
+unit testing framework, and since bitcoin already uses boost, it makes
+sense to simply use this framework rather than require developers to
+configure some other framework (we want as few impediments to creating
+unit tests as possible).
+
+The build system is setup to compile an executable called "test_bitcoin"
+that runs all of the unit tests. The main source file is called
+test_bitcoin.cpp, which simply includes other files that contain the
+actual unit tests (outside of a couple required preprocessor
+directives). The pattern is to create one test file for each class or
+source file for which you want to create unit tests. The file naming
+convention is "<source_filename>_tests.cpp" and such files should wrap
+their tests in a test suite called "<source_filename>_tests". For an
+examples of this pattern, examine uint160_tests.cpp and
+uint256_tests.cpp.
+
+For further reading, I found the following website to be helpful in
+explaining how the boost unit test framework works:
+
+http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
new file mode 100644
index 0000000000..3b7d2d2f2c
--- /dev/null
+++ b/src/test/test_bitcoin.cpp
@@ -0,0 +1,6 @@
+#define BOOST_TEST_MODULE uint160
+#include <boost/test/unit_test.hpp>
+
+#include "uint160_tests.cpp"
+#include "uint256_tests.cpp"
+
diff --git a/src/test/uint160_tests.cpp b/src/test/uint160_tests.cpp
new file mode 100644
index 0000000000..66ffd285b8
--- /dev/null
+++ b/src/test/uint160_tests.cpp
@@ -0,0 +1,16 @@
+#include "../uint256.h"
+
+BOOST_AUTO_TEST_SUITE(uint160_tests)
+
+BOOST_AUTO_TEST_CASE(equality)
+{
+ uint160 num1 = 10;
+ uint160 num2 = 11;
+ BOOST_CHECK(num1+1 == num2);
+
+ uint64 num3 = 10;
+ BOOST_CHECK(num1 == num3);
+ BOOST_CHECK(num1+num2 == num3+num2);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/uint256_tests.cpp b/src/test/uint256_tests.cpp
new file mode 100644
index 0000000000..cbae9bf6d2
--- /dev/null
+++ b/src/test/uint256_tests.cpp
@@ -0,0 +1,16 @@
+#include "../uint256.h"
+
+BOOST_AUTO_TEST_SUITE(uint256_tests)
+
+BOOST_AUTO_TEST_CASE(equality)
+{
+ uint256 num1 = 10;
+ uint256 num2 = 11;
+ BOOST_CHECK(num1+1 == num2);
+
+ uint64 num3 = 10;
+ BOOST_CHECK(num1 == num3);
+ BOOST_CHECK(num1+num2 == num3+num2);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/ui.cpp b/src/ui.cpp
new file mode 100644
index 0000000000..ff0b4afb55
--- /dev/null
+++ b/src/ui.cpp
@@ -0,0 +1,2964 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Distributed under the MIT/X11 software license, see the accompanying
+// file license.txt or http://www.opensource.org/licenses/mit-license.php.
+
+#include "headers.h"
+#include "db.h"
+#include "init.h"
+#include "strlcpy.h"
+#include <boost/filesystem/fstream.hpp>
+#include <boost/filesystem/convenience.hpp>
+#ifdef _MSC_VER
+#include <crtdbg.h>
+#endif
+
+using namespace std;
+using namespace boost;
+
+
+DEFINE_EVENT_TYPE(wxEVT_UITHREADCALL)
+
+CMainFrame* pframeMain = NULL;
+CMyTaskBarIcon* ptaskbaricon = NULL;
+bool fClosedToTray = false;
+wxLocale g_locale;
+
+#ifdef __WXMSW__
+double nScaleX = 1.0;
+double nScaleY = 1.0;
+#else
+static const double nScaleX = 1.0;
+static const double nScaleY = 1.0;
+#endif
+
+
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Util
+//
+
+void HandleCtrlA(wxKeyEvent& event)
+{
+ // Ctrl-a select all
+ event.Skip();
+ wxTextCtrl* textCtrl = (wxTextCtrl*)event.GetEventObject();
+ if (event.GetModifiers() == wxMOD_CONTROL && event.GetKeyCode() == 'A')
+ textCtrl->SetSelection(-1, -1);
+}
+
+bool Is24HourTime()
+{
+ //char pszHourFormat[256];
+ //pszHourFormat[0] = '\0';
+ //GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ITIME, pszHourFormat, 256);
+ //return (pszHourFormat[0] != '0');
+ return true;
+}
+
+string DateStr(int64 nTime)
+{
+ // Can only be used safely here in the UI
+ return (string)wxDateTime((time_t)nTime).FormatDate();
+}
+
+string DateTimeStr(int64 nTime)
+{
+ // Can only be used safely here in the UI
+ wxDateTime datetime((time_t)nTime);
+ if (Is24HourTime())
+ return (string)datetime.Format("%x %H:%M");
+ else
+ return (string)datetime.Format("%x ") + itostr((datetime.GetHour() + 11) % 12 + 1) + (string)datetime.Format(":%M %p");
+}
+
+wxString GetItemText(wxListCtrl* listCtrl, int nIndex, int nColumn)
+{
+ // Helper to simplify access to listctrl
+ wxListItem item;
+ item.m_itemId = nIndex;
+ item.m_col = nColumn;
+ item.m_mask = wxLIST_MASK_TEXT;
+ if (!listCtrl->GetItem(item))
+ return "";
+ return item.GetText();
+}
+
+int InsertLine(wxListCtrl* listCtrl, const wxString& str0, const wxString& str1)
+{
+ int nIndex = listCtrl->InsertItem(listCtrl->GetItemCount(), str0);
+ listCtrl->SetItem(nIndex, 1, str1);
+ return nIndex;
+}
+
+int InsertLine(wxListCtrl* listCtrl, const wxString& str0, const wxString& str1, const wxString& str2, const wxString& str3, const wxString& str4)
+{
+ int nIndex = listCtrl->InsertItem(listCtrl->GetItemCount(), str0);
+ listCtrl->SetItem(nIndex, 1, str1);
+ listCtrl->SetItem(nIndex, 2, str2);
+ listCtrl->SetItem(nIndex, 3, str3);
+ listCtrl->SetItem(nIndex, 4, str4);
+ return nIndex;
+}
+
+int InsertLine(wxListCtrl* listCtrl, void* pdata, const wxString& str0, const wxString& str1, const wxString& str2, const wxString& str3, const wxString& str4)
+{
+ int nIndex = listCtrl->InsertItem(listCtrl->GetItemCount(), str0);
+ listCtrl->SetItemPtrData(nIndex, (wxUIntPtr)pdata);
+ listCtrl->SetItem(nIndex, 1, str1);
+ listCtrl->SetItem(nIndex, 2, str2);
+ listCtrl->SetItem(nIndex, 3, str3);
+ listCtrl->SetItem(nIndex, 4, str4);
+ return nIndex;
+}
+
+void SetItemTextColour(wxListCtrl* listCtrl, int nIndex, const wxColour& colour)
+{
+ // Repaint on Windows is more flickery if the colour has ever been set,
+ // so don't want to set it unless it's different. Default colour has
+ // alpha 0 transparent, so our colours don't match using operator==.
+ wxColour c1 = listCtrl->GetItemTextColour(nIndex);
+ if (!c1.IsOk())
+ c1 = wxColour(0,0,0);
+ if (colour.Red() != c1.Red() || colour.Green() != c1.Green() || colour.Blue() != c1.Blue())
+ listCtrl->SetItemTextColour(nIndex, colour);
+}
+
+void SetSelection(wxListCtrl* listCtrl, int nIndex)
+{
+ int nSize = listCtrl->GetItemCount();
+ long nState = (wxLIST_STATE_SELECTED|wxLIST_STATE_FOCUSED);
+ for (int i = 0; i < nSize; i++)
+ listCtrl->SetItemState(i, (i == nIndex ? nState : 0), nState);
+}
+
+int GetSelection(wxListCtrl* listCtrl)
+{
+ int nSize = listCtrl->GetItemCount();
+ for (int i = 0; i < nSize; i++)
+ if (listCtrl->GetItemState(i, wxLIST_STATE_FOCUSED))
+ return i;
+ return -1;
+}
+
+string HtmlEscape(const char* psz, bool fMultiLine=false)
+{
+ int len = 0;
+ for (const char* p = psz; *p; p++)
+ {
+ if (*p == '<') len += 4;
+ else if (*p == '>') len += 4;
+ else if (*p == '&') len += 5;
+ else if (*p == '"') len += 6;
+ else if (*p == ' ' && p > psz && p[-1] == ' ' && p[1] == ' ') len += 6;
+ else if (*p == '\n' && fMultiLine) len += 5;
+ else
+ len++;
+ }
+ string str;
+ str.reserve(len);
+ for (const char* p = psz; *p; p++)
+ {
+ if (*p == '<') str += "&lt;";
+ else if (*p == '>') str += "&gt;";
+ else if (*p == '&') str += "&amp;";
+ else if (*p == '"') str += "&quot;";
+ else if (*p == ' ' && p > psz && p[-1] == ' ' && p[1] == ' ') str += "&nbsp;";
+ else if (*p == '\n' && fMultiLine) str += "<br>\n";
+ else
+ str += *p;
+ }
+ return str;
+}
+
+string HtmlEscape(const string& str, bool fMultiLine=false)
+{
+ return HtmlEscape(str.c_str(), fMultiLine);
+}
+
+void CalledMessageBox(const string& message, const string& caption, int style, wxWindow* parent, int x, int y, int* pnRet, bool* pfDone)
+{
+ *pnRet = wxMessageBox(message, caption, style, parent, x, y);
+ *pfDone = true;
+}
+
+int ThreadSafeMessageBox(const string& message, const string& caption, int style, wxWindow* parent, int x, int y)
+{
+#ifdef __WXMSW__
+ return wxMessageBox(message, caption, style, parent, x, y);
+#else
+ if (wxThread::IsMain() || fDaemon)
+ {
+ return wxMessageBox(message, caption, style, parent, x, y);
+ }
+ else
+ {
+ int nRet = 0;
+ bool fDone = false;
+ UIThreadCall(bind(CalledMessageBox, message, caption, style, parent, x, y, &nRet, &fDone));
+ while (!fDone)
+ Sleep(100);
+ return nRet;
+ }
+#endif
+}
+
+bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWindow* parent)
+{
+ if (nFeeRequired < MIN_TX_FEE || nFeeRequired <= nTransactionFee || fDaemon)
+ return true;
+ string strMessage = strprintf(
+ _("This transaction is over the size limit. You can still send it for a fee of %s, "
+ "which goes to the nodes that process your transaction and helps to support the network. "
+ "Do you want to pay the fee?"),
+ FormatMoney(nFeeRequired).c_str());
+ return (ThreadSafeMessageBox(strMessage, strCaption, wxYES_NO, parent) == wxYES);
+}
+
+void CalledSetStatusBar(const string& strText, int nField)
+{
+ if (nField == 0 && GetWarnings("statusbar") != "")
+ return;
+ if (pframeMain && pframeMain->m_statusBar)
+ pframeMain->m_statusBar->SetStatusText(strText, nField);
+}
+
+void SetDefaultReceivingAddress(const string& strAddress)
+{
+ // Update main window address and database
+ if (pframeMain == NULL)
+ return;
+ if (strAddress != pframeMain->m_textCtrlAddress->GetValue())
+ {
+ uint160 hash160;
+ if (!AddressToHash160(strAddress, hash160))
+ return;
+ if (!mapPubKeys.count(hash160))
+ return;
+ pwalletMain->SetDefaultKey(mapPubKeys[hash160]);
+ pframeMain->m_textCtrlAddress->SetValue(strAddress);
+ }
+}
+
+
+
+
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// CMainFrame
+//
+
+CMainFrame::CMainFrame(wxWindow* parent) : CMainFrameBase(parent)
+{
+ Connect(wxEVT_UITHREADCALL, wxCommandEventHandler(CMainFrame::OnUIThreadCall), NULL, this);
+
+ // Set initially selected page
+ wxNotebookEvent event;
+ event.SetSelection(0);
+ OnNotebookPageChanged(event);
+ m_notebook->ChangeSelection(0);
+
+ // Init
+ fRefreshListCtrl = false;
+ fRefreshListCtrlRunning = false;
+ fOnSetFocusAddress = false;
+ fRefresh = false;
+ m_choiceFilter->SetSelection(0);
+ double dResize = nScaleX;
+#ifdef __WXMSW__
+ SetIcon(wxICON(bitcoin));
+ SetSize(dResize * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
+#else
+ SetIcon(bitcoin80_xpm);
+ SetBackgroundColour(m_toolBar->GetBackgroundColour());
+ wxFont fontTmp = m_staticText41->GetFont();
+ fontTmp.SetFamily(wxFONTFAMILY_TELETYPE);
+ m_staticTextBalance->SetFont(fontTmp);
+ m_staticTextBalance->SetSize(140, 17);
+ // resize to fit ubuntu's huge default font
+ dResize = 1.22;
+ SetSize(dResize * GetSize().GetWidth(), 1.15 * GetSize().GetHeight());
+#endif
+ m_staticTextBalance->SetLabel(FormatMoney(pwalletMain->GetBalance()) + " ");
+ m_listCtrl->SetFocus();
+ ptaskbaricon = new CMyTaskBarIcon();
+#ifdef __WXMAC_OSX__
+ // Mac automatically moves wxID_EXIT, wxID_PREFERENCES and wxID_ABOUT
+ // to their standard places, leaving these menus empty.
+ GetMenuBar()->Remove(2); // remove Help menu
+ GetMenuBar()->Remove(0); // remove File menu
+#endif
+
+ // Init column headers
+ int nDateWidth = DateTimeStr(1229413914).size() * 6 + 8;
+ if (!strstr(DateTimeStr(1229413914).c_str(), "2008"))
+ nDateWidth += 12;
+#ifdef __WXMAC_OSX__
+ nDateWidth += 5;
+ dResize -= 0.01;
+#endif
+ wxListCtrl* pplistCtrl[] = {m_listCtrlAll, m_listCtrlSentReceived, m_listCtrlSent, m_listCtrlReceived};
+ BOOST_FOREACH(wxListCtrl* p, pplistCtrl)
+ {
+ p->InsertColumn(0, "", wxLIST_FORMAT_LEFT, dResize * 0);
+ p->InsertColumn(1, "", wxLIST_FORMAT_LEFT, dResize * 0);
+ p->InsertColumn(2, _("Status"), wxLIST_FORMAT_LEFT, dResize * 112);
+ p->InsertColumn(3, _("Date"), wxLIST_FORMAT_LEFT, dResize * nDateWidth);
+ p->InsertColumn(4, _("Description"), wxLIST_FORMAT_LEFT, dResize * 409 - nDateWidth);
+ p->InsertColumn(5, _("Debit"), wxLIST_FORMAT_RIGHT, dResize * 79);
+ p->InsertColumn(6, _("Credit"), wxLIST_FORMAT_RIGHT, dResize * 79);
+ }
+
+ // Init status bar
+ int pnWidths[3] = { -100, 88, 300 };
+#ifndef __WXMSW__
+ pnWidths[1] = pnWidths[1] * 1.1 * dResize;
+ pnWidths[2] = pnWidths[2] * 1.1 * dResize;
+#endif
+ m_statusBar->SetFieldsCount(3, pnWidths);
+
+ // Fill your address text box
+ vector<unsigned char> vchPubKey;
+ if (CWalletDB(pwalletMain->strWalletFile,"r").ReadDefaultKey(vchPubKey))
+ m_textCtrlAddress->SetValue(PubKeyToAddress(vchPubKey));
+
+ // Fill listctrl with wallet transactions
+ RefreshListCtrl();
+}
+
+CMainFrame::~CMainFrame()
+{
+ pframeMain = NULL;
+ delete ptaskbaricon;
+ ptaskbaricon = NULL;
+}
+
+void CMainFrame::OnNotebookPageChanged(wxNotebookEvent& event)
+{
+ event.Skip();
+ nPage = event.GetSelection();
+ if (nPage == ALL)
+ {
+ m_listCtrl = m_listCtrlAll;
+ fShowGenerated = true;
+ fShowSent = true;
+ fShowReceived = true;
+ }
+ else if (nPage == SENTRECEIVED)
+ {
+ m_listCtrl = m_listCtrlSentReceived;
+ fShowGenerated = false;
+ fShowSent = true;
+ fShowReceived = true;
+ }
+ else if (nPage == SENT)
+ {
+ m_listCtrl = m_listCtrlSent;
+ fShowGenerated = false;
+ fShowSent = true;
+ fShowReceived = false;
+ }
+ else if (nPage == RECEIVED)
+ {
+ m_listCtrl = m_listCtrlReceived;
+ fShowGenerated = false;
+ fShowSent = false;
+ fShowReceived = true;
+ }
+ RefreshListCtrl();
+ m_listCtrl->SetFocus();
+}
+
+void CMainFrame::OnClose(wxCloseEvent& event)
+{
+ if (fMinimizeOnClose && event.CanVeto() && !IsIconized())
+ {
+ // Divert close to minimize
+ event.Veto();
+ fClosedToTray = true;
+ Iconize(true);
+ }
+ else
+ {
+ Destroy();
+ CreateThread(Shutdown, NULL);
+ }
+}
+
+void CMainFrame::OnIconize(wxIconizeEvent& event)
+{
+ event.Skip();
+ // Hide the task bar button when minimized.
+ // Event is sent when the frame is minimized or restored.
+ // wxWidgets 2.8.9 doesn't have IsIconized() so there's no way
+ // to get rid of the deprecated warning. Just ignore it.
+ if (!event.Iconized())
+ fClosedToTray = false;
+#if defined(__WXGTK__) || defined(__WXMAC_OSX__)
+ if (GetBoolArg("-minimizetotray")) {
+#endif
+ // The tray icon sometimes disappears on ubuntu karmic
+ // Hiding the taskbar button doesn't work cleanly on ubuntu lucid
+ // Reports of CPU peg on 64-bit linux
+ if (fMinimizeToTray && event.Iconized())
+ fClosedToTray = true;
+ Show(!fClosedToTray);
+ ptaskbaricon->Show(fMinimizeToTray || fClosedToTray);
+#if defined(__WXGTK__) || defined(__WXMAC_OSX__)
+ }
+#endif
+}
+
+void CMainFrame::OnMouseEvents(wxMouseEvent& event)
+{
+ event.Skip();
+ RandAddSeed();
+ RAND_add(&event.m_x, sizeof(event.m_x), 0.25);
+ RAND_add(&event.m_y, sizeof(event.m_y), 0.25);
+}
+
+void CMainFrame::OnListColBeginDrag(wxListEvent& event)
+{
+ // Hidden columns not resizeable
+ if (event.GetColumn() <= 1 && !fDebug)
+ event.Veto();
+ else
+ event.Skip();
+}
+
+int CMainFrame::GetSortIndex(const string& strSort)
+{
+#ifdef __WXMSW__
+ return 0;
+#else
+ // The wx generic listctrl implementation used on GTK doesn't sort,
+ // so we have to do it ourselves. Remember, we sort in reverse order.
+ // In the wx generic implementation, they store the list of items
+ // in a vector, so indexed lookups are fast, but inserts are slower
+ // the closer they are to the top.
+ int low = 0;
+ int high = m_listCtrl->GetItemCount();
+ while (low < high)
+ {
+ int mid = low + ((high - low) / 2);
+ if (strSort.compare(m_listCtrl->GetItemText(mid).c_str()) >= 0)
+ high = mid;
+ else
+ low = mid + 1;
+ }
+ return low;
+#endif
+}
+
+void CMainFrame::InsertLine(bool fNew, int nIndex, uint256 hashKey, string strSort, const wxColour& colour, const wxString& str2, const wxString& str3, const wxString& str4, const wxString& str5, const wxString& str6)
+{
+ strSort = " " + strSort; // leading space to workaround wx2.9.0 ubuntu 9.10 bug
+ long nData = *(long*)&hashKey; // where first char of hidden column is displayed
+
+ // Find item
+ if (!fNew && nIndex == -1)
+ {
+ string strHash = " " + hashKey.ToString();
+ while ((nIndex = m_listCtrl->FindItem(nIndex, nData)) != -1)
+ if (GetItemText(m_listCtrl, nIndex, 1) == strHash)
+ break;
+ }
+
+ // fNew is for blind insert, only use if you're sure it's new
+ if (fNew || nIndex == -1)
+ {
+ nIndex = m_listCtrl->InsertItem(GetSortIndex(strSort), strSort);
+ }
+ else
+ {
+ // If sort key changed, must delete and reinsert to make it relocate
+ if (GetItemText(m_listCtrl, nIndex, 0) != strSort)
+ {
+ m_listCtrl->DeleteItem(nIndex);
+ nIndex = m_listCtrl->InsertItem(GetSortIndex(strSort), strSort);
+ }
+ }
+
+ m_listCtrl->SetItem(nIndex, 1, " " + hashKey.ToString());
+ m_listCtrl->SetItem(nIndex, 2, str2);
+ m_listCtrl->SetItem(nIndex, 3, str3);
+ m_listCtrl->SetItem(nIndex, 4, str4);
+ m_listCtrl->SetItem(nIndex, 5, str5);
+ m_listCtrl->SetItem(nIndex, 6, str6);
+ m_listCtrl->SetItemData(nIndex, nData);
+ SetItemTextColour(m_listCtrl, nIndex, colour);
+}
+
+bool CMainFrame::DeleteLine(uint256 hashKey)
+{
+ long nData = *(long*)&hashKey;
+
+ // Find item
+ int nIndex = -1;
+ string strHash = " " + hashKey.ToString();
+ while ((nIndex = m_listCtrl->FindItem(nIndex, nData)) != -1)
+ if (GetItemText(m_listCtrl, nIndex, 1) == strHash)
+ break;
+
+ if (nIndex != -1)
+ m_listCtrl->DeleteItem(nIndex);
+
+ return nIndex != -1;
+}
+
+string FormatTxStatus(const CWalletTx& wtx)
+{
+ // Status
+ if (!wtx.IsFinal())
+ {
+ if (wtx.nLockTime < LOCKTIME_THRESHOLD)
+ return strprintf(_("Open for %d blocks"), nBestHeight - wtx.nLockTime);
+ else
+ return strprintf(_("Open until %s"), DateTimeStr(wtx.nLockTime).c_str());
+ }
+ else
+ {
+ int nDepth = wtx.GetDepthInMainChain();
+ if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0)
+ return strprintf(_("%d/offline?"), nDepth);
+ else if (nDepth < 6)
+ return strprintf(_("%d/unconfirmed"), nDepth);
+ else
+ return strprintf(_("%d confirmations"), nDepth);
+ }
+}
+
+string SingleLine(const string& strIn)
+{
+ string strOut;
+ bool fOneSpace = false;
+ BOOST_FOREACH(unsigned char c, strIn)
+ {
+ if (isspace(c))
+ {
+ fOneSpace = true;
+ }
+ else if (c > ' ')
+ {
+ if (fOneSpace && !strOut.empty())
+ strOut += ' ';
+ strOut += c;
+ fOneSpace = false;
+ }
+ }
+ return strOut;
+}
+
+bool CMainFrame::InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex)
+{
+ int64 nTime = wtx.nTimeDisplayed = wtx.GetTxTime();
+ int64 nCredit = wtx.GetCredit(true);
+ int64 nDebit = wtx.GetDebit();
+ int64 nNet = nCredit - nDebit;
+ uint256 hash = wtx.GetHash();
+ string strStatus = FormatTxStatus(wtx);
+ bool fConfirmed = wtx.fConfirmedDisplayed = wtx.IsConfirmed();
+ wxColour colour = (fConfirmed ? wxColour(0,0,0) : wxColour(128,128,128));
+ map<string, string> mapValue = wtx.mapValue;
+ wtx.nLinesDisplayed = 1;
+ nListViewUpdated++;
+
+ // Filter
+ if (wtx.IsCoinBase())
+ {
+ // Don't show generated coin until confirmed by at least one block after it
+ // so we don't get the user's hopes up until it looks like it's probably accepted.
+ //
+ // It is not an error when generated blocks are not accepted. By design,
+ // some percentage of blocks, like 10% or more, will end up not accepted.
+ // This is the normal mechanism by which the network copes with latency.
+ //
+ // We display regular transactions right away before any confirmation
+ // because they can always get into some block eventually. Generated coins
+ // are special because if their block is not accepted, they are not valid.
+ //
+ if (wtx.GetDepthInMainChain() < 2)
+ {
+ wtx.nLinesDisplayed = 0;
+ return false;
+ }
+
+ if (!fShowGenerated)
+ return false;
+ }
+
+ // Find the block the tx is in
+ CBlockIndex* pindex = NULL;
+ map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(wtx.hashBlock);
+ if (mi != mapBlockIndex.end())
+ pindex = (*mi).second;
+
+ // Sort order, unrecorded transactions sort to the top
+ string strSort = strprintf("%010d-%01d-%010u",
+ (pindex ? pindex->nHeight : INT_MAX),
+ (wtx.IsCoinBase() ? 1 : 0),
+ wtx.nTimeReceived);
+
+ // Insert line
+ if (nNet > 0 || wtx.IsCoinBase())
+ {
+ //
+ // Credit
+ //
+ string strDescription;
+ if (wtx.IsCoinBase())
+ {
+ // Generated
+ strDescription = _("Generated");
+ if (nCredit == 0)
+ {
+ int64 nUnmatured = 0;
+ BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ nUnmatured += pwalletMain->GetCredit(txout);
+ if (wtx.IsInMainChain())
+ {
+ strDescription = strprintf(_("Generated (%s matures in %d more blocks)"), FormatMoney(nUnmatured).c_str(), wtx.GetBlocksToMaturity());
+
+ // Check if the block was requested by anyone
+ if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0)
+ strDescription = _("Generated - Warning: This block was not received by any other nodes and will probably not be accepted!");
+ }
+ else
+ {
+ strDescription = _("Generated (not accepted)");
+ }
+ }
+ }
+ else if (!mapValue["from"].empty() || !mapValue["message"].empty())
+ {
+ // Received by IP connection
+ if (!fShowReceived)
+ return false;
+ if (!mapValue["from"].empty())
+ strDescription += _("From: ") + mapValue["from"];
+ if (!mapValue["message"].empty())
+ {
+ if (!strDescription.empty())
+ strDescription += " - ";
+ strDescription += mapValue["message"];
+ }
+ }
+ else
+ {
+ // Received by Bitcoin Address
+ if (!fShowReceived)
+ return false;
+ BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ {
+ if (pwalletMain->IsMine(txout))
+ {
+ vector<unsigned char> vchPubKey;
+ if (ExtractPubKey(txout.scriptPubKey, pwalletMain, vchPubKey))
+ {
+ CRITICAL_BLOCK(pwalletMain->cs_mapAddressBook)
+ {
+ //strDescription += _("Received payment to ");
+ //strDescription += _("Received with address ");
+ strDescription += _("Received with: ");
+ string strAddress = PubKeyToAddress(vchPubKey);
+ map<string, string>::iterator mi = pwalletMain->mapAddressBook.find(strAddress);
+ if (mi != pwalletMain->mapAddressBook.end() && !(*mi).second.empty())
+ {
+ string strLabel = (*mi).second;
+ strDescription += strAddress.substr(0,12) + "... ";
+ strDescription += "(" + strLabel + ")";
+ }
+ else
+ strDescription += strAddress;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ string strCredit = FormatMoney(nNet, true);
+ if (!fConfirmed)
+ strCredit = "[" + strCredit + "]";
+
+ InsertLine(fNew, nIndex, hash, strSort, colour,
+ strStatus,
+ nTime ? DateTimeStr(nTime) : "",
+ SingleLine(strDescription),
+ "",
+ strCredit);
+ }
+ else
+ {
+ bool fAllFromMe = true;
+ BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ fAllFromMe = fAllFromMe && pwalletMain->IsMine(txin);
+
+ bool fAllToMe = true;
+ BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ fAllToMe = fAllToMe && pwalletMain->IsMine(txout);
+
+ if (fAllFromMe && fAllToMe)
+ {
+ // Payment to self
+ int64 nChange = wtx.GetChange();
+ InsertLine(fNew, nIndex, hash, strSort, colour,
+ strStatus,
+ nTime ? DateTimeStr(nTime) : "",
+ _("Payment to yourself"),
+ FormatMoney(-(nDebit - nChange), true),
+ FormatMoney(nCredit - nChange, true));
+ }
+ else if (fAllFromMe)
+ {
+ //
+ // Debit
+ //
+ if (!fShowSent)
+ return false;
+
+ int64 nTxFee = nDebit - wtx.GetValueOut();
+ wtx.nLinesDisplayed = 0;
+ for (int nOut = 0; nOut < wtx.vout.size(); nOut++)
+ {
+ const CTxOut& txout = wtx.vout[nOut];
+ if (pwalletMain->IsMine(txout))
+ continue;
+
+ string strAddress;
+ if (!mapValue["to"].empty())
+ {
+ // Sent to IP
+ strAddress = mapValue["to"];
+ }
+ else
+ {
+ // Sent to Bitcoin Address
+ uint160 hash160;
+ if (ExtractHash160(txout.scriptPubKey, hash160))
+ strAddress = Hash160ToAddress(hash160);
+ }
+
+ string strDescription = _("To: ");
+ CRITICAL_BLOCK(pwalletMain->cs_mapAddressBook)
+ if (pwalletMain->mapAddressBook.count(strAddress) && !pwalletMain->mapAddressBook[strAddress].empty())
+ strDescription += pwalletMain->mapAddressBook[strAddress] + " ";
+ strDescription += strAddress;
+ if (!mapValue["message"].empty())
+ {
+ if (!strDescription.empty())
+ strDescription += " - ";
+ strDescription += mapValue["message"];
+ }
+ else if (!mapValue["comment"].empty())
+ {
+ if (!strDescription.empty())
+ strDescription += " - ";
+ strDescription += mapValue["comment"];
+ }
+
+ int64 nValue = txout.nValue;
+ if (nTxFee > 0)
+ {
+ nValue += nTxFee;
+ nTxFee = 0;
+ }
+
+ InsertLine(fNew, nIndex, hash, strprintf("%s-%d", strSort.c_str(), nOut), colour,
+ strStatus,
+ nTime ? DateTimeStr(nTime) : "",
+ SingleLine(strDescription),
+ FormatMoney(-nValue, true),
+ "");
+ nIndex = -1;
+ wtx.nLinesDisplayed++;
+ }
+ }
+ else
+ {
+ //
+ // Mixed debit transaction, can't break down payees
+ //
+ bool fAllMine = true;
+ BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ fAllMine = fAllMine && pwalletMain->IsMine(txout);
+ BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ fAllMine = fAllMine && pwalletMain->IsMine(txin);
+
+ InsertLine(fNew, nIndex, hash, strSort, colour,
+ strStatus,
+ nTime ? DateTimeStr(nTime) : "",
+ "",
+ FormatMoney(nNet, true),
+ "");
+ }
+ }
+
+ return true;
+}
+
+void CMainFrame::RefreshListCtrl()
+{
+ fRefreshListCtrl = true;
+ ::wxWakeUpIdle();
+}
+
+void CMainFrame::OnIdle(wxIdleEvent& event)
+{
+ if (fRefreshListCtrl)
+ {
+ // Collect list of wallet transactions and sort newest first
+ bool fEntered = false;
+ vector<pair<unsigned int, uint256> > vSorted;
+ TRY_CRITICAL_BLOCK(pwalletMain->cs_mapWallet)
+ {
+ printf("RefreshListCtrl starting\n");
+ fEntered = true;
+ fRefreshListCtrl = false;
+ pwalletMain->vWalletUpdated.clear();
+
+ // Do the newest transactions first
+ vSorted.reserve(pwalletMain->mapWallet.size());
+ for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
+ {
+ const CWalletTx& wtx = (*it).second;
+ unsigned int nTime = UINT_MAX - wtx.GetTxTime();
+ vSorted.push_back(make_pair(nTime, (*it).first));
+ }
+ m_listCtrl->DeleteAllItems();
+ }
+ if (!fEntered)
+ return;
+
+ sort(vSorted.begin(), vSorted.end());
+
+ // Fill list control
+ for (int i = 0; i < vSorted.size();)
+ {
+ if (fShutdown)
+ return;
+ bool fEntered = false;
+ TRY_CRITICAL_BLOCK(pwalletMain->cs_mapWallet)
+ {
+ fEntered = true;
+ uint256& hash = vSorted[i++].second;
+ map<uint256, CWalletTx>::iterator mi = pwalletMain->mapWallet.find(hash);
+ if (mi != pwalletMain->mapWallet.end())
+ InsertTransaction((*mi).second, true);
+ }
+ if (!fEntered || i == 100 || i % 500 == 0)
+ wxYield();
+ }
+
+ printf("RefreshListCtrl done\n");
+
+ // Update transaction total display
+ MainFrameRepaint();
+ }
+ else
+ {
+ // Check for time updates
+ static int64 nLastTime;
+ if (GetTime() > nLastTime + 30)
+ {
+ TRY_CRITICAL_BLOCK(pwalletMain->cs_mapWallet)
+ {
+ nLastTime = GetTime();
+ for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
+ {
+ CWalletTx& wtx = (*it).second;
+ if (wtx.nTimeDisplayed && wtx.nTimeDisplayed != wtx.GetTxTime())
+ InsertTransaction(wtx, false);
+ }
+ }
+ }
+ }
+}
+
+void CMainFrame::RefreshStatusColumn()
+{
+ static int nLastTop;
+ static CBlockIndex* pindexLastBest;
+ static unsigned int nLastRefreshed;
+
+ int nTop = max((int)m_listCtrl->GetTopItem(), 0);
+ if (nTop == nLastTop && pindexLastBest == pindexBest)
+ return;
+
+ TRY_CRITICAL_BLOCK(pwalletMain->cs_mapWallet)
+ {
+ int nStart = nTop;
+ int nEnd = min(nStart + 100, m_listCtrl->GetItemCount());
+
+ if (pindexLastBest == pindexBest && nLastRefreshed == nListViewUpdated)
+ {
+ // If no updates, only need to do the part that moved onto the screen
+ if (nStart >= nLastTop && nStart < nLastTop + 100)
+ nStart = nLastTop + 100;
+ if (nEnd >= nLastTop && nEnd < nLastTop + 100)
+ nEnd = nLastTop;
+ }
+ nLastTop = nTop;
+ pindexLastBest = pindexBest;
+ nLastRefreshed = nListViewUpdated;
+
+ for (int nIndex = nStart; nIndex < min(nEnd, m_listCtrl->GetItemCount()); nIndex++)
+ {
+ uint256 hash((string)GetItemText(m_listCtrl, nIndex, 1));
+ map<uint256, CWalletTx>::iterator mi = pwalletMain->mapWallet.find(hash);
+ if (mi == pwalletMain->mapWallet.end())
+ {
+ printf("CMainFrame::RefreshStatusColumn() : tx not found in mapWallet\n");
+ continue;
+ }
+ CWalletTx& wtx = (*mi).second;
+ if (wtx.IsCoinBase() ||
+ wtx.GetTxTime() != wtx.nTimeDisplayed ||
+ wtx.IsConfirmed() != wtx.fConfirmedDisplayed)
+ {
+ if (!InsertTransaction(wtx, false, nIndex))
+ m_listCtrl->DeleteItem(nIndex--);
+ }
+ else
+ {
+ m_listCtrl->SetItem(nIndex, 2, FormatTxStatus(wtx));
+ }
+ }
+ }
+}
+
+void CMainFrame::OnPaint(wxPaintEvent& event)
+{
+ event.Skip();
+ if (fRefresh)
+ {
+ fRefresh = false;
+ Refresh();
+ }
+}
+
+
+unsigned int nNeedRepaint = 0;
+unsigned int nLastRepaint = 0;
+int64 nLastRepaintTime = 0;
+int64 nRepaintInterval = 500;
+
+void ThreadDelayedRepaint(void* parg)
+{
+ while (!fShutdown)
+ {
+ if (nLastRepaint != nNeedRepaint && GetTimeMillis() - nLastRepaintTime >= nRepaintInterval)
+ {
+ nLastRepaint = nNeedRepaint;
+ if (pframeMain)
+ {
+ printf("DelayedRepaint\n");
+ wxPaintEvent event;
+ pframeMain->fRefresh = true;
+ pframeMain->GetEventHandler()->AddPendingEvent(event);
+ }
+ }
+ Sleep(nRepaintInterval);
+ }
+}
+
+void MainFrameRepaint()
+{
+ // This is called by network code that shouldn't access pframeMain
+ // directly because it could still be running after the UI is closed.
+ if (pframeMain)
+ {
+ // Don't repaint too often
+ static int64 nLastRepaintRequest;
+ if (GetTimeMillis() - nLastRepaintRequest < 100)
+ {
+ nNeedRepaint++;
+ return;
+ }
+ nLastRepaintRequest = GetTimeMillis();
+
+ printf("MainFrameRepaint\n");
+ wxPaintEvent event;
+ pframeMain->fRefresh = true;
+ pframeMain->GetEventHandler()->AddPendingEvent(event);
+ }
+}
+
+void CMainFrame::OnPaintListCtrl(wxPaintEvent& event)
+{
+ // Skip lets the listctrl do the paint, we're just hooking the message
+ event.Skip();
+
+ if (ptaskbaricon)
+ ptaskbaricon->UpdateTooltip();
+
+ //
+ // Slower stuff
+ //
+ static int nTransactionCount;
+ bool fPaintedBalance = false;
+ if (GetTimeMillis() - nLastRepaintTime >= nRepaintInterval)
+ {
+ nLastRepaint = nNeedRepaint;
+ nLastRepaintTime = GetTimeMillis();
+
+ // Update listctrl contents
+ if (!pwalletMain->vWalletUpdated.empty())
+ {
+ TRY_CRITICAL_BLOCK(pwalletMain->cs_mapWallet)
+ {
+ string strTop;
+ if (m_listCtrl->GetItemCount())
+ strTop = (string)m_listCtrl->GetItemText(0);
+ BOOST_FOREACH(uint256 hash, pwalletMain->vWalletUpdated)
+ {
+ map<uint256, CWalletTx>::iterator mi = pwalletMain->mapWallet.find(hash);
+ if (mi != pwalletMain->mapWallet.end())
+ InsertTransaction((*mi).second, false);
+ }
+ pwalletMain->vWalletUpdated.clear();
+ if (m_listCtrl->GetItemCount() && strTop != (string)m_listCtrl->GetItemText(0))
+ m_listCtrl->ScrollList(0, INT_MIN/2);
+ }
+ }
+
+ // Balance total
+ TRY_CRITICAL_BLOCK(pwalletMain->cs_mapWallet)
+ {
+ fPaintedBalance = true;
+ m_staticTextBalance->SetLabel(FormatMoney(pwalletMain->GetBalance()) + " ");
+
+ // Count hidden and multi-line transactions
+ nTransactionCount = 0;
+ for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
+ {
+ CWalletTx& wtx = (*it).second;
+ nTransactionCount += wtx.nLinesDisplayed;
+ }
+ }
+ }
+ if (!pwalletMain->vWalletUpdated.empty() || !fPaintedBalance)
+ nNeedRepaint++;
+
+ // Update status column of visible items only
+ RefreshStatusColumn();
+
+ // Update status bar
+ static string strPrevWarning;
+ string strWarning = GetWarnings("statusbar");
+ if (strWarning != "")
+ m_statusBar->SetStatusText(string(" ") + _(strWarning), 0);
+ else if (strPrevWarning != "")
+ m_statusBar->SetStatusText("", 0);
+ strPrevWarning = strWarning;
+
+ string strGen = "";
+ if (fGenerateBitcoins)
+ strGen = _(" Generating");
+ if (fGenerateBitcoins && vNodes.empty())
+ strGen = _("(not connected)");
+ m_statusBar->SetStatusText(strGen, 1);
+
+ string strStatus = strprintf(_(" %d connections %d blocks %d transactions"), vNodes.size(), nBestHeight, nTransactionCount);
+ m_statusBar->SetStatusText(strStatus, 2);
+
+ // Update receiving address
+ string strDefaultAddress = PubKeyToAddress(pwalletMain->vchDefaultKey);
+ if (m_textCtrlAddress->GetValue() != strDefaultAddress)
+ m_textCtrlAddress->SetValue(strDefaultAddress);
+}
+
+
+void UIThreadCall(boost::function0<void> fn)
+{
+ // Call this with a function object created with bind.
+ // bind needs all parameters to match the function's expected types
+ // and all default parameters specified. Some examples:
+ // UIThreadCall(bind(wxBell));
+ // UIThreadCall(bind(wxMessageBox, wxT("Message"), wxT("Title"), wxOK, (wxWindow*)NULL, -1, -1));
+ // UIThreadCall(bind(&CMainFrame::OnMenuHelpAbout, pframeMain, event));
+ if (pframeMain)
+ {
+ wxCommandEvent event(wxEVT_UITHREADCALL);
+ event.SetClientData((void*)new boost::function0<void>(fn));
+ pframeMain->GetEventHandler()->AddPendingEvent(event);
+ }
+}
+
+void CMainFrame::OnUIThreadCall(wxCommandEvent& event)
+{
+ boost::function0<void>* pfn = (boost::function0<void>*)event.GetClientData();
+ (*pfn)();
+ delete pfn;
+}
+
+void CMainFrame::OnMenuFileExit(wxCommandEvent& event)
+{
+ // File->Exit
+ Close(true);
+}
+
+void CMainFrame::OnUpdateUIOptionsGenerate(wxUpdateUIEvent& event)
+{
+ event.Check(fGenerateBitcoins);
+}
+
+void CMainFrame::OnMenuOptionsChangeYourAddress(wxCommandEvent& event)
+{
+ // Options->Your Receiving Addresses
+ CAddressBookDialog dialog(this, "", CAddressBookDialog::RECEIVING, false);
+ if (!dialog.ShowModal())
+ return;
+}
+
+void CMainFrame::OnMenuOptionsOptions(wxCommandEvent& event)
+{
+ // Options->Options
+ COptionsDialog dialog(this);
+ dialog.ShowModal();
+}
+
+void CMainFrame::OnMenuHelpAbout(wxCommandEvent& event)
+{
+ // Help->About
+ CAboutDialog dialog(this);
+ dialog.ShowModal();
+}
+
+void CMainFrame::OnButtonSend(wxCommandEvent& event)
+{
+ // Toolbar: Send
+ CSendDialog dialog(this);
+ dialog.ShowModal();
+}
+
+void CMainFrame::OnButtonAddressBook(wxCommandEvent& event)
+{
+ // Toolbar: Address Book
+ CAddressBookDialog dialogAddr(this, "", CAddressBookDialog::SENDING, false);
+ if (dialogAddr.ShowModal() == 2)
+ {
+ // Send
+ CSendDialog dialogSend(this, dialogAddr.GetSelectedAddress());
+ dialogSend.ShowModal();
+ }
+}
+
+void CMainFrame::OnSetFocusAddress(wxFocusEvent& event)
+{
+ // Automatically select-all when entering window
+ event.Skip();
+ m_textCtrlAddress->SetSelection(-1, -1);
+ fOnSetFocusAddress = true;
+}
+
+void CMainFrame::OnMouseEventsAddress(wxMouseEvent& event)
+{
+ event.Skip();
+ if (fOnSetFocusAddress)
+ m_textCtrlAddress->SetSelection(-1, -1);
+ fOnSetFocusAddress = false;
+}
+
+void CMainFrame::OnButtonNew(wxCommandEvent& event)
+{
+ // Ask name
+ CGetTextFromUserDialog dialog(this,
+ _("New Receiving Address"),
+ _("You should use a new address for each payment you receive.\n\nLabel"),
+ "");
+ if (!dialog.ShowModal())
+ return;
+ string strName = dialog.GetValue();
+
+ // Generate new key
+ string strAddress = PubKeyToAddress(pwalletMain->GetKeyFromKeyPool());
+
+ // Save
+ CRITICAL_BLOCK(pwalletMain->cs_mapAddressBook)
+ pwalletMain->SetAddressBookName(strAddress, strName);
+ SetDefaultReceivingAddress(strAddress);
+}
+
+void CMainFrame::OnButtonCopy(wxCommandEvent& event)
+{
+ // Copy address box to clipboard
+ if (wxTheClipboard->Open())
+ {
+ wxTheClipboard->SetData(new wxTextDataObject(m_textCtrlAddress->GetValue()));
+ wxTheClipboard->Close();
+ }
+}
+
+void CMainFrame::OnListItemActivated(wxListEvent& event)
+{
+ uint256 hash((string)GetItemText(m_listCtrl, event.GetIndex(), 1));
+ CWalletTx wtx;
+ CRITICAL_BLOCK(pwalletMain->cs_mapWallet)
+ {
+ map<uint256, CWalletTx>::iterator mi = pwalletMain->mapWallet.find(hash);
+ if (mi == pwalletMain->mapWallet.end())
+ {
+ printf("CMainFrame::OnListItemActivated() : tx not found in mapWallet\n");
+ return;
+ }
+ wtx = (*mi).second;
+ }
+ CTxDetailsDialog dialog(this, wtx);
+ dialog.ShowModal();
+ //CTxDetailsDialog* pdialog = new CTxDetailsDialog(this, wtx);
+ //pdialog->Show();
+}
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// CTxDetailsDialog
+//
+
+CTxDetailsDialog::CTxDetailsDialog(wxWindow* parent, CWalletTx wtx) : CTxDetailsDialogBase(parent)
+{
+#ifdef __WXMSW__
+ SetSize(nScaleX * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
+#endif
+ CRITICAL_BLOCK(pwalletMain->cs_mapAddressBook)
+ {
+ string strHTML;
+ strHTML.reserve(4000);
+ strHTML += "<html><font face='verdana, arial, helvetica, sans-serif'>";
+
+ int64 nTime = wtx.GetTxTime();
+ int64 nCredit = wtx.GetCredit();
+ int64 nDebit = wtx.GetDebit();
+ int64 nNet = nCredit - nDebit;
+
+
+
+ strHTML += _("<b>Status:</b> ") + FormatTxStatus(wtx);
+ int nRequests = wtx.GetRequestCount();
+ if (nRequests != -1)
+ {
+ if (nRequests == 0)
+ strHTML += _(", has not been successfully broadcast yet");
+ else if (nRequests == 1)
+ strHTML += strprintf(_(", broadcast through %d node"), nRequests);
+ else
+ strHTML += strprintf(_(", broadcast through %d nodes"), nRequests);
+ }
+ strHTML += "<br>";
+
+ strHTML += _("<b>Date:</b> ") + (nTime ? DateTimeStr(nTime) : "") + "<br>";
+
+
+ //
+ // From
+ //
+ if (wtx.IsCoinBase())
+ {
+ strHTML += _("<b>Source:</b> Generated<br>");
+ }
+ else if (!wtx.mapValue["from"].empty())
+ {
+ // Online transaction
+ if (!wtx.mapValue["from"].empty())
+ strHTML += _("<b>From:</b> ") + HtmlEscape(wtx.mapValue["from"]) + "<br>";
+ }
+ else
+ {
+ // Offline transaction
+ if (nNet > 0)
+ {
+ // Credit
+ BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ {
+ if (pwalletMain->IsMine(txout))
+ {
+ vector<unsigned char> vchPubKey;
+ if (ExtractPubKey(txout.scriptPubKey, pwalletMain, vchPubKey))
+ {
+ string strAddress = PubKeyToAddress(vchPubKey);
+ if (pwalletMain->mapAddressBook.count(strAddress))
+ {
+ strHTML += string() + _("<b>From:</b> ") + _("unknown") + "<br>";
+ strHTML += _("<b>To:</b> ");
+ strHTML += HtmlEscape(strAddress);
+ if (!pwalletMain->mapAddressBook[strAddress].empty())
+ strHTML += _(" (yours, label: ") + pwalletMain->mapAddressBook[strAddress] + ")";
+ else
+ strHTML += _(" (yours)");
+ strHTML += "<br>";
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+
+
+ //
+ // To
+ //
+ string strAddress;
+ if (!wtx.mapValue["to"].empty())
+ {
+ // Online transaction
+ strAddress = wtx.mapValue["to"];
+ strHTML += _("<b>To:</b> ");
+ if (pwalletMain->mapAddressBook.count(strAddress) && !pwalletMain->mapAddressBook[strAddress].empty())
+ strHTML += pwalletMain->mapAddressBook[strAddress] + " ";
+ strHTML += HtmlEscape(strAddress) + "<br>";
+ }
+
+
+ //
+ // Amount
+ //
+ if (wtx.IsCoinBase() && nCredit == 0)
+ {
+ //
+ // Coinbase
+ //
+ int64 nUnmatured = 0;
+ BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ nUnmatured += pwalletMain->GetCredit(txout);
+ strHTML += _("<b>Credit:</b> ");
+ if (wtx.IsInMainChain())
+ strHTML += strprintf(_("(%s matures in %d more blocks)"), FormatMoney(nUnmatured).c_str(), wtx.GetBlocksToMaturity());
+ else
+ strHTML += _("(not accepted)");
+ strHTML += "<br>";
+ }
+ else if (nNet > 0)
+ {
+ //
+ // Credit
+ //
+ strHTML += _("<b>Credit:</b> ") + FormatMoney(nNet) + "<br>";
+ }
+ else
+ {
+ bool fAllFromMe = true;
+ BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ fAllFromMe = fAllFromMe && pwalletMain->IsMine(txin);
+
+ bool fAllToMe = true;
+ BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ fAllToMe = fAllToMe && pwalletMain->IsMine(txout);
+
+ if (fAllFromMe)
+ {
+ //
+ // Debit
+ //
+ BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ {
+ if (pwalletMain->IsMine(txout))
+ continue;
+
+ if (wtx.mapValue["to"].empty())
+ {
+ // Offline transaction
+ uint160 hash160;
+ if (ExtractHash160(txout.scriptPubKey, hash160))
+ {
+ string strAddress = Hash160ToAddress(hash160);
+ strHTML += _("<b>To:</b> ");
+ if (pwalletMain->mapAddressBook.count(strAddress) && !pwalletMain->mapAddressBook[strAddress].empty())
+ strHTML += pwalletMain->mapAddressBook[strAddress] + " ";
+ strHTML += strAddress;
+ strHTML += "<br>";
+ }
+ }
+
+ strHTML += _("<b>Debit:</b> ") + FormatMoney(-txout.nValue) + "<br>";
+ }
+
+ if (fAllToMe)
+ {
+ // Payment to self
+ int64 nChange = wtx.GetChange();
+ int64 nValue = nCredit - nChange;
+ strHTML += _("<b>Debit:</b> ") + FormatMoney(-nValue) + "<br>";
+ strHTML += _("<b>Credit:</b> ") + FormatMoney(nValue) + "<br>";
+ }
+
+ int64 nTxFee = nDebit - wtx.GetValueOut();
+ if (nTxFee > 0)
+ strHTML += _("<b>Transaction fee:</b> ") + FormatMoney(-nTxFee) + "<br>";
+ }
+ else
+ {
+ //
+ // Mixed debit transaction
+ //
+ BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ if (pwalletMain->IsMine(txin))
+ strHTML += _("<b>Debit:</b> ") + FormatMoney(-pwalletMain->GetDebit(txin)) + "<br>";
+ BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ if (pwalletMain->IsMine(txout))
+ strHTML += _("<b>Credit:</b> ") + FormatMoney(pwalletMain->GetCredit(txout)) + "<br>";
+ }
+ }
+
+ strHTML += _("<b>Net amount:</b> ") + FormatMoney(nNet, true) + "<br>";
+
+
+ //
+ // Message
+ //
+ if (!wtx.mapValue["message"].empty())
+ strHTML += string() + "<br><b>" + _("Message:") + "</b><br>" + HtmlEscape(wtx.mapValue["message"], true) + "<br>";
+ if (!wtx.mapValue["comment"].empty())
+ strHTML += string() + "<br><b>" + _("Comment:") + "</b><br>" + HtmlEscape(wtx.mapValue["comment"], true) + "<br>";
+
+ if (wtx.IsCoinBase())
+ strHTML += string() + "<br>" + _("Generated coins must wait 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.") + "<br>";
+
+
+ //
+ // Debug view
+ //
+ if (fDebug)
+ {
+ strHTML += "<hr><br>debug print<br><br>";
+ BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ if (pwalletMain->IsMine(txin))
+ strHTML += "<b>Debit:</b> " + FormatMoney(-pwalletMain->GetDebit(txin)) + "<br>";
+ BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ if (pwalletMain->IsMine(txout))
+ strHTML += "<b>Credit:</b> " + FormatMoney(pwalletMain->GetCredit(txout)) + "<br>";
+
+ strHTML += "<br><b>Transaction:</b><br>";
+ strHTML += HtmlEscape(wtx.ToString(), true);
+
+ strHTML += "<br><b>Inputs:</b><br>";
+ CRITICAL_BLOCK(pwalletMain->cs_mapWallet)
+ {
+ BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ {
+ COutPoint prevout = txin.prevout;
+ map<uint256, CWalletTx>::iterator mi = pwalletMain->mapWallet.find(prevout.hash);
+ if (mi != pwalletMain->mapWallet.end())
+ {
+ const CWalletTx& prev = (*mi).second;
+ if (prevout.n < prev.vout.size())
+ {
+ strHTML += HtmlEscape(prev.ToString(), true);
+ strHTML += " &nbsp;&nbsp; " + FormatTxStatus(prev) + ", ";
+ strHTML = strHTML + "IsMine=" + (pwalletMain->IsMine(prev.vout[prevout.n]) ? "true" : "false") + "<br>";
+ }
+ }
+ }
+ }
+ }
+
+
+
+ strHTML += "</font></html>";
+ string(strHTML.begin(), strHTML.end()).swap(strHTML);
+ m_htmlWin->SetPage(strHTML);
+ m_buttonOK->SetFocus();
+ }
+}
+
+void CTxDetailsDialog::OnButtonOK(wxCommandEvent& event)
+{
+ EndModal(false);
+}
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Startup folder
+//
+
+#ifdef __WXMSW__
+string StartupShortcutPath()
+{
+ return MyGetSpecialFolderPath(CSIDL_STARTUP, true) + "\\Bitcoin.lnk";
+}
+
+bool GetStartOnSystemStartup()
+{
+ return filesystem::exists(StartupShortcutPath().c_str());
+}
+
+void SetStartOnSystemStartup(bool fAutoStart)
+{
+ // If the shortcut exists already, remove it for updating
+ remove(StartupShortcutPath().c_str());
+
+ if (fAutoStart)
+ {
+ CoInitialize(NULL);
+
+ // Get a pointer to the IShellLink interface.
+ IShellLink* psl = NULL;
+ HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL,
+ CLSCTX_INPROC_SERVER, IID_IShellLink,
+ reinterpret_cast<void**>(&psl));
+
+ if (SUCCEEDED(hres))
+ {
+ // Get the current executable path
+ TCHAR pszExePath[MAX_PATH];
+ GetModuleFileName(NULL, pszExePath, sizeof(pszExePath));
+
+ // Set the path to the shortcut target
+ psl->SetPath(pszExePath);
+ PathRemoveFileSpec(pszExePath);
+ psl->SetWorkingDirectory(pszExePath);
+ psl->SetShowCmd(SW_SHOWMINNOACTIVE);
+
+ // Query IShellLink for the IPersistFile interface for
+ // saving the shortcut in persistent storage.
+ IPersistFile* ppf = NULL;
+ hres = psl->QueryInterface(IID_IPersistFile,
+ reinterpret_cast<void**>(&ppf));
+ if (SUCCEEDED(hres))
+ {
+ WCHAR pwsz[MAX_PATH];
+ // Ensure that the string is ANSI.
+ MultiByteToWideChar(CP_ACP, 0, StartupShortcutPath().c_str(), -1, pwsz, MAX_PATH);
+ // Save the link by calling IPersistFile::Save.
+ hres = ppf->Save(pwsz, TRUE);
+ ppf->Release();
+ }
+ psl->Release();
+ }
+ CoUninitialize();
+ }
+}
+
+#elif defined(__WXGTK__)
+
+// Follow the Desktop Application Autostart Spec:
+// http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html
+
+boost::filesystem::path GetAutostartDir()
+{
+ namespace fs = boost::filesystem;
+
+ char* pszConfigHome = getenv("XDG_CONFIG_HOME");
+ if (pszConfigHome) return fs::path(pszConfigHome) / fs::path("autostart");
+ char* pszHome = getenv("HOME");
+ if (pszHome) return fs::path(pszHome) / fs::path(".config/autostart");
+ return fs::path();
+}
+
+boost::filesystem::path GetAutostartFilePath()
+{
+ return GetAutostartDir() / boost::filesystem::path("bitcoin.desktop");
+}
+
+bool GetStartOnSystemStartup()
+{
+ boost::filesystem::ifstream optionFile(GetAutostartFilePath());
+ if (!optionFile.good())
+ return false;
+ // Scan through file for "Hidden=true":
+ string line;
+ while (!optionFile.eof())
+ {
+ getline(optionFile, line);
+ if (line.find("Hidden") != string::npos &&
+ line.find("true") != string::npos)
+ return false;
+ }
+ optionFile.close();
+
+ return true;
+}
+
+void SetStartOnSystemStartup(bool fAutoStart)
+{
+ if (!fAutoStart)
+ {
+ unlink(GetAutostartFilePath().native_file_string().c_str());
+ }
+ else
+ {
+ char pszExePath[MAX_PATH+1];
+ memset(pszExePath, 0, sizeof(pszExePath));
+ if (readlink("/proc/self/exe", pszExePath, sizeof(pszExePath)-1) == -1)
+ return;
+
+ boost::filesystem::create_directories(GetAutostartDir());
+
+ boost::filesystem::ofstream optionFile(GetAutostartFilePath(), ios_base::out|ios_base::trunc);
+ if (!optionFile.good())
+ {
+ wxMessageBox(_("Cannot write autostart/bitcoin.desktop file"), "Bitcoin");
+ return;
+ }
+ // Write a bitcoin.desktop file to the autostart directory:
+ optionFile << "[Desktop Entry]\n";
+ optionFile << "Type=Application\n";
+ optionFile << "Name=Bitcoin\n";
+ optionFile << "Exec=" << pszExePath << "\n";
+ optionFile << "Terminal=false\n";
+ optionFile << "Hidden=false\n";
+ optionFile.close();
+ }
+}
+#else
+
+// TODO: OSX startup stuff; see:
+// http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/CustomLogin.html
+
+bool GetStartOnSystemStartup() { return false; }
+void SetStartOnSystemStartup(bool fAutoStart) { }
+
+#endif
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// COptionsDialog
+//
+
+COptionsDialog::COptionsDialog(wxWindow* parent) : COptionsDialogBase(parent)
+{
+ // Set up list box of page choices
+ m_listBox->Append(_("Main"));
+ //m_listBox->Append(_("Test 2"));
+ m_listBox->SetSelection(0);
+ SelectPage(0);
+#ifndef __WXMSW__
+ SetSize(1.0 * GetSize().GetWidth(), 1.2 * GetSize().GetHeight());
+#else
+ SetSize(nScaleX * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
+#endif
+#if defined(__WXGTK__) || defined(__WXMAC_OSX__)
+ m_checkBoxStartOnSystemStartup->SetLabel(_("&Start Bitcoin on window system startup"));
+ if (!GetBoolArg("-minimizetotray"))
+ {
+ // Minimize to tray is just too buggy on Linux
+ fMinimizeToTray = false;
+ m_checkBoxMinimizeToTray->SetValue(false);
+ m_checkBoxMinimizeToTray->Enable(false);
+ m_checkBoxMinimizeOnClose->SetLabel(_("&Minimize on close"));
+ }
+#endif
+#ifdef __WXMAC_OSX__
+ m_checkBoxStartOnSystemStartup->Enable(false); // not implemented yet
+#endif
+
+ // Init values
+ m_textCtrlTransactionFee->SetValue(FormatMoney(nTransactionFee));
+ m_checkBoxStartOnSystemStartup->SetValue(fTmpStartOnSystemStartup = GetStartOnSystemStartup());
+ m_checkBoxMinimizeToTray->SetValue(fMinimizeToTray);
+ m_checkBoxMinimizeOnClose->SetValue(fMinimizeOnClose);
+ if (fHaveUPnP)
+ m_checkBoxUseUPnP->SetValue(fUseUPnP);
+ else
+ m_checkBoxUseUPnP->Enable(false);
+ m_checkBoxUseProxy->SetValue(fUseProxy);
+ m_textCtrlProxyIP->Enable(fUseProxy);
+ m_textCtrlProxyPort->Enable(fUseProxy);
+ m_staticTextProxyIP->Enable(fUseProxy);
+ m_staticTextProxyPort->Enable(fUseProxy);
+ m_textCtrlProxyIP->SetValue(addrProxy.ToStringIP());
+ m_textCtrlProxyPort->SetValue(addrProxy.ToStringPort());
+
+ m_buttonOK->SetFocus();
+}
+
+void COptionsDialog::SelectPage(int nPage)
+{
+ m_panelMain->Show(nPage == 0);
+ m_panelTest2->Show(nPage == 1);
+
+ m_scrolledWindow->Layout();
+ m_scrolledWindow->SetScrollbars(0, 0, 0, 0, 0, 0);
+}
+
+void COptionsDialog::OnListBox(wxCommandEvent& event)
+{
+ SelectPage(event.GetSelection());
+}
+
+void COptionsDialog::OnKillFocusTransactionFee(wxFocusEvent& event)
+{
+ event.Skip();
+ int64 nTmp = nTransactionFee;
+ ParseMoney(m_textCtrlTransactionFee->GetValue(), nTmp);
+ m_textCtrlTransactionFee->SetValue(FormatMoney(nTmp));
+}
+
+void COptionsDialog::OnCheckBoxUseProxy(wxCommandEvent& event)
+{
+ m_textCtrlProxyIP->Enable(event.IsChecked());
+ m_textCtrlProxyPort->Enable(event.IsChecked());
+ m_staticTextProxyIP->Enable(event.IsChecked());
+ m_staticTextProxyPort->Enable(event.IsChecked());
+}
+
+CAddress COptionsDialog::GetProxyAddr()
+{
+ // Be careful about byte order, addr.ip and addr.port are big endian
+ CAddress addr(m_textCtrlProxyIP->GetValue() + ":" + m_textCtrlProxyPort->GetValue());
+ if (addr.ip == INADDR_NONE)
+ addr.ip = addrProxy.ip;
+ int nPort = atoi(m_textCtrlProxyPort->GetValue());
+ addr.port = htons(nPort);
+ if (nPort <= 0 || nPort > USHRT_MAX)
+ addr.port = addrProxy.port;
+ return addr;
+}
+
+void COptionsDialog::OnKillFocusProxy(wxFocusEvent& event)
+{
+ event.Skip();
+ m_textCtrlProxyIP->SetValue(GetProxyAddr().ToStringIP());
+ m_textCtrlProxyPort->SetValue(GetProxyAddr().ToStringPort());
+}
+
+
+void COptionsDialog::OnButtonOK(wxCommandEvent& event)
+{
+ OnButtonApply(event);
+ EndModal(false);
+}
+
+void COptionsDialog::OnButtonCancel(wxCommandEvent& event)
+{
+ EndModal(false);
+}
+
+void COptionsDialog::OnButtonApply(wxCommandEvent& event)
+{
+ CWalletDB walletdb(pwalletMain->strWalletFile);
+
+ int64 nPrevTransactionFee = nTransactionFee;
+ if (ParseMoney(m_textCtrlTransactionFee->GetValue(), nTransactionFee) && nTransactionFee != nPrevTransactionFee)
+ walletdb.WriteSetting("nTransactionFee", nTransactionFee);
+
+ if (fTmpStartOnSystemStartup != m_checkBoxStartOnSystemStartup->GetValue())
+ {
+ fTmpStartOnSystemStartup = m_checkBoxStartOnSystemStartup->GetValue();
+ SetStartOnSystemStartup(fTmpStartOnSystemStartup);
+ }
+
+ if (fMinimizeToTray != m_checkBoxMinimizeToTray->GetValue())
+ {
+ fMinimizeToTray = m_checkBoxMinimizeToTray->GetValue();
+ walletdb.WriteSetting("fMinimizeToTray", fMinimizeToTray);
+ ptaskbaricon->Show(fMinimizeToTray || fClosedToTray);
+ }
+
+ if (fMinimizeOnClose != m_checkBoxMinimizeOnClose->GetValue())
+ {
+ fMinimizeOnClose = m_checkBoxMinimizeOnClose->GetValue();
+ walletdb.WriteSetting("fMinimizeOnClose", fMinimizeOnClose);
+ }
+
+ if (fHaveUPnP && fUseUPnP != m_checkBoxUseUPnP->GetValue())
+ {
+ fUseUPnP = m_checkBoxUseUPnP->GetValue();
+ walletdb.WriteSetting("fUseUPnP", fUseUPnP);
+ MapPort(fUseUPnP);
+ }
+
+ fUseProxy = m_checkBoxUseProxy->GetValue();
+ walletdb.WriteSetting("fUseProxy", fUseProxy);
+
+ addrProxy = GetProxyAddr();
+ walletdb.WriteSetting("addrProxy", addrProxy);
+}
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// CAboutDialog
+//
+
+CAboutDialog::CAboutDialog(wxWindow* parent) : CAboutDialogBase(parent)
+{
+ m_staticTextVersion->SetLabel(strprintf(_("version %s"), FormatFullVersion().c_str()));
+
+ // Change (c) into UTF-8 or ANSI copyright symbol
+ wxString str = m_staticTextMain->GetLabel();
+#if wxUSE_UNICODE
+ str.Replace("(c)", wxString::FromUTF8("\xC2\xA9"));
+#else
+ str.Replace("(c)", "\xA9");
+#endif
+ m_staticTextMain->SetLabel(str);
+#ifndef __WXMSW__
+ // Resize on Linux to make the window fit the text.
+ // The text was wrapped manually rather than using the Wrap setting because
+ // the wrap would be too small on Linux and it can't be changed at this point.
+ wxFont fontTmp = m_staticTextMain->GetFont();
+ if (fontTmp.GetPointSize() > 8);
+ fontTmp.SetPointSize(8);
+ m_staticTextMain->SetFont(fontTmp);
+ SetSize(GetSize().GetWidth() + 44, GetSize().GetHeight() + 10);
+#else
+ SetSize(nScaleX * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
+#endif
+}
+
+void CAboutDialog::OnButtonOK(wxCommandEvent& event)
+{
+ EndModal(false);
+}
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// CSendDialog
+//
+
+CSendDialog::CSendDialog(wxWindow* parent, const wxString& strAddress) : CSendDialogBase(parent)
+{
+ // Init
+ m_textCtrlAddress->SetValue(strAddress);
+ m_choiceTransferType->SetSelection(0);
+ m_bitmapCheckMark->Show(false);
+ fEnabledPrev = true;
+ m_textCtrlAddress->SetFocus();
+
+ //// todo: should add a display of your balance for convenience
+#ifndef __WXMSW__
+ wxFont fontTmp = m_staticTextInstructions->GetFont();
+ if (fontTmp.GetPointSize() > 9);
+ fontTmp.SetPointSize(9);
+ m_staticTextInstructions->SetFont(fontTmp);
+ SetSize(725, 180);
+#else
+ SetSize(nScaleX * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
+#endif
+
+ // Set Icon
+ if (nScaleX == 1.0 && nScaleY == 1.0) // We don't have icons of the proper size otherwise
+ {
+ wxIcon iconSend;
+ iconSend.CopyFromBitmap(wxBitmap(send16noshadow_xpm));
+ SetIcon(iconSend);
+ }
+#ifdef __WXMSW__
+ else
+ SetIcon(wxICON(bitcoin));
+#endif
+
+ // Fixup the tab order
+ m_buttonPaste->MoveAfterInTabOrder(m_buttonCancel);
+ m_buttonAddress->MoveAfterInTabOrder(m_buttonPaste);
+ this->Layout();
+}
+
+void CSendDialog::OnKillFocusAmount(wxFocusEvent& event)
+{
+ // Reformat the amount
+ event.Skip();
+ if (m_textCtrlAmount->GetValue().Trim().empty())
+ return;
+ int64 nTmp;
+ if (ParseMoney(m_textCtrlAmount->GetValue(), nTmp))
+ m_textCtrlAmount->SetValue(FormatMoney(nTmp));
+}
+
+void CSendDialog::OnButtonAddressBook(wxCommandEvent& event)
+{
+ // Open address book
+ CAddressBookDialog dialog(this, m_textCtrlAddress->GetValue(), CAddressBookDialog::SENDING, true);
+ if (dialog.ShowModal())
+ m_textCtrlAddress->SetValue(dialog.GetSelectedAddress());
+}
+
+void CSendDialog::OnButtonPaste(wxCommandEvent& event)
+{
+ // Copy clipboard to address box
+ if (wxTheClipboard->Open())
+ {
+ if (wxTheClipboard->IsSupported(wxDF_TEXT))
+ {
+ wxTextDataObject data;
+ wxTheClipboard->GetData(data);
+ m_textCtrlAddress->SetValue(data.GetText());
+ }
+ wxTheClipboard->Close();
+ }
+}
+
+void CSendDialog::OnButtonSend(wxCommandEvent& event)
+{
+ static CCriticalSection cs_sendlock;
+ TRY_CRITICAL_BLOCK(cs_sendlock)
+ {
+ CWalletTx wtx;
+ string strAddress = (string)m_textCtrlAddress->GetValue();
+
+ // Parse amount
+ int64 nValue = 0;
+ if (!ParseMoney(m_textCtrlAmount->GetValue(), nValue) || nValue <= 0)
+ {
+ wxMessageBox(_("Error in amount "), _("Send Coins"));
+ return;
+ }
+ if (nValue > pwalletMain->GetBalance())
+ {
+ wxMessageBox(_("Amount exceeds your balance "), _("Send Coins"));
+ return;
+ }
+ if (nValue + nTransactionFee > pwalletMain->GetBalance())
+ {
+ wxMessageBox(string(_("Total exceeds your balance when the ")) + FormatMoney(nTransactionFee) + _(" transaction fee is included "), _("Send Coins"));
+ return;
+ }
+
+ // Parse bitcoin address
+ uint160 hash160;
+ bool fBitcoinAddress = AddressToHash160(strAddress, hash160);
+
+ if (fBitcoinAddress)
+ {
+ CRITICAL_BLOCK(cs_main)
+ {
+ // Send to bitcoin address
+ CScript scriptPubKey;
+ scriptPubKey << OP_DUP << OP_HASH160 << hash160 << OP_EQUALVERIFY << OP_CHECKSIG;
+
+ string strError = pwalletMain->SendMoney(scriptPubKey, nValue, wtx, true);
+ if (strError == "")
+ wxMessageBox(_("Payment sent "), _("Sending..."));
+ else if (strError == "ABORTED")
+ return; // leave send dialog open
+ else
+ {
+ wxMessageBox(strError + " ", _("Sending..."));
+ EndModal(false);
+ return;
+ }
+ }
+ }
+ else
+ {
+ // Parse IP address
+ CAddress addr(strAddress);
+ if (!addr.IsValid())
+ {
+ wxMessageBox(_("Invalid address "), _("Send Coins"));
+ return;
+ }
+
+ // Message
+ wtx.mapValue["to"] = strAddress;
+
+ // Send to IP address
+ CSendingDialog* pdialog = new CSendingDialog(this, addr, nValue, wtx);
+ if (!pdialog->ShowModal())
+ return;
+ }
+
+ CRITICAL_BLOCK(pwalletMain->cs_mapAddressBook)
+ if (!pwalletMain->mapAddressBook.count(strAddress))
+ pwalletMain->SetAddressBookName(strAddress, "");
+
+ EndModal(true);
+ }
+}
+
+void CSendDialog::OnButtonCancel(wxCommandEvent& event)
+{
+ // Cancel
+ EndModal(false);
+}
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// CSendingDialog
+//
+
+CSendingDialog::CSendingDialog(wxWindow* parent, const CAddress& addrIn, int64 nPriceIn, const CWalletTx& wtxIn) : CSendingDialogBase(NULL) // we have to give null so parent can't destroy us
+{
+ addr = addrIn;
+ nPrice = nPriceIn;
+ wtx = wtxIn;
+ start = wxDateTime::UNow();
+ memset(pszStatus, 0, sizeof(pszStatus));
+ fCanCancel = true;
+ fAbort = false;
+ fSuccess = false;
+ fUIDone = false;
+ fWorkDone = false;
+#ifndef __WXMSW__
+ SetSize(1.2 * GetSize().GetWidth(), 1.08 * GetSize().GetHeight());
+#else
+ SetSize(nScaleX * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
+#endif
+
+ SetTitle(strprintf(_("Sending %s to %s"), FormatMoney(nPrice).c_str(), wtx.mapValue["to"].c_str()));
+ m_textCtrlStatus->SetValue("");
+
+ CreateThread(SendingDialogStartTransfer, this);
+}
+
+CSendingDialog::~CSendingDialog()
+{
+ printf("~CSendingDialog()\n");
+}
+
+void CSendingDialog::Close()
+{
+ // Last one out turn out the lights.
+ // fWorkDone signals that work side is done and UI thread should call destroy.
+ // fUIDone signals that UI window has closed and work thread should call destroy.
+ // This allows the window to disappear and end modality when cancelled
+ // without making the user wait for ConnectNode to return. The dialog object
+ // hangs around in the background until the work thread exits.
+ if (IsModal())
+ EndModal(fSuccess);
+ else
+ Show(false);
+ if (fWorkDone)
+ Destroy();
+ else
+ fUIDone = true;
+}
+
+void CSendingDialog::OnClose(wxCloseEvent& event)
+{
+ if (!event.CanVeto() || fWorkDone || fAbort || !fCanCancel)
+ {
+ Close();
+ }
+ else
+ {
+ event.Veto();
+ wxCommandEvent cmdevent;
+ OnButtonCancel(cmdevent);
+ }
+}
+
+void CSendingDialog::OnButtonOK(wxCommandEvent& event)
+{
+ if (fWorkDone)
+ Close();
+}
+
+void CSendingDialog::OnButtonCancel(wxCommandEvent& event)
+{
+ if (fCanCancel)
+ fAbort = true;
+}
+
+void CSendingDialog::OnPaint(wxPaintEvent& event)
+{
+ event.Skip();
+ if (strlen(pszStatus) > 130)
+ m_textCtrlStatus->SetValue(string("\n") + pszStatus);
+ else
+ m_textCtrlStatus->SetValue(string("\n\n") + pszStatus);
+ m_staticTextSending->SetFocus();
+ if (!fCanCancel)
+ m_buttonCancel->Enable(false);
+ if (fWorkDone)
+ {
+ m_buttonOK->Enable(true);
+ m_buttonOK->SetFocus();
+ m_buttonCancel->Enable(false);
+ }
+ if (fAbort && fCanCancel && IsShown())
+ {
+ strcpy(pszStatus, _("CANCELLED"));
+ m_buttonOK->Enable(true);
+ m_buttonOK->SetFocus();
+ m_buttonCancel->Enable(false);
+ m_buttonCancel->SetLabel(_("Cancelled"));
+ Close();
+ wxMessageBox(_("Transfer cancelled "), _("Sending..."), wxOK, this);
+ }
+}
+
+
+//
+// Everything from here on is not in the UI thread and must only communicate
+// with the rest of the dialog through variables and calling repaint.
+//
+
+void CSendingDialog::Repaint()
+{
+ Refresh();
+ wxPaintEvent event;
+ GetEventHandler()->AddPendingEvent(event);
+}
+
+bool CSendingDialog::Status()
+{
+ if (fUIDone)
+ {
+ Destroy();
+ return false;
+ }
+ if (fAbort && fCanCancel)
+ {
+ memset(pszStatus, 0, 10);
+ strcpy(pszStatus, _("CANCELLED"));
+ Repaint();
+ fWorkDone = true;
+ return false;
+ }
+ return true;
+}
+
+bool CSendingDialog::Status(const string& str)
+{
+ if (!Status())
+ return false;
+
+ // This can be read by the UI thread at any time,
+ // so copy in a way that can be read cleanly at all times.
+ memset(pszStatus, 0, min(str.size()+1, sizeof(pszStatus)));
+ strlcpy(pszStatus, str.c_str(), sizeof(pszStatus));
+
+ Repaint();
+ return true;
+}
+
+bool CSendingDialog::Error(const string& str)
+{
+ fCanCancel = false;
+ fWorkDone = true;
+ Status(string(_("Error: ")) + str);
+ return false;
+}
+
+void SendingDialogStartTransfer(void* parg)
+{
+ ((CSendingDialog*)parg)->StartTransfer();
+}
+
+void CSendingDialog::StartTransfer()
+{
+ // Make sure we have enough money
+ if (nPrice + nTransactionFee > pwalletMain->GetBalance())
+ {
+ Error(_("Insufficient funds"));
+ return;
+ }
+
+ // We may have connected already for product details
+ if (!Status(_("Connecting...")))
+ return;
+ CNode* pnode = ConnectNode(addr, 15 * 60);
+ if (!pnode)
+ {
+ Error(_("Unable to connect"));
+ return;
+ }
+
+ // Send order to seller, with response going to OnReply2 via event handler
+ if (!Status(_("Requesting public key...")))
+ return;
+ pnode->PushRequest("checkorder", wtx, SendingDialogOnReply2, this);
+}
+
+void SendingDialogOnReply2(void* parg, CDataStream& vRecv)
+{
+ ((CSendingDialog*)parg)->OnReply2(vRecv);
+}
+
+void CSendingDialog::OnReply2(CDataStream& vRecv)
+{
+ if (!Status(_("Received public key...")))
+ return;
+
+ CScript scriptPubKey;
+ int nRet;
+ try
+ {
+ vRecv >> nRet;
+ if (nRet > 0)
+ {
+ string strMessage;
+ if (!vRecv.empty())
+ vRecv >> strMessage;
+ if (nRet == 2)
+ Error(_("Recipient is not accepting transactions sent by IP address"));
+ else
+ Error(_("Transfer was not accepted"));
+ //// todo: enlarge the window and enable a hidden white box to put seller's message
+ return;
+ }
+ vRecv >> scriptPubKey;
+ }
+ catch (...)
+ {
+ //// what do we want to do about this?
+ Error(_("Invalid response received"));
+ return;
+ }
+
+ // Pause to give the user a chance to cancel
+ while (wxDateTime::UNow() < start + wxTimeSpan(0, 0, 0, 2 * 1000))
+ {
+ Sleep(200);
+ if (!Status())
+ return;
+ }
+
+ CRITICAL_BLOCK(cs_main)
+ {
+ // Pay
+ if (!Status(_("Creating transaction...")))
+ return;
+ if (nPrice + nTransactionFee > pwalletMain->GetBalance())
+ {
+ Error(_("Insufficient funds"));
+ return;
+ }
+ CReserveKey reservekey(pwalletMain);
+ int64 nFeeRequired;
+ if (!pwalletMain->CreateTransaction(scriptPubKey, nPrice, wtx, reservekey, nFeeRequired))
+ {
+ if (nPrice + nFeeRequired > pwalletMain->GetBalance())
+ Error(strprintf(_("This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds"), FormatMoney(nFeeRequired).c_str()));
+ else
+ Error(_("Transaction creation failed"));
+ return;
+ }
+
+ // Transaction fee
+ if (!ThreadSafeAskFee(nFeeRequired, _("Sending..."), this))
+ {
+ Error(_("Transaction aborted"));
+ return;
+ }
+
+ // Make sure we're still connected
+ CNode* pnode = ConnectNode(addr, 2 * 60 * 60);
+ if (!pnode)
+ {
+ Error(_("Lost connection, transaction cancelled"));
+ return;
+ }
+
+ // Last chance to cancel
+ Sleep(50);
+ if (!Status())
+ return;
+ fCanCancel = false;
+ if (fAbort)
+ {
+ fCanCancel = true;
+ if (!Status())
+ return;
+ fCanCancel = false;
+ }
+ if (!Status(_("Sending payment...")))
+ return;
+
+ // Commit
+ if (!pwalletMain->CommitTransaction(wtx, reservekey))
+ {
+ Error(_("The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."));
+ return;
+ }
+
+ // Send payment tx to seller, with response going to OnReply3 via event handler
+ CWalletTx wtxSend = wtx;
+ wtxSend.fFromMe = false;
+ pnode->PushRequest("submitorder", wtxSend, SendingDialogOnReply3, this);
+
+ Status(_("Waiting for confirmation..."));
+ MainFrameRepaint();
+ }
+}
+
+void SendingDialogOnReply3(void* parg, CDataStream& vRecv)
+{
+ ((CSendingDialog*)parg)->OnReply3(vRecv);
+}
+
+void CSendingDialog::OnReply3(CDataStream& vRecv)
+{
+ int nRet;
+ try
+ {
+ vRecv >> nRet;
+ if (nRet > 0)
+ {
+ Error(_("The payment was sent, but the recipient was unable to verify it.\n"
+ "The transaction is recorded and will credit to the recipient,\n"
+ "but the comment information will be blank."));
+ return;
+ }
+ }
+ catch (...)
+ {
+ //// what do we want to do about this?
+ Error(_("Payment was sent, but an invalid response was received"));
+ return;
+ }
+
+ fSuccess = true;
+ fWorkDone = true;
+ Status(_("Payment completed"));
+}
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// CAddressBookDialog
+//
+
+CAddressBookDialog::CAddressBookDialog(wxWindow* parent, const wxString& strInitSelected, int nPageIn, bool fDuringSendIn) : CAddressBookDialogBase(parent)
+{
+#ifdef __WXMSW__
+ SetSize(nScaleX * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
+#endif
+
+ // Set initially selected page
+ wxNotebookEvent event;
+ event.SetSelection(nPageIn);
+ OnNotebookPageChanged(event);
+ m_notebook->ChangeSelection(nPageIn);
+
+ fDuringSend = fDuringSendIn;
+ if (!fDuringSend)
+ m_buttonCancel->Show(false);
+
+ // Set Icon
+ if (nScaleX == 1.0 && nScaleY == 1.0) // We don't have icons of the proper size otherwise
+ {
+ wxIcon iconAddressBook;
+ iconAddressBook.CopyFromBitmap(wxBitmap(addressbook16_xpm));
+ SetIcon(iconAddressBook);
+ }
+#ifdef __WXMSW__
+ else
+ SetIcon(wxICON(bitcoin));
+#endif
+
+ // Init column headers
+ m_listCtrlSending->InsertColumn(0, _("Name"), wxLIST_FORMAT_LEFT, 200);
+ m_listCtrlSending->InsertColumn(1, _("Address"), wxLIST_FORMAT_LEFT, 350);
+ m_listCtrlSending->SetFocus();
+ m_listCtrlReceiving->InsertColumn(0, _("Label"), wxLIST_FORMAT_LEFT, 200);
+ m_listCtrlReceiving->InsertColumn(1, _("Bitcoin Address"), wxLIST_FORMAT_LEFT, 350);
+ m_listCtrlReceiving->SetFocus();
+
+ // Fill listctrl with address book data
+ CRITICAL_BLOCK(pwalletMain->cs_mapKeys)
+ CRITICAL_BLOCK(pwalletMain->cs_mapAddressBook)
+ {
+ string strDefaultReceiving = (string)pframeMain->m_textCtrlAddress->GetValue();
+ BOOST_FOREACH(const PAIRTYPE(string, string)& item, pwalletMain->mapAddressBook)
+ {
+ string strAddress = item.first;
+ string strName = item.second;
+ uint160 hash160;
+ bool fMine = (AddressToHash160(strAddress, hash160) && mapPubKeys.count(hash160));
+ wxListCtrl* plistCtrl = fMine ? m_listCtrlReceiving : m_listCtrlSending;
+ int nIndex = InsertLine(plistCtrl, strName, strAddress);
+ if (strAddress == (fMine ? strDefaultReceiving : string(strInitSelected)))
+ plistCtrl->SetItemState(nIndex, wxLIST_STATE_SELECTED|wxLIST_STATE_FOCUSED, wxLIST_STATE_SELECTED|wxLIST_STATE_FOCUSED);
+ }
+ }
+}
+
+wxString CAddressBookDialog::GetSelectedAddress()
+{
+ int nIndex = GetSelection(m_listCtrl);
+ if (nIndex == -1)
+ return "";
+ return GetItemText(m_listCtrl, nIndex, 1);
+}
+
+wxString CAddressBookDialog::GetSelectedSendingAddress()
+{
+ int nIndex = GetSelection(m_listCtrlSending);
+ if (nIndex == -1)
+ return "";
+ return GetItemText(m_listCtrlSending, nIndex, 1);
+}
+
+wxString CAddressBookDialog::GetSelectedReceivingAddress()
+{
+ int nIndex = GetSelection(m_listCtrlReceiving);
+ if (nIndex == -1)
+ return "";
+ return GetItemText(m_listCtrlReceiving, nIndex, 1);
+}
+
+void CAddressBookDialog::OnNotebookPageChanged(wxNotebookEvent& event)
+{
+ event.Skip();
+ nPage = event.GetSelection();
+ if (nPage == SENDING)
+ m_listCtrl = m_listCtrlSending;
+ else if (nPage == RECEIVING)
+ m_listCtrl = m_listCtrlReceiving;
+ m_buttonDelete->Show(nPage == SENDING);
+ m_buttonCopy->Show(nPage == RECEIVING);
+ this->Layout();
+ m_listCtrl->SetFocus();
+}
+
+void CAddressBookDialog::OnListEndLabelEdit(wxListEvent& event)
+{
+ // Update address book with edited name
+ event.Skip();
+ if (event.IsEditCancelled())
+ return;
+ string strAddress = (string)GetItemText(m_listCtrl, event.GetIndex(), 1);
+ CRITICAL_BLOCK(pwalletMain->cs_mapAddressBook)
+ pwalletMain->SetAddressBookName(strAddress, string(event.GetText()));
+ pframeMain->RefreshListCtrl();
+}
+
+void CAddressBookDialog::OnListItemSelected(wxListEvent& event)
+{
+ event.Skip();
+ if (nPage == RECEIVING)
+ SetDefaultReceivingAddress((string)GetSelectedReceivingAddress());
+}
+
+void CAddressBookDialog::OnListItemActivated(wxListEvent& event)
+{
+ event.Skip();
+ if (fDuringSend)
+ {
+ // Doubleclick returns selection
+ EndModal(GetSelectedAddress() != "" ? 2 : 0);
+ return;
+ }
+
+ // Doubleclick edits item
+ wxCommandEvent event2;
+ OnButtonEdit(event2);
+}
+
+void CAddressBookDialog::OnButtonDelete(wxCommandEvent& event)
+{
+ if (nPage != SENDING)
+ return;
+ for (int nIndex = m_listCtrl->GetItemCount()-1; nIndex >= 0; nIndex--)
+ {
+ if (m_listCtrl->GetItemState(nIndex, wxLIST_STATE_SELECTED))
+ {
+ string strAddress = (string)GetItemText(m_listCtrl, nIndex, 1);
+ CRITICAL_BLOCK(pwalletMain->cs_mapAddressBook)
+ pwalletMain->DelAddressBookName(strAddress);
+ m_listCtrl->DeleteItem(nIndex);
+ }
+ }
+ pframeMain->RefreshListCtrl();
+}
+
+void CAddressBookDialog::OnButtonCopy(wxCommandEvent& event)
+{
+ // Copy address box to clipboard
+ if (wxTheClipboard->Open())
+ {
+ wxTheClipboard->SetData(new wxTextDataObject(GetSelectedAddress()));
+ wxTheClipboard->Close();
+ }
+}
+
+bool CAddressBookDialog::CheckIfMine(const string& strAddress, const string& strTitle)
+{
+ uint160 hash160;
+ bool fMine = (AddressToHash160(strAddress, hash160) && mapPubKeys.count(hash160));
+ if (fMine)
+ wxMessageBox(_("This is one of your own addresses for receiving payments and cannot be entered in the address book. "), strTitle);
+ return fMine;
+}
+
+void CAddressBookDialog::OnButtonEdit(wxCommandEvent& event)
+{
+ int nIndex = GetSelection(m_listCtrl);
+ if (nIndex == -1)
+ return;
+ string strName = (string)m_listCtrl->GetItemText(nIndex);
+ string strAddress = (string)GetItemText(m_listCtrl, nIndex, 1);
+ string strAddressOrg = strAddress;
+
+ if (nPage == SENDING)
+ {
+ // Ask name and address
+ do
+ {
+ CGetTextFromUserDialog dialog(this, _("Edit Address"), _("Name"), strName, _("Address"), strAddress);
+ if (!dialog.ShowModal())
+ return;
+ strName = dialog.GetValue1();
+ strAddress = dialog.GetValue2();
+ }
+ while (CheckIfMine(strAddress, _("Edit Address")));
+
+ }
+ else if (nPage == RECEIVING)
+ {
+ // Ask name
+ CGetTextFromUserDialog dialog(this, _("Edit Address Label"), _("Label"), strName);
+ if (!dialog.ShowModal())
+ return;
+ strName = dialog.GetValue();
+ }
+
+ // Write back
+ CRITICAL_BLOCK(pwalletMain->cs_mapAddressBook)
+ {
+ if (strAddress != strAddressOrg)
+ pwalletMain->DelAddressBookName(strAddressOrg);
+ pwalletMain->SetAddressBookName(strAddress, strName);
+ }
+ m_listCtrl->SetItem(nIndex, 1, strAddress);
+ m_listCtrl->SetItemText(nIndex, strName);
+ pframeMain->RefreshListCtrl();
+}
+
+void CAddressBookDialog::OnButtonNew(wxCommandEvent& event)
+{
+ string strName;
+ string strAddress;
+
+ if (nPage == SENDING)
+ {
+ // Ask name and address
+ do
+ {
+ CGetTextFromUserDialog dialog(this, _("Add Address"), _("Name"), strName, _("Address"), strAddress);
+ if (!dialog.ShowModal())
+ return;
+ strName = dialog.GetValue1();
+ strAddress = dialog.GetValue2();
+ }
+ while (CheckIfMine(strAddress, _("Add Address")));
+ }
+ else if (nPage == RECEIVING)
+ {
+ // Ask name
+ CGetTextFromUserDialog dialog(this,
+ _("New Receiving Address"),
+ _("You should use a new address for each payment you receive.\n\nLabel"),
+ "");
+ if (!dialog.ShowModal())
+ return;
+ strName = dialog.GetValue();
+
+ // Generate new key
+ strAddress = PubKeyToAddress(pwalletMain->GetKeyFromKeyPool());
+ }
+
+ // Add to list and select it
+ CRITICAL_BLOCK(pwalletMain->cs_mapAddressBook)
+ pwalletMain->SetAddressBookName(strAddress, strName);
+ int nIndex = InsertLine(m_listCtrl, strName, strAddress);
+ SetSelection(m_listCtrl, nIndex);
+ m_listCtrl->SetFocus();
+ if (nPage == SENDING)
+ pframeMain->RefreshListCtrl();
+}
+
+void CAddressBookDialog::OnButtonOK(wxCommandEvent& event)
+{
+ // OK
+ EndModal(GetSelectedAddress() != "" ? 1 : 0);
+}
+
+void CAddressBookDialog::OnButtonCancel(wxCommandEvent& event)
+{
+ // Cancel
+ EndModal(0);
+}
+
+void CAddressBookDialog::OnClose(wxCloseEvent& event)
+{
+ // Close
+ EndModal(0);
+}
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// CMyTaskBarIcon
+//
+
+enum
+{
+ ID_TASKBAR_RESTORE = 10001,
+ ID_TASKBAR_SEND,
+ ID_TASKBAR_OPTIONS,
+ ID_TASKBAR_GENERATE,
+ ID_TASKBAR_EXIT,
+};
+
+BEGIN_EVENT_TABLE(CMyTaskBarIcon, wxTaskBarIcon)
+ EVT_TASKBAR_LEFT_DCLICK(CMyTaskBarIcon::OnLeftButtonDClick)
+ EVT_MENU(ID_TASKBAR_RESTORE, CMyTaskBarIcon::OnMenuRestore)
+ EVT_MENU(ID_TASKBAR_SEND, CMyTaskBarIcon::OnMenuSend)
+ EVT_MENU(ID_TASKBAR_OPTIONS, CMyTaskBarIcon::OnMenuOptions)
+ EVT_UPDATE_UI(ID_TASKBAR_GENERATE, CMyTaskBarIcon::OnUpdateUIGenerate)
+ EVT_MENU(ID_TASKBAR_EXIT, CMyTaskBarIcon::OnMenuExit)
+END_EVENT_TABLE()
+
+void CMyTaskBarIcon::Show(bool fShow)
+{
+ static char pszPrevTip[200];
+ if (fShow)
+ {
+ string strTooltip = _("Bitcoin");
+ if (fGenerateBitcoins)
+ strTooltip = _("Bitcoin - Generating");
+ if (fGenerateBitcoins && vNodes.empty())
+ strTooltip = _("Bitcoin - (not connected)");
+
+ // Optimization, only update when changed, using char array to be reentrant
+ if (strncmp(pszPrevTip, strTooltip.c_str(), sizeof(pszPrevTip)-1) != 0)
+ {
+ strlcpy(pszPrevTip, strTooltip.c_str(), sizeof(pszPrevTip));
+#ifdef __WXMSW__
+ // somehow it'll choose the wrong size and scale it down if
+ // we use the main icon, so we hand it one with only 16x16
+ SetIcon(wxICON(favicon), strTooltip);
+#else
+ SetIcon(bitcoin80_xpm, strTooltip);
+#endif
+ }
+ }
+ else
+ {
+ strlcpy(pszPrevTip, "", sizeof(pszPrevTip));
+ RemoveIcon();
+ }
+}
+
+void CMyTaskBarIcon::Hide()
+{
+ Show(false);
+}
+
+void CMyTaskBarIcon::OnLeftButtonDClick(wxTaskBarIconEvent& event)
+{
+ Restore();
+}
+
+void CMyTaskBarIcon::OnMenuRestore(wxCommandEvent& event)
+{
+ Restore();
+}
+
+void CMyTaskBarIcon::OnMenuSend(wxCommandEvent& event)
+{
+ // Taskbar: Send
+ CSendDialog dialog(pframeMain);
+ dialog.ShowModal();
+}
+
+void CMyTaskBarIcon::OnMenuOptions(wxCommandEvent& event)
+{
+ // Since it's modal, get the main window to do it
+ wxCommandEvent event2(wxEVT_COMMAND_MENU_SELECTED, wxID_PREFERENCES);
+ pframeMain->GetEventHandler()->AddPendingEvent(event2);
+}
+
+void CMyTaskBarIcon::Restore()
+{
+ pframeMain->Show();
+ wxIconizeEvent event(0, false);
+ pframeMain->GetEventHandler()->AddPendingEvent(event);
+ pframeMain->Iconize(false);
+ pframeMain->Raise();
+}
+
+void CMyTaskBarIcon::OnUpdateUIGenerate(wxUpdateUIEvent& event)
+{
+ event.Check(fGenerateBitcoins);
+}
+
+void CMyTaskBarIcon::OnMenuExit(wxCommandEvent& event)
+{
+ pframeMain->Close(true);
+}
+
+void CMyTaskBarIcon::UpdateTooltip()
+{
+ if (IsIconInstalled())
+ Show(true);
+}
+
+wxMenu* CMyTaskBarIcon::CreatePopupMenu()
+{
+ wxMenu* pmenu = new wxMenu;
+ pmenu->Append(ID_TASKBAR_RESTORE, _("&Open Bitcoin"));
+ pmenu->Append(ID_TASKBAR_SEND, _("&Send Bitcoins"));
+ pmenu->Append(ID_TASKBAR_OPTIONS, _("O&ptions..."));
+#ifndef __WXMAC_OSX__ // Mac has built-in quit menu
+ pmenu->AppendSeparator();
+ pmenu->Append(ID_TASKBAR_EXIT, _("E&xit"));
+#endif
+ return pmenu;
+}
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// CMyApp
+//
+
+void CreateMainWindow()
+{
+ pframeMain = new CMainFrame(NULL);
+ if (GetBoolArg("-min"))
+ pframeMain->Iconize(true);
+#if defined(__WXGTK__) || defined(__WXMAC_OSX__)
+ if (!GetBoolArg("-minimizetotray"))
+ fMinimizeToTray = false;
+#endif
+ pframeMain->Show(true); // have to show first to get taskbar button to hide
+ if (fMinimizeToTray && pframeMain->IsIconized())
+ fClosedToTray = true;
+ pframeMain->Show(!fClosedToTray);
+ ptaskbaricon->Show(fMinimizeToTray || fClosedToTray);
+ CreateThread(ThreadDelayedRepaint, NULL);
+}
+
+
+// Define a new application
+class CMyApp : public wxApp
+{
+public:
+ CMyApp(){};
+ ~CMyApp(){};
+ bool OnInit();
+ bool OnInit2();
+ int OnExit();
+
+ // Hook Initialize so we can start without GUI
+ virtual bool Initialize(int& argc, wxChar** argv);
+
+ // 2nd-level exception handling: we get all the exceptions occurring in any
+ // event handler here
+ virtual bool OnExceptionInMainLoop();
+
+ // 3rd, and final, level exception handling: whenever an unhandled
+ // exception is caught, this function is called
+ virtual void OnUnhandledException();
+
+ // and now for something different: this function is called in case of a
+ // crash (e.g. dereferencing null pointer, division by 0, ...)
+ virtual void OnFatalException();
+};
+
+IMPLEMENT_APP(CMyApp)
+
+bool CMyApp::Initialize(int& argc, wxChar** argv)
+{
+ for (int i = 1; i < argc; i++)
+ if (!IsSwitchChar(argv[i][0]))
+ fCommandLine = true;
+
+ if (!fCommandLine)
+ {
+ // wxApp::Initialize will remove environment-specific parameters,
+ // so it's too early to call ParseParameters yet
+ for (int i = 1; i < argc; i++)
+ {
+ wxString str = argv[i];
+ #ifdef __WXMSW__
+ if (str.size() >= 1 && str[0] == '/')
+ str[0] = '-';
+ char pszLower[MAX_PATH];
+ strlcpy(pszLower, str.c_str(), sizeof(pszLower));
+ strlwr(pszLower);
+ str = pszLower;
+ #endif
+ if (str == "-daemon")
+ fDaemon = true;
+ }
+ }
+
+#ifdef __WXGTK__
+ if (fDaemon || fCommandLine)
+ {
+ // Call the original Initialize while suppressing error messages
+ // and ignoring failure. If unable to initialize GTK, it fails
+ // near the end so hopefully the last few things don't matter.
+ {
+ wxLogNull logNo;
+ wxApp::Initialize(argc, argv);
+ }
+
+ if (fDaemon)
+ {
+ // Daemonize
+ pid_t pid = fork();
+ if (pid < 0)
+ {
+ fprintf(stderr, "Error: fork() returned %d errno %d\n", pid, errno);
+ return false;
+ }
+ if (pid > 0)
+ pthread_exit((void*)0);
+
+ pid_t sid = setsid();
+ if (sid < 0)
+ fprintf(stderr, "Error: setsid() returned %d errno %d\n", sid, errno);
+ }
+
+ return true;
+ }
+#endif
+
+ return wxApp::Initialize(argc, argv);
+}
+
+bool CMyApp::OnInit()
+{
+#if defined(__WXMSW__) && defined(__WXDEBUG__) && defined(GUI)
+ // Disable malfunctioning wxWidgets debug assertion
+ extern int g_isPainting;
+ g_isPainting = 10000;
+#endif
+#if defined(__WXMSW__ ) || defined(__WXMAC_OSX__)
+ SetAppName("Bitcoin");
+#else
+ SetAppName("bitcoin");
+#endif
+#ifdef __WXMSW__
+#if wxUSE_UNICODE
+ // Hack to set wxConvLibc codepage to UTF-8 on Windows,
+ // may break if wxMBConv_win32 implementation in strconv.cpp changes.
+ class wxMBConv_win32 : public wxMBConv
+ {
+ public:
+ long m_CodePage;
+ size_t m_minMBCharWidth;
+ };
+ if (((wxMBConv_win32*)&wxConvLibc)->m_CodePage == CP_ACP)
+ ((wxMBConv_win32*)&wxConvLibc)->m_CodePage = CP_UTF8;
+#endif
+#endif
+
+ // Load locale/<lang>/LC_MESSAGES/bitcoin.mo language file
+ g_locale.Init(wxLANGUAGE_DEFAULT, 0);
+ g_locale.AddCatalogLookupPathPrefix("locale");
+#ifndef __WXMSW__
+ g_locale.AddCatalogLookupPathPrefix("/usr/share/locale");
+ g_locale.AddCatalogLookupPathPrefix("/usr/local/share/locale");
+#endif
+ g_locale.AddCatalog("wxstd"); // wxWidgets standard translations, if any
+ g_locale.AddCatalog("bitcoin");
+
+#ifdef __WXMSW__
+ HDC hdc = GetDC(NULL);
+ if (hdc)
+ {
+ nScaleX = GetDeviceCaps(hdc, LOGPIXELSX) / 96.0;
+ nScaleY = GetDeviceCaps(hdc, LOGPIXELSY) / 96.0;
+ ReleaseDC(NULL, hdc);
+ }
+#endif
+
+ return AppInit(argc, argv);
+}
+
+int CMyApp::OnExit()
+{
+ Shutdown(NULL);
+ return wxApp::OnExit();
+}
+
+bool CMyApp::OnExceptionInMainLoop()
+{
+ try
+ {
+ throw;
+ }
+ catch (std::exception& e)
+ {
+ PrintException(&e, "CMyApp::OnExceptionInMainLoop()");
+ wxLogWarning("Exception %s %s", typeid(e).name(), e.what());
+ Sleep(1000);
+ throw;
+ }
+ catch (...)
+ {
+ PrintException(NULL, "CMyApp::OnExceptionInMainLoop()");
+ wxLogWarning("Unknown exception");
+ Sleep(1000);
+ throw;
+ }
+ return true;
+}
+
+void CMyApp::OnUnhandledException()
+{
+ // this shows how we may let some exception propagate uncaught
+ try
+ {
+ throw;
+ }
+ catch (std::exception& e)
+ {
+ PrintException(&e, "CMyApp::OnUnhandledException()");
+ wxLogWarning("Exception %s %s", typeid(e).name(), e.what());
+ Sleep(1000);
+ throw;
+ }
+ catch (...)
+ {
+ PrintException(NULL, "CMyApp::OnUnhandledException()");
+ wxLogWarning("Unknown exception");
+ Sleep(1000);
+ throw;
+ }
+}
+
+void CMyApp::OnFatalException()
+{
+ wxMessageBox(_("Program has crashed and will terminate. "), "Bitcoin", wxOK | wxICON_ERROR);
+}
diff --git a/src/ui.h b/src/ui.h
new file mode 100644
index 0000000000..3f06ad90cb
--- /dev/null
+++ b/src/ui.h
@@ -0,0 +1,350 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Distributed under the MIT/X11 software license, see the accompanying
+// file license.txt or http://www.opensource.org/licenses/mit-license.php.
+#ifndef BITCOIN_UI_H
+#define BITCOIN_UI_H
+
+#include <boost/function.hpp>
+#include "wallet.h"
+
+DECLARE_EVENT_TYPE(wxEVT_UITHREADCALL, -1)
+
+
+
+extern wxLocale g_locale;
+
+
+
+void HandleCtrlA(wxKeyEvent& event);
+void UIThreadCall(boost::function0<void>);
+int ThreadSafeMessageBox(const std::string& message, const std::string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1);
+bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption, wxWindow* parent);
+void CalledSetStatusBar(const std::string& strText, int nField);
+void MainFrameRepaint();
+void CreateMainWindow();
+void SetStartOnSystemStartup(bool fAutoStart);
+
+
+
+
+inline int MyMessageBox(const wxString& message, const wxString& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1)
+{
+#ifdef GUI
+ if (!fDaemon)
+ return wxMessageBox(message, caption, style, parent, x, y);
+#endif
+ printf("wxMessageBox %s: %s\n", std::string(caption).c_str(), std::string(message).c_str());
+ fprintf(stderr, "%s: %s\n", std::string(caption).c_str(), std::string(message).c_str());
+ return wxOK;
+}
+#define wxMessageBox MyMessageBox
+
+
+
+
+
+
+class CMainFrame : public CMainFrameBase
+{
+protected:
+ // Event handlers
+ void OnNotebookPageChanged(wxNotebookEvent& event);
+ void OnClose(wxCloseEvent& event);
+ void OnIconize(wxIconizeEvent& event);
+ void OnMouseEvents(wxMouseEvent& event);
+ void OnKeyDown(wxKeyEvent& event) { HandleCtrlA(event); }
+ void OnIdle(wxIdleEvent& event);
+ void OnPaint(wxPaintEvent& event);
+ void OnPaintListCtrl(wxPaintEvent& event);
+ void OnMenuFileExit(wxCommandEvent& event);
+ void OnUpdateUIOptionsGenerate(wxUpdateUIEvent& event);
+ void OnMenuOptionsChangeYourAddress(wxCommandEvent& event);
+ void OnMenuOptionsOptions(wxCommandEvent& event);
+ void OnMenuHelpAbout(wxCommandEvent& event);
+ void OnButtonSend(wxCommandEvent& event);
+ void OnButtonAddressBook(wxCommandEvent& event);
+ void OnSetFocusAddress(wxFocusEvent& event);
+ void OnMouseEventsAddress(wxMouseEvent& event);
+ void OnButtonNew(wxCommandEvent& event);
+ void OnButtonCopy(wxCommandEvent& event);
+ void OnListColBeginDrag(wxListEvent& event);
+ void OnListItemActivated(wxListEvent& event);
+ void OnListItemActivatedProductsSent(wxListEvent& event);
+ void OnListItemActivatedOrdersSent(wxListEvent& event);
+ void OnListItemActivatedOrdersReceived(wxListEvent& event);
+
+public:
+ /** Constructor */
+ CMainFrame(wxWindow* parent);
+ ~CMainFrame();
+
+ // Custom
+ enum
+ {
+ ALL = 0,
+ SENTRECEIVED = 1,
+ SENT = 2,
+ RECEIVED = 3,
+ };
+ int nPage;
+ wxListCtrl* m_listCtrl;
+ bool fShowGenerated;
+ bool fShowSent;
+ bool fShowReceived;
+ bool fRefreshListCtrl;
+ bool fRefreshListCtrlRunning;
+ bool fOnSetFocusAddress;
+ unsigned int nListViewUpdated;
+ bool fRefresh;
+
+ void OnUIThreadCall(wxCommandEvent& event);
+ int GetSortIndex(const std::string& strSort);
+ void InsertLine(bool fNew, int nIndex, uint256 hashKey, std::string strSort, const wxColour& colour, const wxString& str1, const wxString& str2, const wxString& str3, const wxString& str4, const wxString& str5);
+ bool DeleteLine(uint256 hashKey);
+ bool InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex=-1);
+ void RefreshListCtrl();
+ void RefreshStatusColumn();
+};
+
+
+
+
+class CTxDetailsDialog : public CTxDetailsDialogBase
+{
+protected:
+ // Event handlers
+ void OnButtonOK(wxCommandEvent& event);
+
+public:
+ /** Constructor */
+ CTxDetailsDialog(wxWindow* parent, CWalletTx wtx);
+
+ // State
+ CWalletTx wtx;
+};
+
+
+
+class COptionsDialog : public COptionsDialogBase
+{
+protected:
+ // Event handlers
+ void OnListBox(wxCommandEvent& event);
+ void OnKillFocusTransactionFee(wxFocusEvent& event);
+ void OnCheckBoxUseProxy(wxCommandEvent& event);
+ void OnKillFocusProxy(wxFocusEvent& event);
+
+ void OnButtonOK(wxCommandEvent& event);
+ void OnButtonCancel(wxCommandEvent& event);
+ void OnButtonApply(wxCommandEvent& event);
+
+public:
+ /** Constructor */
+ COptionsDialog(wxWindow* parent);
+
+ // Custom
+ bool fTmpStartOnSystemStartup;
+ bool fTmpMinimizeOnClose;
+ void SelectPage(int nPage);
+ CAddress GetProxyAddr();
+};
+
+
+
+class CAboutDialog : public CAboutDialogBase
+{
+protected:
+ // Event handlers
+ void OnButtonOK(wxCommandEvent& event);
+
+public:
+ /** Constructor */
+ CAboutDialog(wxWindow* parent);
+};
+
+
+
+class CSendDialog : public CSendDialogBase
+{
+protected:
+ // Event handlers
+ void OnKeyDown(wxKeyEvent& event) { HandleCtrlA(event); }
+ void OnKillFocusAmount(wxFocusEvent& event);
+ void OnButtonAddressBook(wxCommandEvent& event);
+ void OnButtonPaste(wxCommandEvent& event);
+ void OnButtonSend(wxCommandEvent& event);
+ void OnButtonCancel(wxCommandEvent& event);
+
+public:
+ /** Constructor */
+ CSendDialog(wxWindow* parent, const wxString& strAddress="");
+
+ // Custom
+ bool fEnabledPrev;
+ std::string strFromSave;
+ std::string strMessageSave;
+};
+
+
+
+class CSendingDialog : public CSendingDialogBase
+{
+public:
+ // Event handlers
+ void OnClose(wxCloseEvent& event);
+ void OnButtonOK(wxCommandEvent& event);
+ void OnButtonCancel(wxCommandEvent& event);
+ void OnPaint(wxPaintEvent& event);
+
+public:
+ /** Constructor */
+ CSendingDialog(wxWindow* parent, const CAddress& addrIn, int64 nPriceIn, const CWalletTx& wtxIn);
+ ~CSendingDialog();
+
+ // State
+ CAddress addr;
+ int64 nPrice;
+ CWalletTx wtx;
+ wxDateTime start;
+ char pszStatus[10000];
+ bool fCanCancel;
+ bool fAbort;
+ bool fSuccess;
+ bool fUIDone;
+ bool fWorkDone;
+
+ void Close();
+ void Repaint();
+ bool Status();
+ bool Status(const std::string& str);
+ bool Error(const std::string& str);
+ void StartTransfer();
+ void OnReply2(CDataStream& vRecv);
+ void OnReply3(CDataStream& vRecv);
+};
+
+void SendingDialogStartTransfer(void* parg);
+void SendingDialogOnReply2(void* parg, CDataStream& vRecv);
+void SendingDialogOnReply3(void* parg, CDataStream& vRecv);
+
+
+
+class CAddressBookDialog : public CAddressBookDialogBase
+{
+protected:
+ // Event handlers
+ void OnNotebookPageChanged(wxNotebookEvent& event);
+ void OnListEndLabelEdit(wxListEvent& event);
+ void OnListItemSelected(wxListEvent& event);
+ void OnListItemActivated(wxListEvent& event);
+ void OnButtonDelete(wxCommandEvent& event);
+ void OnButtonCopy(wxCommandEvent& event);
+ void OnButtonEdit(wxCommandEvent& event);
+ void OnButtonNew(wxCommandEvent& event);
+ void OnButtonOK(wxCommandEvent& event);
+ void OnButtonCancel(wxCommandEvent& event);
+ void OnClose(wxCloseEvent& event);
+
+public:
+ /** Constructor */
+ CAddressBookDialog(wxWindow* parent, const wxString& strInitSelected, int nPageIn, bool fDuringSendIn);
+
+ // Custom
+ enum
+ {
+ SENDING = 0,
+ RECEIVING = 1,
+ };
+ int nPage;
+ wxListCtrl* m_listCtrl;
+ bool fDuringSend;
+ wxString GetAddress();
+ wxString GetSelectedAddress();
+ wxString GetSelectedSendingAddress();
+ wxString GetSelectedReceivingAddress();
+ bool CheckIfMine(const std::string& strAddress, const std::string& strTitle);
+};
+
+
+
+class CGetTextFromUserDialog : public CGetTextFromUserDialogBase
+{
+protected:
+ // Event handlers
+ void OnButtonOK(wxCommandEvent& event) { EndModal(true); }
+ void OnButtonCancel(wxCommandEvent& event) { EndModal(false); }
+ void OnClose(wxCloseEvent& event) { EndModal(false); }
+
+ void OnKeyDown(wxKeyEvent& event)
+ {
+ if (event.GetKeyCode() == '\r' || event.GetKeyCode() == WXK_NUMPAD_ENTER)
+ EndModal(true);
+ else
+ HandleCtrlA(event);
+ }
+
+public:
+ /** Constructor */
+ CGetTextFromUserDialog(wxWindow* parent,
+ const std::string& strCaption,
+ const std::string& strMessage1,
+ const std::string& strValue1="",
+ const std::string& strMessage2="",
+ const std::string& strValue2="") : CGetTextFromUserDialogBase(parent, wxID_ANY, strCaption)
+ {
+ int x = GetSize().GetWidth();
+ int y = GetSize().GetHeight();
+ m_staticTextMessage1->SetLabel(strMessage1);
+ m_textCtrl1->SetValue(strValue1);
+ y += wxString(strMessage1).Freq('\n') * 14;
+ if (!strMessage2.empty())
+ {
+ m_staticTextMessage2->Show(true);
+ m_staticTextMessage2->SetLabel(strMessage2);
+ m_textCtrl2->Show(true);
+ m_textCtrl2->SetValue(strValue2);
+ y += 46 + wxString(strMessage2).Freq('\n') * 14;
+ }
+#ifndef __WXMSW__
+ x = x * 114 / 100;
+ y = y * 114 / 100;
+#endif
+ SetSize(x, y);
+ }
+
+ // Custom
+ std::string GetValue() { return (std::string)m_textCtrl1->GetValue(); }
+ std::string GetValue1() { return (std::string)m_textCtrl1->GetValue(); }
+ std::string GetValue2() { return (std::string)m_textCtrl2->GetValue(); }
+};
+
+
+
+class CMyTaskBarIcon : public wxTaskBarIcon
+{
+protected:
+ // Event handlers
+ void OnLeftButtonDClick(wxTaskBarIconEvent& event);
+ void OnMenuRestore(wxCommandEvent& event);
+ void OnMenuSend(wxCommandEvent& event);
+ void OnMenuOptions(wxCommandEvent& event);
+ void OnUpdateUIGenerate(wxUpdateUIEvent& event);
+ void OnMenuGenerate(wxCommandEvent& event);
+ void OnMenuExit(wxCommandEvent& event);
+
+public:
+ CMyTaskBarIcon() : wxTaskBarIcon()
+ {
+ Show(true);
+ }
+
+ void Show(bool fShow=true);
+ void Hide();
+ void Restore();
+ void UpdateTooltip();
+ virtual wxMenu* CreatePopupMenu();
+
+DECLARE_EVENT_TABLE()
+};
+
+#endif
diff --git a/src/uibase.cpp b/src/uibase.cpp
new file mode 100644
index 0000000000..1b901a1edb
--- /dev/null
+++ b/src/uibase.cpp
@@ -0,0 +1,1008 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Dec 21 2009)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "uibase.h"
+
+#include "xpm/about.xpm"
+#include "xpm/addressbook20.xpm"
+#include "xpm/check.xpm"
+#include "xpm/send20.xpm"
+
+///////////////////////////////////////////////////////////////////////////
+
+CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+ this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ m_menubar = new wxMenuBar( 0 );
+ m_menuFile = new wxMenu();
+ wxMenuItem* m_menuFileExit;
+ m_menuFileExit = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("E&xit") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuFileExit );
+
+ m_menubar->Append( m_menuFile, _("&File") );
+
+ m_menuOptions = new wxMenu();
+ wxMenuItem* m_menuOptionsChangeYourAddress;
+ m_menuOptionsChangeYourAddress = new wxMenuItem( m_menuOptions, wxID_ANY, wxString( _("&Your Receiving Addresses...") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuOptions->Append( m_menuOptionsChangeYourAddress );
+
+ wxMenuItem* m_menuOptionsOptions;
+ m_menuOptionsOptions = new wxMenuItem( m_menuOptions, wxID_PREFERENCES, wxString( _("&Options...") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuOptions->Append( m_menuOptionsOptions );
+
+ m_menubar->Append( m_menuOptions, _("&Settings") );
+
+ m_menuHelp = new wxMenu();
+ wxMenuItem* m_menuHelpAbout;
+ m_menuHelpAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuHelpAbout );
+
+ m_menubar->Append( m_menuHelp, _("&Help") );
+
+ this->SetMenuBar( m_menubar );
+
+ m_toolBar = this->CreateToolBar( wxTB_FLAT|wxTB_HORZ_TEXT, wxID_ANY );
+ m_toolBar->SetToolBitmapSize( wxSize( 20,20 ) );
+ m_toolBar->SetToolSeparation( 1 );
+ m_toolBar->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ m_toolBar->AddTool( wxID_BUTTONSEND, _("Send Coins"), wxBitmap( send20_xpm ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
+ m_toolBar->AddTool( wxID_BUTTONRECEIVE, _("Address Book"), wxBitmap( addressbook20_xpm ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
+ m_toolBar->Realize();
+
+ m_statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
+ wxBoxSizer* bSizer2;
+ bSizer2 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer2->Add( 0, 2, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer85;
+ bSizer85 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText32 = new wxStaticText( this, wxID_ANY, _("Your Bitcoin Address:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText32->Wrap( -1 );
+ bSizer85->Add( m_staticText32, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ m_textCtrlAddress = new wxTextCtrl( this, wxID_TEXTCTRLADDRESS, wxEmptyString, wxDefaultPosition, wxSize( 340,-1 ), wxTE_READONLY );
+ bSizer85->Add( m_textCtrlAddress, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+ m_buttonNew = new wxButton( this, wxID_BUTTONNEW, _(" &New... "), wxDefaultPosition, wxSize( -1,-1 ), wxBU_EXACTFIT );
+ bSizer85->Add( m_buttonNew, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonCopy = new wxButton( this, wxID_BUTTONCOPY, _(" &Copy to Clipboard "), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+ bSizer85->Add( m_buttonCopy, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+
+ bSizer85->Add( 0, 0, 0, wxEXPAND, 5 );
+
+ bSizer2->Add( bSizer85, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer3;
+ bSizer3 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer66;
+ bSizer66 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText41 = new wxStaticText( this, wxID_ANY, _("Balance:"), wxDefaultPosition, wxSize( -1,15 ), 0 );
+ m_staticText41->Wrap( -1 );
+ bSizer66->Add( m_staticText41, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_staticTextBalance = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 120,15 ), wxALIGN_RIGHT|wxST_NO_AUTORESIZE );
+ m_staticTextBalance->Wrap( -1 );
+ m_staticTextBalance->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) );
+ m_staticTextBalance->SetBackgroundColour( wxColour( 255, 255, 255 ) );
+
+ bSizer66->Add( m_staticTextBalance, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ bSizer3->Add( bSizer66, 1, wxEXPAND|wxALL, 5 );
+
+
+ bSizer3->Add( 0, 0, 0, wxEXPAND, 5 );
+
+ wxString m_choiceFilterChoices[] = { _(" All"), _(" Sent"), _(" Received"), _(" In Progress") };
+ int m_choiceFilterNChoices = sizeof( m_choiceFilterChoices ) / sizeof( wxString );
+ m_choiceFilter = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxSize( 110,-1 ), m_choiceFilterNChoices, m_choiceFilterChoices, 0 );
+ m_choiceFilter->SetSelection( 0 );
+ m_choiceFilter->Hide();
+
+ bSizer3->Add( m_choiceFilter, 0, wxALIGN_BOTTOM|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ bSizer2->Add( bSizer3, 0, wxEXPAND, 5 );
+
+ m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_panel9 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer11;
+ bSizer11 = new wxBoxSizer( wxVERTICAL );
+
+ m_listCtrlAll = new wxListCtrl( m_panel9, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING );
+ bSizer11->Add( m_listCtrlAll, 1, wxEXPAND, 5 );
+
+ m_panel9->SetSizer( bSizer11 );
+ m_panel9->Layout();
+ bSizer11->Fit( m_panel9 );
+ m_notebook->AddPage( m_panel9, _("All Transactions"), true );
+ m_panel91 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer111;
+ bSizer111 = new wxBoxSizer( wxVERTICAL );
+
+ m_listCtrlSentReceived = new wxListCtrl( m_panel91, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING );
+ bSizer111->Add( m_listCtrlSentReceived, 1, wxEXPAND, 5 );
+
+ m_panel91->SetSizer( bSizer111 );
+ m_panel91->Layout();
+ bSizer111->Fit( m_panel91 );
+ m_notebook->AddPage( m_panel91, _("Sent/Received"), false );
+ m_panel92 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer112;
+ bSizer112 = new wxBoxSizer( wxVERTICAL );
+
+ m_listCtrlSent = new wxListCtrl( m_panel92, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING );
+ bSizer112->Add( m_listCtrlSent, 1, wxEXPAND, 5 );
+
+ m_panel92->SetSizer( bSizer112 );
+ m_panel92->Layout();
+ bSizer112->Fit( m_panel92 );
+ m_notebook->AddPage( m_panel92, _("Sent"), false );
+ m_panel93 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer113;
+ bSizer113 = new wxBoxSizer( wxVERTICAL );
+
+ m_listCtrlReceived = new wxListCtrl( m_panel93, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_DESCENDING );
+ bSizer113->Add( m_listCtrlReceived, 1, wxEXPAND, 5 );
+
+ m_panel93->SetSizer( bSizer113 );
+ m_panel93->Layout();
+ bSizer113->Fit( m_panel93 );
+ m_notebook->AddPage( m_panel93, _("Received"), false );
+
+ bSizer2->Add( m_notebook, 1, wxEXPAND, 5 );
+
+ this->SetSizer( bSizer2 );
+ this->Layout();
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CMainFrameBase::OnClose ) );
+ this->Connect( wxEVT_ICONIZE, wxIconizeEventHandler( CMainFrameBase::OnIconize ) );
+ this->Connect( wxEVT_IDLE, wxIdleEventHandler( CMainFrameBase::OnIdle ) );
+ this->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Connect( wxEVT_MOTION, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Connect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Connect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaint ) );
+ this->Connect( m_menuFileExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuFileExit ) );
+ this->Connect( m_menuOptionsChangeYourAddress->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsChangeYourAddress ) );
+ this->Connect( m_menuOptionsOptions->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsOptions ) );
+ this->Connect( m_menuHelpAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuHelpAbout ) );
+ this->Connect( wxID_BUTTONSEND, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonSend ) );
+ this->Connect( wxID_BUTTONRECEIVE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonAddressBook ) );
+ m_textCtrlAddress->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CMainFrameBase::OnKeyDown ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_MOTION, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( CMainFrameBase::OnSetFocusAddress ), NULL, this );
+ m_buttonNew->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonNew ), NULL, this );
+ m_buttonCopy->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonCopy ), NULL, this );
+ m_notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( CMainFrameBase::OnNotebookPageChanged ), NULL, this );
+ m_listCtrlAll->Connect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this );
+ m_listCtrlAll->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this );
+ m_listCtrlAll->Connect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this );
+ m_listCtrlSentReceived->Connect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this );
+ m_listCtrlSentReceived->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this );
+ m_listCtrlSentReceived->Connect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this );
+ m_listCtrlSent->Connect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this );
+ m_listCtrlSent->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this );
+ m_listCtrlSent->Connect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this );
+ m_listCtrlReceived->Connect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this );
+ m_listCtrlReceived->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this );
+ m_listCtrlReceived->Connect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this );
+}
+
+CMainFrameBase::~CMainFrameBase()
+{
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CMainFrameBase::OnClose ) );
+ this->Disconnect( wxEVT_ICONIZE, wxIconizeEventHandler( CMainFrameBase::OnIconize ) );
+ this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( CMainFrameBase::OnIdle ) );
+ this->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Disconnect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Disconnect( wxEVT_MIDDLE_UP, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Disconnect( wxEVT_MOTION, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Disconnect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Disconnect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Disconnect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Disconnect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
+ this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaint ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuFileExit ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsChangeYourAddress ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsOptions ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuHelpAbout ) );
+ this->Disconnect( wxID_BUTTONSEND, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonSend ) );
+ this->Disconnect( wxID_BUTTONRECEIVE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonAddressBook ) );
+ m_textCtrlAddress->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CMainFrameBase::OnKeyDown ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_MIDDLE_UP, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_MOTION, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( CMainFrameBase::OnSetFocusAddress ), NULL, this );
+ m_buttonNew->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonNew ), NULL, this );
+ m_buttonCopy->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonCopy ), NULL, this );
+ m_notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( CMainFrameBase::OnNotebookPageChanged ), NULL, this );
+ m_listCtrlAll->Disconnect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this );
+ m_listCtrlAll->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this );
+ m_listCtrlAll->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this );
+ m_listCtrlSentReceived->Disconnect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this );
+ m_listCtrlSentReceived->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this );
+ m_listCtrlSentReceived->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this );
+ m_listCtrlSent->Disconnect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this );
+ m_listCtrlSent->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this );
+ m_listCtrlSent->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this );
+ m_listCtrlReceived->Disconnect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this );
+ m_listCtrlReceived->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this );
+ m_listCtrlReceived->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this );
+}
+
+CTxDetailsDialogBase::CTxDetailsDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer64;
+ bSizer64 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer66;
+ bSizer66 = new wxBoxSizer( wxVERTICAL );
+
+ m_htmlWin = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
+ bSizer66->Add( m_htmlWin, 1, wxALL|wxEXPAND, 5 );
+
+ bSizer64->Add( bSizer66, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer65;
+ bSizer65 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer65->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ bSizer64->Add( bSizer65, 0, wxALIGN_RIGHT, 5 );
+
+ this->SetSizer( bSizer64 );
+ this->Layout();
+
+ // Connect Events
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CTxDetailsDialogBase::OnButtonOK ), NULL, this );
+}
+
+CTxDetailsDialogBase::~CTxDetailsDialogBase()
+{
+ // Disconnect Events
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CTxDetailsDialogBase::OnButtonOK ), NULL, this );
+}
+
+COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer55;
+ bSizer55 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer66;
+ bSizer66 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_listBox = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxSize( 110,-1 ), 0, NULL, wxLB_NEEDED_SB|wxLB_SINGLE );
+ bSizer66->Add( m_listBox, 0, wxEXPAND|wxRIGHT, 5 );
+
+ m_scrolledWindow = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_scrolledWindow->SetScrollRate( 5, 5 );
+ wxBoxSizer* bSizer63;
+ bSizer63 = new wxBoxSizer( wxVERTICAL );
+
+ m_panelMain = new wxPanel( m_scrolledWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer69;
+ bSizer69 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer69->Add( 0, 16, 0, wxEXPAND, 5 );
+
+ m_checkBoxStartOnSystemStartup = new wxCheckBox( m_panelMain, wxID_ANY, _("&Start Bitcoin on system startup"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer69->Add( m_checkBoxStartOnSystemStartup, 0, wxALL, 5 );
+
+ m_checkBoxMinimizeToTray = new wxCheckBox( m_panelMain, wxID_ANY, _("&Minimize to the tray instead of the taskbar"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer69->Add( m_checkBoxMinimizeToTray, 0, wxALL, 5 );
+
+ m_checkBoxUseUPnP = new wxCheckBox( m_panelMain, wxID_ANY, _("Map port using &UPnP"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer69->Add( m_checkBoxUseUPnP, 0, wxALL, 5 );
+
+ m_checkBoxMinimizeOnClose = new wxCheckBox( m_panelMain, wxID_ANY, _("M&inimize to the tray on close"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer69->Add( m_checkBoxMinimizeOnClose, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer102;
+ bSizer102 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_checkBoxUseProxy = new wxCheckBox( m_panelMain, wxID_ANY, _("&Connect through socks4 proxy: "), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer102->Add( m_checkBoxUseProxy, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer69->Add( bSizer102, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer103;
+ bSizer103 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer103->Add( 18, 0, 0, 0, 5 );
+
+ m_staticTextProxyIP = new wxStaticText( m_panelMain, wxID_ANY, _("Proxy &IP:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextProxyIP->Wrap( -1 );
+ bSizer103->Add( m_staticTextProxyIP, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlProxyIP = new wxTextCtrl( m_panelMain, wxID_PROXYIP, wxEmptyString, wxDefaultPosition, wxSize( 140,-1 ), 0 );
+ m_textCtrlProxyIP->SetMaxLength( 15 );
+ bSizer103->Add( m_textCtrlProxyIP, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextProxyPort = new wxStaticText( m_panelMain, wxID_ANY, _(" &Port:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextProxyPort->Wrap( -1 );
+ bSizer103->Add( m_staticTextProxyPort, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlProxyPort = new wxTextCtrl( m_panelMain, wxID_PROXYPORT, wxEmptyString, wxDefaultPosition, wxSize( 55,-1 ), 0 );
+ m_textCtrlProxyPort->SetMaxLength( 5 );
+ bSizer103->Add( m_textCtrlProxyPort, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer69->Add( bSizer103, 1, wxEXPAND, 5 );
+
+
+ bSizer69->Add( 0, 1, 0, 0, 5 );
+
+ m_staticText32 = new wxStaticText( m_panelMain, wxID_ANY, _("Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText32->Wrap( 365 );
+ bSizer69->Add( m_staticText32, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer56;
+ bSizer56 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText31 = new wxStaticText( m_panelMain, wxID_ANY, _("Pay transaction fee:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText31->Wrap( -1 );
+ bSizer56->Add( m_staticText31, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_textCtrlTransactionFee = new wxTextCtrl( m_panelMain, wxID_TRANSACTIONFEE, wxEmptyString, wxDefaultPosition, wxSize( 70,-1 ), 0 );
+ bSizer56->Add( m_textCtrlTransactionFee, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ bSizer69->Add( bSizer56, 0, wxEXPAND, 5 );
+
+ m_panelMain->SetSizer( bSizer69 );
+ m_panelMain->Layout();
+ bSizer69->Fit( m_panelMain );
+ bSizer63->Add( m_panelMain, 0, wxEXPAND, 5 );
+
+ m_panelTest2 = new wxPanel( m_scrolledWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer64;
+ bSizer64 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer64->Add( 0, 16, 0, wxEXPAND, 5 );
+
+ m_staticText321 = new wxStaticText( m_panelTest2, wxID_ANY, _("// [don't translate] Test panel 2 for future expansion"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText321->Wrap( -1 );
+ bSizer64->Add( m_staticText321, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_staticText69 = new wxStaticText( m_panelTest2, wxID_ANY, _("// [don't translate] Let's not start multiple pages until the first page is filled up"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText69->Wrap( -1 );
+ bSizer64->Add( m_staticText69, 0, wxALL, 5 );
+
+ m_panelTest2->SetSizer( bSizer64 );
+ m_panelTest2->Layout();
+ bSizer64->Fit( m_panelTest2 );
+ bSizer63->Add( m_panelTest2, 0, wxEXPAND, 5 );
+
+ m_scrolledWindow->SetSizer( bSizer63 );
+ m_scrolledWindow->Layout();
+ bSizer63->Fit( m_scrolledWindow );
+ bSizer66->Add( m_scrolledWindow, 1, wxEXPAND|wxLEFT, 5 );
+
+ bSizer55->Add( bSizer66, 1, wxEXPAND|wxALL, 9 );
+
+ wxBoxSizer* bSizer58;
+ bSizer58 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer58->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer58->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonApply = new wxButton( this, wxID_APPLY, _("&Apply"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer58->Add( m_buttonApply, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ bSizer55->Add( bSizer58, 0, wxALIGN_RIGHT, 5 );
+
+ this->SetSizer( bSizer55 );
+ this->Layout();
+
+ // Connect Events
+ m_listBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( COptionsDialogBase::OnListBox ), NULL, this );
+ m_checkBoxMinimizeToTray->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnCheckBoxMinimizeToTray ), NULL, this );
+ m_checkBoxUseProxy->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnCheckBoxUseProxy ), NULL, this );
+ m_textCtrlProxyIP->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( COptionsDialogBase::OnKillFocusProxy ), NULL, this );
+ m_textCtrlProxyPort->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( COptionsDialogBase::OnKillFocusProxy ), NULL, this );
+ m_textCtrlTransactionFee->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( COptionsDialogBase::OnKillFocusTransactionFee ), NULL, this );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnButtonOK ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnButtonCancel ), NULL, this );
+ m_buttonApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnButtonApply ), NULL, this );
+}
+
+COptionsDialogBase::~COptionsDialogBase()
+{
+ // Disconnect Events
+ m_listBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( COptionsDialogBase::OnListBox ), NULL, this );
+ m_checkBoxMinimizeToTray->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnCheckBoxMinimizeToTray ), NULL, this );
+ m_checkBoxUseProxy->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnCheckBoxUseProxy ), NULL, this );
+ m_textCtrlProxyIP->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( COptionsDialogBase::OnKillFocusProxy ), NULL, this );
+ m_textCtrlProxyPort->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( COptionsDialogBase::OnKillFocusProxy ), NULL, this );
+ m_textCtrlTransactionFee->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( COptionsDialogBase::OnKillFocusTransactionFee ), NULL, this );
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnButtonOK ), NULL, this );
+ m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnButtonCancel ), NULL, this );
+ m_buttonApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnButtonApply ), NULL, this );
+}
+
+CAboutDialogBase::CAboutDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer63;
+ bSizer63 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmap = new wxStaticBitmap( this, wxID_ANY, wxBitmap( about_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer63->Add( m_bitmap, 0, 0, 5 );
+
+ wxBoxSizer* bSizer60;
+ bSizer60 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer62;
+ bSizer62 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer631;
+ bSizer631 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer631->Add( 0, 65, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer64;
+ bSizer64 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText40 = new wxStaticText( this, wxID_ANY, _("Bitcoin "), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText40->Wrap( -1 );
+ m_staticText40->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) );
+
+ bSizer64->Add( m_staticText40, 0, wxALIGN_BOTTOM|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_staticTextVersion = new wxStaticText( this, wxID_ANY, _("version"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextVersion->Wrap( -1 );
+ m_staticTextVersion->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
+
+ bSizer64->Add( m_staticTextVersion, 0, wxALIGN_BOTTOM|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+ bSizer631->Add( bSizer64, 0, wxEXPAND, 5 );
+
+
+ bSizer631->Add( 0, 4, 0, wxEXPAND, 5 );
+
+ m_staticTextMain = new wxStaticText( this, wxID_ANY, _("Copyright (c) 2009-2011 Bitcoin Developers\n\nThis is experimental software.\n\nDistributed under the MIT/X11 software license, see the accompanying file \nlicense.txt or http://www.opensource.org/licenses/mit-license.php.\n\nThis product includes software developed by the OpenSSL Project for use in the \nOpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \nEric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMain->Wrap( -1 );
+ bSizer631->Add( m_staticTextMain, 0, wxALL, 5 );
+
+
+ bSizer631->Add( 0, 0, 0, wxEXPAND, 5 );
+
+ bSizer62->Add( bSizer631, 1, wxEXPAND, 5 );
+
+ bSizer60->Add( bSizer62, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer61;
+ bSizer61 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer61->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer61->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 6 );
+
+ bSizer60->Add( bSizer61, 0, wxALIGN_RIGHT|wxEXPAND|wxRIGHT, 2 );
+
+ bSizer63->Add( bSizer60, 1, wxEXPAND|wxLEFT, 5 );
+
+ this->SetSizer( bSizer63 );
+ this->Layout();
+
+ // Connect Events
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAboutDialogBase::OnButtonOK ), NULL, this );
+}
+
+CAboutDialogBase::~CAboutDialogBase()
+{
+ // Disconnect Events
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAboutDialogBase::OnButtonOK ), NULL, this );
+}
+
+CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer21;
+ bSizer21 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer21->Add( 0, 5, 0, wxEXPAND, 5 );
+
+ wxFlexGridSizer* fgSizer1;
+ fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
+ fgSizer1->AddGrowableCol( 1 );
+ fgSizer1->SetFlexibleDirection( wxBOTH );
+ fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+
+ fgSizer1->Add( 0, 0, 0, wxEXPAND, 5 );
+
+ m_staticTextInstructions = new wxStaticText( this, wxID_ANY, _("Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextInstructions->Wrap( -1 );
+ fgSizer1->Add( m_staticTextInstructions, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer47;
+ bSizer47 = new wxBoxSizer( wxHORIZONTAL );
+
+ bSizer47->SetMinSize( wxSize( 70,-1 ) );
+
+ bSizer47->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_bitmapCheckMark = new wxStaticBitmap( this, wxID_ANY, wxBitmap( check_xpm ), wxDefaultPosition, wxSize( 16,16 ), 0 );
+ bSizer47->Add( m_bitmapCheckMark, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticText36 = new wxStaticText( this, wxID_ANY, _("Pay &To:"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_RIGHT );
+ m_staticText36->Wrap( -1 );
+ bSizer47->Add( m_staticText36, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ fgSizer1->Add( bSizer47, 1, wxEXPAND|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer19;
+ bSizer19 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_textCtrlAddress = new wxTextCtrl( this, wxID_TEXTCTRLPAYTO, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer19->Add( m_textCtrlAddress, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ wxBoxSizer* bSizer66;
+ bSizer66 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonPaste = new wxButton( this, wxID_BUTTONPASTE, _("&Paste"), wxDefaultPosition, wxSize( -1,-1 ), wxBU_EXACTFIT );
+ bSizer66->Add( m_buttonPaste, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND, 5 );
+
+ m_buttonAddress = new wxButton( this, wxID_BUTTONADDRESSBOOK, _(" Address &Book..."), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer66->Add( m_buttonAddress, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND, 5 );
+
+ bSizer19->Add( bSizer66, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ fgSizer1->Add( bSizer19, 1, wxEXPAND|wxRIGHT, 5 );
+
+ m_staticText19 = new wxStaticText( this, wxID_ANY, _("&Amount:"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_RIGHT );
+ m_staticText19->Wrap( -1 );
+ fgSizer1->Add( m_staticText19, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT, 5 );
+
+ m_textCtrlAmount = new wxTextCtrl( this, wxID_TEXTCTRLAMOUNT, wxEmptyString, wxDefaultPosition, wxSize( 145,-1 ), 0 );
+ m_textCtrlAmount->SetMaxLength( 20 );
+ m_textCtrlAmount->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ fgSizer1->Add( m_textCtrlAmount, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_staticText20 = new wxStaticText( this, wxID_ANY, _("T&ransfer:"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_RIGHT );
+ m_staticText20->Wrap( -1 );
+ m_staticText20->Hide();
+
+ fgSizer1->Add( m_staticText20, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ wxString m_choiceTransferTypeChoices[] = { _(" Standard") };
+ int m_choiceTransferTypeNChoices = sizeof( m_choiceTransferTypeChoices ) / sizeof( wxString );
+ m_choiceTransferType = new wxChoice( this, wxID_CHOICETRANSFERTYPE, wxDefaultPosition, wxDefaultSize, m_choiceTransferTypeNChoices, m_choiceTransferTypeChoices, 0 );
+ m_choiceTransferType->SetSelection( 0 );
+ m_choiceTransferType->Hide();
+
+ fgSizer1->Add( m_choiceTransferType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ fgSizer1->Add( 0, 3, 0, wxEXPAND, 5 );
+
+
+ fgSizer1->Add( 0, 0, 0, wxEXPAND, 5 );
+
+ bSizer21->Add( fgSizer1, 0, wxEXPAND|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer672;
+ bSizer672 = new wxBoxSizer( wxHORIZONTAL );
+
+ bSizer21->Add( bSizer672, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer23;
+ bSizer23 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer23->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_buttonSend = new wxButton( this, wxID_BUTTONSEND, _("&Send"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonSend->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer23->Add( m_buttonSend, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer23->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ bSizer21->Add( bSizer23, 0, wxEXPAND, 5 );
+
+ this->SetSizer( bSizer21 );
+ this->Layout();
+
+ // Connect Events
+ m_textCtrlAddress->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CSendDialogBase::OnKeyDown ), NULL, this );
+ m_textCtrlAddress->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( CSendDialogBase::OnTextAddress ), NULL, this );
+ m_buttonPaste->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CSendDialogBase::OnButtonPaste ), NULL, this );
+ m_buttonAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CSendDialogBase::OnButtonAddressBook ), NULL, this );
+ m_textCtrlAmount->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CSendDialogBase::OnKeyDown ), NULL, this );
+ m_textCtrlAmount->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( CSendDialogBase::OnKillFocusAmount ), NULL, this );
+ m_buttonSend->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CSendDialogBase::OnButtonSend ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CSendDialogBase::OnButtonCancel ), NULL, this );
+}
+
+CSendDialogBase::~CSendDialogBase()
+{
+ // Disconnect Events
+ m_textCtrlAddress->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CSendDialogBase::OnKeyDown ), NULL, this );
+ m_textCtrlAddress->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( CSendDialogBase::OnTextAddress ), NULL, this );
+ m_buttonPaste->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CSendDialogBase::OnButtonPaste ), NULL, this );
+ m_buttonAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CSendDialogBase::OnButtonAddressBook ), NULL, this );
+ m_textCtrlAmount->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CSendDialogBase::OnKeyDown ), NULL, this );
+ m_textCtrlAmount->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( CSendDialogBase::OnKillFocusAmount ), NULL, this );
+ m_buttonSend->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CSendDialogBase::OnButtonSend ), NULL, this );
+ m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CSendDialogBase::OnButtonCancel ), NULL, this );
+}
+
+CSendingDialogBase::CSendingDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer68;
+ bSizer68 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextSending = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,14 ), 0 );
+ m_staticTextSending->Wrap( -1 );
+ bSizer68->Add( m_staticTextSending, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
+
+ m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, _("\n\nConnecting..."), wxDefaultPosition, wxDefaultSize, wxTE_CENTRE|wxTE_MULTILINE|wxTE_NO_VSCROLL|wxTE_READONLY|wxNO_BORDER );
+ m_textCtrlStatus->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+
+ bSizer68->Add( m_textCtrlStatus, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
+
+ wxBoxSizer* bSizer69;
+ bSizer69 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer69->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_buttonOK = new wxButton( this, wxID_ANY, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonOK->Enable( false );
+
+ bSizer69->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer69->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ bSizer68->Add( bSizer69, 0, wxEXPAND, 5 );
+
+ this->SetSizer( bSizer68 );
+ this->Layout();
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CSendingDialogBase::OnClose ) );
+ this->Connect( wxEVT_PAINT, wxPaintEventHandler( CSendingDialogBase::OnPaint ) );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CSendingDialogBase::OnButtonOK ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CSendingDialogBase::OnButtonCancel ), NULL, this );
+}
+
+CSendingDialogBase::~CSendingDialogBase()
+{
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CSendingDialogBase::OnClose ) );
+ this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CSendingDialogBase::OnPaint ) );
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CSendingDialogBase::OnButtonOK ), NULL, this );
+ m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CSendingDialogBase::OnButtonCancel ), NULL, this );
+}
+
+CYourAddressDialogBase::CYourAddressDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer68;
+ bSizer68 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer68->Add( 0, 5, 0, wxEXPAND, 5 );
+
+ m_staticText45 = new wxStaticText( this, wxID_ANY, _("These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText45->Wrap( 590 );
+ bSizer68->Add( m_staticText45, 0, wxALL, 5 );
+
+ m_listCtrl = new wxListCtrl( this, wxID_LISTCTRL, wxDefaultPosition, wxDefaultSize, wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_ASCENDING );
+ bSizer68->Add( m_listCtrl, 1, wxALL|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer69;
+ bSizer69 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer69->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_buttonRename = new wxButton( this, wxID_BUTTONRENAME, _("&Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer69->Add( m_buttonRename, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonNew = new wxButton( this, wxID_BUTTONNEW, _(" &New Address... "), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer69->Add( m_buttonNew, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonCopy = new wxButton( this, wxID_BUTTONCOPY, _(" &Copy to Clipboard "), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer69->Add( m_buttonCopy, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer69->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonCancel->Hide();
+
+ bSizer69->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ bSizer68->Add( bSizer69, 0, wxEXPAND, 5 );
+
+ this->SetSizer( bSizer68 );
+ this->Layout();
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CYourAddressDialogBase::OnClose ) );
+ m_listCtrl->Connect( wxEVT_COMMAND_LIST_END_LABEL_EDIT, wxListEventHandler( CYourAddressDialogBase::OnListEndLabelEdit ), NULL, this );
+ m_listCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CYourAddressDialogBase::OnListItemActivated ), NULL, this );
+ m_listCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( CYourAddressDialogBase::OnListItemSelected ), NULL, this );
+ m_buttonRename->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CYourAddressDialogBase::OnButtonRename ), NULL, this );
+ m_buttonNew->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CYourAddressDialogBase::OnButtonNew ), NULL, this );
+ m_buttonCopy->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CYourAddressDialogBase::OnButtonCopy ), NULL, this );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CYourAddressDialogBase::OnButtonOK ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CYourAddressDialogBase::OnButtonCancel ), NULL, this );
+}
+
+CYourAddressDialogBase::~CYourAddressDialogBase()
+{
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CYourAddressDialogBase::OnClose ) );
+ m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_END_LABEL_EDIT, wxListEventHandler( CYourAddressDialogBase::OnListEndLabelEdit ), NULL, this );
+ m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CYourAddressDialogBase::OnListItemActivated ), NULL, this );
+ m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( CYourAddressDialogBase::OnListItemSelected ), NULL, this );
+ m_buttonRename->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CYourAddressDialogBase::OnButtonRename ), NULL, this );
+ m_buttonNew->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CYourAddressDialogBase::OnButtonNew ), NULL, this );
+ m_buttonCopy->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CYourAddressDialogBase::OnButtonCopy ), NULL, this );
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CYourAddressDialogBase::OnButtonOK ), NULL, this );
+ m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CYourAddressDialogBase::OnButtonCancel ), NULL, this );
+}
+
+CAddressBookDialogBase::CAddressBookDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer58;
+ bSizer58 = new wxBoxSizer( wxVERTICAL );
+
+ m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_panelSending = new wxPanel( m_notebook, wxID_PANELSENDING, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer68;
+ bSizer68 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer68->Add( 0, 0, 0, wxEXPAND, 5 );
+
+ m_staticText55 = new wxStaticText( m_panelSending, wxID_ANY, _("Bitcoin Address"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText55->Wrap( -1 );
+ m_staticText55->Hide();
+
+ bSizer68->Add( m_staticText55, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_listCtrlSending = new wxListCtrl( m_panelSending, wxID_LISTCTRLSENDING, wxDefaultPosition, wxDefaultSize, wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_ASCENDING );
+ bSizer68->Add( m_listCtrlSending, 1, wxALL|wxEXPAND, 5 );
+
+ m_panelSending->SetSizer( bSizer68 );
+ m_panelSending->Layout();
+ bSizer68->Fit( m_panelSending );
+ m_notebook->AddPage( m_panelSending, _("Sending"), false );
+ m_panelReceiving = new wxPanel( m_notebook, wxID_PANELRECEIVING, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer681;
+ bSizer681 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer681->Add( 0, 0, 0, wxEXPAND, 5 );
+
+ m_staticText45 = new wxStaticText( m_panelReceiving, wxID_ANY, _("These are your Bitcoin addresses for receiving payments. You can give a different one to each sender to keep track of who is paying you. The highlighted address will be displayed in the main window."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText45->Wrap( 570 );
+ bSizer681->Add( m_staticText45, 0, wxTOP|wxRIGHT|wxLEFT, 6 );
+
+
+ bSizer681->Add( 0, 2, 0, wxEXPAND, 5 );
+
+ m_listCtrlReceiving = new wxListCtrl( m_panelReceiving, wxID_LISTCTRLRECEIVING, wxDefaultPosition, wxDefaultSize, wxLC_NO_SORT_HEADER|wxLC_REPORT|wxLC_SORT_ASCENDING );
+ bSizer681->Add( m_listCtrlReceiving, 1, wxALL|wxEXPAND, 5 );
+
+ m_panelReceiving->SetSizer( bSizer681 );
+ m_panelReceiving->Layout();
+ bSizer681->Fit( m_panelReceiving );
+ m_notebook->AddPage( m_panelReceiving, _("Receiving"), true );
+
+ bSizer58->Add( m_notebook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer69;
+ bSizer69 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer69->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_buttonDelete = new wxButton( this, wxID_BUTTONDELETE, _("&Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer69->Add( m_buttonDelete, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonCopy = new wxButton( this, wxID_BUTTONCOPY, _(" &Copy to Clipboard "), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer69->Add( m_buttonCopy, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonEdit = new wxButton( this, wxID_BUTTONEDIT, _("&Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer69->Add( m_buttonEdit, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonNew = new wxButton( this, wxID_BUTTONNEW, _(" &New Address... "), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer69->Add( m_buttonNew, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer69->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer69->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ bSizer58->Add( bSizer69, 0, wxEXPAND, 5 );
+
+ this->SetSizer( bSizer58 );
+ this->Layout();
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CAddressBookDialogBase::OnClose ) );
+ m_notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( CAddressBookDialogBase::OnNotebookPageChanged ), NULL, this );
+ m_listCtrlSending->Connect( wxEVT_COMMAND_LIST_END_LABEL_EDIT, wxListEventHandler( CAddressBookDialogBase::OnListEndLabelEdit ), NULL, this );
+ m_listCtrlSending->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CAddressBookDialogBase::OnListItemActivated ), NULL, this );
+ m_listCtrlSending->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( CAddressBookDialogBase::OnListItemSelected ), NULL, this );
+ m_listCtrlReceiving->Connect( wxEVT_COMMAND_LIST_END_LABEL_EDIT, wxListEventHandler( CAddressBookDialogBase::OnListEndLabelEdit ), NULL, this );
+ m_listCtrlReceiving->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CAddressBookDialogBase::OnListItemActivated ), NULL, this );
+ m_listCtrlReceiving->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( CAddressBookDialogBase::OnListItemSelected ), NULL, this );
+ m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAddressBookDialogBase::OnButtonDelete ), NULL, this );
+ m_buttonCopy->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAddressBookDialogBase::OnButtonCopy ), NULL, this );
+ m_buttonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAddressBookDialogBase::OnButtonEdit ), NULL, this );
+ m_buttonNew->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAddressBookDialogBase::OnButtonNew ), NULL, this );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAddressBookDialogBase::OnButtonOK ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAddressBookDialogBase::OnButtonCancel ), NULL, this );
+}
+
+CAddressBookDialogBase::~CAddressBookDialogBase()
+{
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CAddressBookDialogBase::OnClose ) );
+ m_notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( CAddressBookDialogBase::OnNotebookPageChanged ), NULL, this );
+ m_listCtrlSending->Disconnect( wxEVT_COMMAND_LIST_END_LABEL_EDIT, wxListEventHandler( CAddressBookDialogBase::OnListEndLabelEdit ), NULL, this );
+ m_listCtrlSending->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CAddressBookDialogBase::OnListItemActivated ), NULL, this );
+ m_listCtrlSending->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( CAddressBookDialogBase::OnListItemSelected ), NULL, this );
+ m_listCtrlReceiving->Disconnect( wxEVT_COMMAND_LIST_END_LABEL_EDIT, wxListEventHandler( CAddressBookDialogBase::OnListEndLabelEdit ), NULL, this );
+ m_listCtrlReceiving->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CAddressBookDialogBase::OnListItemActivated ), NULL, this );
+ m_listCtrlReceiving->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( CAddressBookDialogBase::OnListItemSelected ), NULL, this );
+ m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAddressBookDialogBase::OnButtonDelete ), NULL, this );
+ m_buttonCopy->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAddressBookDialogBase::OnButtonCopy ), NULL, this );
+ m_buttonEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAddressBookDialogBase::OnButtonEdit ), NULL, this );
+ m_buttonNew->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAddressBookDialogBase::OnButtonNew ), NULL, this );
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAddressBookDialogBase::OnButtonOK ), NULL, this );
+ m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAddressBookDialogBase::OnButtonCancel ), NULL, this );
+}
+
+CGetTextFromUserDialogBase::CGetTextFromUserDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer79;
+ bSizer79 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer81;
+ bSizer81 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer81->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_staticTextMessage1 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMessage1->Wrap( -1 );
+ bSizer81->Add( m_staticTextMessage1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrl1 = new wxTextCtrl( this, wxID_TEXTCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
+ bSizer81->Add( m_textCtrl1, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_staticTextMessage2 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMessage2->Wrap( -1 );
+ m_staticTextMessage2->Hide();
+
+ bSizer81->Add( m_staticTextMessage2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrl2 = new wxTextCtrl( this, wxID_TEXTCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
+ m_textCtrl2->Hide();
+
+ bSizer81->Add( m_textCtrl2, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizer81->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ bSizer79->Add( bSizer81, 1, wxEXPAND|wxALL, 10 );
+
+ wxBoxSizer* bSizer80;
+ bSizer80 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer80->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ bSizer80->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer80->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ bSizer79->Add( bSizer80, 0, wxEXPAND, 5 );
+
+ this->SetSizer( bSizer79 );
+ this->Layout();
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CGetTextFromUserDialogBase::OnClose ) );
+ m_textCtrl1->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CGetTextFromUserDialogBase::OnKeyDown ), NULL, this );
+ m_textCtrl2->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CGetTextFromUserDialogBase::OnKeyDown ), NULL, this );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CGetTextFromUserDialogBase::OnButtonOK ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CGetTextFromUserDialogBase::OnButtonCancel ), NULL, this );
+}
+
+CGetTextFromUserDialogBase::~CGetTextFromUserDialogBase()
+{
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CGetTextFromUserDialogBase::OnClose ) );
+ m_textCtrl1->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CGetTextFromUserDialogBase::OnKeyDown ), NULL, this );
+ m_textCtrl2->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CGetTextFromUserDialogBase::OnKeyDown ), NULL, this );
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CGetTextFromUserDialogBase::OnButtonOK ), NULL, this );
+ m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CGetTextFromUserDialogBase::OnButtonCancel ), NULL, this );
+}
diff --git a/src/uibase.h b/src/uibase.h
new file mode 100644
index 0000000000..78f3d1b385
--- /dev/null
+++ b/src/uibase.h
@@ -0,0 +1,421 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Dec 21 2009)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __uibase__
+#define __uibase__
+
+#include <wx/intl.h>
+
+#include <wx/string.h>
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/icon.h>
+#include <wx/menu.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/toolbar.h>
+#include <wx/statusbr.h>
+#include <wx/stattext.h>
+#include <wx/textctrl.h>
+#include <wx/button.h>
+#include <wx/sizer.h>
+#include <wx/choice.h>
+#include <wx/listctrl.h>
+#include <wx/panel.h>
+#include <wx/notebook.h>
+#include <wx/frame.h>
+#include <wx/html/htmlwin.h>
+#include <wx/dialog.h>
+#include <wx/listbox.h>
+#include <wx/checkbox.h>
+#include <wx/scrolwin.h>
+#include <wx/statbmp.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+#define wxID_MAINFRAME 1000
+#define wxID_BUTTONSEND 1001
+#define wxID_BUTTONRECEIVE 1002
+#define wxID_TEXTCTRLADDRESS 1003
+#define wxID_BUTTONNEW 1004
+#define wxID_BUTTONCOPY 1005
+#define wxID_PROXYIP 1006
+#define wxID_PROXYPORT 1007
+#define wxID_TRANSACTIONFEE 1008
+#define wxID_TEXTCTRLPAYTO 1009
+#define wxID_BUTTONPASTE 1010
+#define wxID_BUTTONADDRESSBOOK 1011
+#define wxID_TEXTCTRLAMOUNT 1012
+#define wxID_CHOICETRANSFERTYPE 1013
+#define wxID_LISTCTRL 1014
+#define wxID_BUTTONRENAME 1015
+#define wxID_PANELSENDING 1016
+#define wxID_LISTCTRLSENDING 1017
+#define wxID_PANELRECEIVING 1018
+#define wxID_LISTCTRLRECEIVING 1019
+#define wxID_BUTTONDELETE 1020
+#define wxID_BUTTONEDIT 1021
+#define wxID_TEXTCTRL 1022
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class CMainFrameBase
+///////////////////////////////////////////////////////////////////////////////
+class CMainFrameBase : public wxFrame
+{
+ private:
+
+ protected:
+ wxMenuBar* m_menubar;
+ wxMenu* m_menuFile;
+ wxMenu* m_menuHelp;
+ wxToolBar* m_toolBar;
+
+ wxStaticText* m_staticText32;
+ wxButton* m_buttonNew;
+ wxButton* m_buttonCopy;
+
+ wxStaticText* m_staticText41;
+ wxStaticText* m_staticTextBalance;
+
+ wxChoice* m_choiceFilter;
+ wxNotebook* m_notebook;
+ wxPanel* m_panel9;
+ wxPanel* m_panel91;
+ wxPanel* m_panel92;
+ wxPanel* m_panel93;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); }
+ virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
+ virtual void OnMouseEvents( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnPaint( wxPaintEvent& event ) { event.Skip(); }
+ virtual void OnMenuFileExit( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuOptionsChangeYourAddress( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuOptionsOptions( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuHelpAbout( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonSend( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonAddressBook( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnKeyDown( wxKeyEvent& event ) { event.Skip(); }
+ virtual void OnMouseEventsAddress( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnSetFocusAddress( wxFocusEvent& event ) { event.Skip(); }
+ virtual void OnButtonNew( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonCopy( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnNotebookPageChanged( wxNotebookEvent& event ) { event.Skip(); }
+ virtual void OnListColBeginDrag( wxListEvent& event ) { event.Skip(); }
+ virtual void OnListItemActivated( wxListEvent& event ) { event.Skip(); }
+ virtual void OnPaintListCtrl( wxPaintEvent& event ) { event.Skip(); }
+
+
+ public:
+ wxMenu* m_menuOptions;
+ wxStatusBar* m_statusBar;
+ wxTextCtrl* m_textCtrlAddress;
+ wxListCtrl* m_listCtrlAll;
+ wxListCtrl* m_listCtrlSentReceived;
+ wxListCtrl* m_listCtrlSent;
+ wxListCtrl* m_listCtrlReceived;
+
+ CMainFrameBase( wxWindow* parent, wxWindowID id = wxID_MAINFRAME, const wxString& title = _("Bitcoin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 723,484 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
+ ~CMainFrameBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class CTxDetailsDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class CTxDetailsDialogBase : public wxDialog
+{
+ private:
+
+ protected:
+ wxHtmlWindow* m_htmlWin;
+ wxButton* m_buttonOK;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnButtonOK( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ CTxDetailsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Transaction Details"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 620,450 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~CTxDetailsDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class COptionsDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class COptionsDialogBase : public wxDialog
+{
+ private:
+
+ protected:
+ wxListBox* m_listBox;
+ wxScrolledWindow* m_scrolledWindow;
+ wxPanel* m_panelMain;
+
+ wxCheckBox* m_checkBoxStartOnSystemStartup;
+ wxCheckBox* m_checkBoxMinimizeToTray;
+ wxCheckBox* m_checkBoxUseUPnP;
+ wxCheckBox* m_checkBoxMinimizeOnClose;
+ wxCheckBox* m_checkBoxUseProxy;
+
+ wxStaticText* m_staticTextProxyIP;
+ wxTextCtrl* m_textCtrlProxyIP;
+ wxStaticText* m_staticTextProxyPort;
+ wxTextCtrl* m_textCtrlProxyPort;
+
+ wxStaticText* m_staticText32;
+ wxStaticText* m_staticText31;
+ wxTextCtrl* m_textCtrlTransactionFee;
+ wxPanel* m_panelTest2;
+
+ wxStaticText* m_staticText321;
+ wxStaticText* m_staticText69;
+ wxButton* m_buttonOK;
+ wxButton* m_buttonCancel;
+ wxButton* m_buttonApply;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnListBox( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCheckBoxMinimizeToTray( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCheckBoxUseProxy( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnKillFocusProxy( wxFocusEvent& event ) { event.Skip(); }
+ virtual void OnKillFocusTransactionFee( wxFocusEvent& event ) { event.Skip(); }
+ virtual void OnButtonOK( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonCancel( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonApply( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ COptionsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 540,360 ), long style = wxDEFAULT_DIALOG_STYLE );
+ ~COptionsDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class CAboutDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class CAboutDialogBase : public wxDialog
+{
+ private:
+
+ protected:
+ wxStaticBitmap* m_bitmap;
+
+ wxStaticText* m_staticText40;
+
+ wxStaticText* m_staticTextMain;
+
+
+ wxButton* m_buttonOK;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnButtonOK( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+ wxStaticText* m_staticTextVersion;
+
+ CAboutDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About Bitcoin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 532,333 ), long style = wxDEFAULT_DIALOG_STYLE );
+ ~CAboutDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class CSendDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class CSendDialogBase : public wxDialog
+{
+ private:
+
+ protected:
+
+
+ wxStaticText* m_staticTextInstructions;
+
+ wxStaticBitmap* m_bitmapCheckMark;
+ wxStaticText* m_staticText36;
+ wxTextCtrl* m_textCtrlAddress;
+ wxButton* m_buttonPaste;
+ wxButton* m_buttonAddress;
+ wxStaticText* m_staticText19;
+ wxTextCtrl* m_textCtrlAmount;
+ wxStaticText* m_staticText20;
+ wxChoice* m_choiceTransferType;
+
+
+
+ wxButton* m_buttonSend;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnKeyDown( wxKeyEvent& event ) { event.Skip(); }
+ virtual void OnTextAddress( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonPaste( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonAddressBook( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnKillFocusAmount( wxFocusEvent& event ) { event.Skip(); }
+ virtual void OnButtonSend( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ CSendDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Send Coins"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 498,157 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~CSendDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class CSendingDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class CSendingDialogBase : public wxDialog
+{
+ private:
+
+ protected:
+ wxStaticText* m_staticTextSending;
+ wxTextCtrl* m_textCtrlStatus;
+
+ wxButton* m_buttonOK;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnPaint( wxPaintEvent& event ) { event.Skip(); }
+ virtual void OnButtonOK( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ CSendingDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Sending..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 442,151 ), long style = wxDEFAULT_DIALOG_STYLE );
+ ~CSendingDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class CYourAddressDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class CYourAddressDialogBase : public wxDialog
+{
+ private:
+
+ protected:
+
+ wxStaticText* m_staticText45;
+ wxListCtrl* m_listCtrl;
+
+ wxButton* m_buttonRename;
+ wxButton* m_buttonNew;
+ wxButton* m_buttonCopy;
+ wxButton* m_buttonOK;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnListEndLabelEdit( wxListEvent& event ) { event.Skip(); }
+ virtual void OnListItemActivated( wxListEvent& event ) { event.Skip(); }
+ virtual void OnListItemSelected( wxListEvent& event ) { event.Skip(); }
+ virtual void OnButtonRename( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonNew( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonCopy( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonOK( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ CYourAddressDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Your Bitcoin Addresses"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 610,390 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~CYourAddressDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class CAddressBookDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class CAddressBookDialogBase : public wxDialog
+{
+ private:
+
+ protected:
+ wxNotebook* m_notebook;
+ wxPanel* m_panelSending;
+
+ wxStaticText* m_staticText55;
+ wxListCtrl* m_listCtrlSending;
+ wxPanel* m_panelReceiving;
+
+ wxStaticText* m_staticText45;
+
+ wxListCtrl* m_listCtrlReceiving;
+
+ wxButton* m_buttonDelete;
+ wxButton* m_buttonCopy;
+ wxButton* m_buttonEdit;
+ wxButton* m_buttonNew;
+ wxButton* m_buttonOK;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnNotebookPageChanged( wxNotebookEvent& event ) { event.Skip(); }
+ virtual void OnListEndLabelEdit( wxListEvent& event ) { event.Skip(); }
+ virtual void OnListItemActivated( wxListEvent& event ) { event.Skip(); }
+ virtual void OnListItemSelected( wxListEvent& event ) { event.Skip(); }
+ virtual void OnButtonDelete( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonCopy( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonEdit( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonNew( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonOK( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+ wxButton* m_buttonCancel;
+
+ CAddressBookDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Address Book"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 610,390 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~CAddressBookDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class CGetTextFromUserDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class CGetTextFromUserDialogBase : public wxDialog
+{
+ private:
+
+ protected:
+
+ wxStaticText* m_staticTextMessage1;
+ wxTextCtrl* m_textCtrl1;
+ wxStaticText* m_staticTextMessage2;
+ wxTextCtrl* m_textCtrl2;
+
+
+ wxButton* m_buttonOK;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnKeyDown( wxKeyEvent& event ) { event.Skip(); }
+ virtual void OnButtonOK( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ CGetTextFromUserDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 440,138 ), long style = wxDEFAULT_DIALOG_STYLE );
+ ~CGetTextFromUserDialogBase();
+
+};
+
+#endif //__uibase__
diff --git a/src/xpm/about.xpm b/src/xpm/about.xpm
new file mode 100644
index 0000000000..3fa868ca76
--- /dev/null
+++ b/src/xpm/about.xpm
@@ -0,0 +1,665 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Distributed under the MIT/X11 software license, see the accompanying
+// file license.txt or http://www.opensource.org/licenses/mit-license.php.
+/* XPM */
+static const char * about_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"96 564 92 1",
+" c #001269",
+". c #000C72",
+"X c #00057F",
+"o c #001175",
+"O c #000B6A",
+"+ c #000E84",
+"@ c #000489",
+"# c #001583",
+"$ c #001B89",
+"% c #001B99",
+"& c #000B92",
+"* c #00208B",
+"= c #002B97",
+"- c #0004A6",
+"; c #001DA7",
+": c #0014BC",
+"> c #0019BB",
+", c #0017B4",
+"< c #0023A3",
+"1 c #002CAA",
+"2 c #0030A4",
+"3 c #003BA3",
+"4 c #0033AB",
+"5 c #003FA8",
+"6 c #0027B8",
+"7 c #0035BB",
+"8 c #003CBA",
+"9 c #004ABD",
+"0 c #001DC4",
+"q c #0017CC",
+"w c #000CD0",
+"e c #0026C7",
+"r c #0035C4",
+"t c #003DC5",
+"y c #0032CB",
+"u c #003BCC",
+"i c #002BD3",
+"p c #0021DC",
+"a c #0025D5",
+"s c #0034D5",
+"d c #003ADB",
+"f c #0016F6",
+"g c #0008F9",
+"h c #0027E3",
+"j c #003CE9",
+"k c #002BF5",
+"l c #0024F9",
+"z c #0033F4",
+"x c #0035F8",
+"c c #0048CA",
+"v c #0055C5",
+"b c #0059C3",
+"n c #0053CB",
+"m c #005ACC",
+"M c #004FD4",
+"N c #004CDC",
+"B c #0047D0",
+"V c #005BD6",
+"C c #0049E5",
+"Z c #0042EA",
+"A c #0052E4",
+"S c #005CE4",
+"D c #0054EC",
+"F c #005EEB",
+"G c #004AF5",
+"H c #0051F2",
+"J c #005CFA",
+"K c #0058F9",
+"L c #0066E4",
+"P c #006BE3",
+"I c #0064EC",
+"U c #006DEF",
+"Y c #0074EB",
+"T c #0078EC",
+"R c #0073E7",
+"E c #0065F4",
+"W c #006BF5",
+"Q c #006BFB",
+"! c #0066FD",
+"~ c #0073F5",
+"^ c #007CF3",
+"/ c #0075FB",
+"( c #007DFC",
+") c #0084FF",
+"_ c #008AFF",
+"` c #0092FF",
+"' c #339CFF",
+"] c #33A3FF",
+"[ c #33AAFF",
+"{ c #66B5FF",
+"} c #66BBFF",
+"| c #66C0FF",
+/* pixels */
+"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
+"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
+"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
+"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
+"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
+"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
+"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
+"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
+"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
+"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
+"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
+"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
+"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
+"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
+"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
+"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
+"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
+"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
+"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
+"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
+"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
+"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
+"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
+"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
+"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
+"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
+"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
+"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
+"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
+"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
+"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
+"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
+"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
+"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
+"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
+"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
+"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
+"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
+"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
+"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
+"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
+"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
+"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
+"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
+"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
+"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
+"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
+"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
+"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
+"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
+"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
+"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
+"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
+"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
+"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
+"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
+"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
+"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
+"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
+"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
+"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
+"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
+"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
+" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
+" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
+" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
+" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
+" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
+" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
+" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
+" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
+" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
+" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
+" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
+" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
+"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
+"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
+"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
+"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
+"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
+"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
+"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
+"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
+"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
+"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
+"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
+"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
+"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
+"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
+"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
+"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
+"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
+"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
+"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
+"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
+"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
+"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
+"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
+"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
+"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
+" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
+" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
+" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
+" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
+" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
+" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
+" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
+" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
+" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
+" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
+" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
+" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
+"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
+"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
+"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
+"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
+"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
+"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
+"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
+"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
+"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
+"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
+"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
+"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
+"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
+"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
+"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
+"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
+"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
+"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
+"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
+"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
+"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
+"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
+"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
+"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
+"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
+"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
+"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
+"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
+"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
+"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
+"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
+"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
+"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
+"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
+"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
+"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
+"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
+"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
+"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
+"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
+"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
+"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
+"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
+"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
+"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
+"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
+"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
+"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
+",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
+",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
+",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
+",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
+",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
+",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
+",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
+",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
+",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
+",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
+",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
+",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
+"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
+"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
+"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
+"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
+"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
+"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
+"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
+"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
+"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
+"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
+"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
+"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
+"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
+">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
+"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
+"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
+"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
+"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
+"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
+"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
+"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
+"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
+"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
+"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
+"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
+"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
+"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
+"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
+"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
+"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
+"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
+"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
+"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
+"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
+"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
+"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
+"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
+"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
+"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
+"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
+"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
+"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
+"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
+"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
+"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
+"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
+"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
+"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
+"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
+"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
+"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
+"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
+"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
+"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
+"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
+"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
+"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
+"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
+"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
+"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
+"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
+"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
+"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
+"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
+"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
+"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
+"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
+"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
+"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
+"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
+"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
+"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
+"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
+"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
+"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
+"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
+"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
+"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
+"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
+"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
+"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
+"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
+"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
+"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
+"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
+"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
+"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
+"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
+"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
+"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
+"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{"
+};
diff --git a/src/xpm/addressbook16.xpm b/src/xpm/addressbook16.xpm
new file mode 100644
index 0000000000..e00944ef7a
--- /dev/null
+++ b/src/xpm/addressbook16.xpm
@@ -0,0 +1,278 @@
+/* XPM */
+static const char * addressbook16_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 256 2",
+" c #FFFFFF",
+". c #F7FFFF",
+"X c #F7F7FF",
+"o c #EFF7FF",
+"O c #E6EFF7",
+"+ c #E6E6F7",
+"@ c #CEE6F7",
+"# c #DEDEEF",
+"$ c #D6DEEF",
+"% c #D6DEE6",
+"& c #CEDEF7",
+"* c #CEDEEF",
+"= c #EFF708",
+"- c #C5DEF7",
+"; c #CED6EF",
+": c None",
+"> c #C5D6E6",
+", c #BDD6F7",
+"< c #BDD6EF",
+"1 c #D6CECE",
+"2 c #BDCEE6",
+"3 c #BDC5E6",
+"4 c #B5C5DE",
+"5 c #BDD631",
+"6 c #ADBDDE",
+"7 c #B5B5BD",
+"8 c #A5B5D6",
+"9 c #00FFFF",
+"0 c #9CB5CE",
+"q c #9CADD6",
+"w c #94A5D6",
+"e c #8CA5D6",
+"r c #8CA5CE",
+"t c #8CA5C5",
+"y c #849CC5",
+"u c #7B9CD6",
+"i c #7B9CCE",
+"p c #31BDCE",
+"a c #6B9CD6",
+"s c #00F708",
+"d c #8494AD",
+"f c #7B94B5",
+"g c #6B94D6",
+"h c #6B9C84",
+"j c #7B8CAD",
+"k c #738CAD",
+"l c #638CC5",
+"z c #10CE42",
+"x c #638CBD",
+"c c #7B849C",
+"v c #73849C",
+"b c #6B84A5",
+"n c #7B7BA5",
+"m c #6B849C",
+"M c #7B8C42",
+"N c #5A84C5",
+"B c #29AD6B",
+"V c #F74A4A",
+"C c #6384A5",
+"Z c #5284C5",
+"A c #637BA5",
+"S c #637B9C",
+"D c #9C637B",
+"F c #6B7B5A",
+"G c #637394",
+"H c #52739C",
+"J c #5A7384",
+"K c #526B94",
+"L c #426B94",
+"P c #52638C",
+"I c #426B7B",
+"U c #5A5A8C",
+"Y c #524A7B",
+"T c #425273",
+"R c #21636B",
+"E c #106394",
+"W c #106B52",
+"Q c #3A4273",
+"! c #31426B",
+"~ c #523163",
+"^ c #29426B",
+"/ c #293A63",
+"( c #213A63",
+") c #193A63",
+"_ c #193163",
+"` c #19315A",
+"' c #212963",
+"] c #10315A",
+"[ c #082952",
+"{ c #FFCC33",
+"} c #33FF33",
+"| c #66FF33",
+" . c #99FF33",
+".. c #CCFF33",
+"X. c #FFFF33",
+"o. c #000066",
+"O. c #330066",
+"+. c #660066",
+"@. c #990066",
+"#. c #CC0066",
+"$. c #FF0066",
+"%. c #003366",
+"&. c #333366",
+"*. c #663366",
+"=. c #993366",
+"-. c #CC3366",
+";. c #FF3366",
+":. c #006666",
+">. c #336666",
+",. c #666666",
+"<. c #996666",
+"1. c #CC6666",
+"2. c #009966",
+"3. c #339966",
+"4. c #669966",
+"5. c #999966",
+"6. c #CC9966",
+"7. c #FF9966",
+"8. c #00CC66",
+"9. c #33CC66",
+"0. c #99CC66",
+"q. c #CCCC66",
+"w. c #FFCC66",
+"e. c #00FF66",
+"r. c #33FF66",
+"t. c #99FF66",
+"y. c #CCFF66",
+"u. c #FF00CC",
+"i. c #CC00FF",
+"p. c #009999",
+"a. c #993399",
+"s. c #990099",
+"d. c #CC0099",
+"f. c #000099",
+"g. c #333399",
+"h. c #660099",
+"j. c #CC3399",
+"k. c #FF0099",
+"l. c #006699",
+"z. c #336699",
+"x. c #663399",
+"c. c #996699",
+"v. c #CC6699",
+"b. c #FF3399",
+"n. c #339999",
+"m. c #669999",
+"M. c #999999",
+"N. c #CC9999",
+"B. c #FF9999",
+"V. c #00CC99",
+"C. c #33CC99",
+"Z. c #66CC66",
+"A. c #99CC99",
+"S. c #CCCC99",
+"D. c #FFCC99",
+"F. c #00FF99",
+"G. c #33FF99",
+"H. c #66CC99",
+"J. c #99FF99",
+"K. c #CCFF99",
+"L. c #FFFF99",
+"P. c #0000CC",
+"I. c #330099",
+"U. c #6600CC",
+"Y. c #9900CC",
+"T. c #CC00CC",
+"R. c #003399",
+"E. c #3333CC",
+"W. c #6633CC",
+"Q. c #9933CC",
+"!. c #CC33CC",
+"~. c #FF33CC",
+"^. c #0066CC",
+"/. c #3366CC",
+"(. c #666699",
+"). c #9966CC",
+"_. c #CC66CC",
+"`. c #FF6699",
+"'. c #0099CC",
+"]. c #3399CC",
+"[. c #6699CC",
+"{. c #9999CC",
+"}. c #CC99CC",
+"|. c #FF99CC",
+" X c #00CCCC",
+".X c #33CCCC",
+"XX c #66CCCC",
+"oX c #99CCCC",
+"OX c #CCCCCC",
+"+X c #FFCCCC",
+"@X c #00FFCC",
+"#X c #33FFCC",
+"$X c #66FF99",
+"%X c #99FFCC",
+"&X c #CCFFCC",
+"*X c #FFFFCC",
+"=X c #3300CC",
+"-X c #6600FF",
+";X c #9900FF",
+":X c #0033CC",
+">X c #3333FF",
+",X c #6633FF",
+"<X c #9933FF",
+"1X c #CC33FF",
+"2X c #FF33FF",
+"3X c #0066FF",
+"4X c #3366FF",
+"5X c #6666CC",
+"6X c #9966FF",
+"7X c #CC66FF",
+"8X c #FF66CC",
+"9X c #0099FF",
+"0X c #3399FF",
+"qX c #6699FF",
+"wX c #9999FF",
+"eX c #CC99FF",
+"rX c #FF99FF",
+"tX c #00CCFF",
+"yX c #33CCFF",
+"uX c #66CCFF",
+"iX c #99CCFF",
+"pX c #CCCCFF",
+"aX c #FFCCFF",
+"sX c #33FFFF",
+"dX c #66FFCC",
+"fX c #99FFFF",
+"gX c #CCFFFF",
+"hX c #FF6666",
+"jX c #66FF66",
+"kX c #FFFF66",
+"lX c #6666FF",
+"zX c #FF66FF",
+"xX c #66FFFF",
+"cX c #A50021",
+"vX c #5F5F5F",
+"bX c #777777",
+"nX c #868686",
+"mX c #969696",
+"MX c #CBCBCB",
+"NX c #B2B2B2",
+"BX c #D7D7D7",
+"VX c #DDDDDD",
+"CX c #E3E3E3",
+"ZX c #EAEAEA",
+"AX c #F1F1F1",
+"SX c #F8F8F8",
+"DX c #FFFBF0",
+"FX c #A0A0A4",
+"GX c #808080",
+"HX c #FF0000",
+"JX c #00FF00",
+"KX c #FFFF00",
+"LX c #0000FF",
+"PX c #FF00FF",
+"IX c #00FFFF",
+"UX c #FFFFFF",
+/* pixels */
+": : : : : : : : : : : : : : : : ",
+": : H H H A d : 7 G K H H : : : ",
+"n n c X 4 k j X b n n : ",
+"n 2 c $ 8 6 4 x < + 4 4 C V ~ : ",
+"n * c X o $ y N u 6 $ + b D Y : ",
+"n * c X > g , S z R : ",
+"n * c * r r y g , 6 r q S s W : ",
+"n * c X 4 N u + m B I : ",
+"n * c X ; a - S 5 F : ",
+"n * c * r r r g - S = M : ",
+"n * c X 4 N - m h J : ",
+"n * c X ; a - A 9 E : ",
+"n * ( ] ` ^ P l y T / / ( p L : ",
+"n O > 0 f ) ! t 8 % n : ",
+"U U U U U U U ' Q U U U U U U : ",
+": : : : : : : : : : : : : : : : "
+};
diff --git a/src/xpm/addressbook20.xpm b/src/xpm/addressbook20.xpm
new file mode 100644
index 0000000000..7ebd73fb2f
--- /dev/null
+++ b/src/xpm/addressbook20.xpm
@@ -0,0 +1,282 @@
+/* XPM */
+static const char * addressbook20_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"20 20 256 2",
+" c #FFFFFF",
+". c #F7FFFF",
+"X c #F7F7FF",
+"o c #EFF7FF",
+"O c #EFF7F7",
+"+ c #E6EFFF",
+"@ c #E6EFF7",
+"# c #DEEFFF",
+"$ c #DEE6F7",
+"% c #DEE6EF",
+"& c #D6E6F7",
+"* c #FFFF00",
+"= c #DEDEE6",
+"- c #D6DEE6",
+"; c #D6D6DE",
+": c #CED6E6",
+"> c None",
+", c #C5D6E6",
+"< c #C5CEE6",
+"1 c #B5CEEF",
+"2 c #C5C5C5",
+"3 c #C5DE31",
+"4 c #B5C5DE",
+"5 c #BDC5C5",
+"6 c #ADC5EF",
+"7 c #B5C5CE",
+"8 c #BDBDBD",
+"9 c #B5BDCE",
+"0 c #ADBDDE",
+"q c #ADBDD6",
+"w c #B5CE52",
+"e c #ADB5C5",
+"r c #00FFFF",
+"t c #A5B5C5",
+"y c #9CB5CE",
+"u c #94B5DE",
+"i c #9CADD6",
+"p c #A5ADB5",
+"a c #94ADDE",
+"s c #94ADD6",
+"d c #9CADBD",
+"f c #8CADDE",
+"g c #BD9CA5",
+"h c #9CA5BD",
+"j c #9CA5B5",
+"k c #29D6E6",
+"l c #8CA5CE",
+"z c #849CCE",
+"x c #6BA5C5",
+"c c #739CDE",
+"v c #00FF00",
+"b c #739CD6",
+"n c #7B94CE",
+"m c #8494AD",
+"M c #7394CE",
+"N c #7B94B5",
+"B c #4AB584",
+"V c #848CB5",
+"C c #6B94CE",
+"Z c #6394D6",
+"A c #6394CE",
+"S c #7B8CAD",
+"D c #6B8CC5",
+"F c #738CAD",
+"G c #5294B5",
+"H c #6B84C5",
+"J c #7384A5",
+"K c #73849C",
+"L c #738494",
+"P c #FF4A4A",
+"I c #FF4A42",
+"U c #737B8C",
+"Y c #637BAD",
+"T c #527BBD",
+"R c #637394",
+"E c #637352",
+"W c #5A6B8C",
+"Q c #526B9C",
+"! c #63638C",
+"~ c #5A734A",
+"^ c #4A6B9C",
+"/ c #526B63",
+"( c #0884A5",
+") c #526384",
+"_ c #52637B",
+"` c #4A6B5A",
+"' c #52636B",
+"] c #525A8C",
+"[ c #525A7B",
+"{ c #426363",
+"} c #4A5A7B",
+"| c #425A8C",
+" . c #196B94",
+".. c #3A5A8C",
+"X. c #3A5A84",
+"o. c #087B4A",
+"O. c #21636B",
+"+. c #634263",
+"@. c #3A527B",
+"#. c #424A84",
+"$. c #315284",
+"%. c #295284",
+"&. c #3A4A6B",
+"*. c #42427B",
+"=. c #424273",
+"-. c #294A84",
+";. c #3A3A73",
+":. c #194284",
+">. c #104A63",
+",. c #213A6B",
+"<. c #31316B",
+"1. c #21315A",
+"2. c #212163",
+"3. c #08295A",
+"4. c #082152",
+"5. c #101952",
+"6. c #CC9966",
+"7. c #FF9966",
+"8. c #00CC66",
+"9. c #33CC66",
+"0. c #99CC66",
+"q. c #CCCC66",
+"w. c #FFCC66",
+"e. c #00FF66",
+"r. c #33FF66",
+"t. c #99FF66",
+"y. c #CCFF66",
+"u. c #FF00CC",
+"i. c #CC00FF",
+"p. c #009999",
+"a. c #993399",
+"s. c #990099",
+"d. c #CC0099",
+"f. c #000099",
+"g. c #333399",
+"h. c #660099",
+"j. c #CC3399",
+"k. c #FF0099",
+"l. c #006699",
+"z. c #336699",
+"x. c #663399",
+"c. c #996699",
+"v. c #CC6699",
+"b. c #FF3399",
+"n. c #339999",
+"m. c #669999",
+"M. c #999999",
+"N. c #CC9999",
+"B. c #FF9999",
+"V. c #00CC99",
+"C. c #33CC99",
+"Z. c #66CC66",
+"A. c #99CC99",
+"S. c #CCCC99",
+"D. c #FFCC99",
+"F. c #00FF99",
+"G. c #33FF99",
+"H. c #66CC99",
+"J. c #99FF99",
+"K. c #CCFF99",
+"L. c #FFFF99",
+"P. c #0000CC",
+"I. c #330099",
+"U. c #6600CC",
+"Y. c #9900CC",
+"T. c #CC00CC",
+"R. c #003399",
+"E. c #3333CC",
+"W. c #6633CC",
+"Q. c #9933CC",
+"!. c #CC33CC",
+"~. c #FF33CC",
+"^. c #0066CC",
+"/. c #3366CC",
+"(. c #666699",
+"). c #9966CC",
+"_. c #CC66CC",
+"`. c #FF6699",
+"'. c #0099CC",
+"]. c #3399CC",
+"[. c #6699CC",
+"{. c #9999CC",
+"}. c #CC99CC",
+"|. c #FF99CC",
+" X c #00CCCC",
+".X c #33CCCC",
+"XX c #66CCCC",
+"oX c #99CCCC",
+"OX c #CCCCCC",
+"+X c #FFCCCC",
+"@X c #00FFCC",
+"#X c #33FFCC",
+"$X c #66FF99",
+"%X c #99FFCC",
+"&X c #CCFFCC",
+"*X c #FFFFCC",
+"=X c #3300CC",
+"-X c #6600FF",
+";X c #9900FF",
+":X c #0033CC",
+">X c #3333FF",
+",X c #6633FF",
+"<X c #9933FF",
+"1X c #CC33FF",
+"2X c #FF33FF",
+"3X c #0066FF",
+"4X c #3366FF",
+"5X c #6666CC",
+"6X c #9966FF",
+"7X c #CC66FF",
+"8X c #FF66CC",
+"9X c #0099FF",
+"0X c #3399FF",
+"qX c #6699FF",
+"wX c #9999FF",
+"eX c #CC99FF",
+"rX c #FF99FF",
+"tX c #00CCFF",
+"yX c #33CCFF",
+"uX c #66CCFF",
+"iX c #99CCFF",
+"pX c #CCCCFF",
+"aX c #FFCCFF",
+"sX c #33FFFF",
+"dX c #66FFCC",
+"fX c #99FFFF",
+"gX c #CCFFFF",
+"hX c #FF6666",
+"jX c #66FF66",
+"kX c #FFFF66",
+"lX c #6666FF",
+"zX c #FF66FF",
+"xX c #66FFFF",
+"cX c #A50021",
+"vX c #5F5F5F",
+"bX c #777777",
+"nX c #868686",
+"mX c #969696",
+"MX c #CBCBCB",
+"NX c #B2B2B2",
+"BX c #D7D7D7",
+"VX c #DDDDDD",
+"CX c #E3E3E3",
+"ZX c #EAEAEA",
+"AX c #F1F1F1",
+"SX c #F8F8F8",
+"DX c #FFFBF0",
+"FX c #A0A0A4",
+"GX c #808080",
+"HX c #FF0000",
+"JX c #00FF00",
+"KX c #FFFF00",
+"LX c #0000FF",
+"PX c #FF00FF",
+"IX c #00FFFF",
+"UX c #FFFFFF",
+/* pixels */
+"> > > > > > > > > > > > > > > > > > > > ",
+"> > > > > > > > > > > > > > > > > > > > ",
+"> > U $.| | ^ S 2 > p W | | @.L > > > > ",
+"8 5 R - < Y j S O - ) g e > > ",
+"! V K - % a Q # - +.P <.> > ",
+"! & K - 0 z n D C b f n n z q +.P <.> > ",
+"! & K - % M A 1 - %.G #.> > ",
+"! & K - % u b # - o.v >.> > ",
+"! & K - 0 z n H M b 6 z n z q o.v >.> > ",
+"! & K - X - M A a - O.B @.> > ",
+"! & K - X % u b # - ` 3 / > > ",
+"! & K - 0 l i 4 u b # - ~ * E > > ",
+"! & K - X o $ s T b # - { w ' > > ",
+"! & K - % f b # - .k -.> > ",
+"! & K m d t 7 , u b # ; 9 9 h ( r :.> > ",
+"! & h _ _ [ &.4.$.A ,.1.} _ _ F x ] > > ",
+"! @ , y N _ 3._ N y , @ ! > > ",
+"*.*.*.*.*.*.*.*.;.5.*.*.*.*.*.*.*.2.> > ",
+"> > > > > > > > > > > > > > > > > > > > ",
+"> > > > > > > > > > > > > > > > > > > > "
+};
diff --git a/src/xpm/bitcoin16.xpm b/src/xpm/bitcoin16.xpm
new file mode 100644
index 0000000000..f70fef026a
--- /dev/null
+++ b/src/xpm/bitcoin16.xpm
@@ -0,0 +1,219 @@
+/* XPM */
+static const char * bitcoin16_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 197 2",
+" c #755507",
+". c #775606",
+"X c #795707",
+"o c #7D5A07",
+"O c #765608",
+"+ c #74550A",
+"@ c #75550A",
+"# c #75560A",
+"$ c #785708",
+"% c #78580B",
+"& c #7D5C0B",
+"* c #78590E",
+"= c #7E5F14",
+"- c #8A6711",
+"; c #8D6B15",
+": c #8A691A",
+"> c #93711C",
+", c #9D7A23",
+"< c #9F7B22",
+"1 c #9C7B2A",
+"2 c #9E7C28",
+"3 c #A37F26",
+"4 c #B4831B",
+"5 c #A68126",
+"6 c #A5852E",
+"7 c #A9872E",
+"8 c #AC862D",
+"9 c #AC872F",
+"0 c #AF8B30",
+"q c #AC8932",
+"w c #AF8A34",
+"e c #B08E36",
+"r c #B98F33",
+"t c #B18E3A",
+"y c #B39036",
+"u c #B69237",
+"i c #B3913B",
+"p c #B6923C",
+"a c #BD9338",
+"s c #B9993F",
+"d c #BA993F",
+"f c #C2932D",
+"g c #C09437",
+"h c #C59832",
+"j c #C39836",
+"k c #C89835",
+"l c #C59C3D",
+"z c #CF9E3E",
+"x c #CFA23F",
+"c c #D0A13A",
+"v c #D3A23A",
+"b c #D4A338",
+"n c #D6A33F",
+"m c #B19345",
+"M c #BF9940",
+"N c #BF9D43",
+"B c #B3954B",
+"V c #BD9A48",
+"C c #BC9C4B",
+"Z c #BD9F51",
+"A c #CAA244",
+"S c #C2A14B",
+"D c #C4A44B",
+"F c #C1A24C",
+"G c #C7A64C",
+"H c #C5A64E",
+"J c #C9A94F",
+"K c #D1A343",
+"L c #D7A644",
+"P c #D5A547",
+"I c #D6A547",
+"U c #DCAD42",
+"Y c #DDAB45",
+"T c #C3A151",
+"R c #C9A551",
+"E c #CAAA50",
+"W c #CBAD53",
+"Q c #CDAC52",
+"! c #CEA855",
+"~ c #CEB15A",
+"^ c #DEB154",
+"/ c #D1B35A",
+"( c #D7B35A",
+") c #D8B45D",
+"_ c #E3B34A",
+"` c #E2B34E",
+"' c #E6B54F",
+"] c #E2B350",
+"[ c #E3B352",
+"{ c #E4B451",
+"} c #E2B355",
+"| c #E7B853",
+" . c #E9BC51",
+".. c #ECBC53",
+"X. c #E7BE5A",
+"o. c #E2BA5C",
+"O. c #E2BC5C",
+"+. c #E9BB59",
+"@. c #EBBE59",
+"#. c #EABD5B",
+"$. c #E8BF5C",
+"%. c #E9BE5E",
+"&. c #C8AC63",
+"*. c #D0B162",
+"=. c #D5B567",
+"-. c #DABC62",
+";. c #D2B66B",
+":. c #D0B56D",
+">. c #DCBC6E",
+",. c #D2B972",
+"<. c #D7BE78",
+"1. c #E9BE62",
+"2. c #EEC05A",
+"3. c #F0C25F",
+"4. c #DEC26B",
+"5. c #DDC27A",
+"6. c #E0C167",
+"7. c #E5C067",
+"8. c #EBC463",
+"9. c #EEC460",
+"0. c #ECC364",
+"q. c #E4C16B",
+"w. c #E7C46B",
+"e. c #E9C56C",
+"r. c #E0C172",
+"t. c #E5C575",
+"y. c #E4C870",
+"u. c #E6CA72",
+"i. c #E6CA74",
+"p. c #E8CB73",
+"a. c #E9CE76",
+"s. c #EBD07B",
+"d. c #EED179",
+"f. c #F5D478",
+"g. c #F5D57C",
+"h. c #F4D67C",
+"j. c #F4D77E",
+"k. c #DEC781",
+"l. c #E0C883",
+"z. c #E3CA89",
+"x. c #E4CB8B",
+"c. c #E3CD8A",
+"v. c #E5CE8B",
+"b. c #E3CC8E",
+"n. c #E8D18D",
+"m. c #F6D980",
+"M. c #F7DB83",
+"N. c #F3DA86",
+"B. c #F7DA84",
+"V. c #F6DB84",
+"C. c #F7DB84",
+"Z. c #F7DA86",
+"A. c #F6DC85",
+"S. c #F7DC85",
+"D. c #F8DB85",
+"F. c #FADD85",
+"G. c #FBDE86",
+"H. c #F5DE8B",
+"J. c #FADD88",
+"K. c #F9DF8B",
+"L. c #E4CF93",
+"P. c #E6CF92",
+"I. c #E6D094",
+"U. c #EAD597",
+"Y. c #EBD698",
+"T. c #EFDA99",
+"R. c #F0DC9C",
+"E. c #FCE089",
+"W. c #FCE28B",
+"Q. c #FDE28B",
+"!. c #FCE38C",
+"~. c #FCE28D",
+"^. c #FCE38D",
+"/. c #FDE38D",
+"(. c #FEE38D",
+"). c #FDE38E",
+"_. c #FEE48D",
+"`. c #FEE58F",
+"'. c #FCE490",
+"]. c #FDE490",
+"[. c #FFE590",
+"{. c #FFE690",
+"}. c #FFE691",
+"|. c #FEE791",
+" X c #FFE692",
+".X c #FFE792",
+"XX c #FEE693",
+"oX c #FFE693",
+"OX c #FFE793",
+"+X c #FEE897",
+"@X c #F6E2A2",
+"#X c #F7E3A2",
+"$X c #FAE6A8",
+"%X c #FBE7A9",
+"&X c #FCE9AB",
+"*X c #FDEAAC",
+"=X c None",
+/* pixels */
+"=X=X=X=X=X0 S G D i =X=X=X=X=X=X",
+"=X=X=X9 6.).).).).).d.e =X=X=X=X",
+"=X=Xu C.J.O.( h ( o.D.).J & =X=X",
+"=X0 S.j.f 4 b.e P.K @.j.'.d % =X",
+"=X4.).k a T Y.&.Y.R 2.2.F.S.- =X",
+"e '.e.z ! v.&X,.k.*X:. .%.`.d # ",
+"H +X^ I P =.*X9 j T.k.U ' F.-.% ",
+"W '.` { } >.*X<.n.*XC b Y g.u.X ",
+"W |.` { 3.t.&Xm C c.%Xa n m.u.. ",
+"N '.9...@.r.&Xi A 5.*XM L W.~ . ",
+"5 m.f._ *.#X&XR.#X%X:.v 0.'.7 # ",
+"=XQ `.@.l t P.B I.u v { G.a.o =X",
+"=X3 u.W.0.A z.V b.+.1.J.E., # =X",
+"=X=X3 u.oXF.e.7.q.C.+XH.6 # =X=X",
+"=X=X=X=XS s.'.'.'.C.~ ; * =X=X=X",
+"=X=X=X=X=X=X1 1 > : = =X=X=X=X=X"
+};
diff --git a/src/xpm/bitcoin20.xpm b/src/xpm/bitcoin20.xpm
new file mode 100644
index 0000000000..3cc29ac14b
--- /dev/null
+++ b/src/xpm/bitcoin20.xpm
@@ -0,0 +1,160 @@
+/* XPM */
+static const char * bitcoin20_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"20 20 134 2",
+" c #735305",
+". c #785706",
+"X c #7E5C07",
+"o c #755509",
+"O c #76580D",
+"+ c #7F6015",
+"@ c #85620D",
+"# c #89650D",
+"$ c #836215",
+"% c #886510",
+"& c #8E6B11",
+"* c #81641F",
+"= c #906D19",
+"- c #977116",
+"; c #96741E",
+": c #9B761E",
+"> c #947424",
+", c #9B7722",
+"< c #9D7824",
+"1 c #A47F23",
+"2 c #A17D2A",
+"3 c #A58125",
+"4 c #AA8327",
+"5 c #A4832F",
+"6 c #AD862B",
+"7 c #B28B2E",
+"8 c #A58433",
+"9 c #A88637",
+"0 c #AD8932",
+"q c #A78639",
+"w c #A8893C",
+"e c #B28C34",
+"r c #B88E33",
+"t c #B28E3A",
+"y c #B79136",
+"u c #BB9235",
+"i c #BB9639",
+"p c #C19836",
+"a c #C29539",
+"s c #C59C3C",
+"d c #A88B41",
+"f c #AF9045",
+"g c #B49342",
+"h c #BE9641",
+"j c #BD9B44",
+"k c #B29448",
+"l c #B7994B",
+"z c #B8994C",
+"x c #C09946",
+"c c #CB9E46",
+"v c #C59D4C",
+"b c #CFA246",
+"n c #CBAB47",
+"m c #CEA74A",
+"M c #D4A749",
+"N c #D6A94D",
+"B c #C7A754",
+"V c #CEA453",
+"C c #C6AA56",
+"Z c #CDA955",
+"A c #CBAB5B",
+"S c #D2AB54",
+"D c #D2AE5E",
+"F c #D9AE5A",
+"G c #D7B356",
+"H c #DDB35F",
+"J c #DFB95A",
+"K c #E1B554",
+"L c #E4BA56",
+"P c #E6BC5A",
+"I c #E9BE5E",
+"U c #C7AC64",
+"Y c #CBAF64",
+"T c #CDB166",
+"R c #D4B364",
+"E c #DBB463",
+"W c #DFB867",
+"Q c #D5B76B",
+"! c #DFBA6F",
+"~ c #D5BB76",
+"^ c #D7BE79",
+"/ c #E3BC64",
+"( c #E8BF64",
+") c #E0BB68",
+"_ c #DECA7A",
+"` c #EBC265",
+"' c #EBC36B",
+"] c #EFC96B",
+"[ c #F1C564",
+"{ c #F3CB6A",
+"} c #F9CD6C",
+"| c #FAD16C",
+" . c #E5C770",
+".. c #EEC774",
+"X. c #E6CE7E",
+"o. c #EFCE7A",
+"O. c #F1CB73",
+"+. c #F4CE7A",
+"@. c #F3D273",
+"#. c #FCD574",
+"$. c #FEDA76",
+"%. c #F5D47D",
+"&. c #FAD47B",
+"*. c #F2D97D",
+"=. c #FCDA7A",
+"-. c #DDC784",
+";. c #E1CA86",
+":. c #E4CE8B",
+">. c #ECD985",
+",. c #E7D18E",
+"<. c #F4DC84",
+"1. c #FCDC81",
+"2. c #F4DB8B",
+"3. c #FBDF8B",
+"4. c #EBD592",
+"5. c #EFDA99",
+"6. c #F1DD9C",
+"7. c #F6E081",
+"8. c #FDE484",
+"9. c #FFEA87",
+"0. c #F9E488",
+"q. c #FEE88D",
+"w. c #F9E394",
+"e. c #FFEB93",
+"r. c #FEE698",
+"t. c #FEEA9B",
+"y. c #FFF49A",
+"u. c #F7E4A4",
+"i. c #F9E5A5",
+"p. c #FCE9AA",
+"a. c #F7F0AA",
+"s. c #FEF1AE",
+"d. c #FEF6B3",
+"f. c None",
+/* pixels */
+"f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.",
+"f.f.f.f.f.f.f.0 y i i 0 , f.f.f.f.f.f.f.",
+"f.f.f.f.3 p P | $.| } { I p ; f.f.f.f.f.",
+"f.f.f.4 L | $.{ L K L ` =.#.` 3 $ f.f.f.",
+"f.f.6 [ $.{ M a Q 0 Q S ' %.q.*.6 o f.f.",
+"f.3 ' $.P i u r ,.< :.S +.%.0.y.*.& f.f.",
+"f.C e.%.c x T Y 6.U 5.T R @.#.0.9.n . f.",
+"f.>.t.W F A ^ p.u.~ -.p.i.C { { =.@.# f.",
+"e e.3.E H / j p.6.0 V ~ p.Y ( ` #.$.3 o ",
+"j p.2.( ( ! Z p.6.l R 6.6.t I I { #.y o ",
+"j e.1.( ! +.H i.i.-.:.i.u.R N K ` #.u ",
+"i 9.&.( ..1.) p.6.8 j w p.p.h N ' #.7 ",
+"4 =.7.` ....Z p.6.g D T p.i.t M [ } - o ",
+"f.J =.{ ` E i.p.p.i.p.p.6.k u M } K @ o ",
+"f.7 @.@./ S z f 4.d ,.q 2 r a ( { 6 f.",
+"f.f.m @.O.( / V 4.q :.v V V O.&.G X O f.",
+"f.f.: G 1.0.+.W R D R ! 4.d.d._ # f.f.",
+"f.f.f.2 C a.i.r.w.w.i.s.d.p.Y @ f.f.f.",
+"f.f.f.f.f.5 Z .<.3.2.X.A > . f.f.f.f.",
+"f.f.f.f.f.f.f.> > = # $ + f.f.f.f.f.f.f."
+};
diff --git a/src/xpm/bitcoin32.xpm b/src/xpm/bitcoin32.xpm
new file mode 100644
index 0000000000..f538a44d2d
--- /dev/null
+++ b/src/xpm/bitcoin32.xpm
@@ -0,0 +1,232 @@
+/* XPM */
+static const char * bitcoin32_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 194 2",
+" c #745305",
+". c #785704",
+"X c #7C5903",
+"o c #75560B",
+"O c #77590F",
+"+ c #7C5C0B",
+"@ c #795B12",
+"# c #7F631D",
+"$ c #825E07",
+"% c #825F0B",
+"& c #85610A",
+"* c #8C660C",
+"= c #8E680E",
+"- c #916B0F",
+"; c #856515",
+": c #8B6714",
+"> c #8F6A16",
+", c #816218",
+"< c #88691C",
+"1 c #926D12",
+"2 c #936F1C",
+"3 c #997417",
+"4 c #94721E",
+"5 c #9B761C",
+"6 c #9F781C",
+"7 c #A17B1E",
+"8 c #826622",
+"9 c #916E20",
+"0 c #967425",
+"q c #9D7420",
+"w c #9C7923",
+"e c #997728",
+"r c #99792C",
+"t c #A37D23",
+"y c #A37F2C",
+"u c #A68125",
+"i c #AB8225",
+"p c #A5832B",
+"a c #AA852C",
+"s c #B28A2C",
+"d c #A58233",
+"f c #AC8734",
+"g c #AE8C33",
+"h c #AC8C3C",
+"j c #B28C33",
+"k c #B98E34",
+"l c #B28D3D",
+"z c #B59136",
+"x c #BC9335",
+"c c #B3913E",
+"v c #BC933A",
+"b c #BF9A3D",
+"n c #C19235",
+"m c #C2953C",
+"M c #C39B3C",
+"N c #CA9C3D",
+"B c #B59343",
+"V c #BE9642",
+"C c #B69A44",
+"Z c #BD9A45",
+"A c #B49649",
+"S c #BB9A49",
+"D c #BB9F52",
+"F c #BFA256",
+"G c #C49C43",
+"H c #CA9D41",
+"J c #C59D4A",
+"K c #C99E4D",
+"L c #C3A144",
+"P c #CDA244",
+"I c #CFAA47",
+"U c #C3A14D",
+"Y c #CDA24A",
+"T c #CCAB49",
+"R c #D2A644",
+"E c #D2A54B",
+"W c #D6AA4C",
+"Q c #DAAE4E",
+"! c #DAB04F",
+"~ c #C7A656",
+"^ c #CDA452",
+"/ c #CFAC52",
+"( c #C0A65E",
+") c #CEA75A",
+"_ c #CCAC59",
+"` c #D2AB53",
+"' c #DCAF52",
+"] c #D6AD5A",
+"[ c #D9AE5B",
+"{ c #DCB556",
+"} c #DFB855",
+"| c #D6B25F",
+" . c #DCB35C",
+".. c #DEBE5E",
+"X. c #E2B656",
+"o. c #E1B55A",
+"O. c #E6BC5D",
+"+. c #E9BD5E",
+"@. c #C3AA63",
+"#. c #CCAD62",
+"$. c #D4AF62",
+"%. c #CDB565",
+"&. c #CEB46D",
+"*. c #D7B164",
+"=. c #DBB362",
+"-. c #D6BD64",
+";. c #DDBA64",
+":. c #D3B66C",
+">. c #DFB86B",
+",. c #CEB772",
+"<. c #D0B771",
+"1. c #D4BA73",
+"2. c #D9BE77",
+"3. c #D6BE79",
+"4. c #D8BF7A",
+"5. c #E4BB62",
+"6. c #E9BF64",
+"7. c #E4BC69",
+"8. c #E9BF69",
+"9. c #E0BB71",
+"0. c #E9C05E",
+"q. c #D2C279",
+"w. c #DBC27C",
+"e. c #E2C667",
+"r. c #EDC364",
+"t. c #E3C16E",
+"y. c #ECC46C",
+"u. c #EDCC6C",
+"i. c #F1C764",
+"p. c #F5CA66",
+"a. c #F9CD67",
+"s. c #F5CC6A",
+"d. c #F9CD6B",
+"f. c #FBD36F",
+"g. c #EDC572",
+"h. c #E5CF77",
+"j. c #ECCA74",
+"k. c #E0C67E",
+"l. c #EFCE78",
+"z. c #F6CE72",
+"x. c #FBCF71",
+"c. c #F4CE79",
+"v. c #F4D273",
+"b. c #FCD473",
+"n. c #F4DC75",
+"m. c #FEDA74",
+"M. c #F6D77C",
+"N. c #FBD47A",
+"B. c #F1DA7B",
+"V. c #FDDA7C",
+"C. c #FEE27D",
+"Z. c #DDC683",
+"A. c #DFC884",
+"S. c #E4CA84",
+"D. c #E3CC89",
+"F. c #E7D183",
+"G. c #EFD280",
+"H. c #EFDC82",
+"J. c #ECD48D",
+"K. c #EFDA8C",
+"L. c #F9D783",
+"P. c #F2DF83",
+"I. c #FCDB83",
+"U. c #F5DC8F",
+"Y. c #FADD8B",
+"T. c #EBD593",
+"R. c #EFDA99",
+"E. c #F3DD93",
+"W. c #F3DF9F",
+"Q. c #FFE385",
+"!. c #FEE986",
+"~. c #FDE48C",
+"^. c #FEEC8E",
+"/. c #ECE199",
+"(. c #F6E591",
+"). c #FEE494",
+"_. c #FEEB93",
+"`. c #FEE69A",
+"'. c #FFEB9B",
+"]. c #FFF197",
+"[. c #FFF39B",
+"{. c #FEF99B",
+"}. c #F6E2A2",
+"|. c #F9E5A5",
+" X c #F7E9A5",
+".X c #FEECA4",
+"XX c #FBE7A8",
+"oX c #FDEAAB",
+"OX c #F7F2AA",
+"+X c #FEF2AC",
+"@X c #FDF4B4",
+"#X c #FFFABA",
+"$X c #FFFEC2",
+"%X c None",
+/* pixels */
+"%X%X%X%X%X%X%X%X%X%X%X%Xp t 6 5 w t w %X%X%X%X%X%X%X%X%X%X%X%X%X",
+"%X%X%X%X%X%X%X%X%Xu u x I X.0.s.u.0.W x 7 4 %X%X%X%X%X%X%X%X%X%X",
+"%X%X%X%X%X%X%Xy i I i.a.f.m.m.b.f.s.a.s.i.W 7 > %X%X%X%X%X%X%X%X",
+"%X%X%X%X%X%Xt M 0.a.m.m.m.m.f.d.p.p.p.f.d.f.i.b 1 < %X%X%X%X%X%X",
+"%X%X%X%X%X7 ! d.f.f.m.f.+.W P R I Q 5.v.V.V.z.f.{ 5 + %X%X%X%X%X",
+"%X%X%X%Xu X.f.m.m.f.' H s ~ V y _ Z J o.g.L.L.Q.!.e.5 X %X%X%X%X",
+"%X%X%Xu X.b.C.m.+.N m n t }.3.> }.w.V 5.y.y.Y.[.^.^.-.1 + %X%X%X",
+"%X%Xt P m.N.m.X.v v v k 6 }.1.: /.4.c 7.N.N.v.!.{.{.^.L & %X%X%X",
+"%X%Xg Y.Y.V.+.m k a t t : }.1.% }.1.r | l.B.M.b.!.{.^.n.7 X %X%X",
+"%Xp -._.'.Y.' Y n D.}.}.|.oXXX|.oX XT.w.F _ j.v.v._.^.C.T & @ %X",
+"%Xa (.'.'.9.[ [ K S.}.oXoXoXoXXXoXoXoXoX XD / s.d.v.!.C.v.3 o %X",
+"%XU '.'.Y.[ [ [ [ J f <.oXoX( 2 f S J.oXoXT.j r.s.i.C.C.C.z X %X",
+"p e.'.'.F. .=.=.=.=.) 1.oXoX@.f . .F oXoX}.a +.i.i.b.C.m.I X O ",
+"u w.'.[.j.5.8.7.7.7.] 2.oXoX@.y W c &.oXoXZ.k r.s.i.s.V.m.} = o ",
+"u H.[.{.y.8.y.g.8.g.7.2.oXoXA.@.&.D.oXoXT.e G +.O.O.5.V.m.0.- o ",
+"u !.].[.r.8.y.g.g.g.7.4.oXoXoXoXoXoXoXoXoX<.y W X.o.o.m.m.0.- o ",
+"u B._._.5.5.8.y.g.c.g.w.oXoX,.h A F <..XoXoX1.k ' ' ' V.N.r.- ",
+"u u.Q.~.r.6.z.N.V.I.v.k.oXoX@.B | _ c 1.oXoX}.a ' ' O.I.b.O.= o ",
+"u ..Q.Q.v.i.s.c.N.L.l.Z.oXoX@.B t.=.S &.oXoXXXy Y R +.N.b.Q % o ",
+"t T C.I.I.6.u.z.z.5.S 1.oXoX@.e B h D |.oXoXS.f Y Y 6.d.d.n X O ",
+"%Xs m.V.Q.r.r.z.5.<.}.oXoXoXXXW.}.oXoXoXoXW.h G H R a.p.s.7 %X",
+"%X7 O.V.V.v.+.r.` 4.oXoXoXoXoXoXoXoXXXR.<.h v N N o.a.p.Q = %X",
+"%Xw x v.v.v.r.+. .Z l d e }.Z.r }.3.d l V G n n R a.s.a.s X O %X",
+"%X%X6 { v.l.v.+.O.5.=.^ d }.4.9 }.1.f J G m m G d.d.x.Q = %X%X",
+"%X%X%Xs u.v.v.v.r.6.o. .l }.4.9 W.4.l ^ ^ J ) c.N.N.y.7 X O %X%X",
+"%X%X%X5 z v.v.M.I.g.;. .J 1.#.B 1.#.) 7.$.S..X'.W.Y.j $ %X%X%X",
+"%X%X%X%X5 b N.Y.~.).Y.j.5.$.=.=.$.*.2.J.@X$X#X#XoXC $ %X%X%X%X",
+"%X%X%X%X%X3 z U.@X+X`.`.`.(.E.E.E.|.@X@X#X#X#X/.j % %X%X%X%X%X",
+"%X%X%X%X%X%Xw a q.OX|.).`._.'.'.XX.X.X+X+X X%.w X o %X%X%X%X%X%X",
+"%X%X%X%X%X%X%X%Xw a _ j.~.~.).).`.`.`.F._ t & . # %X%X%X%X%X%X%X",
+"%X%X%X%X%X%X%X%X%X%X4 3 t z L U Z z t 1 $ . 8 %X%X%X%X%X%X%X%X%X",
+"%X%X%X%X%X%X%X%X%X%X%X%X%X< ; & + + , 8 %X%X%X%X%X%X%X%X%X%X%X%X"
+};
diff --git a/src/xpm/bitcoin48.xpm b/src/xpm/bitcoin48.xpm
new file mode 100644
index 0000000000..85a7711940
--- /dev/null
+++ b/src/xpm/bitcoin48.xpm
@@ -0,0 +1,277 @@
+/* XPM */
+static const char * bitcoin48_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"48 48 223 2",
+" c #765404",
+". c #795704",
+"X c #7C5904",
+"o c #7C5A0A",
+"O c #825E05",
+"+ c #815F0E",
+"@ c #815F11",
+"# c #866107",
+"$ c #866208",
+"% c #8A650A",
+"& c #8E680D",
+"* c #916B0E",
+"= c #866414",
+"- c #8C6715",
+"; c #8F6A10",
+": c #8A691B",
+"> c #956E12",
+", c #906D1D",
+"< c #967013",
+"1 c #997215",
+"2 c #94711F",
+"3 c #9C751A",
+"4 c #9E781C",
+"5 c #A27B1D",
+"6 c #947324",
+"7 c #997625",
+"8 c #9D7926",
+"9 c #97792B",
+"0 c #9D7B28",
+"q c #9C7F34",
+"w c #A47E22",
+"e c #A87F21",
+"r c #A37E2A",
+"t c #A8801F",
+"y c #A58025",
+"u c #AB8425",
+"i c #A5812C",
+"p c #AB842A",
+"a c #AB892D",
+"s c #B0862C",
+"d c #B48C2D",
+"f c #B88F2F",
+"g c #B9912E",
+"h c #A68432",
+"j c #AB8531",
+"k c #AD8A33",
+"l c #A68638",
+"z c #AD8B3B",
+"x c #B38C32",
+"c c #BA8E35",
+"v c #B28D3B",
+"b c #B59234",
+"n c #BD9235",
+"m c #B5903E",
+"M c #BC943B",
+"N c #BA9A3B",
+"B c #C29536",
+"V c #C59937",
+"C c #C2953B",
+"Z c #C49C3C",
+"A c #CA9E3D",
+"S c #AC8E43",
+"D c #AD9045",
+"F c #AE9248",
+"G c #B49444",
+"H c #B99542",
+"J c #B49842",
+"K c #BD9C44",
+"L c #B3954A",
+"P c #B7994D",
+"I c #BD9A4A",
+"U c #B69A52",
+"Y c #BB9E54",
+"T c #BEA04A",
+"R c #BFA354",
+"E c #BEA35A",
+"W c #C19742",
+"Q c #C49B43",
+"! c #CA9D41",
+"~ c #C39C4B",
+"^ c #C99E4A",
+"/ c #C7A444",
+"( c #CDA244",
+") c #CAA945",
+"_ c #C5A44C",
+"` c #CCA44B",
+"' c #C6A94C",
+"] c #CFAC4D",
+"[ c #D2A647",
+"{ c #D2A54B",
+"} c #D4AA4C",
+"| c #D9AC4D",
+" . c #D4B04E",
+".. c #DCB14D",
+"X. c #C4A151",
+"o. c #CAA454",
+"O. c #C6AB56",
+"+. c #CCA955",
+"@. c #C1A45A",
+"#. c #C6AA5A",
+"$. c #CDAB5D",
+"%. c #D1A652",
+"&. c #D4AB53",
+"*. c #DDAF52",
+"=. c #D3AC5B",
+"-. c #D9AF5C",
+";. c #D5B154",
+":. c #DDB253",
+">. c #D5B25B",
+",. c #DCB45D",
+"<. c #DDBB5E",
+"1. c #E1B354",
+"2. c #E4B955",
+"3. c #E3B65B",
+"4. c #E5BA5C",
+"5. c #EABE5E",
+"6. c #C6AB63",
+"7. c #CCAD63",
+"8. c #C6AE68",
+"9. c #C9AF69",
+"0. c #D4AC60",
+"q. c #CDB067",
+"w. c #CDB36C",
+"e. c #D6B162",
+"r. c #DDB463",
+"t. c #D7B964",
+"y. c #DBB965",
+"u. c #D1B66F",
+"i. c #DDB66A",
+"p. c #D0BC6C",
+"a. c #DFBE6B",
+"s. c #CEB772",
+"d. c #D1B771",
+"f. c #D4BC74",
+"g. c #DBBD75",
+"h. c #DABF78",
+"j. c #E2B764",
+"k. c #E4BA64",
+"l. c #E9BD62",
+"z. c #E2BB6A",
+"x. c #E8BF69",
+"c. c #EBC15F",
+"v. c #F1C25E",
+"b. c #DFC266",
+"n. c #DBC26C",
+"m. c #DCC676",
+"M. c #DEC973",
+"N. c #D7C07A",
+"B. c #D9C27E",
+"V. c #E4C162",
+"C. c #EDC363",
+"Z. c #E3C36F",
+"A. c #EBC26C",
+"S. c #E5CA6B",
+"D. c #EECA6D",
+"F. c #F1C565",
+"G. c #F5CB66",
+"H. c #F9CA66",
+"J. c #F2C76A",
+"K. c #F5CC6A",
+"L. c #F9CD6C",
+"P. c #EDD26C",
+"I. c #FBD26E",
+"U. c #E5C374",
+"Y. c #EDC573",
+"T. c #E6CB74",
+"R. c #EECC73",
+"E. c #EBCA78",
+"W. c #F5CD74",
+"Q. c #F9CE72",
+"!. c #EED77F",
+"~. c #F4D274",
+"^. c #FDD473",
+"/. c #F2D870",
+"(. c #FED975",
+"). c #F5D37C",
+"_. c #FCD57A",
+"`. c #F7D87A",
+"'. c #FEDC7C",
+"]. c #FFE37D",
+"[. c #DCC682",
+"{. c #E1C984",
+"}. c #E4CD8A",
+"|. c #EFD182",
+" X c #E5D48D",
+".X c #EAD28D",
+"XX c #E8DB8D",
+"oX c #F1D581",
+"OX c #FDD581",
+"+X c #F5DB84",
+"@X c #FDDC84",
+"#X c #FEDE89",
+"$X c #EAD594",
+"%X c #E1D894",
+"&X c #ECDA94",
+"*X c #EFDA99",
+"=X c #F2DD9C",
+"-X c #F6E284",
+";X c #FEE385",
+":X c #FFE883",
+">X c #FEE38C",
+",X c #FEEA8C",
+"<X c #F6E196",
+"1X c #FEE594",
+"2X c #FEEC93",
+"3X c #F6E39C",
+"4X c #FEE599",
+"5X c #FFEB9B",
+"6X c #FFF195",
+"7X c #FEF39B",
+"8X c #FEF99C",
+"9X c #F5E2A2",
+"0X c #F9E5A5",
+"qX c #F6EAA6",
+"wX c #FFECA3",
+"eX c #FDEAAB",
+"rX c #FFF5A0",
+"tX c #FFF2AB",
+"yX c #FEF5B3",
+"uX c #FFF9B3",
+"iX c #FFFBBB",
+"pX c #FFFDC1",
+"aX c None",
+/* pixels */
+"aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX* < * < < < < * * & aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX",
+"aXaXaXaXaXaXaXaXaXaXaXaXaXaXaX* 1 3 5 u u d g Z Z N d u 5 3 * % aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX",
+"aXaXaXaXaXaXaXaXaXaXaXaXaX< 3 t u A ..c.K.I.I.(.(.'.(.G.2.( d 5 1 & aXaXaXaXaXaXaXaXaXaXaXaXaXaX",
+"aXaXaXaXaXaXaXaXaXaXaX< 5 t g 1.G.H.H.I.(.'.(.I.I.I.K.K.G.I.K.2.V u 1 % aXaXaXaXaXaXaXaXaXaXaXaX",
+"aXaXaXaXaXaXaXaXaXaX4 t g c.G.H.I.I.I.].(.(.(.I.G.H.K.G.K.I.G.K.Q.C.C 5 & % aXaXaXaXaXaXaXaXaXaX",
+"aXaXaXaXaXaXaXaXaX4 u } v.G.G.I.(.].(.(.(.I.G.G.G.G.G.L.G.K.I.^.^.L.L.:.u < # aXaXaXaXaXaXaXaXaX",
+"aXaXaXaXaXaXaXaXt d c.G.I.I.I.I.].(.I.G.c.........:.4.C.W.~.`.'._.^.K.K.J.N 4 # aXaXaXaXaXaXaXaX",
+"aXaXaXaXaXaXaX5 g v.H.I.I.(.(.(.H.c.[ V V V V A A A ! ( } l.).>X@X_.`._.'.'./ 4 O aXaXaXaXaXaXaX",
+"aXaXaXaXaXaXt g C.I.(.(.^.(.^.1.( ! C d p u s d d d x M &.3.3.A.).+XOX>X;X;X;X) 3 O aXaXaXaXaXaX",
+"aXaXaXaXaX5 d G.I.'.].(.^.l.( C A C s H =X=XI 7 N.*X$Xk o.j.z.J.l.W.1X7X6X,X,X,XK 1 X aXaXaXaXaX",
+"aXaXaXaX3 p C.(.(.'.'.^.*.C C C C B r G eXeXL - [.eX3Xr ~ r.W._.W.J.D.6X8X6X6X6X-Xd & X aXaXaXaX",
+"aXaXaXaXu ;.'.'.(.^.^.| C c B B B c w z eXeXF = [.eX*X8 K r.@X#X;X`.~.D.7X8X8X6X,XS.y O aXaXaXaX",
+"aXaXaXw N #X#X'.'.^.*.C c c s r e r 2 r eXeXD $ B.eX=X: z z.oX>X,X,X;X~.D.8X8X6X,X:X) < X aXaXaX",
+"aXaX3 a T.1X1X>X#XA.! C B s $.6.6.@.@.w.eXeXd.U $XeX9XF z G O.n.!.-X;X'.D./.8X6X,X:X/.u # aXaXaX",
+"aXaXy K 5X5X5X2X>X-.} ^ C r 0XeXeXeXeXeXeXeXeXeXeXeXeXeXeX9XN.L O.T.`.]./.F.-X6X:X].].) < . aXaX",
+"aXaXa M.7X5X5X5XU.&.-.&.^ j 0XeXeXeXeXeXeXeXeXeXeXeXeXeXeXeXeX9XL X.~.'.'.K.c.6X:X].].P.t O aXaX",
+"aX5 k 2X5X5X5X<X-.-.-.-.=.W q.6.9.=XeXeXeXeXs.9.d.B.*XeXeXeXeXeX&Xh <.(.(.Q.F.~.;X].].].b & . aX",
+"aXy O.5X5X5X5XE.-.-.-.-.-.%.Q z 6 6.eXeXeXeX: , w r 7 R eXeXeXeX0XG ' ~.^.^.F.l.;X].].]. .1 . aX",
+"aXp n.2X5X5X5Xj.-.-.-.r.r.r.-.=.G 9.eXeXeXeX6 j ( &.} i [.eXeXeXeXY Q J.I.I.L.5.(.;X].(.c.5 X aX",
+"3 a !.7X5X7X<X-.r.r.r.r.j.r.r.r.W w.eXeXeXeX6 v ,.Q.k.m s.eXeXeXeXL K C.L.L.L.F.D.'.'.(.I.u # ",
+"5 a ,X5XrXwX+X3.j.j.j.z.z.z.z.r.~ w.eXeXeXeX6 l ;.<._ 0 *XeXeXeX0X0 ( G.L.Q.L.5.C.].'.^.^.g $ ",
+"4 b 2X7X7XrX!.l.x.x.x.x.U.x.z.z.~ w.eXeXeXeX: , k z Y XeXeXeXeXY r } C.5.5.5.3.4.'.(.^.^.V % . ",
+"4 N 6X7X7XrXOXx.x.x.W.x.Y.Y.Y.Y.o.d.eXeXeXeX=X=X9XeXeXeXeXeXeX8.+ r [ 3.5.5.3.3.1.'._.(.^.A & . ",
+"5 N 2X6X5X5XW.x.x.x.x.W.Y.Y.Y.Y.o.d.eXeXeXeXeXeXeXeXeXeXeXeXeXeX[.r C | 1.3.3.3.:._._.^.I./ % ",
+"5 N ,X2X2X6XD.l.l.x.x.x.Y.Y.Y.R.=.f.eXeXeXeX[.[.[.[.*XeXeXeXeXeXeX*Xj ! *.1.1.1.1._._.^.^./ % ",
+"5 b ;X,X,X2XU.3.j.x.Y.W.).OX#X@Xt.f.eXeXeXeX: : 7 7 : 6 6.eXeXeXeXeXd.k { *.*.*.1.OX_.(.^.V % ",
+"4 a ].;X;X>X`.C.L.^._._.OX@X#X#Xt.f.eXeXeXeX6 z #.o.I z 6 w.eXeXeXeX*Xr ! { %.%.,.OX_.(.^.n % ",
+"4 u /.;X;X;X@XF.Q.Q._._._.@X#X#Xa.f.eXeXeXeX9 I a.Z.y.+.k F eXeXeXeX0Xr Q { { { 4.'.(.^.^.u O ",
+"aXu V.;X;X;X>XF.K.Q.Q._._.OX#X@Xt.f.eXeXeXeX9 I Z.U.z.=.z 8.eXeXeXeX=X7 Q { { ( A._.^.^.F.5 O ",
+"aXu ] '.'.;X>XK.J.Q.Q.^._._.~.Z.R w.eXeXeXeX6 S =.>.+.G S 9XeXeXeXeXh.r ! ( ( [ L.L.L.L.:.1 . aX",
+"aX5 b '.'.'.@X`.F.K.Q.Q.~.A.e.$.P }.eXeXeXeXF L E #.9.[.eXeXeXeXeXeXS k ! ( ! *.H.K.H.L.Z % aX",
+"aX1 u J.(.'.'.;XC.F.W.Q.K.&.h.eXeXeXeXeXeXeXeXeXeXeXeXeXeXeXeXeXeX@.2 c ! ! ! F.H.L.H.F.w O aX",
+"aXaXw ( (.(.`.`.`.C.F.K.A.~ [.eXeXeXeXeXeXeXeXeXeXeXeXeXeXeXeX*XF 7 r C B A | H.H.H.H.| 1 X aXaX",
+"aXaX3 u D.~.~.~.`.D.C.J.V.` .X=X=X3X9X9XeXeX9X=XeXeXeX$X{.9.S 2 r r B B B V 5.H.H.H.H.s + . aXaX",
+"aXaXaXt / ~.W.~.`.`.5.V.C.>.M i 6 - = q eXeXS o B.eX*Xo 7 r r r B C B r B 1.H.H.L.L.*.5 X . aXaX",
+"aXaXaX1 u 4.~.~.~.~.~.c.V.l.4.,.~ H i S eXeXF : [.eX=X, r W ^ W W C C W *.Q.Q.Q.Q.J.e % aXaXaX",
+"aXaXaXaX5 b K.~.~.R.~.`.l.C.J.A.,.=.H P eXeXU , [.eX=X7 v ^ %.^ W ^ ^ -.^.^.W._.W.Z > . aXaXaX",
+"aXaXaXaX1 5 / ~.~.~.~.~.`.F.F.<.r.,.~ R eXeXY 7 [.eX=Xq ~ 0.r.0.%.o.g.#XOXOXOXOX,.4 O aXaXaXaX",
+"aXaXaXaXaX1 y } ~.`.`.`.'.#XR.,.r.,.+.X.9.7.I G 9.7.7.X.0.i.i.j.i.9XeX0X=X4X1XT.r # aXaXaXaXaX",
+"aXaXaXaXaXaX1 u :.'.'.OX#X#X1X+XA.3.r.-.=.=.>.e.i.$.0.0.i.j.g.0XpXpXpXyXuXyXXXk % aXaXaXaXaXaX",
+"aXaXaXaXaXaXaX1 p >.>X#X>X1X1X1X1X1X|.U.z.3.j.z.y.i.i.U..XqXpXiXpXpXpXiXiX Xh % . . aXaXaXaXaXaX",
+"aXaXaXaXaXaXaXaX< y _ 3XtXuXtXwX=X4X4X4X5X<X>X=X3X0XeXtXyXuXiXiXiXiXiXuXp.y # . . aXaXaXaXaXaXaX",
+"aXaXaXaXaXaXaXaXaX* y J %XpXiXwX4X4X4X5X4X5X5XwXwXwXeXtXeXtXtXyXyXyX&XJ 3 # aXaXaXaXaXaXaXaXaX",
+"aXaXaXaXaXaXaXaXaXaX* 3 k R XwX4X1X1X1X1X5X4X5X5XwX5XwXwXtXtXtX&X@.y & X aXaXaXaXaXaXaXaXaXaX",
+"aXaXaXaXaXaXaXaXaXaXaXaX& 3 a J t.|.>X,X>X>X2X1X1X1X5X4X0X<Xm.T i > O o aXaXaXaXaXaXaXaXaXaXaX",
+"aXaXaXaXaXaXaXaXaXaXaXaXaXaX% > w p b _ >.b.S.T.T.U.t.O.N p 4 & O . o aXaXaXaXaXaXaXaXaXaXaXaXaX",
+"aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX$ $ ; 1 4 5 5 w w 5 3 > % O . . o aXaXaXaXaXaXaXaXaXaXaXaXaXaXaX",
+"aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXO X X X o X X X o aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX"
+};
diff --git a/src/xpm/bitcoin80.xpm b/src/xpm/bitcoin80.xpm
new file mode 100644
index 0000000000..c3c816e92d
--- /dev/null
+++ b/src/xpm/bitcoin80.xpm
@@ -0,0 +1,292 @@
+/* XPM */
+static const char * bitcoin80_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"80 80 206 2",
+" c #725203",
+". c #785706",
+"X c #7B5907",
+"o c #7C5A09",
+"O c #7F5F10",
+"+ c #815E0B",
+"@ c #85620C",
+"# c #89650F",
+"$ c #856313",
+"% c #896614",
+"& c #8D6913",
+"* c #886718",
+"= c #8D6B1B",
+"- c #926D14",
+"; c #926E1B",
+": c #967116",
+"> c #997317",
+", c #95711E",
+"< c #9B7419",
+"1 c #9F781B",
+"2 c #A27B1D",
+"3 c #8F6F22",
+"4 c #926F21",
+"5 c #947323",
+"6 c #9A7623",
+"7 c #9D7925",
+"8 c #957628",
+"9 c #9A7729",
+"0 c #9D7B2B",
+"q c #9D7F33",
+"w c #A47D23",
+"e c #A97F27",
+"r c #A37E2B",
+"t c #9F8030",
+"y c #A78021",
+"u c #AC8425",
+"i c #A5802D",
+"p c #AC842B",
+"a c #AF8829",
+"s c #B2872C",
+"d c #B28B2D",
+"f c #A68333",
+"g c #AA8633",
+"h c #AD8A36",
+"j c #A4863A",
+"k c #A88638",
+"l c #A7893B",
+"z c #AC8B3B",
+"x c #B28732",
+"c c #B48C32",
+"v c #B98E34",
+"b c #B28D3B",
+"n c #B88F3C",
+"m c #B69033",
+"M c #BD9235",
+"N c #B4913D",
+"B c #BC943A",
+"V c #BE993C",
+"C c #C19336",
+"Z c #C1953B",
+"A c #C49A3C",
+"S c #C99C3D",
+"D c #CDA13F",
+"F c #D0A33F",
+"G c #A88B40",
+"H c #B08F40",
+"J c #AE9142",
+"K c #AE944C",
+"L c #B49443",
+"P c #BB9542",
+"I c #B49946",
+"U c #BD9846",
+"Y c #B3964C",
+"T c #BB974A",
+"R c #B6994A",
+"E c #BF9C4A",
+"W c #B69B53",
+"Q c #B99D53",
+"! c #BCA055",
+"~ c #BDA25A",
+"^ c #C49742",
+"/ c #C49C43",
+"( c #CB9E42",
+") c #C49D4B",
+"_ c #C99E4C",
+"` c #C29F52",
+"' c #C5A244",
+"] c #CDA245",
+"[ c #C5A34C",
+"{ c #CCA34B",
+"} c #CCA94D",
+"| c #D2A445",
+" . c #D1A54B",
+".. c #D5AA4E",
+"X. c #DBAF4F",
+"o. c #C6A352",
+"O. c #CBA554",
+"+. c #C5AA57",
+"@. c #CEAC54",
+"#. c #C4A65A",
+"$. c #CDA458",
+"%. c #C2A85F",
+"&. c #CEAA5B",
+"*. c #D0A550",
+"=. c #D4AB53",
+"-. c #DBAE53",
+";. c #D0A75B",
+":. c #D4AC5A",
+">. c #D9AE5C",
+",. c #CEB25E",
+"<. c #D4B156",
+"1. c #DDB156",
+"2. c #D4B25C",
+"3. c #DCB35D",
+"4. c #D7B85C",
+"5. c #DCBA5E",
+"6. c #E2B355",
+"7. c #E2B65B",
+"8. c #E4BA5D",
+"9. c #EABD5E",
+"0. c #C5AA62",
+"q. c #CCAE63",
+"w. c #C6AE69",
+"e. c #D5AF62",
+"r. c #CEB167",
+"t. c #CCB36C",
+"y. c #D5B162",
+"u. c #DCB462",
+"i. c #D7B964",
+"p. c #DCBC64",
+"a. c #D2B66B",
+"s. c #DCB669",
+"d. c #D7BE69",
+"f. c #DFB86A",
+"g. c #D0B771",
+"h. c #D2BA74",
+"j. c #D5BE78",
+"k. c #E1B766",
+"l. c #E4BB63",
+"z. c #E9BE63",
+"x. c #E3BB6A",
+"c. c #E9BF6A",
+"v. c #E1BE72",
+"b. c #DDC16B",
+"n. c #DAC27E",
+"m. c #E4C164",
+"M. c #ECC264",
+"N. c #E4C36B",
+"B. c #EBC36C",
+"V. c #E7C96F",
+"C. c #EECA6E",
+"Z. c #F1C564",
+"A. c #F1C76A",
+"S. c #F5CB6C",
+"D. c #FACE6D",
+"F. c #F4D06F",
+"G. c #FCD06E",
+"H. c #E5C371",
+"J. c #EDC573",
+"K. c #E4CA73",
+"L. c #ECCC74",
+"P. c #E7CF7A",
+"I. c #EBCD7A",
+"U. c #F3CD73",
+"Y. c #F8CE71",
+"T. c #F3CD7A",
+"R. c #EDD076",
+"E. c #EDD17B",
+"W. c #F4D274",
+"Q. c #FBD274",
+"!. c #FED977",
+"~. c #F3D47B",
+"^. c #FDD47A",
+"/. c #F5DA7C",
+"(. c #FDDA7C",
+"). c #FFE07F",
+"_. c #DBC481",
+"`. c #DFC885",
+"'. c #E1CA86",
+"]. c #EACC80",
+"[. c #E4CD8A",
+"{. c #EED383",
+"}. c #E7D18F",
+"|. c #EAD38C",
+" X c #F4D680",
+".X c #FDD780",
+"XX c #F5DA83",
+"oX c #FCDC84",
+"OX c #F5DB8A",
+"+X c #FADE89",
+"@X c #EAD492",
+"#X c #EED896",
+"$X c #EFDA9A",
+"%X c #F1DD9D",
+"&X c #FDE283",
+"*X c #F6E18D",
+"=X c #FEE48D",
+"-X c #FFE692",
+";X c #FFE894",
+":X c #FBE799",
+">X c #FFEA98",
+",X c #F6E2A3",
+"<X c #FAE6A6",
+"1X c #FAE7A8",
+"2X c #FDEAAB",
+"3X c None",
+/* pixels */
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u u u u y y u y 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u u u u u u a u u u u u u a u u 2 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u u u u u s m V D ' { ' D M d u u a u u u u 2 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u u u M } m.~.oX=X=X=X=X=X-X-X=X&X/.m.=.V u u a u u w 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u u M 4.~.=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X/.5.Z u u u u u 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u ] V.&X=X=X&X=X=X=X=X=X=X=X=X=X&X=X=X=X=X=X=X=X=X=X=XW.} a u u u 2 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu a u u ' W.=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X+X=X=X=X&X=X=X=X~.} a u u u < 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u M N.=X&X=X=X=X=X=X=X=X-X=X=X=X=X&X=X=X=XoX=X=X=X=X&X+X=X=X=X=X=X=X=XL.M u u u < 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u } XX=X=X=X&X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X*X=X=X=X=X=X=X=X=X=X=X=X=X=X=XoX<.a u u 2 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u s m.&X=X=X=X=X=X=X=X=X=X=X=X=X=X/.L.M.m.9.m.9.m.C.~.&X*X=X=X=X=X=X=X=X=X=X=X=X=XV.m u u 2 o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u c R.=X=X=X=X=X=X=X=X=X=X=XoXC.1.| S S A S D D D D ] ] ..<.N./.=X-X=X-X=X=X=X=X=X=X=XXXZ u a 2 o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3Xu u u m XX=X=X=X=X=X=X=X=X=X=XW.3.| ^ A C M M M C S S A A A / ( { =.<.l.I.=X-X-X=X=X=X=X=X=X=X=XV a u 2 . 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3Xu u m /.=X=X=X-X=X=X=X=X=X~.1.D ] S Z v x p s u s d d v c c v V { =.7.8.7.l.T.=X-X=X-X-X-X-X-X=X=XV u a 1 3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3Xu u d /.=X=X=X=X=X=X=X=X&X8.^ A ( S M v e $.r.e.r.u w i a.a.a.&.b ^ =.l.l.l.c.z.z.XX-X-X-X-X=X-X-X;X&XV u u : 3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3Xu u s R.=X=X=X=X=X=X=X=XU.{ ^ Z C ( A M u w [.2X2X2X0 - 7 2X2X1X@Xi P *.l.x.B.U.C.z.z.W.-X-X-X-X-X-X=X-X*Xd a u # . 3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3Xu u u l.=X=X=X=X-X=X=X=Xm.Z Z Z Z n Z Z v e , '.2X2X2X5 & ; 2X2X2X}.7 b { 3.x.^.^.^.Y.A.z.R.-X;X;X;X;X-X;X-XP.a u y . 3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3Xu u } -X-X=X-X=X=X=X=Xl.M M Z C C C C C x e ; '.2X2X2X, $ = 2X2X2X}.6 h ) >.J..X.X.X.X(.W.Z.C.&X;X;X;X;X-X-X-X<.u u < 3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3Xu u c oX=X=X=X=X=X=X=Xl.Z C M M C C v v v s w = '.2X2X2X5 $ = 2X2X2X}.5 g ) u./.+X+X=X=X=X&XW.Z.F.=X;X;X;X;X-X-X*XV u y @ X 3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3Xu u u N.-X-X-X-X=X=X=XB.Z M C v v s e e e e w > % `.2X2X2X= + % 2X2X2X}.= r L 4.E.OX+X-X=X=X&X).W.M.R.;X;X;X-X-X-X;XR.u u y 3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3Xu u U -X-X-X-X-X-X=XW.^ C C C x e e r 6 5 4 ; = $ `.2X2X2X= O = 2X2X2X}.O = t Q ,.b.P./.*X=X&X&X).F.M.W.;X;X;X;X&X-X&X} u u O 3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3Xu u u R.-X-X-X-X-X-X=X=.{ ^ Z C x n 2X2X<X<X1X2X<X<X2X2X2X2X1X1X<X2X2X2X<X$X[.b.~ J I ~ b.P.&X&X&X).!.F.m.).;X;X;X;X;X&X).u y y 3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3Xu u U -X-X-X-X-X-X-Xc.=.=. ._ ^ x z 2X2X1X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X<Xn.l I ,.K./.).).).F.Z.Z.&X;X;X=X-X-X&X} u u O 3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3Xu u V.-X;X-X-X-X-XOX>.>.>.=.=._ n b 2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X:XI N +.V./.).).F.F.9.W.;X=X;X-X-X-XR.u u > 3X3X3X3X3X3X3X3X",
+"3X3X3X3X3Xu u d =X;X-X-X-X-X-Xx.>.>.>.>.>...^ P 2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X,Xl N 4.R.!.!.!.G.Z.M.&X;X=X=X-X-X-XB a u 3X3X3X3X3X3X3X",
+"3X3X3X3X3Xu u @.;X;X-X;X;X;XXX>.:.>.>.>.>.>._ P ` Y Y W _.2X2X2X2X2X2X@XW W ~ 0.t.'.<X2X2X2X2X2X2X2X2X'.0 ' m./.!.!.Q.S.9.F.=X;X-X=X-X&X4.u u @ 3X3X3X3X3X3X3X",
+"3X3X3X3X3Xu u P.;X;X;X;X-X:XN.>.>.>.>.>.>.>.=._ P z r 4 8 2X2X2X2X2X2X_.. $ , 6 1 3 t ~ 1X2X2X2X2X2X2X2Xt B 5.G.!.!.G.G.M.9.&X;X=X-X-X=X/.u u > 3X3X3X3X3X3X3X",
+"3X3X3X3Xu u d =X;X;X=X;X;X=X3.>.>.>.e.>.3.3.>.:.*._ P r 9 2X2X2X2X2X1Xn.@ , c B N m h 8 ~ 2X2X2X2X2X2X2XI h <.F.!.G.G.F.M.9.W.;X=X-X-X=X=Xm u y . 3X3X3X3X3X3X",
+"3X3X3X3Xu u ' -X-X>X-X-X-X X>.>.>.>.>.>.>.u.u.u.u.3.$.P f 2X2X2X2X2X2X_.$ i / -.<.8.} h 8 1X2X2X2X2X2X2X! i <.S.G.G.G.G.Z.9.Z.=X-X=X-X&X-X} u u X 3X3X3X3X3X3X",
+"3X3X3X3Xu u 4.-X-X-X-X-X-XJ.3.>.>.k.k.k.k.k.u.k.u.u.:.U k 2X2X2X2X2X1X_.% f } 8.Z.F.8.U 8 ,X2X2X2X2X2X2XI g } Z.D.G.D.G.D.Z.9.&X-X=X=X=X-Xm.u u @ 3X3X3X3X3X3X",
+"3X3X3X3Xu u K.;X-X;X-X>X-Xk.3.k.k.k.k.k.k.k.k.k.k.u.e.U k 2X2X2X2X2X2X_.% f [ 8.F.M.<.b i 2X2X2X2X2X2X2Xt a X.Z.D.D.D.G.G.Z.9./.=X-X=X=X=XR.u u & 3X3X3X3X3X3X",
+"3X3X3X3Xu u E.;X-X;X-X-X=Xl.l.x.c.k.x.k.k.x.x.v.x.x.u.) z 2X2X2X2X2X2X_.$ 7 L <.<.} N 6 h.2X2X2X2X2X2X_.: V 1.S.D.D.G.D.S.M.6.W.-X=X-X=X=X&Xu u > X 3X3X3X3X3X",
+"3X3X3Xu a u =X;X;X;X;X;XoX7.z.c.c.c.c.c.c.c.c.c.x.k.u.) z 2X2X2X2X2X2Xn.o = i N h i l n.2X2X2X2X2X2X<Xt t D 7.M.Z.z.z.9.9.9.6.M.-X=X=X=X;X=Xm u 1 3X3X3X3X3X",
+"3X3X3Xy u a =X;X;X;X;X;XXXl.z.c.c.c.c.T.J.J.T.v.J.J.s.` z 2X2X2X2X2X2X#XW ~ ~ t.n.$X2X2X2X2X2X2X2X,Xt % t V X.8.9.8.9.9.9.6.6.M.-X=X=X=X=X&XM u 2 3X3X3X3X3X",
+"3X3X3Xu u m -X-X-X;X;X;X~.z.z.c.c.c.c..XJ.J.J.J.J.J.x.O.b 2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2Xw.$ * y V X.7.8.8.9.7.8.7.6.8.=X=X-X-X=X-XV a y 3X3X3X3X3X",
+"3X3X3Xu a m -X-X-X;X;X;X~.7.z.c.c.c.c.c.c.J.T.J.T.J.B.O.b 2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X,X~ , c ' X.6.6.7.6.6.6.6.8.=X=X=X-X&X-XV u y 3X3X3X3X3X",
+"3X3X3Xu u m -X-X-X-X-X-X/.8.l.z.c.T.c.J.c.J.T.v.J.J.x.O.G 2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2Xn.r v { 6.6.6.6.6.6.-.7.&X-X=X=X=X-XD u y 3X3X3X3X3X",
+"3X3X3Xu u d =X-X-X-X-X-X~.7.z.z.c.c.c.c.c.J.c.T.T.^.T.y.R 2X2X2X2X2X2X@XK K W W W ~ h.#X1X2X2X2X2X2X2X2X2Xa.i Z ..X.6.6.-.-.6.7.-X-X-X-X-X-XD u 2 3X3X3X3X3X",
+"3X3X3Xw u a =X-X-X-X-X-X~.7.7.8.c.c.c.c.T..X.X+X+X+XXXi.R 2X2X2X2X2X2Xn.. * 5 8 5 3 = * q `.2X2X2X2X2X2X2X<Xk c | X.6.-.-.-.-.z.&X;X=X;X-X;XV u w 3X3X3X3X3X",
+"3X3X3Xu u u =X-X=X-X-X-X/.8.M.B.Y.T.^.^.^..X.XoXoX+XXXi.R 2X2X2X2X2X2X_.$ 0 b U U N l t 5 $ `.2X2X2X2X2X2X2X0.e Z .....-.-.6.c.;X=X;X=X;X-Xd u 1 3X3X3X3X3X",
+"3X3X3X3Xu a E.-X-X-X-X-X=Xz.S.D.Y.^.Q.^.^.^..XoX+X+XXXi.R 2X2X2X2X2X2X_.= l +.u.i.,.O.E h 5 G 2X2X2X2X2X2X2X_.0 n | . .*. .*.T.-X;X;X;X-X=Xa u : 3X3X3X3X3X",
+"3X3X3X3Xu u N.-X-X-X=X-X-XA.Z.S.Y.Q.Q.^.^..X.XoXoX&X.Xi.R 2X2X2X2X2X2X_.= N y.H.H.m.i.y.E f 8 2X2X2X2X2X2X2X'.6 n | . . . . ..X;X;X;X;X-X~.u u & 3X3X3X3X3X",
+"3X3X3X3Xu u <.-X-X=X=X-X-XW.Z.S.Y.Y.Q.^.^.^.(..XoX=XXXi.R 2X2X2X2X2X2X_.= L 4.H.J.H.x.i.o.k j 2X2X2X2X2X2X2X_.6 B . . . .{ =.-X;X-X;X-X-Xb.a u @ 3X3X3X3X3X",
+"3X3X3X3Xy a V =X=X-X-X=X-XXXZ.S.Y.Y.Y.Q.!.^..X.XoXoXE.y.I 2X2X2X2X2X2X_.= J y.b.H.N.p.&.P 0 g.2X2X2X2X2X2X2Xr.r B _ { .| ] l.-X;X;X-X-X;X..u u . . 3X3X3X3X3X",
+"3X3X3X3Xy u a =X=X=X=X-X=X-XM.Z.S.Y.Y.Q.Q.^.^.^.U.J.u.E l 2X2X2X2X2X2X_.* k o.e.e.$.` P q W 1X2X2X2X2X2X2X2XG i B ] | ] ] ( ~.=X;X;X;X;X;XM u y 3X3X3X3X3X3X",
+"3X3X3X3X3Xu u V.-X=X-X=X-X-XF.M.A.D.Y.Q.Y.Q.Y.B.2.[ N 0 j 2X2X2X2X2X2X_.O 5 l G z H H Q _.2X2X2X2X2X2X2X2X#X, g ^ ] ] | ] ..-X-X-X-X&X;X).u u : 3X3X3X3X3X3X",
+"3X3X3X3X3Xu u } =X=X=X=X-X=X&XM.Z.S.D.W.Q.Y.B.*.a.#X@X|.,X2X2X2X2X2X2X,X[.[.}.}.%X<X2X2X2X2X2X2X2X2X2X2X<Xj 6 b / ] ] ] ] M.-X-X-X-X-X-X4.u u O 3X3X3X3X3X3X",
+"3X3X3X3X3Xy u d =X=X=X=X=X=X-XS.M.A.S.S.U.A.u.) n.2X2X2X2X2X2X2X2X2X2X2X2X1X2X2X2X2X2X2X2X2X2X2X2X2X2X2XW ; i M ( S S S ] &X-X-X-X-X=X-Xm u y . X 3X3X3X3X3X3X",
+"3X3X3X3X3X3Xu u p.=X=X=X=X=X-X&X9.Z.C.S.S.M.:.b [.2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X%XG = r x v C D D D m.-X-X-X-X-X-XR.u u : 3X3X3X3X3X3X3X",
+"3X3X3X3X3X3Xy u B =X=X=X=X=X=X=XF.9.M.A.C.M.=.h %X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X1X#X~ 4 ; r p v v M C A | &X-X-X-X-X-X-X] u u X 3X3X3X3X3X3X3X",
+"3X3X3X3X3X3Xy u u N.=X=X-X=X-X=X=XM.z.M.M.M.1.V #X%X%X%X%X$X%X%X<X2X2X2X%X$X%X2X2X2X<X[.n.t.W q = , r i x v C C C M C W.-X-X-X-X-X-X/.u u 1 X 3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3Xu u V *X=X=X*X=X=X=XoX8.M.M.M.5.{ m r , ; $ $ o o `.2X2X2X3 o $ 2X2X2X[.o $ 4 9 0 r g x v m C M C C C 8.&X-X-X-X-X-X-X[ u u @ 3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X2 u u 5.=X=X=X=X=X=X=XI.8.M.M.z.3.O.) P b r 0 4 % `.2X2X2X3 $ * 2X2X2X[.$ 4 r e ^ n n Z Z Z C C C M | =X=X-X-X-X-X-XR.u u < 3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3Xy u d XX=X=X=X=X-X=X=XS.8.8.M.M.z.z.7.{ _ U g 5 `.2X2X2X8 = 3 2X2X2X}.3 0 x ^ _ ^ ^ ^ Z ^ B ^ C .&X-X-X-X-X-X-X=XB u u o 3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X1 u u ' =X=X*X=X=X*X=X=XW.8.M.M.A.S.l.u.>.o.L r [.2X2X2X9 = 8 2X2X2X}.4 r ^ _ *.*._ ) ) ^ ^ ^ O.oX=X-X-X-X-X-X-X<.u u : . 3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3Xy u u i.=X=X=X=X=X-X*X=XW.9.M.A.B.3.5.5.;.U f [.2X2X2Xq 4 8 2X2X2X}.r q _ _ ;.;.*._ _ ` _ e.+X-X-X-X-X-X-X-XR.a u 2 3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3Xu u u K.=X=X=X-X=X=X=X=XXXz.M.8.5.8.u.:.) h }.2X2X2Xj r f 2X2X2X@Xq T _ e.e.u.e.;.$.$.b.-X-X-X=X;X=X;X-X&Xa a u + 3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3Xu u d ~.=X=X=X=X=X-X=X-X+XC.3.5.7.7.2.@.) q.r.q.q.H H L g.r.w.q.T ` e.k.v.k.k.s.s.{.-X-X;X-X;X;X;X;X*XV u u & . 3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X2 u u c XX-X=X=X=X=X-X=X-X-X Xl.7.7.u.2.$.o.[ [ o.O.$.&.&.` ` ` q.s.k.v.k.k.x.{.%X>X>X>X;X>X;X>X>X*XV u u > 3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X2 u u m ~.=X-X-X-X=X-X-X-X-X-X Xc.7.5.u.3.e.y.u.s.f.k.s.e.e.s.s.k.k.k.v. X:X>X>X>X>X>X>X;X>X>X*XV u u < 3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X2 u u d R.-X=X-X=X-X-X-X-X-X-X-X+XI.v.u.s.l.k.k.x.x.x.s.s.s.s.j.].+X>X>X>X>X>X:X>X>X>X>X>XOXV u u 1 3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X2 u u a p.-X-X-X;X;X;X-X-X-X:X-X-X-X-XOX XL.J.J.J.L.I.].OX:X>X-X>X>X-X>X>X>X>X>X>X>X>XK.a a u < 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X2 u u u @.=X;X;X>X;X-X-X>X-X-X-X-X;X-X-X-X-X-X>X>X-X>X-X>X>X>X>X;X>X>X>X-X>X-X-X:X<.u u u > 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X1 u u u m n.>X;X>X>X-X-X-X-X>X-X-X-X;X;X;X-X-X-X-X-X>X-X-X>X-X>X>X-X>X>X>X>XK.B u u u & 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xw u u u / {.>X>X-X-X-X-X-X-X-X-X-X-X;X-X-X;X:X-X-X>X-X:X>X;X;X>X;X;X{.[ u u u w + 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X2 u u u u ) K.-X-X-X-X:X-X-X-X-X-X-X-X-X-X-X-X-X>X-X-X-X-X-X-XE.[ u u u u - . 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X1 u u u u m 2.E.-X+X:X-X-X-X-X-X-X-X-X-X:X-X-X-X;X-XOXi.B u u u u 1 o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X> u u u u u v [ l.I.OX-X-X-X-X-X-X-X-X+XI.f.@.m u u u u u 1 + o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X& 2 u u u u u u u d B V V V V B d u u u u u u u y - . o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X+ - 1 u u u u u u u a u u u u u u u u 2 - o o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xo . X # - > 1 2 2 2 1 2 > - # o . o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xo o . o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
+"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X"
+};
diff --git a/src/xpm/check.xpm b/src/xpm/check.xpm
new file mode 100644
index 0000000000..e62b656961
--- /dev/null
+++ b/src/xpm/check.xpm
@@ -0,0 +1,41 @@
+/* XPM */
+static const char * check_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 3 1",
+" c #008000",
+". c #00FF00",
+"X c None",
+/* pixels */
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXX XXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXX . XXXXXXXXXXX",
+"XXXXXXXXXXXXXXXX .. XXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXX . XXXXXXXXXXXX",
+"XXXXXXXXXXXXXXX .. XXXXXXXXXXXXX",
+"XXXXXXXXXXX XX . XXXXXXXXXXXXX",
+"XXXXXXXXXXX . .. XXXXXXXXXXXXXX",
+"XXXXXXXXXXX .. . XXXXXXXXXXXXXX",
+"XXXXXXXXXXXX ... XXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXX . XXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXX XXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+};
diff --git a/src/xpm/send16.xpm b/src/xpm/send16.xpm
new file mode 100644
index 0000000000..7da44d9c56
--- /dev/null
+++ b/src/xpm/send16.xpm
@@ -0,0 +1,278 @@
+/* XPM */
+static const char * send16_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 256 2",
+" c #ADF7AD",
+". c #9CFF9C",
+"X c None",
+"o c #ADEFAD",
+"O c #94FF94",
+"+ c #D6CECE",
+"@ c #8CFF8C",
+"# c #CECECE",
+"$ c #CECEC5",
+"% c #84FF84",
+"& c #CEC5C5",
+"* c #73FF73",
+"= c #C5C5C5",
+"- c #6BFF6B",
+"; c #73F773",
+": c #C5BDBD",
+"> c #6BF76B",
+", c #BDBDBD",
+"< c #63F763",
+"1 c #B5B5B5",
+"2 c #52F752",
+"3 c #42FF42",
+"4 c #3AFF3A",
+"5 c #ADADAD",
+"6 c #ADADA5",
+"7 c #4AEF4A",
+"8 c #29FF29",
+"9 c #A5A5A5",
+"0 c #42E642",
+"q c #9CA59C",
+"w c #3AE63A",
+"e c #10FF10",
+"r c #08FF08",
+"t c #949C94",
+"y c #00FF00",
+"u c #00F700",
+"i c #8C948C",
+"p c #00EF00",
+"a c #08E608",
+"s c #10DE10",
+"d c #00E600",
+"f c #00DE00",
+"g c #19C519",
+"h c #00CE00",
+"j c #00C500",
+"k c #008C00",
+"l c #008400",
+"z c #669900",
+"x c #999900",
+"c c #CC9900",
+"v c #FF9900",
+"b c #00CC00",
+"n c #33CC00",
+"m c #66CC00",
+"M c #99CC00",
+"N c #CCCC00",
+"B c #FFCC00",
+"V c #66FF00",
+"C c #99FF00",
+"Z c #CCFF00",
+"A c #000033",
+"S c #330033",
+"D c #660033",
+"F c #990033",
+"G c #CC0033",
+"H c #FF0033",
+"J c #003333",
+"K c #333333",
+"L c #663333",
+"P c #993333",
+"I c #CC3333",
+"U c #FF3333",
+"Y c #006633",
+"T c #336633",
+"R c #666633",
+"E c #996633",
+"W c #CC6633",
+"Q c #FF6633",
+"! c #009933",
+"~ c #339933",
+"^ c #669933",
+"/ c #999933",
+"( c #CC9933",
+") c #FF9933",
+"_ c #00CC33",
+"` c #33CC33",
+"' c #66CC33",
+"] c #99CC33",
+"[ c #CCCC33",
+"{ c #FFCC33",
+"} c #33FF33",
+"| c #66FF33",
+" . c #99FF33",
+".. c #CCFF33",
+"X. c #FFFF33",
+"o. c #000066",
+"O. c #330066",
+"+. c #660066",
+"@. c #990066",
+"#. c #CC0066",
+"$. c #FF0066",
+"%. c #003366",
+"&. c #333366",
+"*. c #663366",
+"=. c #993366",
+"-. c #CC3366",
+";. c #FF3366",
+":. c #006666",
+">. c #336666",
+",. c #666666",
+"<. c #996666",
+"1. c #CC6666",
+"2. c #009966",
+"3. c #339966",
+"4. c #669966",
+"5. c #999966",
+"6. c #CC9966",
+"7. c #FF9966",
+"8. c #00CC66",
+"9. c #33CC66",
+"0. c #99CC66",
+"q. c #CCCC66",
+"w. c #FFCC66",
+"e. c #00FF66",
+"r. c #33FF66",
+"t. c #99FF66",
+"y. c #CCFF66",
+"u. c #FF00CC",
+"i. c #CC00FF",
+"p. c #009999",
+"a. c #993399",
+"s. c #990099",
+"d. c #CC0099",
+"f. c #000099",
+"g. c #333399",
+"h. c #660099",
+"j. c #CC3399",
+"k. c #FF0099",
+"l. c #006699",
+"z. c #336699",
+"x. c #663399",
+"c. c #996699",
+"v. c #CC6699",
+"b. c #FF3399",
+"n. c #339999",
+"m. c #669999",
+"M. c #999999",
+"N. c #CC9999",
+"B. c #FF9999",
+"V. c #00CC99",
+"C. c #33CC99",
+"Z. c #66CC66",
+"A. c #99CC99",
+"S. c #CCCC99",
+"D. c #FFCC99",
+"F. c #00FF99",
+"G. c #33FF99",
+"H. c #66CC99",
+"J. c #99FF99",
+"K. c #CCFF99",
+"L. c #FFFF99",
+"P. c #0000CC",
+"I. c #330099",
+"U. c #6600CC",
+"Y. c #9900CC",
+"T. c #CC00CC",
+"R. c #003399",
+"E. c #3333CC",
+"W. c #6633CC",
+"Q. c #9933CC",
+"!. c #CC33CC",
+"~. c #FF33CC",
+"^. c #0066CC",
+"/. c #3366CC",
+"(. c #666699",
+"). c #9966CC",
+"_. c #CC66CC",
+"`. c #FF6699",
+"'. c #0099CC",
+"]. c #3399CC",
+"[. c #6699CC",
+"{. c #9999CC",
+"}. c #CC99CC",
+"|. c #FF99CC",
+" X c #00CCCC",
+".X c #33CCCC",
+"XX c #66CCCC",
+"oX c #99CCCC",
+"OX c #CCCCCC",
+"+X c #FFCCCC",
+"@X c #00FFCC",
+"#X c #33FFCC",
+"$X c #66FF99",
+"%X c #99FFCC",
+"&X c #CCFFCC",
+"*X c #FFFFCC",
+"=X c #3300CC",
+"-X c #6600FF",
+";X c #9900FF",
+":X c #0033CC",
+">X c #3333FF",
+",X c #6633FF",
+"<X c #9933FF",
+"1X c #CC33FF",
+"2X c #FF33FF",
+"3X c #0066FF",
+"4X c #3366FF",
+"5X c #6666CC",
+"6X c #9966FF",
+"7X c #CC66FF",
+"8X c #FF66CC",
+"9X c #0099FF",
+"0X c #3399FF",
+"qX c #6699FF",
+"wX c #9999FF",
+"eX c #CC99FF",
+"rX c #FF99FF",
+"tX c #00CCFF",
+"yX c #33CCFF",
+"uX c #66CCFF",
+"iX c #99CCFF",
+"pX c #CCCCFF",
+"aX c #FFCCFF",
+"sX c #33FFFF",
+"dX c #66FFCC",
+"fX c #99FFFF",
+"gX c #CCFFFF",
+"hX c #FF6666",
+"jX c #66FF66",
+"kX c #FFFF66",
+"lX c #6666FF",
+"zX c #FF66FF",
+"xX c #66FFFF",
+"cX c #A50021",
+"vX c #5F5F5F",
+"bX c #777777",
+"nX c #868686",
+"mX c #969696",
+"MX c #CBCBCB",
+"NX c #B2B2B2",
+"BX c #D7D7D7",
+"VX c #DDDDDD",
+"CX c #E3E3E3",
+"ZX c #EAEAEA",
+"AX c #F1F1F1",
+"SX c #F8F8F8",
+"DX c #FFFBF0",
+"FX c #A0A0A4",
+"GX c #808080",
+"HX c #FF0000",
+"JX c #00FF00",
+"KX c #FFFF00",
+"LX c #0000FF",
+"PX c #FF00FF",
+"IX c #00FFFF",
+"UX c #FFFFFF",
+/* pixels */
+"X X X X X X X k k X X X X X X X ",
+"X X X X X X X k j k X X X X X X ",
+"X X X X X X X k o j k X X X X X ",
+"X X X X X X X k * o j k X X X X ",
+"l k k k k k k k * * . j k X X X ",
+"l @ @ @ @ @ @ @ 4 e e % j k X X ",
+"l O 3 8 e r r r r r r e ; j k X ",
+"l @ e e r r r r r u p a f < j k ",
+"l @ r u p a a a a a f f w j k i ",
+"l O ; ; ; ; ; < a f b 0 j k t : ",
+"l k k k k k k k s j 7 j k q = X ",
+"X $ = = = = = k g 7 j k 9 & X X ",
+"X X X X X X X k 2 j k 6 $ X X X ",
+"X X X X X X X k j k 5 + X X X X ",
+"X X X X X X X k k 1 + X X X X X ",
+"X X X X X X X = , X X X X X X X "
+};
diff --git a/src/xpm/send16noshadow.xpm b/src/xpm/send16noshadow.xpm
new file mode 100644
index 0000000000..f6cef45e0d
--- /dev/null
+++ b/src/xpm/send16noshadow.xpm
@@ -0,0 +1,278 @@
+/* XPM */
+static const char * send16noshadow_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 256 2",
+" c #ADF7AD",
+". c #9CFF9C",
+"X c None",
+"o c #ADEFAD",
+"O c #94FF94",
+"+ c #D6CECE",
+"@ c #8CFF8C",
+"# c #CECECE",
+"$ c #CECEC5",
+"% c #84FF84",
+"& c #CEC5C5",
+"* c #73FF73",
+"= c #C5C5C5",
+"- c #6BFF6B",
+"; c #73F773",
+": c #C5BDBD",
+"> c #6BF76B",
+", c #BDBDBD",
+"< c #63F763",
+"1 c #B5B5B5",
+"2 c #52F752",
+"3 c #42FF42",
+"4 c #3AFF3A",
+"5 c #ADADAD",
+"6 c #ADADA5",
+"7 c #4AEF4A",
+"8 c #29FF29",
+"9 c #A5A5A5",
+"0 c #42E642",
+"q c #9CA59C",
+"w c #3AE63A",
+"e c #10FF10",
+"r c #08FF08",
+"t c #949C94",
+"y c #00FF00",
+"u c #00F700",
+"i c #8C948C",
+"p c #00EF00",
+"a c #08E608",
+"s c #10DE10",
+"d c #00E600",
+"f c #00DE00",
+"g c #19C519",
+"h c #00CE00",
+"j c #00C500",
+"k c #008C00",
+"l c #008400",
+"z c #669900",
+"x c #999900",
+"c c #CC9900",
+"v c #FF9900",
+"b c #00CC00",
+"n c #33CC00",
+"m c #66CC00",
+"M c #99CC00",
+"N c #CCCC00",
+"B c #FFCC00",
+"V c #66FF00",
+"C c #99FF00",
+"Z c #CCFF00",
+"A c #000033",
+"S c #330033",
+"D c #660033",
+"F c #990033",
+"G c #CC0033",
+"H c #FF0033",
+"J c #003333",
+"K c #333333",
+"L c #663333",
+"P c #993333",
+"I c #CC3333",
+"U c #FF3333",
+"Y c #006633",
+"T c #336633",
+"R c #666633",
+"E c #996633",
+"W c #CC6633",
+"Q c #FF6633",
+"! c #009933",
+"~ c #339933",
+"^ c #669933",
+"/ c #999933",
+"( c #CC9933",
+") c #FF9933",
+"_ c #00CC33",
+"` c #33CC33",
+"' c #66CC33",
+"] c #99CC33",
+"[ c #CCCC33",
+"{ c #FFCC33",
+"} c #33FF33",
+"| c #66FF33",
+" . c #99FF33",
+".. c #CCFF33",
+"X. c #FFFF33",
+"o. c #000066",
+"O. c #330066",
+"+. c #660066",
+"@. c #990066",
+"#. c #CC0066",
+"$. c #FF0066",
+"%. c #003366",
+"&. c #333366",
+"*. c #663366",
+"=. c #993366",
+"-. c #CC3366",
+";. c #FF3366",
+":. c #006666",
+">. c #336666",
+",. c #666666",
+"<. c #996666",
+"1. c #CC6666",
+"2. c #009966",
+"3. c #339966",
+"4. c #669966",
+"5. c #999966",
+"6. c #CC9966",
+"7. c #FF9966",
+"8. c #00CC66",
+"9. c #33CC66",
+"0. c #99CC66",
+"q. c #CCCC66",
+"w. c #FFCC66",
+"e. c #00FF66",
+"r. c #33FF66",
+"t. c #99FF66",
+"y. c #CCFF66",
+"u. c #FF00CC",
+"i. c #CC00FF",
+"p. c #009999",
+"a. c #993399",
+"s. c #990099",
+"d. c #CC0099",
+"f. c #000099",
+"g. c #333399",
+"h. c #660099",
+"j. c #CC3399",
+"k. c #FF0099",
+"l. c #006699",
+"z. c #336699",
+"x. c #663399",
+"c. c #996699",
+"v. c #CC6699",
+"b. c #FF3399",
+"n. c #339999",
+"m. c #669999",
+"M. c #999999",
+"N. c #CC9999",
+"B. c #FF9999",
+"V. c #00CC99",
+"C. c #33CC99",
+"Z. c #66CC66",
+"A. c #99CC99",
+"S. c #CCCC99",
+"D. c #FFCC99",
+"F. c #00FF99",
+"G. c #33FF99",
+"H. c #66CC99",
+"J. c #99FF99",
+"K. c #CCFF99",
+"L. c #FFFF99",
+"P. c #0000CC",
+"I. c #330099",
+"U. c #6600CC",
+"Y. c #9900CC",
+"T. c #CC00CC",
+"R. c #003399",
+"E. c #3333CC",
+"W. c #6633CC",
+"Q. c #9933CC",
+"!. c #CC33CC",
+"~. c #FF33CC",
+"^. c #0066CC",
+"/. c #3366CC",
+"(. c #666699",
+"). c #9966CC",
+"_. c #CC66CC",
+"`. c #FF6699",
+"'. c #0099CC",
+"]. c #3399CC",
+"[. c #6699CC",
+"{. c #9999CC",
+"}. c #CC99CC",
+"|. c #FF99CC",
+" X c #00CCCC",
+".X c #33CCCC",
+"XX c #66CCCC",
+"oX c #99CCCC",
+"OX c #CCCCCC",
+"+X c #FFCCCC",
+"@X c #00FFCC",
+"#X c #33FFCC",
+"$X c #66FF99",
+"%X c #99FFCC",
+"&X c #CCFFCC",
+"*X c #FFFFCC",
+"=X c #3300CC",
+"-X c #6600FF",
+";X c #9900FF",
+":X c #0033CC",
+">X c #3333FF",
+",X c #6633FF",
+"<X c #9933FF",
+"1X c #CC33FF",
+"2X c #FF33FF",
+"3X c #0066FF",
+"4X c #3366FF",
+"5X c #6666CC",
+"6X c #9966FF",
+"7X c #CC66FF",
+"8X c #FF66CC",
+"9X c #0099FF",
+"0X c #3399FF",
+"qX c #6699FF",
+"wX c #9999FF",
+"eX c #CC99FF",
+"rX c #FF99FF",
+"tX c #00CCFF",
+"yX c #33CCFF",
+"uX c #66CCFF",
+"iX c #99CCFF",
+"pX c #CCCCFF",
+"aX c #FFCCFF",
+"sX c #33FFFF",
+"dX c #66FFCC",
+"fX c #99FFFF",
+"gX c #CCFFFF",
+"hX c #FF6666",
+"jX c #66FF66",
+"kX c #FFFF66",
+"lX c #6666FF",
+"zX c #FF66FF",
+"xX c #66FFFF",
+"cX c #A50021",
+"vX c #5F5F5F",
+"bX c #777777",
+"nX c #868686",
+"mX c #969696",
+"MX c #CBCBCB",
+"NX c #B2B2B2",
+"BX c #D7D7D7",
+"VX c #DDDDDD",
+"CX c #E3E3E3",
+"ZX c #EAEAEA",
+"AX c #F1F1F1",
+"SX c #F8F8F8",
+"DX c #FFFBF0",
+"FX c #A0A0A4",
+"GX c #808080",
+"HX c #FF0000",
+"JX c #00FF00",
+"KX c #FFFF00",
+"LX c #0000FF",
+"PX c #FF00FF",
+"IX c #00FFFF",
+"UX c #FFFFFF",
+/* pixels */
+"X X X X X X X k k X X X X X X X ",
+"X X X X X X X k j k X X X X X X ",
+"X X X X X X X k o j k X X X X X ",
+"X X X X X X X k * o j k X X X X ",
+"l k k k k k k k * * . j k X X X ",
+"l @ @ @ @ @ @ @ 4 e e % j k X X ",
+"l O 3 8 e r r r r r r e ; j k X ",
+"l @ e e r r r r r u p a f < j k ",
+"l @ r u p a a a a a f f w j k X ",
+"l O ; ; ; ; ; < a f b 0 j k X X ",
+"l k k k k k k k s j 7 j k X X X ",
+"X X X X X X X k g 7 j k X X X X ",
+"X X X X X X X k 2 j k X X X X X ",
+"X X X X X X X k j k X X X X X X ",
+"X X X X X X X k k X X X X X X X ",
+"X X X X X X X X X X X X X X X X "
+};
diff --git a/src/xpm/send20.xpm b/src/xpm/send20.xpm
new file mode 100644
index 0000000000..68e7b1379a
--- /dev/null
+++ b/src/xpm/send20.xpm
@@ -0,0 +1,282 @@
+/* XPM */
+static const char * send20_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"20 20 256 2",
+" c #CEFFCE",
+". c #BDFFBD",
+"X c #C5F7C5",
+"o c #B5FFB5",
+"O c #ADFFAD",
+"+ c #A5FFA5",
+"@ c #9CFF9C",
+"# c None",
+"$ c #94FF94",
+"% c #D6CECE",
+"& c #8CFF8C",
+"* c #CECEC5",
+"= c #84FF84",
+"- c #94EF94",
+"; c #7BFF7B",
+": c #CEC5C5",
+"> c #73FF73",
+", c #C5C5C5",
+"< c #C5C5BD",
+"1 c #6BFF6B",
+"2 c #BDC5B5",
+"3 c #63FF63",
+"4 c #6BF76B",
+"5 c #BDBDBD",
+"6 c #BDBDB5",
+"7 c #5AFF5A",
+"8 c #63F763",
+"9 c #B5BDB5",
+"0 c #B5BDAD",
+"q c #52FF52",
+"w c #BDB5B5",
+"e c #5AF75A",
+"r c #B5B5B5",
+"t c #B5B5AD",
+"y c #52F752",
+"u c #42FF42",
+"i c #52EF52",
+"p c #ADADAD",
+"a c #ADADA5",
+"s c #4AEF4A",
+"d c #31FF31",
+"f c #29FF29",
+"g c #A5A5A5",
+"h c #21FF21",
+"j c #5AD65A",
+"k c #42E642",
+"l c #94AD94",
+"z c #4ADE4A",
+"x c #3AE63A",
+"c c #5ACE5A",
+"v c #10FF10",
+"b c #9C9C9C",
+"n c #31E631",
+"m c #08FF08",
+"M c #949C94",
+"N c #84A584",
+"B c #00FF00",
+"V c #3AD63A",
+"C c #52C552",
+"Z c #00F700",
+"A c #8C948C",
+"S c #849484",
+"D c #00EF00",
+"F c #739C73",
+"G c #08E608",
+"H c #4AB54A",
+"J c #31C531",
+"K c #00E600",
+"L c #739473",
+"P c #00DE00",
+"I c #63945A",
+"U c #6B8C6B",
+"Y c #00D600",
+"T c #42A542",
+"R c #638C63",
+"E c #00CE00",
+"W c #21B521",
+"Q c #5A8C5A",
+"! c #00C500",
+"~ c #528C52",
+"^ c #3A9C3A",
+"/ c #4A8C4A",
+"( c #00BD00",
+") c #319431",
+"_ c #219C21",
+"` c #318C31",
+"' c #3A843A",
+"] c #219421",
+"[ c #298C29",
+"{ c #318431",
+"} c #218C21",
+"| c #218C19",
+" . c #198C19",
+".. c #218421",
+"X. c #297B29",
+"o. c #198419",
+"O. c #217B21",
+"+. c #108410",
+"@. c #197B19",
+"#. c #CC0066",
+"$. c #FF0066",
+"%. c #003366",
+"&. c #333366",
+"*. c #663366",
+"=. c #993366",
+"-. c #CC3366",
+";. c #FF3366",
+":. c #006666",
+">. c #336666",
+",. c #666666",
+"<. c #996666",
+"1. c #CC6666",
+"2. c #009966",
+"3. c #339966",
+"4. c #669966",
+"5. c #999966",
+"6. c #CC9966",
+"7. c #FF9966",
+"8. c #00CC66",
+"9. c #33CC66",
+"0. c #99CC66",
+"q. c #CCCC66",
+"w. c #FFCC66",
+"e. c #00FF66",
+"r. c #33FF66",
+"t. c #99FF66",
+"y. c #CCFF66",
+"u. c #FF00CC",
+"i. c #CC00FF",
+"p. c #009999",
+"a. c #993399",
+"s. c #990099",
+"d. c #CC0099",
+"f. c #000099",
+"g. c #333399",
+"h. c #660099",
+"j. c #CC3399",
+"k. c #FF0099",
+"l. c #006699",
+"z. c #336699",
+"x. c #663399",
+"c. c #996699",
+"v. c #CC6699",
+"b. c #FF3399",
+"n. c #339999",
+"m. c #669999",
+"M. c #999999",
+"N. c #CC9999",
+"B. c #FF9999",
+"V. c #00CC99",
+"C. c #33CC99",
+"Z. c #66CC66",
+"A. c #99CC99",
+"S. c #CCCC99",
+"D. c #FFCC99",
+"F. c #00FF99",
+"G. c #33FF99",
+"H. c #66CC99",
+"J. c #99FF99",
+"K. c #CCFF99",
+"L. c #FFFF99",
+"P. c #0000CC",
+"I. c #330099",
+"U. c #6600CC",
+"Y. c #9900CC",
+"T. c #CC00CC",
+"R. c #003399",
+"E. c #3333CC",
+"W. c #6633CC",
+"Q. c #9933CC",
+"!. c #CC33CC",
+"~. c #FF33CC",
+"^. c #0066CC",
+"/. c #3366CC",
+"(. c #666699",
+"). c #9966CC",
+"_. c #CC66CC",
+"`. c #FF6699",
+"'. c #0099CC",
+"]. c #3399CC",
+"[. c #6699CC",
+"{. c #9999CC",
+"}. c #CC99CC",
+"|. c #FF99CC",
+" X c #00CCCC",
+".X c #33CCCC",
+"XX c #66CCCC",
+"oX c #99CCCC",
+"OX c #CCCCCC",
+"+X c #FFCCCC",
+"@X c #00FFCC",
+"#X c #33FFCC",
+"$X c #66FF99",
+"%X c #99FFCC",
+"&X c #CCFFCC",
+"*X c #FFFFCC",
+"=X c #3300CC",
+"-X c #6600FF",
+";X c #9900FF",
+":X c #0033CC",
+">X c #3333FF",
+",X c #6633FF",
+"<X c #9933FF",
+"1X c #CC33FF",
+"2X c #FF33FF",
+"3X c #0066FF",
+"4X c #3366FF",
+"5X c #6666CC",
+"6X c #9966FF",
+"7X c #CC66FF",
+"8X c #FF66CC",
+"9X c #0099FF",
+"0X c #3399FF",
+"qX c #6699FF",
+"wX c #9999FF",
+"eX c #CC99FF",
+"rX c #FF99FF",
+"tX c #00CCFF",
+"yX c #33CCFF",
+"uX c #66CCFF",
+"iX c #99CCFF",
+"pX c #CCCCFF",
+"aX c #FFCCFF",
+"sX c #33FFFF",
+"dX c #66FFCC",
+"fX c #99FFFF",
+"gX c #CCFFFF",
+"hX c #FF6666",
+"jX c #66FF66",
+"kX c #FFFF66",
+"lX c #6666FF",
+"zX c #FF66FF",
+"xX c #66FFFF",
+"cX c #A50021",
+"vX c #5F5F5F",
+"bX c #777777",
+"nX c #868686",
+"mX c #969696",
+"MX c #CBCBCB",
+"NX c #B2B2B2",
+"BX c #D7D7D7",
+"VX c #DDDDDD",
+"CX c #E3E3E3",
+"ZX c #EAEAEA",
+"AX c #F1F1F1",
+"SX c #F8F8F8",
+"DX c #FFFBF0",
+"FX c #A0A0A4",
+"GX c #808080",
+"HX c #FF0000",
+"JX c #00FF00",
+"KX c #FFFF00",
+"LX c #0000FF",
+"PX c #FF00FF",
+"IX c #00FFFF",
+"UX c #FFFFFF",
+/* pixels */
+"# # # # # # # # # # # # # # # # # # # # ",
+"# # # # # # # ` 0 # # # # # # # # # # # ",
+"# # # # # # # ..` l # # # # # # # # # # ",
+"# # # # # # # [ X ) N # # # # # # # # # ",
+"# # # # # # # [ &X. ^ F # # # # # # # # ",
+"# # # # # # # } o & o T I : # # # # # # ",
+"` ` ` ` ` ` ` ` + 7 ; + H ~ < # # # # # ",
+"` = = = = = = - @ d v h $ C ' 5 # # # # ",
+"` = = 3 u h v v v m m m v ; c { 6 # # # ",
+"` = f v v m m m m m m Z G G 4 j ..t # # ",
+"` = v m m m Z Z D D G G G P n ; _ R 5 # ",
+"` = m Z G G G G G G G P Y x 4 _ Q g # # ",
+"` = $ $ $ $ $ & e P P E k 8 .U g # # # ",
+"..[ ......[ [ ] e Y ! s i o.L p # # # # ",
+"# # 5 6 6 6 9 ..i ( i z o.S t # # # # # ",
+"# # # # # # # } i i V O.A r # # # # # # ",
+"# # # # # # # } 7 J X.M 6 # # # # # # # ",
+"# # # # # # # | W ' b < # # # # # # # # ",
+"# # # # # # # @.~ g , # # # # # # # # # ",
+"# # # # # # # 6 < , # # # # # # # # # # "
+};