From 14bf35421bf75d26fe4799286c026a0cb7679615 Mon Sep 17 00:00:00 2001 From: Gregor Robinson Date: Wed, 26 Jun 2013 12:28:01 +0000 Subject: [PATCH 01/43] Fixing issue #258, bad keyfile permissions. This spits out a warning to the console, but ideally it would also issue a warning to the GUI for those who didn't start it from the console. N.B. the warning is a one shot thing, since it fixes the problem in a way essentially undetectable in the future, so it should be done right if it is to be done at all. Maybe we should even disable all keys automatically if the keyfile is found in an insecure state. --- src/shared.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/shared.py b/src/shared.py index 5dc6964b..09d0bae8 100644 --- a/src/shared.py +++ b/src/shared.py @@ -21,6 +21,7 @@ import socket import random import highlevelcrypto import shared +import stat config = ConfigParser.SafeConfigParser() myECCryptorObjects = {} @@ -196,8 +197,10 @@ def reloadMyAddressHashes(): myAddressesByHash.clear() #myPrivateKeys.clear() configSections = config.sections() + hasExistingKeys = False for addressInKeysFile in configSections: if addressInKeysFile <> 'bitmessagesettings': + hasExistingKeys = True isEnabled = config.getboolean(addressInKeysFile, 'enabled') if isEnabled: status,addressVersionNumber,streamNumber,hash = decodeAddress(addressInKeysFile) @@ -208,6 +211,7 @@ def reloadMyAddressHashes(): myAddressesByHash[hash] = addressInKeysFile else: sys.stderr.write('Error in reloadMyAddressHashes: Can\'t handle address versions other than 2 or 3.\n') + fixKeyfilePermissions(appdata + 'keys.dat', hasExistingKeys) def reloadBroadcastSendersForWhichImWatching(): printLock.acquire() @@ -298,3 +302,26 @@ def fixPotentiallyInvalidUTF8Data(text): except: output = 'Part of the message is corrupt. The message cannot be displayed the normal way.\n\n' + repr(text) return output + +# Fix keyfile permissions due to inappropriate umask during keys.dat creation. +def fixKeyfilePermissions(keyfile, hasExistingKeys): + present_keyfile_permissions = os.stat(keyfile)[0] + keyfile_disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO + if (present_keyfile_permissions & keyfile_disallowed_permissions) != 0: + allowed_keyfile_permissions = ((1<<32)-1) ^ keyfile_disallowed_permissions + new_keyfile_permissions = ( + allowed_keyfile_permissions & present_keyfile_permissions) + os.chmod(keyfile, new_keyfile_permissions) + if hasExistingKeys: + print + print '******************************************************************' + print '** !! WARNING !! **' + print '******************************************************************' + print '** Possibly major security problem: **' + print '** Your keyfiles were vulnerable to being read by other users **' + print '** (including some untrusted daemons). You may wish to consider **' + print '** generating new keys and discontinuing use of your old ones. **' + print '** The problem has been automatically fixed. **' + print '******************************************************************' + print + From db3120f65530310f92a23f482be02853d1661089 Mon Sep 17 00:00:00 2001 From: Gregor Robinson Date: Thu, 27 Jun 2013 10:02:52 +0000 Subject: [PATCH 02/43] Fix #263 & #262: insecure keyfile permissions. * Added conditional to keyfile fix code that excludes windows. * Cleaned up old keyfile permissions fix. * Added umask (not conditional against Windows, because I don't think that is necessary). --- src/helper_startup.py | 2 + src/shared.py | 97 +++++++++++++++++++++++++++++++------------ 2 files changed, 72 insertions(+), 27 deletions(-) diff --git a/src/helper_startup.py b/src/helper_startup.py index df27fd6e..f9eefc01 100644 --- a/src/helper_startup.py +++ b/src/helper_startup.py @@ -74,6 +74,8 @@ def loadConfig(): print 'Creating new config files in', shared.appdata if not os.path.exists(shared.appdata): os.makedirs(shared.appdata) + if not sys.platform.startswith('win'): + os.umask(0o077) with open(shared.appdata + 'keys.dat', 'wb') as configfile: shared.config.write(configfile) diff --git a/src/shared.py b/src/shared.py index 09d0bae8..57067334 100644 --- a/src/shared.py +++ b/src/shared.py @@ -169,10 +169,10 @@ def isAddressInMyAddressBookSubscriptionsListOrWhitelist(address): return False def safeConfigGetBoolean(section,field): - try: - return config.getboolean(section,field) - except: - return False + try: + return config.getboolean(section,field) + except: + return False def decodeWalletImportFormat(WIFstring): fullString = arithmetic.changebase(WIFstring,58,256) @@ -196,22 +196,37 @@ def reloadMyAddressHashes(): myECCryptorObjects.clear() myAddressesByHash.clear() #myPrivateKeys.clear() + + keyfileSecure = checkSensitiveFilePermissions(appdata + 'keys.dat') configSections = config.sections() - hasExistingKeys = False + hasEnabledKeys = False for addressInKeysFile in configSections: if addressInKeysFile <> 'bitmessagesettings': - hasExistingKeys = True + hasEnabledKeys = True isEnabled = config.getboolean(addressInKeysFile, 'enabled') if isEnabled: - status,addressVersionNumber,streamNumber,hash = decodeAddress(addressInKeysFile) - if addressVersionNumber == 2 or addressVersionNumber == 3: - privEncryptionKey = decodeWalletImportFormat(config.get(addressInKeysFile, 'privencryptionkey')).encode('hex') #returns a simple 32 bytes of information encoded in 64 Hex characters, or null if there was an error - if len(privEncryptionKey) == 64:#It is 32 bytes encoded as 64 hex characters - myECCryptorObjects[hash] = highlevelcrypto.makeCryptor(privEncryptionKey) - myAddressesByHash[hash] = addressInKeysFile + if keyfileSecure: + status,addressVersionNumber,streamNumber,hash = decodeAddress(addressInKeysFile) + if addressVersionNumber == 2 or addressVersionNumber == 3: + # Returns a simple 32 bytes of information encoded in 64 Hex characters, or null if there was an error. + privEncryptionKey = decodeWalletImportFormat( + config.get(addressInKeysFile, 'privencryptionkey')).encode('hex') + + if len(privEncryptionKey) == 64:#It is 32 bytes encoded as 64 hex characters + myECCryptorObjects[hash] = highlevelcrypto.makeCryptor(privEncryptionKey) + myAddressesByHash[hash] = addressInKeysFile + else: + sys.stderr.write('Error in reloadMyAddressHashes: Can\'t handle address versions other than 2 or 3.\n') else: - sys.stderr.write('Error in reloadMyAddressHashes: Can\'t handle address versions other than 2 or 3.\n') - fixKeyfilePermissions(appdata + 'keys.dat', hasExistingKeys) + # Insecure keyfile permissions. Disable key. + config.set(addressInKeysFile, 'enabled', 'false') + try: + if not keyfileSecure: + with open(appdata + 'keys.dat', 'wb') as keyfile: + config.write(keyfile) + except: + print 'Failed to disable vulnerable keyfiles.' + raise def reloadBroadcastSendersForWhichImWatching(): printLock.acquire() @@ -303,16 +318,14 @@ def fixPotentiallyInvalidUTF8Data(text): output = 'Part of the message is corrupt. The message cannot be displayed the normal way.\n\n' + repr(text) return output -# Fix keyfile permissions due to inappropriate umask during keys.dat creation. -def fixKeyfilePermissions(keyfile, hasExistingKeys): - present_keyfile_permissions = os.stat(keyfile)[0] - keyfile_disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO - if (present_keyfile_permissions & keyfile_disallowed_permissions) != 0: - allowed_keyfile_permissions = ((1<<32)-1) ^ keyfile_disallowed_permissions - new_keyfile_permissions = ( - allowed_keyfile_permissions & present_keyfile_permissions) - os.chmod(keyfile, new_keyfile_permissions) - if hasExistingKeys: +def checkSensitiveFilePermissions(filename): + if sys.platform == 'win32': + # TODO: This might deserve extra checks by someone familiar with + # Windows systems. + fileSecure = True + else: + fileSecure = secureFilePermissions(filename) + if not fileSecure: print print '******************************************************************' print '** !! WARNING !! **' @@ -321,7 +334,37 @@ def fixKeyfilePermissions(keyfile, hasExistingKeys): print '** Your keyfiles were vulnerable to being read by other users **' print '** (including some untrusted daemons). You may wish to consider **' print '** generating new keys and discontinuing use of your old ones. **' - print '** The problem has been automatically fixed. **' - print '******************************************************************' - print + print '** Your private keys have been disabled for your security, but **' + print '** you may re-enable them using the "Your Identities" tab in **' + print '** the default GUI or by modifying keys.dat such that your keys **' + print '** show "enabled = true". **' + try: + fixSensitiveFilePermissions(filename) + print '** The problem has been automatically fixed. **' + print '******************************************************************' + print + except Exception, e: + print '** Could NOT automatically fix permissions. **' + print '******************************************************************' + print + raise + return fileSecure + + +# Checks sensitive file permissions for inappropriate umask during keys.dat creation. +# (Or unwise subsequent chmod.) +# Returns true iff file appears to have appropriate permissions. +def secureFilePermissions(filename): + present_permissions = os.stat(filename)[0] + disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO + return present_permissions & disallowed_permissions == 0 + +# Fixes permissions on a sensitive file. +def fixSensitiveFilePermissions(filename): + present_permissions = os.stat(filename)[0] + disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO + allowed_permissions = ((1<<32)-1) ^ disallowed_permissions + new_permissions = ( + allowed_permissions & present_permissions) + os.chmod(filename, new_permissions) From 1ed34b00848c07e5266ac4575474dbf3c42bc168 Mon Sep 17 00:00:00 2001 From: Gregor Robinson Date: Thu, 27 Jun 2013 10:44:49 +0000 Subject: [PATCH 03/43] Make warning message more specific. --- src/shared.py | 136 +++++++++++++++++++++++++++----------------------- 1 file changed, 73 insertions(+), 63 deletions(-) diff --git a/src/shared.py b/src/shared.py index 57067334..ea1e3848 100644 --- a/src/shared.py +++ b/src/shared.py @@ -202,31 +202,36 @@ def reloadMyAddressHashes(): hasEnabledKeys = False for addressInKeysFile in configSections: if addressInKeysFile <> 'bitmessagesettings': - hasEnabledKeys = True isEnabled = config.getboolean(addressInKeysFile, 'enabled') if isEnabled: - if keyfileSecure: - status,addressVersionNumber,streamNumber,hash = decodeAddress(addressInKeysFile) - if addressVersionNumber == 2 or addressVersionNumber == 3: - # Returns a simple 32 bytes of information encoded in 64 Hex characters, or null if there was an error. - privEncryptionKey = decodeWalletImportFormat( - config.get(addressInKeysFile, 'privencryptionkey')).encode('hex') + hasEnabledKeys = True + status,addressVersionNumber,streamNumber,hash = decodeAddress(addressInKeysFile) + if addressVersionNumber == 2 or addressVersionNumber == 3: + # Returns a simple 32 bytes of information encoded in 64 Hex characters, + # or null if there was an error. + privEncryptionKey = decodeWalletImportFormat( + config.get(addressInKeysFile, 'privencryptionkey')).encode('hex') - if len(privEncryptionKey) == 64:#It is 32 bytes encoded as 64 hex characters - myECCryptorObjects[hash] = highlevelcrypto.makeCryptor(privEncryptionKey) - myAddressesByHash[hash] = addressInKeysFile - else: - sys.stderr.write('Error in reloadMyAddressHashes: Can\'t handle address versions other than 2 or 3.\n') + if len(privEncryptionKey) == 64:#It is 32 bytes encoded as 64 hex characters + myECCryptorObjects[hash] = highlevelcrypto.makeCryptor(privEncryptionKey) + myAddressesByHash[hash] = addressInKeysFile + + if not keyfileSecure: + # Insecure keyfile permissions. Disable key. + config.set(addressInKeysFile, 'enabled', 'false') else: - # Insecure keyfile permissions. Disable key. - config.set(addressInKeysFile, 'enabled', 'false') - try: - if not keyfileSecure: - with open(appdata + 'keys.dat', 'wb') as keyfile: - config.write(keyfile) - except: - print 'Failed to disable vulnerable keyfiles.' - raise + sys.stderr.write('Error in reloadMyAddressHashes: Can\'t handle address ' + 'versions other than 2 or 3.\n') + + if not keyfileSecure: + fixSensitiveFilePermissions(appdata + 'keys.dat', hasEnabledKeys) + if hasEnabledKeys: + try: + with open(appdata + 'keys.dat', 'wb') as keyfile: + config.write(keyfile) + except: + print 'Failed to disable vulnerable keys.' + raise def reloadBroadcastSendersForWhichImWatching(): printLock.acquire() @@ -318,53 +323,58 @@ def fixPotentiallyInvalidUTF8Data(text): output = 'Part of the message is corrupt. The message cannot be displayed the normal way.\n\n' + repr(text) return output +# Checks sensitive file permissions for inappropriate umask during keys.dat creation. +# (Or unwise subsequent chmod.) +# Returns true iff file appears to have appropriate permissions. def checkSensitiveFilePermissions(filename): if sys.platform == 'win32': # TODO: This might deserve extra checks by someone familiar with # Windows systems. - fileSecure = True + return True else: - fileSecure = secureFilePermissions(filename) - if not fileSecure: - print - print '******************************************************************' - print '** !! WARNING !! **' - print '******************************************************************' - print '** Possibly major security problem: **' - print '** Your keyfiles were vulnerable to being read by other users **' - print '** (including some untrusted daemons). You may wish to consider **' - print '** generating new keys and discontinuing use of your old ones. **' - print '** Your private keys have been disabled for your security, but **' - print '** you may re-enable them using the "Your Identities" tab in **' - print '** the default GUI or by modifying keys.dat such that your keys **' - print '** show "enabled = true". **' - try: - fixSensitiveFilePermissions(filename) - print '** The problem has been automatically fixed. **' - print '******************************************************************' - print - except Exception, e: - print '** Could NOT automatically fix permissions. **' - print '******************************************************************' - print - raise - return fileSecure - - -# Checks sensitive file permissions for inappropriate umask during keys.dat creation. -# (Or unwise subsequent chmod.) -# Returns true iff file appears to have appropriate permissions. -def secureFilePermissions(filename): - present_permissions = os.stat(filename)[0] - disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO - return present_permissions & disallowed_permissions == 0 + present_permissions = os.stat(filename)[0] + disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO + return present_permissions & disallowed_permissions == 0 # Fixes permissions on a sensitive file. -def fixSensitiveFilePermissions(filename): - present_permissions = os.stat(filename)[0] - disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO - allowed_permissions = ((1<<32)-1) ^ disallowed_permissions - new_permissions = ( - allowed_permissions & present_permissions) - os.chmod(filename, new_permissions) +def fixSensitiveFilePermissions(filename, hasEnabledKeys): + if hasEnabledKeys: + print + print '******************************************************************' + print '** !! WARNING !! **' + print '******************************************************************' + print '** Possibly major security problem: **' + print '** Your keyfile was vulnerable to being read by other users **' + print '** (including some untrusted daemons). You may wish to consider **' + print '** generating new keys and discontinuing use of your old ones. **' + print '** Your private keys have been disabled for your security, but **' + print '** you may re-enable them using the "Your Identities" tab in **' + print '** the default GUI or by modifying keys.dat such that your keys **' + print '** show "enabled = true". **' + else: + print '******************************************************************' + print '** !! WARNING !! **' + print '******************************************************************' + print '** Possibly major security problem: **' + print '** Your keyfile was vulnerable to being read by other users. **' + print '** Fortunately, you don\'t have any enabled keys, but be aware **' + print '** that any disabled keys may have been compromised by malware **' + print '** running by other users and that you should reboot before **' + print '** generating any new keys. **' + try: + present_permissions = os.stat(filename)[0] + disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO + allowed_permissions = ((1<<32)-1) ^ disallowed_permissions + new_permissions = ( + allowed_permissions & present_permissions) + os.chmod(filename, new_permissions) + + print '** The file permissions have been automatically fixed. **' + print '******************************************************************' + print + except Exception, e: + print '** Could NOT automatically fix permissions. **' + print '******************************************************************' + print + raise From ebaa1bf3468d617cc9ec5353f34e32facb992840 Mon Sep 17 00:00:00 2001 From: Gregor Robinson Date: Mon, 8 Jul 2013 23:21:29 +0300 Subject: [PATCH 04/43] No paranoid key disable for bad keyfile perms. --- src/shared.py | 81 ++++++++++++++++++--------------------------------- 1 file changed, 28 insertions(+), 53 deletions(-) diff --git a/src/shared.py b/src/shared.py index 9a1cd428..2930784e 100644 --- a/src/shared.py +++ b/src/shared.py @@ -8,20 +8,24 @@ maximumAgeOfNodesThatIAdvertiseToOthers = 10800 # Equals three hours useVeryEasyProofOfWorkForTesting = False # If you set this to True while on the normal network, you won't be able to send or sometimes receive messages. -import threading -import sys -from addresses import * -import highlevelcrypto -import Queue -import pickle -import os -import time +# Libraries. import ConfigParser -import socket +import os +import pickle +import Queue import random +import socket +import sys +import stat +import threading +import time + +# Project imports. +from addresses import * +from debug import logger import highlevelcrypto import shared -import stat + config = ConfigParser.SafeConfigParser() myECCryptorObjects = {} @@ -131,12 +135,14 @@ def lookupAppdataFolder(): except KeyError: dataFolder = path.join(environ["HOME"], ".config", APPNAME) # Migrate existing data to the proper location if this is an existing install - try: - print "Moving data folder to ~/.config/%s" % APPNAME - move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder) - dataFolder = dataFolder + '/' - except IOError: - dataFolder = dataFolder + '/' + if not os.path.exists(dataFolder): + try: + print "Moving data folder to ~/.config/%s" % APPNAME + move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder) + dataFolder = dataFolder + except IOError: + dataFolder = dataFolder + dataFolder = dataFolder + '/' return dataFolder def isAddressInMyAddressBook(address): @@ -227,22 +233,12 @@ def reloadMyAddressHashes(): myECCryptorObjects[hash] = highlevelcrypto.makeCryptor(privEncryptionKey) myAddressesByHash[hash] = addressInKeysFile - if not keyfileSecure: - # Insecure keyfile permissions. Disable key. - config.set(addressInKeysFile, 'enabled', 'false') else: sys.stderr.write('Error in reloadMyAddressHashes: Can\'t handle address ' 'versions other than 2 or 3.\n') if not keyfileSecure: fixSensitiveFilePermissions(appdata + 'keys.dat', hasEnabledKeys) - if hasEnabledKeys: - try: - with open(appdata + 'keys.dat', 'wb') as keyfile: - config.write(keyfile) - except: - print 'Failed to disable vulnerable keys.' - raise def reloadBroadcastSendersForWhichImWatching(): printLock.acquire() @@ -350,28 +346,10 @@ def checkSensitiveFilePermissions(filename): # Fixes permissions on a sensitive file. def fixSensitiveFilePermissions(filename, hasEnabledKeys): if hasEnabledKeys: - print - print '******************************************************************' - print '** !! WARNING !! **' - print '******************************************************************' - print '** Possibly major security problem: **' - print '** Your keyfile was vulnerable to being read by other users **' - print '** (including some untrusted daemons). You may wish to consider **' - print '** generating new keys and discontinuing use of your old ones. **' - print '** Your private keys have been disabled for your security, but **' - print '** you may re-enable them using the "Your Identities" tab in **' - print '** the default GUI or by modifying keys.dat such that your keys **' - print '** show "enabled = true". **' + logger.warning('Keyfile had insecure permissions, and there were enabled keys. ' + 'The truly paranoid should stop using them immediately.') else: - print '******************************************************************' - print '** !! WARNING !! **' - print '******************************************************************' - print '** Possibly major security problem: **' - print '** Your keyfile was vulnerable to being read by other users. **' - print '** Fortunately, you don\'t have any enabled keys, but be aware **' - print '** that any disabled keys may have been compromised by malware **' - print '** running by other users and that you should reboot before **' - print '** generating any new keys. **' + logger.warning('Keyfile had insecure permissions, but there were no enabled keys.') try: present_permissions = os.stat(filename)[0] disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO @@ -380,12 +358,9 @@ def fixSensitiveFilePermissions(filename, hasEnabledKeys): allowed_permissions & present_permissions) os.chmod(filename, new_permissions) - print '** The file permissions have been automatically fixed. **' - print '******************************************************************' - print + logger.info('Keyfile permissions automatically fixed.') + except Exception, e: - print '** Could NOT automatically fix permissions. **' - print '******************************************************************' - print + logger.exception('Keyfile permissions could not be fixed.') raise From 1ff1c1b8a5b8d523971f69e3b646742362f35bce Mon Sep 17 00:00:00 2001 From: Gregor Robinson Date: Mon, 8 Jul 2013 23:33:15 +0300 Subject: [PATCH 05/43] Spelling. --- src/helper_bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helper_bootstrap.py b/src/helper_bootstrap.py index 296dda6b..c3d5c1fd 100644 --- a/src/helper_bootstrap.py +++ b/src/helper_bootstrap.py @@ -33,7 +33,7 @@ def dns(): print 'Adding', item[4][0], 'to knownNodes based on DNS boostrap method' shared.knownNodes[1][item[4][0]] = (8080, int(time.time())) except: - print 'bootstrap8080.bitmessage.org DNS bootstraping failed.' + print 'bootstrap8080.bitmessage.org DNS bootstrapping failed.' try: for item in socket.getaddrinfo('bootstrap8444.bitmessage.org', 80): print 'Adding', item[4][0], 'to knownNodes based on DNS boostrap method' From a579e8f1d324dac0c547c2d18cbce6e2f4bee7d9 Mon Sep 17 00:00:00 2001 From: Gregor Robinson Date: Wed, 10 Jul 2013 11:43:18 +0300 Subject: [PATCH 06/43] Logging fixes. --- src/debug.py | 3 +++ src/shared.py | 57 +++++++++++++++++++++++++-------------------------- 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/src/debug.py b/src/debug.py index d8033f2d..14214686 100644 --- a/src/debug.py +++ b/src/debug.py @@ -48,12 +48,15 @@ logging.config.dictConfig({ 'loggers': { 'console_only': { 'handlers': ['console'], + 'propagate' : 0 }, 'file_only': { 'handlers': ['file'], + 'propagate' : 0 }, 'both': { 'handlers': ['console', 'file'], + 'propagate' : 0 }, }, 'root': { diff --git a/src/shared.py b/src/shared.py index 2930784e..e7a412ac 100644 --- a/src/shared.py +++ b/src/shared.py @@ -123,7 +123,8 @@ def lookupAppdataFolder(): if "HOME" in environ: dataFolder = path.join(os.environ["HOME"], "Library/Application Support/", APPNAME) + '/' else: - print 'Could not find home folder, please report this message and your OS X version to the BitMessage Github.' + logger.critical('Could not find home folder, please report this message and your ' + 'OS X version to the BitMessage Github.') sys.exit() elif 'win32' in sys.platform or 'win64' in sys.platform: @@ -137,7 +138,7 @@ def lookupAppdataFolder(): # Migrate existing data to the proper location if this is an existing install if not os.path.exists(dataFolder): try: - print "Moving data folder to ~/.config/%s" % APPNAME + logger.info("Moving data folder to %s" % (dataFolder)) move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder) dataFolder = dataFolder except IOError: @@ -195,21 +196,22 @@ def decodeWalletImportFormat(WIFstring): fullString = arithmetic.changebase(WIFstring,58,256) privkey = fullString[:-4] if fullString[-4:] != hashlib.sha256(hashlib.sha256(privkey).digest()).digest()[:4]: - sys.stderr.write('Major problem! When trying to decode one of your private keys, the checksum failed. Here is the PRIVATE key: %s\n' % str(WIFstring)) + logger.error('Major problem! When trying to decode one of your private keys, the checksum ' + 'failed. Here is the PRIVATE key: %s\n' % str(WIFstring)) return "" else: #checksum passed if privkey[0] == '\x80': return privkey[1:] else: - sys.stderr.write('Major problem! When trying to decode one of your private keys, the checksum passed but the key doesn\'t begin with hex 80. Here is the PRIVATE key: %s\n' % str(WIFstring)) + logger.error('Major problem! When trying to decode one of your private keys, the ' + 'checksum passed but the key doesn\'t begin with hex 80. Here is the ' + 'PRIVATE key: %s\n' % str(WIFstring)) return "" def reloadMyAddressHashes(): - printLock.acquire() - print 'reloading keys from keys.dat file' - printLock.release() + logger.debug('reloading keys from keys.dat file') myECCryptorObjects.clear() myAddressesByHash.clear() #myPrivateKeys.clear() @@ -241,9 +243,7 @@ def reloadMyAddressHashes(): fixSensitiveFilePermissions(appdata + 'keys.dat', hasEnabledKeys) def reloadBroadcastSendersForWhichImWatching(): - printLock.acquire() - print 'reloading subscriptions...' - printLock.release() + logger.debug('reloading subscriptions...') broadcastSendersForWhichImWatching.clear() MyECSubscriptionCryptorObjects.clear() sqlLock.acquire() @@ -266,46 +266,44 @@ def doCleanShutdown(): knownNodesLock.acquire() UISignalQueue.put(('updateStatusBar','Saving the knownNodes list of peers to disk...')) output = open(appdata + 'knownnodes.dat', 'wb') - print 'finished opening knownnodes.dat. Now pickle.dump' + logger.info('finished opening knownnodes.dat. Now pickle.dump') pickle.dump(knownNodes, output) - print 'Completed pickle.dump. Closing output...' + logger.info('Completed pickle.dump. Closing output...') output.close() knownNodesLock.release() - printLock.acquire() - print 'Finished closing knownnodes.dat output file.' - printLock.release() + logger.info('Finished closing knownnodes.dat output file.') UISignalQueue.put(('updateStatusBar','Done saving the knownNodes list of peers to disk.')) broadcastToSendDataQueues((0, 'shutdown', 'all')) - printLock.acquire() - print 'Flushing inventory in memory out to disk...' - printLock.release() - UISignalQueue.put(('updateStatusBar','Flushing inventory in memory out to disk. This should normally only take a second...')) + logger.info('Flushing inventory in memory out to disk...') + UISignalQueue.put(('updateStatusBar','Flushing inventory in memory out to disk. ' + 'This should normally only take a second...')) flushInventory() - #This one last useless query will guarantee that the previous flush committed before we close the program. + # This one last useless query will guarantee that the previous flush committed before we close + # the program. sqlLock.acquire() sqlSubmitQueue.put('SELECT address FROM subscriptions') sqlSubmitQueue.put('') sqlReturnQueue.get() sqlSubmitQueue.put('exit') sqlLock.release() - printLock.acquire() - print 'Finished flushing inventory.' - printLock.release() + logger.info('Finished flushing inventory.') - time.sleep(.25) #Wait long enough to guarantee that any running proof of work worker threads will check the shutdown variable and exit. If the main thread closes before they do then they won't stop. + # Wait long enough to guarantee that any running proof of work worker threads will check the + # shutdown variable and exit. If the main thread closes before they do then they won't stop. + time.sleep(.25) if safeConfigGetBoolean('bitmessagesettings','daemon'): - printLock.acquire() - print 'Done.' - printLock.release() + logger.info('Clean shutdown complete.') os._exit(0) -#When you want to command a sendDataThread to do something, like shutdown or send some data, this function puts your data into the queues for each of the sendDataThreads. The sendDataThreads are responsible for putting their queue into (and out of) the sendDataQueues list. +# When you want to command a sendDataThread to do something, like shutdown or send some data, this +# function puts your data into the queues for each of the sendDataThreads. The sendDataThreads are +# responsible for putting their queue into (and out of) the sendDataQueues list. def broadcastToSendDataQueues(data): - #print 'running broadcastToSendDataQueues' + # logger.debug('running broadcastToSendDataQueues') for q in sendDataQueues: q.put((data)) @@ -332,6 +330,7 @@ def fixPotentiallyInvalidUTF8Data(text): # Checks sensitive file permissions for inappropriate umask during keys.dat creation. # (Or unwise subsequent chmod.) +# # Returns true iff file appears to have appropriate permissions. def checkSensitiveFilePermissions(filename): if sys.platform == 'win32': From e8fa5aaefe32a0d77c9a0c634ee07623ae1bc1bd Mon Sep 17 00:00:00 2001 From: Gregor Robinson Date: Wed, 10 Jul 2013 20:29:07 +0100 Subject: [PATCH 07/43] Switch an stderr message to logger. --- src/shared.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared.py b/src/shared.py index 0dbeef5d..816cea2a 100644 --- a/src/shared.py +++ b/src/shared.py @@ -236,8 +236,8 @@ def reloadMyAddressHashes(): myAddressesByHash[hash] = addressInKeysFile else: - sys.stderr.write('Error in reloadMyAddressHashes: Can\'t handle address ' - 'versions other than 2 or 3.\n') + logger.error('Error in reloadMyAddressHashes: Can\'t handle address ' + 'versions other than 2 or 3.\n') if not keyfileSecure: fixSensitiveFilePermissions(appdata + 'keys.dat', hasEnabledKeys) From fa53eb370ca7584bd0d88de2ad956d8894ab7a8e Mon Sep 17 00:00:00 2001 From: Gregor Robinson Date: Thu, 11 Jul 2013 23:58:10 +0100 Subject: [PATCH 08/43] Clarify IOError handling with comment. --- src/shared.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared.py b/src/shared.py index 816cea2a..85246906 100644 --- a/src/shared.py +++ b/src/shared.py @@ -142,6 +142,7 @@ def lookupAppdataFolder(): logger.info("Moving data folder to %s" % (dataFolder)) move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder) except IOError: + # Old directory may not exist. pass dataFolder = dataFolder + '/' return dataFolder From c1496551e66440d252a622d1a6f3ef72b2e658fe Mon Sep 17 00:00:00 2001 From: akh81 Date: Fri, 12 Jul 2013 03:12:57 -0500 Subject: [PATCH 09/43] added translations --- src/translations/bitmessage_ru_RU.pro | 30 + src/translations/bitmessage_ru_RU.qm | Bin 0 -> 18186 bytes src/translations/bitmessage_ru_RU.ts | 1248 +++++++++++++++++++++++++ 3 files changed, 1278 insertions(+) create mode 100644 src/translations/bitmessage_ru_RU.pro create mode 100644 src/translations/bitmessage_ru_RU.qm create mode 100644 src/translations/bitmessage_ru_RU.ts diff --git a/src/translations/bitmessage_ru_RU.pro b/src/translations/bitmessage_ru_RU.pro new file mode 100644 index 00000000..71cac3ae --- /dev/null +++ b/src/translations/bitmessage_ru_RU.pro @@ -0,0 +1,30 @@ +SOURCES += ../addresses.py +SOURCES += ../bitmessagemain.py +SOURCES += ../class_addressGenerator.py +SOURCES += ../class_outgoingSynSender.py +SOURCES += ../class_receiveDataThread.py +SOURCES += ../class_sendDataThread.py +SOURCES += ../class_singleCleaner.py +SOURCES += ../class_singleListener.py +SOURCES += ../class_singleWorker.py +SOURCES += ../class_sqlThread.py +SOURCES += ../helper_bitcoin.py +SOURCES += ../helper_bootstrap.py +SOURCES += ../helper_generic.py +SOURCES += ../helper_inbox.py +SOURCES += ../helper_sent.py +SOURCES += ../helper_startup.py +SOURCES += ../shared.py +SOURCES += ../bitmessageqt/__init__.py +SOURCES += ../bitmessageqt/about.py +SOURCES += ../bitmessageqt/bitmessageui.py +SOURCES += ../bitmessageqt/help.py +SOURCES += ../bitmessageqt/iconglossary.py +SOURCES += ../bitmessageqt/newaddressdialog.py +SOURCES += ../bitmessageqt/newchandialog.py +SOURCES += ../bitmessageqt/newsubscriptiondialog.py +SOURCES += ../bitmessageqt/regenerateaddresses.py +SOURCES += ../bitmessageqt/settings.py +SOURCES += ../bitmessageqt/specialaddressbehavior.py + +TRANSLATIONS = bitmessage_ru_RU.ts diff --git a/src/translations/bitmessage_ru_RU.qm b/src/translations/bitmessage_ru_RU.qm new file mode 100644 index 0000000000000000000000000000000000000000..e878db88e37272e43abffc0181d99c25b5c2b4d1 GIT binary patch literal 18186 zcmeHPYm8jwdH&WuyWYFk#u(o)hc)1}YtP>8_3U`B2HV)XHr@>;X%cdF=IqX}vvVeA zW?3&y0wGb9gj|ps2q6eTg_HscO-j>Tnv#YfMWqC_N(!QCTBKA-8bwX2q(p5M(dT); za~toOT|1&ue-z6;bNO!X?RhWXJEXpr+4kZu9(mw<*Y5h(dmjJGAC4(y)GMXBmFla( zvlq`ErE32~sVjFXHT_+s+DxT>e?Q(IQ^wz3uT*_f8LzzyPg@y3@51w^`gvfRs{Mq4 z@sFt5M~*4Ac?X`;c>br_bmOm-x+bNLKllRnQ2M#|pVY(yzr_3p)x?91cs{4jp3ExM zlu_p{d=t-y^z*uIb?e9PQ0iz(ozLBcXF=We-6KkEx?8=o?&C_0-KO4Gcvz|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vkquL4#!pT4S=Ht>N9KiF*U7B@YLg;A zGX_OW13k7?M4fF@no;;cPq~10`l^z<zUCEz&w!3T`th!WIJ zqsOnReYNBIJtcvRR{CfIFkAG_L{@6RwYpo?T0e@gsby2mZ}&C5xn-U4+XIbP{15K& B#{K{R literal 0 HcmV?d00001 diff --git a/src/translations/bitmessage_ru_RU.ts b/src/translations/bitmessage_ru_RU.ts new file mode 100644 index 00000000..23061133 --- /dev/null +++ b/src/translations/bitmessage_ru_RU.ts @@ -0,0 +1,1248 @@ + + + + + MainWindow + + + One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. May we delete it now? + + + + + Reply + Ответить + + + + Add sender to your Address Book + Добавить отправителя в адресную книгу + + + + Move to Trash + Поместить в корзину + + + + View HTML code as formatted text + + + + + Save message as... + Сохранить сообщение как ... + + + + New + Новый адрес + + + + Enable + + + + + Disable + + + + + Copy address to clipboard + Скопировать адрес в буфер обмена + + + + Special address behavior... + + + + + Send message to this address + + + + + Subscribe to this address + + + + + Add New Address + Добавить новый адрес + + + + Delete + + + + + Copy destination address to clipboard + Скопировать адрес отправки в буфер обмена + + + + Force send + + + + + Add new entry + Добавить новую запись + + + + Waiting on their encryption key. Will request it again soon. + + + + + Encryption key request queued. + + + + + Queued. + + + + + Message sent. Waiting on acknowledgement. Sent at %1 + Сообщение отправлено. Ожидаем подтверждения. Отправлено в %1 + + + + Need to do work to send message. Work is queued. + + + + + Acknowledgement of the message received %1 + Сообщение получено %1 + + + + Broadcast queued. + + + + + Broadcast on %1 + + + + + Problem: The work demanded by the recipient is more difficult than you are willing to do. %1 + + + + + Problem: The recipient's encryption key is no good. Could not encrypt message. %1 + + + + + Forced difficulty override. Send should start soon. + + + + + Unknown status: %1 %2 + Неизвестный статус: %1 %2 + + + + Since startup on %1 + + + + + Not Connected + Не соединено + + + + Show Bitmessage + + + + + Send + Отправка + + + + Subscribe + Подписки + + + + Address Book + Адресная книга + + + + Quit + Выйти + + + + You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. + + + + + You may manage your keys by editing the keys.dat file stored in + %1 +It is important that you back up this file. + + + + + Open keys.dat? + + + + + You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.) + + + + + You may manage your keys by editing the keys.dat file stored in + %1 +It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.) + + + + + Delete trash? + + + + + Are you sure you want to delete all trashed messages? + + + + + bad passphrase + Неподходящая секретная фраза + + + + You must type your passphrase. If you don't have one then this is not the form for you. + Вы должны ввести секретную фразу. Если Вы не хотите это делать, то Вы выбрали неправильную опцию. + + + + Processed %1 person-to-person messages. + + + + + Processed %1 broadcast messages. + + + + + Processed %1 public keys. + + + + + Total Connections: %1 + Всего соединений: %1 + + + + Connection lost + Соединение потеряно + + + + Connected + Соединено + + + + Message trashed + + + + + Error: Bitmessage addresses start with BM- Please check %1 + + + + + Error: The address %1 is not typed or copied correctly. Please check it. + + + + + Error: The address %1 contains invalid characters. Please check it. + + + + + Error: The address version in %1 is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever. + + + + + Error: Some data encoded in the address %1 is too short. There might be something wrong with the software of your acquaintance. + + + + + Error: Some data encoded in the address %1 is too long. There might be something wrong with the software of your acquaintance. + + + + + Error: Something is wrong with the address %1. + + + + + Error: You must specify a From address. If you don't have one, go to the 'Your Identities' tab. + + + + + Sending to your address + + + + + Error: One of the addresses to which you are sending a message, %1, is yours. Unfortunately the Bitmessage client cannot process its own messages. Please try running a second client on a different computer or within a VM. + + + + + Address version number + + + + + Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version. + + + + + Stream number + Номер потока + + + + Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version. + + + + + Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won't send until you connect. + + + + + Your 'To' field is empty. + + + + + Work is queued. + + + + + Right click one or more entries in your address book and select 'Send message to this address'. + + + + + Work is queued. %1 + + + + + New Message + + + + + From + От + + + + Address is valid. + + + + + Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want. + + + + + The address you entered was invalid. Ignoring it. + + + + + Error: You cannot add the same address to your subsciptions twice. Perhaps rename the existing one if you want. + + + + + Restart + + + + + You must restart Bitmessage for the port number change to take effect. + + + + + Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections. + + + + + Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want. + + + + + Passphrase mismatch + + + + + The passphrase you entered twice doesn't match. Try again. + + + + + Choose a passphrase + Придумайте секретную фразу + + + + You really do need a passphrase. + Вы действительно должны ввести секретную фразу. + + + + All done. Closing user interface... + + + + + Address is gone + + + + + Bitmessage cannot find your address %1. Perhaps you removed it? + + + + + Address disabled + + + + + Error: The address from which you are trying to send is disabled. You'll have to enable it on the 'Your Identities' tab before using it. + + + + + Entry added to the Address Book. Edit the label to your liking. + + + + + Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back. + Удалено в корзину. Чтобы попасть в корзину, Вам нужно будет найти файл корзины на диске. + + + + Save As... + + + + + Write error. + + + + + No addresses selected. + + + + + Options have been disabled because they either aren't applicable or because they haven't yet been implemented for your operating system. + + + + + The address should start with ''BM-'' + + + + + The address is not typed or copied correctly (the checksum failed). + + + + + The version number of this address is higher than this software can support. Please upgrade Bitmessage. + + + + + The address contains invalid characters. + + + + + Some data encoded in the address is too short. + + + + + Some data encoded in the address is too long. + + + + + You are using TCP port %1. (This can be changed in the settings). + Вы используете TCP порт %1 (Его можно поменять в настройках). + + + + Bitmessage + Bitmessage + + + + To + Кому + + + + From + От кого + + + + Subject + Тема + + + + Received + Получено + + + + Inbox + Входящие + + + + Load from Address book + Взять из адресной книги + + + + Message: + Сообщение: + + + + Subject: + Тема: + + + + Send to one or more specific people + Отправить одному или нескольким указанным получателям + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> + + + + + To: + Кому: + + + + From: + От: + + + + Broadcast to everyone who is subscribed to your address + Рассылка всем, кто подписался на Ваш адрес + + + + Be aware that broadcasts are only encrypted with your address. Anyone who knows your address can read them. + Пожалуйста, учитывайте, что рассылки шифруются лишь Вашим адресом. Любой человек, который знает Ваш адрес, сможет прочитать Вашу рассылку. + + + + Status + Статус + + + + Sent + Отправленные + + + + Label (not shown to anyone) + Название (не показывается никому) + + + + Address + Адрес + + + + Stream + Поток + + + + Your Identities + Ваши Адреса + + + + Here you can subscribe to 'broadcast messages' that are sent by other users. Messages will appear in your Inbox. Addresses here override those on the Blacklist tab. + Здесь Вы можете подписаться на рассылки от других пользователей. Все рассылки будут появлять у Вас во Входящих. Вы будете следить за всеми адресами, указанными здесь, даже если они в черном списке. + + + + Add new Subscription + Добавить новую подписку + + + + Label + Название + + + + Subscriptions + Подписки + + + + The Address book is useful for adding names or labels to other people's Bitmessage addresses so that you can recognize them more easily in your inbox. You can add entries here using the 'Add' button, or from your inbox by right-clicking on a message. + + + + + Name or Label + Название + + + + Use a Blacklist (Allow all incoming messages except those on the Blacklist) + Использовать черный список (Разрешить все входящие сообщения, кроме указанных в черном списке) + + + + Use a Whitelist (Block all incoming messages except those on the Whitelist) + Использовать белый список (блокировать все входящие сообщения, кроме указанных в белом списке) + + + + Blacklist + Черный список + + + + Stream # + № потока + + + + Connections + Соединений + + + + Total connections: 0 + Всего соединений: 0 + + + + Since startup at asdf: + + + + + Processed 0 person-to-person message. + + + + + Processed 0 public key. + + + + + Processed 0 broadcast. + + + + + Network Status + Статус сети + + + + File + Файл + + + + Settings + Настройки + + + + Help + Помощь + + + + Import keys + + + + + Manage keys + Управлять ключами + + + + About + О программе + + + + Regenerate deterministic addresses + Сгенерировать заново все адреса + + + + Delete all trashed messages + Стереть все сообщения из корзины + + + + NewAddressDialog + + + Create new Address + + + + + Here you may generate as many addresses as you like. Indeed, creating and abandoning addresses is encouraged. You may generate addresses by using either random numbers or by using a passphrase. If you use a passphrase, the address is called a "deterministic" address. +The 'Random Number' option is selected by default but deterministic addresses have several pros and cons: + + + + + <html><head/><body><p><span style=" font-weight:600;">Pros:<br/></span>You can recreate your addresses on any computer from memory. <br/>You need-not worry about backing up your keys.dat file as long as you can remember your passphrase. <br/><span style=" font-weight:600;">Cons:<br/></span>You must remember (or write down) your passphrase if you expect to be able to recreate your keys if they are lost. <br/>You must remember the address version number and the stream number along with your passphrase. <br/>If you choose a weak passphrase and someone on the Internet can brute-force it, they can read your messages and send messages as you.</p></body></html> + + + + + Use a random number generator to make an address + Использовать генератор случайных чисел для создания адреса + + + + Use a passphrase to make addresses + Использовать секретную фразу для создания адресов + + + + Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter + Потратить несколько лишних минут, чтобы сделать адрес(а) короче на 1 или 2 символа + + + + Make deterministic addresses + + + + + Address version number: 3 + Версия адреса: 3 + + + + In addition to your passphrase, you must remember these numbers: + В дополнение к секретной фразе, Вам необходимо запомнить эти числа: + + + + Passphrase + Секретная фраза + + + + Number of addresses to make based on your passphrase: + Кол-во адресов, которые Вы хотите получить из секретной фразы: + + + + Stream number: 1 + Номер потока: 1 + + + + Retype passphrase + Повторите секретную фразу + + + + Randomly generate address + Сгенерировать случайный адрес + + + + Label (not shown to anyone except you) + Название (не показывается никому кроме Вас) + + + + Use the most available stream + Использовать наиболее доступный поток + + + + (best if this is the first of many addresses you will create) + + + + + Use the same stream as an existing address + + + + + (saves you some bandwidth and processing power) + + + + + NewChanDialog + + + Dialog + + + + + Create a new chan + + + + + Join a chan + + + + + <html><head/><body><p>A chan is a set of encryption keys that is shared by a group of people. The keys and bitmessage address used by a chan is generated from a human-friendly word or phrase (the chan name).</p><p>Chans are experimental and are unmoderatable.</p></body></html> + + + + + Chan name: + + + + + Chan bitmessage address: + + + + + Create a chan + + + + + Enter a name for your chan. If you choose a sufficiently complex chan name (like a strong and unique passphrase) and none of your friends share it publicly then the chan will be secure and private. + + + + + NewSubscriptionDialog + + + Add new entry + Добавить новую запись + + + + Label + Название + + + + Address + Адрес + + + + SpecialAddressBehaviorDialog + + + Special Address Behavior + + + + + Behave as a normal address + + + + + Behave as a pseudo-mailing-list address + + + + + Mail received to a pseudo-mailing-list address will be automatically broadcast to subscribers (and thus will be public). + + + + + Name of the pseudo-mailing-list: + + + + + aboutDialog + + + About + О программе + + + + PyBitmessage + PyBitmessage + + + + version ? + версия ? + + + + Copyright © 2013 Jonathan Warren + Копирайт © 2013 Джонатан Уоррен + + + + <html><head/><body><p>Distributed under the MIT/X11 software license; see <a href="http://www.opensource.org/licenses/mit-license.php"><span style=" text-decoration: underline; color:#0000ff;">http://www.opensource.org/licenses/mit-license.php</span></a></p></body></html> + <html><head/><body><p>Программа распространяется в соответствии с лицензией MIT/X11; см. <a href="http://www.opensource.org/licenses/mit-license.php"><span style=" text-decoration: underline; color:#0000ff;">http://www.opensource.org/licenses/mit-license.php</span></a></p></body></html> + + + + This is Beta software. + Это бета версия программы. + + + + helpDialog + + + Help + Помощь + + + + <a href="http://Bitmessage.org/wiki/PyBitmessage_Help">http://Bitmessage.org/wiki/PyBitmessage_Help</a> + <a href="http://Bitmessage.org/wiki/PyBitmessage_Help">http://Bitmessage.org/wiki/PyBitmessage_Help</a> + + + + As Bitmessage is a collaborative project, help can be found online in the Bitmessage Wiki: + Битмесседж - это общественный проект. Вы можете найти подсказки и советы на Wiki-страничке Битмесседж: + + + + iconGlossaryDialog + + + Icon Glossary + Описание значков + + + + You have no connections with other peers. + Нет соединения с другими участниками сети. + + + + You have made at least one connection to a peer using an outgoing connection but you have not yet received any incoming connections. Your firewall or home router probably isn't configured to forward incoming TCP connections to your computer. Bitmessage will work just fine but it would help the Bitmessage network if you allowed for incoming connections and will help you be a better-connected node. + На текущий момент Вы установили по-крайней мере одно исходящее соединение, но пока ни одного входящего. Ваш файрвол или маршрутизатор скорее всего не настроен на переброс входящих TCP соединений к Вашему компьютеру. Битмесседж будет прекрасно работать и без этого, но Вы могли бы помочь сети если бы разрешили и входящие соединения тоже. Это помогло бы Вам стать более важным узлом сети. + + + + You are using TCP port ?. (This can be changed in the settings). + Вы используете TCP порт ?. (Его можно поменять в настройках). + + + + You do have connections with other peers and your firewall is correctly configured. + Вы установили соединение с другими участниками сети и ваш файрвол настроен правильно. + + + + regenerateAddressesDialog + + + Regenerate Existing Addresses + Сгенерировать заново существующие адреса + + + + Regenerate existing addresses + Сгенерировать заново существующие адреса + + + + Passphrase + Секретная фраза + + + + Number of addresses to make based on your passphrase: + + + + + Address version Number: + Версия адреса: + + + + 3 + 3 + + + + Stream number: + Номер потока: + + + + 1 + 1 + + + + Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter + Потратить несколько лишних минут, чтобы сделать адрес(а) короче на 1 или 2 символа + + + + You must check (or not check) this box just like you did (or didn't) when you made your addresses the first time. + Вы должны кликнуть эту галочку (или не кликать) точно также как Вы сделали в самый первый раз, когда создавали Ваши адреса. + + + + If you have previously made deterministic addresses but lost them due to an accident (like hard drive failure), you can regenerate them here. If you used the random number generator to make your addresses then this form will be of no use to you. + + + + + settingsDialog + + + Settings + Настройки + + + + Start Bitmessage on user login + Запускать Битмесседж при входе в систему + + + + Start Bitmessage in the tray (don't show main window) + Запускать Битмесседж в свернутом виде (не показывать главное окно) + + + + Minimize to tray + Сворачивать в трей + + + + Show notification when message received + Показывать уведомления при получении новых сообщений + + + + Run in Portable Mode + Запустить в переносном режиме + + + + In Portable Mode, messages and config files are stored in the same directory as the program rather than the normal application-data folder. This makes it convenient to run Bitmessage from a USB thumb drive. + + + + + User Interface + Пользовательские + + + + Listening port + Порт прослушивания + + + + Listen for connections on port: + Прослушивать соединения на порту: + + + + Proxy server / Tor + Прокси сервер / Тор + + + + Type: + Тип: + + + + none + отсутствует + + + + SOCKS4a + SOCKS4a + + + + SOCKS5 + SOCKS5 + + + + Server hostname: + Адрес сервера: + + + + Port: + Порт: + + + + Authentication + Авторизация + + + + Username: + Имя пользователя: + + + + Pass: + Прль: + + + + Network Settings + Сетевые настройки + + + + When someone sends you a message, their computer must first complete some work. The difficulty of this work, by default, is 1. You may raise this default for new addresses you create by changing the values here. Any new addresses you create will require senders to meet the higher difficulty. There is one exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically notify them when you next send a message that they need only complete the minimum amount of work: difficulty 1. + + + + + Total difficulty: + Общая сложность: + + + + Small message difficulty: + Сложность для маленьких сообщений: + + + + The 'Small message difficulty' mostly only affects the difficulty of sending small messages. Doubling this value makes it almost twice as difficult to send a small message but doesn't really affect large messages. + + + + + The 'Total difficulty' affects the absolute amount of work the sender must complete. Doubling this value doubles the amount of work. + + + + + Demanded difficulty + Требуемая сложность + + + + Here you may set the maximum amount of work you are willing to do to send a message to another person. Setting these values to 0 means that any value is acceptable. + + + + + Maximum acceptable total difficulty: + Макс допустимая общая сложность: + + + + Maximum acceptable small message difficulty: + Макс допустимая сложность для маленький сообщений: + + + + Max acceptable difficulty + Макс допустимая сложность + + + From 97f0c56aa856fda505255e0ba7bcee89677f6ea5 Mon Sep 17 00:00:00 2001 From: David Nichols Date: Fri, 12 Jul 2013 13:03:09 -0500 Subject: [PATCH 10/43] Adding configuration option to listen for connections when operating with a SOCKS proxy. --- src/bitmessageqt/__init__.py | 7 +++ src/bitmessageqt/settings.py | 84 +++++++++++++++++++++--------------- src/bitmessageqt/settings.ui | 8 ++++ src/class_singleListener.py | 4 +- src/class_sqlThread.py | 1 + src/helper_startup.py | 2 + 6 files changed, 69 insertions(+), 37 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index ae5ab8a7..ffba42c3 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1764,6 +1764,8 @@ class MyForm(QtGui.QMainWindow): self.settingsDialogInstance.ui.lineEditSocksUsername.text())) shared.config.set('bitmessagesettings', 'sockspassword', str( self.settingsDialogInstance.ui.lineEditSocksPassword.text())) + shared.config.set('bitmessagesettings', 'sockslisten', str( + self.settingsDialogInstance.ui.checkBoxSocksListen.isChecked())) if float(self.settingsDialogInstance.ui.lineEditTotalDifficulty.text()) >= 1: shared.config.set('bitmessagesettings', 'defaultnoncetrialsperbyte', str(int(float( self.settingsDialogInstance.ui.lineEditTotalDifficulty.text()) * shared.networkDefaultProofOfWorkNonceTrialsPerByte))) @@ -2691,6 +2693,8 @@ class settingsDialog(QtGui.QDialog): shared.config.get('bitmessagesettings', 'port'))) self.ui.checkBoxAuthentication.setChecked(shared.config.getboolean( 'bitmessagesettings', 'socksauthentication')) + self.ui.checkBoxSocksListen.setChecked(shared.config.getboolean( + 'bitmessagesettings', 'sockslisten')) if str(shared.config.get('bitmessagesettings', 'socksproxytype')) == 'none': self.ui.comboBoxProxyType.setCurrentIndex(0) self.ui.lineEditSocksHostname.setEnabled(False) @@ -2698,6 +2702,7 @@ class settingsDialog(QtGui.QDialog): self.ui.lineEditSocksUsername.setEnabled(False) self.ui.lineEditSocksPassword.setEnabled(False) self.ui.checkBoxAuthentication.setEnabled(False) + self.ui.checkBoxSocksListen.setEnabled(False) elif str(shared.config.get('bitmessagesettings', 'socksproxytype')) == 'SOCKS4a': self.ui.comboBoxProxyType.setCurrentIndex(1) self.ui.lineEditTCPPort.setEnabled(False) @@ -2754,11 +2759,13 @@ class settingsDialog(QtGui.QDialog): self.ui.lineEditSocksUsername.setEnabled(False) self.ui.lineEditSocksPassword.setEnabled(False) self.ui.checkBoxAuthentication.setEnabled(False) + self.ui.checkBoxSocksListen.setEnabled(False) self.ui.lineEditTCPPort.setEnabled(True) elif comboBoxIndex == 1 or comboBoxIndex == 2: self.ui.lineEditSocksHostname.setEnabled(True) self.ui.lineEditSocksPort.setEnabled(True) self.ui.checkBoxAuthentication.setEnabled(True) + self.ui.checkBoxSocksListen.setEnabled(True) if self.ui.checkBoxAuthentication.isChecked(): self.ui.lineEditSocksUsername.setEnabled(True) self.ui.lineEditSocksPassword.setEnabled(True) diff --git a/src/bitmessageqt/settings.py b/src/bitmessageqt/settings.py index 8c94333c..d7672e9d 100644 --- a/src/bitmessageqt/settings.py +++ b/src/bitmessageqt/settings.py @@ -2,8 +2,8 @@ # Form implementation generated from reading ui file 'settings.ui' # -# Created: Mon Jun 10 11:31:56 2013 -# by: PyQt4 UI code generator 4.9.4 +# Created: Fri Jul 12 12:37:53 2013 +# by: PyQt4 UI code generator 4.10.1 # # WARNING! All changes made in this file will be lost! @@ -12,7 +12,16 @@ from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: - _fromUtf8 = lambda s: s + def _fromUtf8(s): + return s + +try: + _encoding = QtGui.QApplication.UnicodeUTF8 + def _translate(context, text, disambig): + return QtGui.QApplication.translate(context, text, disambig, _encoding) +except AttributeError: + def _translate(context, text, disambig): + return QtGui.QApplication.translate(context, text, disambig) class Ui_settingsDialog(object): def setupUi(self, settingsDialog): @@ -122,6 +131,9 @@ class Ui_settingsDialog(object): self.lineEditSocksPassword.setEchoMode(QtGui.QLineEdit.Password) self.lineEditSocksPassword.setObjectName(_fromUtf8("lineEditSocksPassword")) self.gridLayout_2.addWidget(self.lineEditSocksPassword, 2, 5, 1, 1) + self.checkBoxSocksListen = QtGui.QCheckBox(self.groupBox_2) + self.checkBoxSocksListen.setObjectName(_fromUtf8("checkBoxSocksListen")) + self.gridLayout_2.addWidget(self.checkBoxSocksListen, 3, 1, 1, 4) self.gridLayout_4.addWidget(self.groupBox_2, 1, 0, 1, 1) spacerItem2 = QtGui.QSpacerItem(20, 70, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.gridLayout_4.addItem(spacerItem2, 2, 0, 1, 1) @@ -235,38 +247,40 @@ class Ui_settingsDialog(object): settingsDialog.setTabOrder(self.lineEditSocksPort, self.checkBoxAuthentication) settingsDialog.setTabOrder(self.checkBoxAuthentication, self.lineEditSocksUsername) settingsDialog.setTabOrder(self.lineEditSocksUsername, self.lineEditSocksPassword) - settingsDialog.setTabOrder(self.lineEditSocksPassword, self.buttonBox) + settingsDialog.setTabOrder(self.lineEditSocksPassword, self.checkBoxSocksListen) + settingsDialog.setTabOrder(self.checkBoxSocksListen, self.buttonBox) def retranslateUi(self, settingsDialog): - settingsDialog.setWindowTitle(QtGui.QApplication.translate("settingsDialog", "Settings", None, QtGui.QApplication.UnicodeUTF8)) - self.checkBoxStartOnLogon.setText(QtGui.QApplication.translate("settingsDialog", "Start Bitmessage on user login", None, QtGui.QApplication.UnicodeUTF8)) - self.checkBoxStartInTray.setText(QtGui.QApplication.translate("settingsDialog", "Start Bitmessage in the tray (don\'t show main window)", None, QtGui.QApplication.UnicodeUTF8)) - self.checkBoxMinimizeToTray.setText(QtGui.QApplication.translate("settingsDialog", "Minimize to tray", None, QtGui.QApplication.UnicodeUTF8)) - self.checkBoxShowTrayNotifications.setText(QtGui.QApplication.translate("settingsDialog", "Show notification when message received", None, QtGui.QApplication.UnicodeUTF8)) - self.checkBoxPortableMode.setText(QtGui.QApplication.translate("settingsDialog", "Run in Portable Mode", None, QtGui.QApplication.UnicodeUTF8)) - self.label_7.setText(QtGui.QApplication.translate("settingsDialog", "In Portable Mode, messages and config files are stored in the same directory as the program rather than the normal application-data folder. This makes it convenient to run Bitmessage from a USB thumb drive.", None, QtGui.QApplication.UnicodeUTF8)) - self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabUserInterface), QtGui.QApplication.translate("settingsDialog", "User Interface", None, QtGui.QApplication.UnicodeUTF8)) - self.groupBox.setTitle(QtGui.QApplication.translate("settingsDialog", "Listening port", None, QtGui.QApplication.UnicodeUTF8)) - self.label.setText(QtGui.QApplication.translate("settingsDialog", "Listen for connections on port:", None, QtGui.QApplication.UnicodeUTF8)) - self.groupBox_2.setTitle(QtGui.QApplication.translate("settingsDialog", "Proxy server / Tor", None, QtGui.QApplication.UnicodeUTF8)) - self.label_2.setText(QtGui.QApplication.translate("settingsDialog", "Type:", None, QtGui.QApplication.UnicodeUTF8)) - self.comboBoxProxyType.setItemText(0, QtGui.QApplication.translate("settingsDialog", "none", None, QtGui.QApplication.UnicodeUTF8)) - self.comboBoxProxyType.setItemText(1, QtGui.QApplication.translate("settingsDialog", "SOCKS4a", None, QtGui.QApplication.UnicodeUTF8)) - self.comboBoxProxyType.setItemText(2, QtGui.QApplication.translate("settingsDialog", "SOCKS5", None, QtGui.QApplication.UnicodeUTF8)) - self.label_3.setText(QtGui.QApplication.translate("settingsDialog", "Server hostname:", None, QtGui.QApplication.UnicodeUTF8)) - self.label_4.setText(QtGui.QApplication.translate("settingsDialog", "Port:", None, QtGui.QApplication.UnicodeUTF8)) - self.checkBoxAuthentication.setText(QtGui.QApplication.translate("settingsDialog", "Authentication", None, QtGui.QApplication.UnicodeUTF8)) - self.label_5.setText(QtGui.QApplication.translate("settingsDialog", "Username:", None, QtGui.QApplication.UnicodeUTF8)) - self.label_6.setText(QtGui.QApplication.translate("settingsDialog", "Pass:", None, QtGui.QApplication.UnicodeUTF8)) - self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabNetworkSettings), QtGui.QApplication.translate("settingsDialog", "Network Settings", None, QtGui.QApplication.UnicodeUTF8)) - self.label_8.setText(QtGui.QApplication.translate("settingsDialog", "When someone sends you a message, their computer must first complete some work. The difficulty of this work, by default, is 1. You may raise this default for new addresses you create by changing the values here. Any new addresses you create will require senders to meet the higher difficulty. There is one exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically notify them when you next send a message that they need only complete the minimum amount of work: difficulty 1. ", None, QtGui.QApplication.UnicodeUTF8)) - self.label_9.setText(QtGui.QApplication.translate("settingsDialog", "Total difficulty:", None, QtGui.QApplication.UnicodeUTF8)) - self.label_11.setText(QtGui.QApplication.translate("settingsDialog", "Small message difficulty:", None, QtGui.QApplication.UnicodeUTF8)) - self.label_12.setText(QtGui.QApplication.translate("settingsDialog", "The \'Small message difficulty\' mostly only affects the difficulty of sending small messages. Doubling this value makes it almost twice as difficult to send a small message but doesn\'t really affect large messages.", None, QtGui.QApplication.UnicodeUTF8)) - self.label_10.setText(QtGui.QApplication.translate("settingsDialog", "The \'Total difficulty\' affects the absolute amount of work the sender must complete. Doubling this value doubles the amount of work.", None, QtGui.QApplication.UnicodeUTF8)) - self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tab), QtGui.QApplication.translate("settingsDialog", "Demanded difficulty", None, QtGui.QApplication.UnicodeUTF8)) - self.label_15.setText(QtGui.QApplication.translate("settingsDialog", "Here you may set the maximum amount of work you are willing to do to send a message to another person. Setting these values to 0 means that any value is acceptable.", None, QtGui.QApplication.UnicodeUTF8)) - self.label_13.setText(QtGui.QApplication.translate("settingsDialog", "Maximum acceptable total difficulty:", None, QtGui.QApplication.UnicodeUTF8)) - self.label_14.setText(QtGui.QApplication.translate("settingsDialog", "Maximum acceptable small message difficulty:", None, QtGui.QApplication.UnicodeUTF8)) - self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tab_2), QtGui.QApplication.translate("settingsDialog", "Max acceptable difficulty", None, QtGui.QApplication.UnicodeUTF8)) + settingsDialog.setWindowTitle(_translate("settingsDialog", "Settings", None)) + self.checkBoxStartOnLogon.setText(_translate("settingsDialog", "Start Bitmessage on user login", None)) + self.checkBoxStartInTray.setText(_translate("settingsDialog", "Start Bitmessage in the tray (don\'t show main window)", None)) + self.checkBoxMinimizeToTray.setText(_translate("settingsDialog", "Minimize to tray", None)) + self.checkBoxShowTrayNotifications.setText(_translate("settingsDialog", "Show notification when message received", None)) + self.checkBoxPortableMode.setText(_translate("settingsDialog", "Run in Portable Mode", None)) + self.label_7.setText(_translate("settingsDialog", "In Portable Mode, messages and config files are stored in the same directory as the program rather than the normal application-data folder. This makes it convenient to run Bitmessage from a USB thumb drive.", None)) + self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabUserInterface), _translate("settingsDialog", "User Interface", None)) + self.groupBox.setTitle(_translate("settingsDialog", "Listening port", None)) + self.label.setText(_translate("settingsDialog", "Listen for connections on port:", None)) + self.groupBox_2.setTitle(_translate("settingsDialog", "Proxy server / Tor", None)) + self.label_2.setText(_translate("settingsDialog", "Type:", None)) + self.comboBoxProxyType.setItemText(0, _translate("settingsDialog", "none", None)) + self.comboBoxProxyType.setItemText(1, _translate("settingsDialog", "SOCKS4a", None)) + self.comboBoxProxyType.setItemText(2, _translate("settingsDialog", "SOCKS5", None)) + self.label_3.setText(_translate("settingsDialog", "Server hostname:", None)) + self.label_4.setText(_translate("settingsDialog", "Port:", None)) + self.checkBoxAuthentication.setText(_translate("settingsDialog", "Authentication", None)) + self.label_5.setText(_translate("settingsDialog", "Username:", None)) + self.label_6.setText(_translate("settingsDialog", "Pass:", None)) + self.checkBoxSocksListen.setText(_translate("settingsDialog", "Listen for incoming connections when using proxy", None)) + self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabNetworkSettings), _translate("settingsDialog", "Network Settings", None)) + self.label_8.setText(_translate("settingsDialog", "When someone sends you a message, their computer must first complete some work. The difficulty of this work, by default, is 1. You may raise this default for new addresses you create by changing the values here. Any new addresses you create will require senders to meet the higher difficulty. There is one exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically notify them when you next send a message that they need only complete the minimum amount of work: difficulty 1. ", None)) + self.label_9.setText(_translate("settingsDialog", "Total difficulty:", None)) + self.label_11.setText(_translate("settingsDialog", "Small message difficulty:", None)) + self.label_12.setText(_translate("settingsDialog", "The \'Small message difficulty\' mostly only affects the difficulty of sending small messages. Doubling this value makes it almost twice as difficult to send a small message but doesn\'t really affect large messages.", None)) + self.label_10.setText(_translate("settingsDialog", "The \'Total difficulty\' affects the absolute amount of work the sender must complete. Doubling this value doubles the amount of work.", None)) + self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tab), _translate("settingsDialog", "Demanded difficulty", None)) + self.label_15.setText(_translate("settingsDialog", "Here you may set the maximum amount of work you are willing to do to send a message to another person. Setting these values to 0 means that any value is acceptable.", None)) + self.label_13.setText(_translate("settingsDialog", "Maximum acceptable total difficulty:", None)) + self.label_14.setText(_translate("settingsDialog", "Maximum acceptable small message difficulty:", None)) + self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tab_2), _translate("settingsDialog", "Max acceptable difficulty", None)) diff --git a/src/bitmessageqt/settings.ui b/src/bitmessageqt/settings.ui index a1bb7c88..9414e1a4 100644 --- a/src/bitmessageqt/settings.ui +++ b/src/bitmessageqt/settings.ui @@ -247,6 +247,13 @@ + + + + Listen for incoming connections when using proxy + + + @@ -508,6 +515,7 @@ checkBoxAuthentication lineEditSocksUsername lineEditSocksPassword + checkBoxSocksListen buttonBox diff --git a/src/class_singleListener.py b/src/class_singleListener.py index 58bddf6f..ec6afc39 100644 --- a/src/class_singleListener.py +++ b/src/class_singleListener.py @@ -24,7 +24,7 @@ class singleListener(threading.Thread): # We don't want to accept incoming connections if the user is using a # SOCKS proxy. If they eventually select proxy 'none' then this will # start listening for connections. - while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS': + while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and not shared.config.getboolean('bitmessagesettings', 'sockslisten'): time.sleep(300) with shared.printLock: @@ -43,7 +43,7 @@ class singleListener(threading.Thread): # We don't want to accept incoming connections if the user is using # a SOCKS proxy. If the user eventually select proxy 'none' then # this will start listening for connections. - while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS': + while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and not shared.config.getboolean('bitmessagesettings', 'sockslisten'): time.sleep(10) while len(shared.connectedHostsList) > 220: with shared.printLock: diff --git a/src/class_sqlThread.py b/src/class_sqlThread.py index 84014a8c..da5ace77 100644 --- a/src/class_sqlThread.py +++ b/src/class_sqlThread.py @@ -80,6 +80,7 @@ class sqlThread(threading.Thread): shared.config.set('bitmessagesettings', 'socksauthentication', 'false') shared.config.set('bitmessagesettings', 'socksusername', '') shared.config.set('bitmessagesettings', 'sockspassword', '') + shared.config.set('bitmessagesettings', 'sockslisten', 'false') shared.config.set('bitmessagesettings', 'keysencrypted', 'false') shared.config.set('bitmessagesettings', 'messagesencrypted', 'false') with open(shared.appdata + 'keys.dat', 'wb') as configfile: diff --git a/src/helper_startup.py b/src/helper_startup.py index e6590b0e..3cde6805 100644 --- a/src/helper_startup.py +++ b/src/helper_startup.py @@ -50,6 +50,8 @@ def loadConfig(): shared.config.set('bitmessagesettings', 'socksport', '9050') shared.config.set( 'bitmessagesettings', 'socksauthentication', 'false') + shared.config.set( + 'bitmessagesettings', 'sockslisten', 'false') shared.config.set('bitmessagesettings', 'socksusername', '') shared.config.set('bitmessagesettings', 'sockspassword', '') shared.config.set('bitmessagesettings', 'keysencrypted', 'false') From 27c0ac436c2c03207b33b0f7ee89583735816979 Mon Sep 17 00:00:00 2001 From: David Nichols Date: Fri, 12 Jul 2013 13:40:06 -0500 Subject: [PATCH 11/43] Updating code comments to reflect changes in listening for connections when using SOCKS. --- src/class_singleListener.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/class_singleListener.py b/src/class_singleListener.py index ec6afc39..d6b46643 100644 --- a/src/class_singleListener.py +++ b/src/class_singleListener.py @@ -21,9 +21,10 @@ class singleListener(threading.Thread): self.selfInitiatedConnections = selfInitiatedConnections def run(self): - # We don't want to accept incoming connections if the user is using a - # SOCKS proxy. If they eventually select proxy 'none' then this will - # start listening for connections. + # We typically don't want to accept incoming connections if the user is using a + # SOCKS proxy, unless they have configured otherwise. If they eventually select + # proxy 'none' or configure SOCKS listening then this will start listening for + # connections. while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and not shared.config.getboolean('bitmessagesettings', 'sockslisten'): time.sleep(300) @@ -40,9 +41,10 @@ class singleListener(threading.Thread): sock.listen(2) while True: - # We don't want to accept incoming connections if the user is using - # a SOCKS proxy. If the user eventually select proxy 'none' then - # this will start listening for connections. + # We typically don't want to accept incoming connections if the user is using a + # SOCKS proxy, unless they have configured otherwise. If they eventually select + # proxy 'none' or configure SOCKS listening then this will start listening for + # connections. while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and not shared.config.getboolean('bitmessagesettings', 'sockslisten'): time.sleep(10) while len(shared.connectedHostsList) > 220: From 922cce65585fa57862c04b3f57dd2d827792eee0 Mon Sep 17 00:00:00 2001 From: David Nichols Date: Fri, 12 Jul 2013 13:42:11 -0500 Subject: [PATCH 12/43] Initializing sockslisten config value to account for upgrades. Otherwise, settings panel will not load. --- src/helper_startup.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/helper_startup.py b/src/helper_startup.py index 3cde6805..aaf71709 100644 --- a/src/helper_startup.py +++ b/src/helper_startup.py @@ -78,3 +78,9 @@ def loadConfig(): os.makedirs(shared.appdata) with open(shared.appdata + 'keys.dat', 'wb') as configfile: shared.config.write(configfile) + + # Initialize settings that may be missing due to upgrades and could + # cause errors if missing. + if not shared.config.has_option('bitmessagesettings', 'sockslisten'): + shared.config.set('bitmessagesettings', 'sockslisten', 'false') + From f240f65d537e05479b6a9d04f601109f4e64a795 Mon Sep 17 00:00:00 2001 From: akh81 Date: Sat, 13 Jul 2013 01:19:59 -0500 Subject: [PATCH 13/43] added translations --- src/translations/bitmessage_ru_RU.qm | Bin 18186 -> 30541 bytes src/translations/bitmessage_ru_RU.ts | 320 +++++++++++++-------------- 2 files changed, 160 insertions(+), 160 deletions(-) diff --git a/src/translations/bitmessage_ru_RU.qm b/src/translations/bitmessage_ru_RU.qm index e878db88e37272e43abffc0181d99c25b5c2b4d1..9e7b7cb8d73d21fdf4949b7816a6c018381e7706 100644 GIT binary patch literal 30541 zcmeHwdvILWd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hRF&-E5&_bex&C)# zbv&X1oyh9+BMxKdt8W8B30|+gMC|f0G9J0jWx!?|^7bAi?t|+_GGK5cU)>BiTsX9^ z2e9hVRT~PtcnH7fTLFDPX3d#osF>lsPXJ9c6SuMOZyg@FhqqE#yLfu ztHYUN1+jqXFQ)e^5^}I|0TbkQt(dOA4%qIhHdQtN$rY*zO)2G;$LjZxyp3m954;Ji zZecf{Bi~k;-R3+Etf^(o1*#tP8{1@{c7-wa>irFLevh5cZ+iAf{Knzm05dnNcez0)VwA)#sLtM0Kfe4fs>8 zUQPD3-GDAzliNo1B6!Ww*Mi|j>PgLKbw|i?yJoQU4zR-EW5j~yu9G@df2)02{SOtc z&~De!)`%I}pWQSFMx|Y7dY6RKw2KMD^zH&5IR6F>W|lXfdP;)-@jbs%0)eM^PY4Nb zaPwZ<67d!Oi6sIsAN4Dnv$%oKhsz%{$q~N`0!=b7!|!?{B@+0DU=Iieg3bueOd3UK zu#mk((c9XD;t#gc%2o+22M<#+<3ih&+jRec&@;J>k~0Y&K9N@SCtni;( zO63a;K=2u9{{)c_lBSABX(f%*(x0Cckpos2>+Gc{t92O*45x9 z%I8=%ly!VwpwlX%(a6X}rXHov9L^~GnrcQ~3biSh!!D^5W28$Z7sc;ZEJ>}5>`0!H q^Ib_wskM@oKegXhQqpo(D!W`eIK^7@R3m3rek6xiWy&e<`~MGvgg4{> diff --git a/src/translations/bitmessage_ru_RU.ts b/src/translations/bitmessage_ru_RU.ts index 23061133..7bb06bc1 100644 --- a/src/translations/bitmessage_ru_RU.ts +++ b/src/translations/bitmessage_ru_RU.ts @@ -6,82 +6,82 @@ One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. May we delete it now? - + Один из Ваших адресов, %1, является устаревшим адресом версии 1. Адреса версии 1 больше не поддерживаются. Хотите ли Вы удалить его сейчас? Reply - Ответить + Ответить Add sender to your Address Book - Добавить отправителя в адресную книгу + Добавить отправителя в адресную книгу Move to Trash - Поместить в корзину + Поместить в корзину View HTML code as formatted text - + Просмотреть HTML код как отформатированный текст Save message as... - Сохранить сообщение как ... + Сохранить сообщение как ... New - Новый адрес + Новый адрес Enable - + Разрешить Disable - + Запретить Copy address to clipboard - Скопировать адрес в буфер обмена + Скопировать адрес в буфер обмена Special address behavior... - + Особое поведение адресов... Send message to this address - + Отправить сообщение на этот адрес Subscribe to this address - + Подписаться на рассылку с этого адреса Add New Address - Добавить новый адрес + Добавить новый адрес Delete - + Удалить Copy destination address to clipboard - Скопировать адрес отправки в буфер обмена + Скопировать адрес отправки в буфер обмена @@ -91,7 +91,7 @@ Add new entry - Добавить новую запись + Добавить новую запись @@ -111,7 +111,7 @@ Message sent. Waiting on acknowledgement. Sent at %1 - Сообщение отправлено. Ожидаем подтверждения. Отправлено в %1 + Сообщение отправлено. Ожидаем подтверждения. Отправлено в %1 @@ -121,7 +121,7 @@ Acknowledgement of the message received %1 - Сообщение получено %1 + Сообщение получено %1 @@ -151,7 +151,7 @@ Unknown status: %1 %2 - Неизвестный статус: %1 %2 + Неизвестный статус: %1 %2 @@ -161,7 +161,7 @@ Not Connected - Не соединено + Не соединено @@ -171,22 +171,22 @@ Send - Отправка + Отправка Subscribe - Подписки + Подписки Address Book - Адресная книга + Адресная книга Quit - Выйти + Выйти @@ -230,12 +230,12 @@ It is important that you back up this file. Would you like to open the file now? bad passphrase - Неподходящая секретная фраза + Неподходящая секретная фраза You must type your passphrase. If you don't have one then this is not the form for you. - Вы должны ввести секретную фразу. Если Вы не хотите это делать, то Вы выбрали неправильную опцию. + Вы должны ввести секретную фразу. Если Вы не хотите это делать, то Вы выбрали неправильную опцию. @@ -255,17 +255,17 @@ It is important that you back up this file. Would you like to open the file now? Total Connections: %1 - Всего соединений: %1 + Всего соединений: %1 Connection lost - Соединение потеряно + Соединение потеряно Connected - Соединено + Соединено @@ -335,7 +335,7 @@ It is important that you back up this file. Would you like to open the file now? Stream number - Номер потока + Номер потока @@ -360,7 +360,7 @@ It is important that you back up this file. Would you like to open the file now? Right click one or more entries in your address book and select 'Send message to this address'. - + Нажмите правую кнопку мышки на каком-либо адресе и выберите "Отправить сообщение на этот адрес". @@ -375,7 +375,7 @@ It is important that you back up this file. Would you like to open the file now? From - От + От @@ -430,12 +430,12 @@ It is important that you back up this file. Would you like to open the file now? Choose a passphrase - Придумайте секретную фразу + Придумайте секретную фразу You really do need a passphrase. - Вы действительно должны ввести секретную фразу. + Вы действительно должны ввести секретную фразу. @@ -470,7 +470,7 @@ It is important that you back up this file. Would you like to open the file now? Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back. - Удалено в корзину. Чтобы попасть в корзину, Вам нужно будет найти файл корзины на диске. + Удалено в корзину. Чтобы попасть в корзину, Вам нужно будет найти файл корзины на диске. @@ -495,7 +495,7 @@ It is important that you back up this file. Would you like to open the file now? The address should start with ''BM-'' - + Адрес должен начинаться с "BM-" @@ -525,57 +525,57 @@ It is important that you back up this file. Would you like to open the file now? You are using TCP port %1. (This can be changed in the settings). - Вы используете TCP порт %1 (Его можно поменять в настройках). + Вы используете TCP порт %1 (Его можно поменять в настройках). Bitmessage - Bitmessage + Bitmessage To - Кому + Кому From - От кого + От кого Subject - Тема + Тема Received - Получено + Получено Inbox - Входящие + Входящие Load from Address book - Взять из адресной книги + Взять из адресной книги Message: - Сообщение: + Сообщение: Subject: - Тема: + Тема: Send to one or more specific people - Отправить одному или нескольким указанным получателям + Отправить одному или нескольким указанным получателям @@ -589,72 +589,72 @@ p, li { white-space: pre-wrap; } To: - Кому: + Кому: From: - От: + От: Broadcast to everyone who is subscribed to your address - Рассылка всем, кто подписался на Ваш адрес + Рассылка всем, кто подписался на Ваш адрес Be aware that broadcasts are only encrypted with your address. Anyone who knows your address can read them. - Пожалуйста, учитывайте, что рассылки шифруются лишь Вашим адресом. Любой человек, который знает Ваш адрес, сможет прочитать Вашу рассылку. + Пожалуйста, учитывайте, что рассылки шифруются лишь Вашим адресом. Любой человек, который знает Ваш адрес, сможет прочитать Вашу рассылку. Status - Статус + Статус Sent - Отправленные + Отправленные Label (not shown to anyone) - Название (не показывается никому) + Название (не показывается никому) Address - Адрес + Адрес Stream - Поток + Поток Your Identities - Ваши Адреса + Ваши Адреса Here you can subscribe to 'broadcast messages' that are sent by other users. Messages will appear in your Inbox. Addresses here override those on the Blacklist tab. - Здесь Вы можете подписаться на рассылки от других пользователей. Все рассылки будут появлять у Вас во Входящих. Вы будете следить за всеми адресами, указанными здесь, даже если они в черном списке. + Здесь Вы можете подписаться на рассылки от других пользователей. Все рассылки будут появлять у Вас во Входящих. Вы будете следить за всеми адресами, указанными здесь, даже если они в черном списке. Add new Subscription - Добавить новую подписку + Добавить новую подписку Label - Название + Название Subscriptions - Подписки + Подписки @@ -664,37 +664,37 @@ p, li { white-space: pre-wrap; } Name or Label - Название + Название Use a Blacklist (Allow all incoming messages except those on the Blacklist) - Использовать черный список (Разрешить все входящие сообщения, кроме указанных в черном списке) + Использовать черный список (Разрешить все входящие сообщения, кроме указанных в черном списке) Use a Whitelist (Block all incoming messages except those on the Whitelist) - Использовать белый список (блокировать все входящие сообщения, кроме указанных в белом списке) + Использовать белый список (блокировать все входящие сообщения, кроме указанных в белом списке) Blacklist - Черный список + Черный список Stream # - № потока + № потока Connections - Соединений + Соединений Total connections: 0 - Всего соединений: 0 + Всего соединений: 0 @@ -719,22 +719,22 @@ p, li { white-space: pre-wrap; } Network Status - Статус сети + Статус сети File - Файл + Файл Settings - Настройки + Настройки Help - Помощь + Помощь @@ -744,22 +744,22 @@ p, li { white-space: pre-wrap; } Manage keys - Управлять ключами + Управлять ключами About - О программе + О программе Regenerate deterministic addresses - Сгенерировать заново все адреса + Сгенерировать заново все адреса Delete all trashed messages - Стереть все сообщения из корзины + Стереть все сообщения из корзины @@ -767,98 +767,98 @@ p, li { white-space: pre-wrap; } Create new Address - + Создать новый адрес Here you may generate as many addresses as you like. Indeed, creating and abandoning addresses is encouraged. You may generate addresses by using either random numbers or by using a passphrase. If you use a passphrase, the address is called a "deterministic" address. The 'Random Number' option is selected by default but deterministic addresses have several pros and cons: - + Здесь Вы сможете сгенерировать столько адресов сколько хотите. На самом деле, создание и выкидывание адресов даже поощряется. Вы можете сгенерировать адреса используя либо генератор случайных чисел либо придумав секретную фразу. Если Вы используете секретную фразу, то адреса будут называться "детерминистическими". Генератор случайных чисел выбран по умолчанию, однако детерминистические адреса имеют следующие плюсы и минусы по сравнению с ними: <html><head/><body><p><span style=" font-weight:600;">Pros:<br/></span>You can recreate your addresses on any computer from memory. <br/>You need-not worry about backing up your keys.dat file as long as you can remember your passphrase. <br/><span style=" font-weight:600;">Cons:<br/></span>You must remember (or write down) your passphrase if you expect to be able to recreate your keys if they are lost. <br/>You must remember the address version number and the stream number along with your passphrase. <br/>If you choose a weak passphrase and someone on the Internet can brute-force it, they can read your messages and send messages as you.</p></body></html> - + <html><head/><body><p><span style=" font-weight:600;">Плюсы:<br/></span>Вы сможете восстановить адрес по памяти на любом компьютере<br/>Вам не нужно беспокоиться о сохранении файла keys.dat, если Вы запомнили секретную фразу<br/><span style=" font-weight:600;">Минусы:<br/></span>Вы должны запомнить (или записать) секретную фразу, если Вы хотите когда-либо восстановить Ваш адрес на другом компьютере <br/>Вы должны также запомнить версию адреса и номер потока вместе с секретной фразой<br/>Если Вы выберите слишком короткую секретную фразу, кто-нибудь в интернете сможет подобрать ключ и, как следствие, читать и отправлять от Вашего имени сообщения.</p></body></html> Use a random number generator to make an address - Использовать генератор случайных чисел для создания адреса + Использовать генератор случайных чисел для создания адреса Use a passphrase to make addresses - Использовать секретную фразу для создания адресов + Использовать секретную фразу для создания адресов Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter - Потратить несколько лишних минут, чтобы сделать адрес(а) короче на 1 или 2 символа + Потратить несколько лишних минут, чтобы сделать адрес(а) короче на 1 или 2 символа Make deterministic addresses - + Создать детерминистический адрес Address version number: 3 - Версия адреса: 3 + Версия адреса: 3 In addition to your passphrase, you must remember these numbers: - В дополнение к секретной фразе, Вам необходимо запомнить эти числа: + В дополнение к секретной фразе, Вам необходимо запомнить эти числа: Passphrase - Секретная фраза + Придумайте секретную фразу Number of addresses to make based on your passphrase: - Кол-во адресов, которые Вы хотите получить из секретной фразы: + Кол-во адресов, которые Вы хотите получить из секретной фразы: Stream number: 1 - Номер потока: 1 + Номер потока: 1 Retype passphrase - Повторите секретную фразу + Повторите секретную фразу Randomly generate address - Сгенерировать случайный адрес + Сгенерировать случайный адрес Label (not shown to anyone except you) - Название (не показывается никому кроме Вас) + Название (не показывается никому кроме Вас) Use the most available stream - Использовать наиболее доступный поток + Использовать наиболее доступный поток (best if this is the first of many addresses you will create) - + (выберите этот вариант, если это лишь первый из многих адресов, которые Вы планируете создать) Use the same stream as an existing address - + Использовать тот же поток, что и указанный существующий адрес (saves you some bandwidth and processing power) - + (немного сэкономит Вам пропускную способность сети и вычислительную мощь) @@ -909,17 +909,17 @@ The 'Random Number' option is selected by default but deterministic ad Add new entry - Добавить новую запись + Добавить новую запись Label - Название + Название Address - Адрес + Адрес @@ -927,27 +927,27 @@ The 'Random Number' option is selected by default but deterministic ad Special Address Behavior - + Особое поведение адреса Behave as a normal address - + Вести себя как обычный адрес Behave as a pseudo-mailing-list address - + Вести себя как адрес псевдо-рассылки Mail received to a pseudo-mailing-list address will be automatically broadcast to subscribers (and thus will be public). - + Почта, полученная на адрес псевдо-рассылки, будет автоматически разослана всем подписчикам (и поэтому будет доступна общей публике). Name of the pseudo-mailing-list: - + Имя псевдо-рассылки: @@ -955,32 +955,32 @@ The 'Random Number' option is selected by default but deterministic ad About - О программе + О программе PyBitmessage - PyBitmessage + PyBitmessage version ? - версия ? + версия ? Copyright © 2013 Jonathan Warren - Копирайт © 2013 Джонатан Уоррен + Копирайт © 2013 Джонатан Уоррен <html><head/><body><p>Distributed under the MIT/X11 software license; see <a href="http://www.opensource.org/licenses/mit-license.php"><span style=" text-decoration: underline; color:#0000ff;">http://www.opensource.org/licenses/mit-license.php</span></a></p></body></html> - <html><head/><body><p>Программа распространяется в соответствии с лицензией MIT/X11; см. <a href="http://www.opensource.org/licenses/mit-license.php"><span style=" text-decoration: underline; color:#0000ff;">http://www.opensource.org/licenses/mit-license.php</span></a></p></body></html> + <html><head/><body><p>Программа распространяется в соответствии с лицензией MIT/X11; см. <a href="http://www.opensource.org/licenses/mit-license.php"><span style=" text-decoration: underline; color:#0000ff;">http://www.opensource.org/licenses/mit-license.php</span></a></p></body></html> This is Beta software. - Это бета версия программы. + Это бета версия программы. @@ -988,17 +988,17 @@ The 'Random Number' option is selected by default but deterministic ad Help - Помощь + Помощь <a href="http://Bitmessage.org/wiki/PyBitmessage_Help">http://Bitmessage.org/wiki/PyBitmessage_Help</a> - <a href="http://Bitmessage.org/wiki/PyBitmessage_Help">http://Bitmessage.org/wiki/PyBitmessage_Help</a> + <a href="http://Bitmessage.org/wiki/PyBitmessage_Help">http://Bitmessage.org/wiki/PyBitmessage_Help</a> As Bitmessage is a collaborative project, help can be found online in the Bitmessage Wiki: - Битмесседж - это общественный проект. Вы можете найти подсказки и советы на Wiki-страничке Битмесседж: + Битмесседж - это общественный проект. Вы можете найти подсказки и советы на Wiki-страничке Битмесседж: @@ -1006,27 +1006,27 @@ The 'Random Number' option is selected by default but deterministic ad Icon Glossary - Описание значков + Описание значков You have no connections with other peers. - Нет соединения с другими участниками сети. + Нет соединения с другими участниками сети. You have made at least one connection to a peer using an outgoing connection but you have not yet received any incoming connections. Your firewall or home router probably isn't configured to forward incoming TCP connections to your computer. Bitmessage will work just fine but it would help the Bitmessage network if you allowed for incoming connections and will help you be a better-connected node. - На текущий момент Вы установили по-крайней мере одно исходящее соединение, но пока ни одного входящего. Ваш файрвол или маршрутизатор скорее всего не настроен на переброс входящих TCP соединений к Вашему компьютеру. Битмесседж будет прекрасно работать и без этого, но Вы могли бы помочь сети если бы разрешили и входящие соединения тоже. Это помогло бы Вам стать более важным узлом сети. + На текущий момент Вы установили по-крайней мере одно исходящее соединение, но пока ни одного входящего. Ваш файрвол или маршрутизатор скорее всего не настроен на переброс входящих TCP соединений к Вашему компьютеру. Битмесседж будет прекрасно работать и без этого, но Вы могли бы помочь сети если бы разрешили и входящие соединения тоже. Это помогло бы Вам стать более важным узлом сети. You are using TCP port ?. (This can be changed in the settings). - Вы используете TCP порт ?. (Его можно поменять в настройках). + Вы используете TCP порт ?. (Его можно поменять в настройках). You do have connections with other peers and your firewall is correctly configured. - Вы установили соединение с другими участниками сети и ваш файрвол настроен правильно. + Вы установили соединение с другими участниками сети и ваш файрвол настроен правильно. @@ -1034,57 +1034,57 @@ The 'Random Number' option is selected by default but deterministic ad Regenerate Existing Addresses - Сгенерировать заново существующие адреса + Сгенерировать заново существующие адреса Regenerate existing addresses - Сгенерировать заново существующие адреса + Сгенерировать заново существующие адреса Passphrase - Секретная фраза + Секретная фраза Number of addresses to make based on your passphrase: - + Кол-во адресов, которые Вы хотите получить из Вашей секретной фразы: Address version Number: - Версия адреса: + Версия адреса: 3 - 3 + 3 Stream number: - Номер потока: + Номер потока: 1 - 1 + 1 Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter - Потратить несколько лишних минут, чтобы сделать адрес(а) короче на 1 или 2 символа + Потратить несколько лишних минут, чтобы сделать адрес(а) короче на 1 или 2 символа You must check (or not check) this box just like you did (or didn't) when you made your addresses the first time. - Вы должны кликнуть эту галочку (или не кликать) точно также как Вы сделали в самый первый раз, когда создавали Ваши адреса. + Вы должны кликнуть эту галочку (или не кликать) точно также как Вы сделали в самый первый раз, когда создавали Ваши адреса. If you have previously made deterministic addresses but lost them due to an accident (like hard drive failure), you can regenerate them here. If you used the random number generator to make your addresses then this form will be of no use to you. - + Если Вы ранее делали детерминистические адреса, но случайно потеряли их, Вы можете их восстановить здесь. Если же Вы использовали генератор случайных чисел, чтобы создать Ваши адреса, то Вы не сможете их здесь восстановить. @@ -1092,157 +1092,157 @@ The 'Random Number' option is selected by default but deterministic ad Settings - Настройки + Настройки Start Bitmessage on user login - Запускать Битмесседж при входе в систему + Запускать Битмесседж при входе в систему Start Bitmessage in the tray (don't show main window) - Запускать Битмесседж в свернутом виде (не показывать главное окно) + Запускать Битмесседж в свернутом виде (не показывать главное окно) Minimize to tray - Сворачивать в трей + Сворачивать в трей Show notification when message received - Показывать уведомления при получении новых сообщений + Показывать уведомления при получении новых сообщений Run in Portable Mode - Запустить в переносном режиме + Запустить в переносном режиме In Portable Mode, messages and config files are stored in the same directory as the program rather than the normal application-data folder. This makes it convenient to run Bitmessage from a USB thumb drive. - + В переносном режиме, все сообщения и конфигурационные файлы сохраняются в той же самой папке что и сама программа. Это делает более удобным использование БитМесседж с USB-флэшки. User Interface - Пользовательские + Пользовательские Listening port - Порт прослушивания + Порт прослушивания Listen for connections on port: - Прослушивать соединения на порту: + Прослушивать соединения на порту: Proxy server / Tor - Прокси сервер / Тор + Прокси сервер / Тор Type: - Тип: + Тип: none - отсутствует + отсутствует SOCKS4a - SOCKS4a + SOCKS4a SOCKS5 - SOCKS5 + SOCKS5 Server hostname: - Адрес сервера: + Адрес сервера: Port: - Порт: + Порт: Authentication - Авторизация + Авторизация Username: - Имя пользователя: + Имя пользователя: Pass: - Прль: + Прль: Network Settings - Сетевые настройки + Сетевые настройки When someone sends you a message, their computer must first complete some work. The difficulty of this work, by default, is 1. You may raise this default for new addresses you create by changing the values here. Any new addresses you create will require senders to meet the higher difficulty. There is one exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically notify them when you next send a message that they need only complete the minimum amount of work: difficulty 1. - + Когда кто-либо отправляет Вам сообщение, его компьютер должен сперва решить определенную вычислительную задачу. Сложность этой задачи по умолчанию равна 1. Вы можете повысить эту сложность для новых адресов, которые Вы создадите, здесь. Таким образом, любые новые адреса, которые Вы создадите, могут требовать от отправителей сложность большую чем 1. Однако, есть одно исключение: если Вы специально добавите Вашего собеседника в адресную книгу, то БитМесседж автоматически уведомит его о том, что для него минимальная сложность будет составлять всегда всего лишь 1. Total difficulty: - Общая сложность: + Общая сложность: Small message difficulty: - Сложность для маленьких сообщений: + Сложность для маленьких сообщений: The 'Small message difficulty' mostly only affects the difficulty of sending small messages. Doubling this value makes it almost twice as difficult to send a small message but doesn't really affect large messages. - + "Сложность для маленьких сообщений" влияет исключительно на небольшие сообщения. Увеличив это число в два раза, вы сделаете отправку маленьких сообщений в два раза сложнее, в то время как сложность отправки больших сообщений не изменится. The 'Total difficulty' affects the absolute amount of work the sender must complete. Doubling this value doubles the amount of work. - + "Общая сложность" влияет на абсолютное количество вычислений, которые отправитель должен провести, чтобы отправить сообщение. Увеличив это число в два раза, вы увеличите в два раза объем требуемых вычислений. Demanded difficulty - Требуемая сложность + Требуемая сложность Here you may set the maximum amount of work you are willing to do to send a message to another person. Setting these values to 0 means that any value is acceptable. - + Здесь Вы можете установить максимальную вычислительную работу, которую Вы согласны проделать, чтобы отправить сообщение другому пользователю. Ноль означает, чтобы любое значение допустимо. Maximum acceptable total difficulty: - Макс допустимая общая сложность: + Макс допустимая общая сложность: Maximum acceptable small message difficulty: - Макс допустимая сложность для маленький сообщений: + Макс допустимая сложность для маленький сообщений: Max acceptable difficulty - Макс допустимая сложность + Макс допустимая сложность From 3a06edbbd829df465d86b061ffd728ef38d44800 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Sun, 14 Jul 2013 17:10:37 -0400 Subject: [PATCH 14/43] manual merge, fix minor import issue --- src/shared.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/shared.py b/src/shared.py index 897a1cf0..03ee1752 100644 --- a/src/shared.py +++ b/src/shared.py @@ -22,7 +22,6 @@ import time # Project imports. from addresses import * -from debug import logger import highlevelcrypto import shared import helper_startup From d900b9de7074d5d2298139406835d2ebf75028fa Mon Sep 17 00:00:00 2001 From: DivineOmega Date: Mon, 15 Jul 2013 10:49:01 +0100 Subject: [PATCH 15/43] Added check for logger global before attempting to log in places where logging may occur before the logger is ready --- src/shared.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/shared.py b/src/shared.py index 5abeeb96..ddedf3d0 100644 --- a/src/shared.py +++ b/src/shared.py @@ -118,8 +118,9 @@ def lookupAppdataFolder(): if "HOME" in environ: dataFolder = path.join(os.environ["HOME"], "Library/Application Support/", APPNAME) + '/' else: - logger.critical('Could not find home folder, please report this message and your ' - 'OS X version to the BitMessage Github.') + if 'logger' in globals(): + logger.critical('Could not find home folder, please report this message and your ' + 'OS X version to the BitMessage Github.') sys.exit() elif 'win32' in sys.platform or 'win64' in sys.platform: @@ -133,7 +134,8 @@ def lookupAppdataFolder(): # Migrate existing data to the proper location if this is an existing install try: - logger.info("Moving data folder to %s" % (dataFolder)) + if 'logger' in globals(): + logger.info("Moving data folder to %s" % (dataFolder)) move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder) except IOError: pass From 3107150ace725a4928e1d05e8e2b94af4ba20729 Mon Sep 17 00:00:00 2001 From: DivineOmega Date: Mon, 15 Jul 2013 10:56:13 +0100 Subject: [PATCH 16/43] Added fall back print statements in case logger is unavailable --- src/shared.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/shared.py b/src/shared.py index ddedf3d0..ff39ea2e 100644 --- a/src/shared.py +++ b/src/shared.py @@ -118,9 +118,11 @@ def lookupAppdataFolder(): if "HOME" in environ: dataFolder = path.join(os.environ["HOME"], "Library/Application Support/", APPNAME) + '/' else: + stringToLog = 'Could not find home folder, please report this message and your OS X version to the BitMessage Github.' if 'logger' in globals(): - logger.critical('Could not find home folder, please report this message and your ' - 'OS X version to the BitMessage Github.') + logger.critical(stringToLog) + else: + print stringToLog sys.exit() elif 'win32' in sys.platform or 'win64' in sys.platform: @@ -134,8 +136,11 @@ def lookupAppdataFolder(): # Migrate existing data to the proper location if this is an existing install try: + stringToLog = "Moving data folder to %s" % (dataFolder) if 'logger' in globals(): - logger.info("Moving data folder to %s" % (dataFolder)) + logger.info(stringToLog) + else: + print stringToLog move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder) except IOError: pass From 1ab664564b9521cc0fa42978a15b1410f8427cdf Mon Sep 17 00:00:00 2001 From: fuzzgun Date: Mon, 15 Jul 2013 17:01:12 +0100 Subject: [PATCH 17/43] Play sounds on connection/disconnection or when messages arrive --- archpackage/PKGBUILD | 2 +- debian/control | 2 +- generate.sh | 2 +- puppypackage/pybitmessage-0.3.4.pet.specs | 2 +- rpmpackage/pybitmessage.spec | 2 +- src/bitmessageqt/__init__.py | 68 +++++++++++++++++++++-- 6 files changed, 67 insertions(+), 11 deletions(-) diff --git a/archpackage/PKGBUILD b/archpackage/PKGBUILD index 79ee8ded..e9ab0f74 100644 --- a/archpackage/PKGBUILD +++ b/archpackage/PKGBUILD @@ -7,7 +7,7 @@ arch=('i686' 'x86_64') url="https://github.com/Bitmessage/PyBitmessage" license=('MIT') groups=() -depends=('python2' 'qt4' 'python2-pyqt4' 'sqlite' 'openssl') +depends=('python2' 'qt4' 'python2-pyqt4' 'sqlite' 'openssl' 'gst123') makedepends=() optdepends=('python2-gevent') provides=() diff --git a/debian/control b/debian/control index 01bd7d8c..d9ed8704 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Vcs-Git: https://github.com/fuzzgun/fin.git Package: pybitmessage Section: mail Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev +Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev, gst123 Suggests: libmessaging-menu-dev Description: Send encrypted messages Bitmessage is a P2P communications protocol used to send encrypted diff --git a/generate.sh b/generate.sh index 8909cf2f..8489f024 100755 --- a/generate.sh +++ b/generate.sh @@ -4,4 +4,4 @@ rm -f Makefile rpmpackage/*.spec -packagemonkey -n "PyBitmessage" --version "0.3.4" --dir "." -l "mit" -e "Bob Mottram (4096 bits) " --brief "Send encrypted messages" --desc "Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide \"non-content\" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." --homepage "https://github.com/Bitmessage/PyBitmessage" --section "mail" --categories "Office/Email" --dependsdeb "python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev" --dependsrpm "python, PyQt4, openssl-compat-bitcoin-libs" --mainscript "bitmessagemain.py" --librarypath "/opt/openssl-compat-bitcoin/lib/" --suggestsdeb "libmessaging-menu-dev" --dependspuppy "openssl, python-qt4, sqlite3, sqlite3-dev, python-openssl, python-sip" --dependsarch "python2, qt4, python2-pyqt4, sqlite, openssl" --suggestsarch "python2-gevent" --pythonversion 2 +packagemonkey -n "PyBitmessage" --version "0.3.4" --dir "." -l "mit" -e "Bob Mottram (4096 bits) " --brief "Send encrypted messages" --desc "Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide \"non-content\" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." --homepage "https://github.com/Bitmessage/PyBitmessage" --section "mail" --categories "Office/Email" --dependsdeb "python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev, gst123" --dependsrpm "python, PyQt4, openssl-compat-bitcoin-libs, gst123" --mainscript "bitmessagemain.py" --librarypath "/opt/openssl-compat-bitcoin/lib/" --suggestsdeb "libmessaging-menu-dev" --dependspuppy "openssl, python-qt4, sqlite3, sqlite3-dev, python-openssl, python-sip, gst123" --dependsarch "python2, qt4, python2-pyqt4, sqlite, openssl, gst123" --suggestsarch "python2-gevent" --pythonversion 2 diff --git a/puppypackage/pybitmessage-0.3.4.pet.specs b/puppypackage/pybitmessage-0.3.4.pet.specs index e346d0c9..42d99ac3 100644 --- a/puppypackage/pybitmessage-0.3.4.pet.specs +++ b/puppypackage/pybitmessage-0.3.4.pet.specs @@ -1 +1 @@ -pybitmessage-0.3.4-1|PyBitmessage|0.3.4|1|Internet;mailnews;|5.1M||pybitmessage-0.3.4-1.pet|+openssl,+python-qt4,+sqlite3,+sqlite3-dev,+python-openssl,+python-sip|Send encrypted messages|ubuntu|precise|5| +pybitmessage-0.3.4-1|PyBitmessage|0.3.4|1|Internet;mailnews;|5.3M||pybitmessage-0.3.4-1.pet|+openssl,+python-qt4,+sqlite3,+sqlite3-dev,+python-openssl,+python-sip,+gst123|Send encrypted messages|ubuntu|precise|5| diff --git a/rpmpackage/pybitmessage.spec b/rpmpackage/pybitmessage.spec index 27485d73..c9254dec 100644 --- a/rpmpackage/pybitmessage.spec +++ b/rpmpackage/pybitmessage.spec @@ -8,7 +8,7 @@ Packager: Bob Mottram (4096 bits) Source0: http://yourdomainname.com/src/%{name}_%{version}.orig.tar.gz Group: Office/Email -Requires: python, PyQt4, openssl-compat-bitcoin-libs +Requires: python, PyQt4, openssl-compat-bitcoin-libs, gst123 %description diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index ce477836..69ef2597 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -34,6 +34,7 @@ try: from PyQt4 import QtCore, QtGui from PyQt4.QtCore import * from PyQt4.QtGui import * + except Exception as err: print 'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download it from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\' (without quotes).' print 'Error message:', err @@ -50,6 +51,14 @@ def _translate(context, text): class MyForm(QtGui.QMainWindow): + # sound type constants + SOUND_NONE = 0 + SOUND_KNOWN = 1 + SOUND_UNKNOWN = 2 + SOUND_CONNECTED = 3 + SOUND_DISCONNECTED = 4 + SOUND_CONNECTION_GREEN = 5 + str_broadcast_subscribers = '[Broadcast subscribers]' def __init__(self, parent=None): @@ -894,6 +903,47 @@ class MyForm(QtGui.QMainWindow): # update the menu entries self.ubuntuMessagingMenuUnread(drawAttention) + # play a sound + def playSound(self, category, label): + soundFilename = None + + if label is not None: + # does a sound file exist for this particular contact? + if (os.path.isfile(shared.appdata + 'sounds/' + label + '.wav') or + os.path.isfile(shared.appdata + 'sounds/' + label + '.mp3')): + soundFilename = shared.appdata + 'sounds/' + label + + if soundFilename is None: + if category is self.SOUND_KNOWN: + soundFilename = shared.appdata + 'sounds/known' + elif category is self.SOUND_UNKNOWN: + soundFilename = shared.appdata + 'sounds/unknown' + elif category is self.SOUND_CONNECTED: + soundFilename = shared.appdata + 'sounds/connected' + elif category is self.SOUND_DISCONNECTED: + soundFilename = shared.appdata + 'sounds/disconnected' + elif category is self.SOUND_CONNECTION_GREEN: + soundFilename = shared.appdata + 'sounds/green' + + if soundFilename is not None: + # if not wav then try mp3 format + if not os.path.isfile(soundFilename + '.wav'): + soundFilename = soundFilename + '.mp3' + else: + soundFilename = soundFilename + '.wav' + + if os.path.isfile(soundFilename): + if 'linux' in sys.platform: + # Note: QSound was a nice idea but it didn't work + if '.mp3' in soundFilename: + os.popen('gst123 ' + soundFilename) + else: + os.popen('aplay ' + soundFilename) + elif sys.platform[0:3] == 'win': + # use winsound on Windows + import winsound + winsound.PlaySound(soundFilename, winsound.SND_FILENAME) + # initialise the message notifier def notifierInit(self): global withMessagingMenu @@ -901,8 +951,11 @@ class MyForm(QtGui.QMainWindow): Notify.init('pybitmessage') # shows a notification - def notifierShow(self, title, subtitle): + def notifierShow(self, title, subtitle, fromCategory, label): global withMessagingMenu + + self.playSound(fromCategory, label); + if withMessagingMenu: n = Notify.Notification.new( title, subtitle, 'notification-message-email') @@ -1075,7 +1128,8 @@ class MyForm(QtGui.QMainWindow): # if the connection is lost then show a notification if self.connected: self.notifierShow('Bitmessage', unicode(_translate( - "MainWindow", "Connection lost").toUtf8(),'utf-8')) + "MainWindow", "Connection lost").toUtf8(),'utf-8'), + self.SOUND_DISCONNECTED, None) self.connected = False if self.actionStatus is not None: @@ -1092,7 +1146,8 @@ class MyForm(QtGui.QMainWindow): # if a new connection has been established then show a notification if not self.connected: self.notifierShow('Bitmessage', unicode(_translate( - "MainWindow", "Connected").toUtf8(),'utf-8')) + "MainWindow", "Connected").toUtf8(),'utf-8'), + self.SOUND_CONNECTED, None) self.connected = True if self.actionStatus is not None: @@ -1108,7 +1163,8 @@ class MyForm(QtGui.QMainWindow): shared.statusIconColor = 'green' if not self.connected: self.notifierShow('Bitmessage', unicode(_translate( - "MainWindow", "Connected").toUtf8(),'utf-8')) + "MainWindow", "Connected").toUtf8(),'utf-8'), + self.SOUND_CONNECTION_GREEN, None) self.connected = True if self.actionStatus is not None: @@ -1580,12 +1636,12 @@ class MyForm(QtGui.QMainWindow): newItem = QtGui.QTableWidgetItem(unicode(fromAddress, 'utf-8')) newItem.setToolTip(unicode(fromAddress, 'utf-8')) if shared.config.getboolean('bitmessagesettings', 'showtraynotifications'): - self.notifierShow(unicode(_translate("MainWindow",'New Message').toUtf8(),'utf-8'), unicode(_translate("MainWindow",'From ').toUtf8(),'utf-8') + unicode(fromAddress, 'utf-8')) + self.notifierShow(unicode(_translate("MainWindow",'New Message').toUtf8(),'utf-8'), unicode(_translate("MainWindow",'From ').toUtf8(),'utf-8') + unicode(fromAddress, 'utf-8'), self.SOUND_UNKNOWN, None) else: newItem = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8')) newItem.setToolTip(unicode(unicode(fromLabel, 'utf-8'))) if shared.config.getboolean('bitmessagesettings', 'showtraynotifications'): - self.notifierShow(unicode(_translate("MainWindow",'New Message').toUtf8(),'utf-8'), unicode(_translate("MainWindow",'From ').toUtf8(),'utf-8') + unicode(fromLabel, 'utf-8')) + self.notifierShow(unicode(_translate("MainWindow",'New Message').toUtf8(),'utf-8'), unicode(_translate("MainWindow",'From ').toUtf8(),'utf-8') + unicode(fromLabel, 'utf-8'), self.SOUND_KNOWN, unicode(fromLabel, 'utf-8')) newItem.setData(Qt.UserRole, str(fromAddress)) newItem.setFont(font) self.ui.tableWidgetInbox.setItem(0, 1, newItem) From 52caec5e2b4a04c893e953d3fc8019e3a9547365 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Mon, 15 Jul 2013 12:19:53 -0400 Subject: [PATCH 18/43] Move one line of code so that correct program activity is logged --- src/bitmessagemain.py | 1 - src/shared.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index cfbfdd6c..15acf545 100644 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -720,7 +720,6 @@ if __name__ == "__main__": helper_bootstrap.knownNodes() helper_bootstrap.dns() - # Start the address generation thread addressGeneratorThread = addressGenerator() addressGeneratorThread.daemon = True # close the main program even if there are threads left diff --git a/src/shared.py b/src/shared.py index ff39ea2e..72badbc7 100644 --- a/src/shared.py +++ b/src/shared.py @@ -136,12 +136,12 @@ def lookupAppdataFolder(): # Migrate existing data to the proper location if this is an existing install try: + move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder) stringToLog = "Moving data folder to %s" % (dataFolder) if 'logger' in globals(): logger.info(stringToLog) else: print stringToLog - move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder) except IOError: pass dataFolder = dataFolder + '/' From 3e134686952d261bf57b5a3a2a7532a95912c4bf Mon Sep 17 00:00:00 2001 From: fuzzgun Date: Mon, 15 Jul 2013 17:58:22 +0100 Subject: [PATCH 19/43] Use subprocess.call --- src/bitmessageqt/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 69ef2597..b2cb2640 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -29,6 +29,7 @@ import os from pyelliptic.openssl import OpenSSL import pickle import platform +import subprocess try: from PyQt4 import QtCore, QtGui @@ -936,9 +937,9 @@ class MyForm(QtGui.QMainWindow): if 'linux' in sys.platform: # Note: QSound was a nice idea but it didn't work if '.mp3' in soundFilename: - os.popen('gst123 ' + soundFilename) + subprocess.call(["gst123", soundFilename]) else: - os.popen('aplay ' + soundFilename) + subprocess.call(["aplay", soundFilename]) elif sys.platform[0:3] == 'win': # use winsound on Windows import winsound From a7a2de1d247bb09c2af23f4048a0af6688422ee3 Mon Sep 17 00:00:00 2001 From: fuzzgun Date: Mon, 15 Jul 2013 18:13:21 +0100 Subject: [PATCH 20/43] Fixed freeze on Ubuntu --- src/bitmessageqt/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index b2cb2640..e61c351d 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -937,9 +937,13 @@ class MyForm(QtGui.QMainWindow): if 'linux' in sys.platform: # Note: QSound was a nice idea but it didn't work if '.mp3' in soundFilename: - subprocess.call(["gst123", soundFilename]) + subprocess.call(["gst123", soundFilename], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE) else: - subprocess.call(["aplay", soundFilename]) + subprocess.call(["aplay", soundFilename], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE) elif sys.platform[0:3] == 'win': # use winsound on Windows import winsound From 08694ecc38b0d3a18a01fe2b50f0cfacc26c4a0e Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Mon, 15 Jul 2013 15:45:03 -0400 Subject: [PATCH 21/43] Portable mode moves debug.log --- src/bitmessageqt/__init__.py | 15 +++++++ src/class_sqlThread.py | 1 + src/debug.py | 85 ++++++++++++++++++++---------------- 3 files changed, 64 insertions(+), 37 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 316f4205..b4ce6725 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -29,6 +29,8 @@ import os from pyelliptic.openssl import OpenSSL import pickle import platform +import debug +from debug import logger try: from PyQt4 import QtCore, QtGui @@ -1874,7 +1876,14 @@ class MyForm(QtGui.QMainWindow): shared.knownNodesLock.release() os.remove(shared.appdata + 'keys.dat') os.remove(shared.appdata + 'knownnodes.dat') + previousAppdataLocation = shared.appdata shared.appdata = '' + debug.restartLoggingInUpdatedAppdataLocation() + try: + os.remove(previousAppdataLocation + 'debug.log') + os.remove(previousAppdataLocation + 'debug.log.1') + except: + pass if shared.appdata == '' and not self.settingsDialogInstance.ui.checkBoxPortableMode.isChecked(): # If we ARE using portable mode now but the user selected that we shouldn't... shared.appdata = shared.lookupAppdataFolder() @@ -1894,6 +1903,12 @@ class MyForm(QtGui.QMainWindow): shared.knownNodesLock.release() os.remove('keys.dat') os.remove('knownnodes.dat') + debug.restartLoggingInUpdatedAppdataLocation() + try: + os.remove('debug.log') + os.remove('debug.log.1') + except: + pass def click_radioButtonBlacklist(self): if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'white': diff --git a/src/class_sqlThread.py b/src/class_sqlThread.py index 84014a8c..a9de7042 100644 --- a/src/class_sqlThread.py +++ b/src/class_sqlThread.py @@ -5,6 +5,7 @@ import time import shutil # used for moving the messages.dat file import sys import os +from debug import logger # This thread exists because SQLITE3 is so un-threadsafe that we must # submit queries to it and it puts results back in a different queue. They diff --git a/src/debug.py b/src/debug.py index 034d3102..fe7815e7 100644 --- a/src/debug.py +++ b/src/debug.py @@ -23,48 +23,59 @@ import shared # TODO(xj9): Get from a config file. log_level = 'DEBUG' -logging.config.dictConfig({ - 'version': 1, - 'formatters': { - 'default': { - 'format': '%(asctime)s - %(levelname)s - %(message)s', +def configureLogging(): + logging.config.dictConfig({ + 'version': 1, + 'formatters': { + 'default': { + 'format': '%(asctime)s - %(levelname)s - %(message)s', + }, }, - }, - 'handlers': { - 'console': { - 'class': 'logging.StreamHandler', - 'formatter': 'default', - 'level': log_level, - 'stream': 'ext://sys.stdout' + 'handlers': { + 'console': { + 'class': 'logging.StreamHandler', + 'formatter': 'default', + 'level': log_level, + 'stream': 'ext://sys.stdout' + }, + 'file': { + 'class': 'logging.handlers.RotatingFileHandler', + 'formatter': 'default', + 'level': log_level, + 'filename': shared.appdata + 'debug.log', + 'maxBytes': 2097152, # 2 MiB + 'backupCount': 1, + } }, - 'file': { - 'class': 'logging.handlers.RotatingFileHandler', - 'formatter': 'default', + 'loggers': { + 'console_only': { + 'handlers': ['console'], + 'propagate' : 0 + }, + 'file_only': { + 'handlers': ['file'], + 'propagate' : 0 + }, + 'both': { + 'handlers': ['console', 'file'], + 'propagate' : 0 + }, + }, + 'root': { 'level': log_level, - 'filename': shared.appdata + 'debug.log', - 'maxBytes': 2097152, # 2 MiB - 'backupCount': 1, - } - }, - 'loggers': { - 'console_only': { 'handlers': ['console'], - 'propagate' : 0 }, - 'file_only': { - 'handlers': ['file'], - 'propagate' : 0 - }, - 'both': { - 'handlers': ['console', 'file'], - 'propagate' : 0 - }, - }, - 'root': { - 'level': log_level, - 'handlers': ['console'], - }, -}) + }) # TODO (xj9): Get from a config file. #logger = logging.getLogger('console_only') +configureLogging() logger = logging.getLogger('both') + +def restartLoggingInUpdatedAppdataLocation(): + global logger + for i in list(logger.handlers): + logger.removeHandler(i) + i.flush() + i.close() + configureLogging() + logger = logging.getLogger('both') \ No newline at end of file From 3427bc5c26002dd49a545e519d1544a60ba2e53d Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Mon, 15 Jul 2013 19:27:53 -0400 Subject: [PATCH 22/43] Store msgid in sent table --- src/class_singleWorker.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/class_singleWorker.py b/src/class_singleWorker.py index 1a0fe149..56b7be6e 100644 --- a/src/class_singleWorker.py +++ b/src/class_singleWorker.py @@ -414,10 +414,10 @@ class singleWorker(threading.Thread): # Update the status of the message in the 'sent' table to have # a 'broadcastsent' status shared.sqlLock.acquire() - t = ('broadcastsent', int( + t = (inventoryHash,'broadcastsent', int( time.time()), fromaddress, subject, body, 'broadcastqueued') shared.sqlSubmitQueue.put( - 'UPDATE sent SET status=?, lastactiontime=? WHERE fromaddress=? AND subject=? AND message=? AND status=?') + 'UPDATE sent SET msgid=?, status=?, lastactiontime=? WHERE fromaddress=? AND subject=? AND message=? AND status=?') shared.sqlSubmitQueue.put(t) queryreturn = shared.sqlReturnQueue.get() shared.sqlSubmitQueue.put('commit') @@ -774,8 +774,8 @@ class singleWorker(threading.Thread): # Update the status of the message in the 'sent' table to have a # 'msgsent' status shared.sqlLock.acquire() - t = (ackdata,) - shared.sqlSubmitQueue.put('''UPDATE sent SET status='msgsent' WHERE ackdata=?''') + t = (inventoryHash,ackdata,) + shared.sqlSubmitQueue.put('''UPDATE sent SET msgid=?, status='msgsent' WHERE ackdata=?''') shared.sqlSubmitQueue.put(t) queryreturn = shared.sqlReturnQueue.get() shared.sqlSubmitQueue.put('commit') From 151ca020dfc87437a1eb08a502d8cdb7bb5f82c5 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Mon, 15 Jul 2013 19:36:37 -0400 Subject: [PATCH 23/43] Correct indent on a single line --- src/bitmessageqt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 459b360f..46bac1f3 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -2780,7 +2780,7 @@ class settingsDialog(QtGui.QDialog): shared.config.get('bitmessagesettings', 'port'))) self.ui.checkBoxAuthentication.setChecked(shared.config.getboolean( 'bitmessagesettings', 'socksauthentication')) - self.ui.checkBoxSocksListen.setChecked(shared.config.getboolean( + self.ui.checkBoxSocksListen.setChecked(shared.config.getboolean( 'bitmessagesettings', 'sockslisten')) if str(shared.config.get('bitmessagesettings', 'socksproxytype')) == 'none': self.ui.comboBoxProxyType.setCurrentIndex(0) From 5f8209698fe5458f2a969efa06d4b2ff76eb07ac Mon Sep 17 00:00:00 2001 From: akh81 Date: Mon, 15 Jul 2013 23:10:36 -0500 Subject: [PATCH 24/43] all translations complete --- src/translations/bitmessage_ru_RU.qm | Bin 30541 -> 51726 bytes src/translations/bitmessage_ru_RU.ts | 174 ++++++++++++++------------- 2 files changed, 93 insertions(+), 81 deletions(-) diff --git a/src/translations/bitmessage_ru_RU.qm b/src/translations/bitmessage_ru_RU.qm index 9e7b7cb8d73d21fdf4949b7816a6c018381e7706..560b57b741c60cd9664f2f90a5082fa3c027d5a4 100644 GIT binary patch literal 51726 zcmeHwdzhV7dGDHJPbQg55<&$Ay<+>z*=C>>^(D^%QVK?I8kSgjYTmP6H2>)lqXMXcCjZTomCr&g;E9_`_@J=S_GM=O;+eX5+_?|r}Z zee2t^_9PLd{-KfCw{NZWu6Mon_g!oCKb|?~i~sMDw}0uP^FMd=b9vdk zV)fI;9Jtf;{KlikTz`ex^tF49x#xOw)x&=V7@pGCw|v3ufBW|_&Lw95!;N@7U=Hn> zFs5s#Ieg-e@p?jEA3SQVd*Bvhe*a!`EO$FzKWVQ2i!H_sPMcRPdcc?`o-n`q!YJU` zXpTR7mocy0V2VFRfA>9MX5ZUkOzStz9q)UMF^y&O>ioNm`N(zV9VgZp^NvyT#n0Vn z%$h$mUtac*F}+_l-}wATjal+(^R4r)2EMK~Kl;LR#vJ_Tx+U*^-k7s~P

K;GyTS zx^>ML8}sU2bv-wK*O<3IQP+DH`u)U>b$w@`{cx#n@Ku}8ZoKZm*YNzxf2zCrhW8rt z>(AD`;a34quB-01K7x5XF;@4P#}*p1v$^isy9bQf{++t-&SIUGKT`MNf?;D86&AEV z`THcwYhIo&AFaU%DBuga5qX>vw)0_~}^i zjiqU0uKeDDZ>P$}Jowgy%@5UMyzee-`SQmxzgreA`?aqa^U$h=!6O*=SI$}3^_4#` zX4&@_Zg>OwU%hAH6@|NudH;nAw;c$K`OF&@4&L;PF{4upAHDI{KsRq(_;f?onC4F| z{O&Qpb=Aq~9>qn*I}H&Vj~K48op zkEM<`0p7QMJ~i`W%yW8Y>Yg*Oo?RbKeR%!v8nf#4sgK=z%$V0dochEgD~-ACzSN(7 z?=oX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RkG^Mi5nxR2K`7AjY4jB=K(Uq0}*N9>*=$DEzQ^x?djkKpI>{(Jy$ W;{D|v=Vo# n(gMiwuM>i+;%A)e9z diff --git a/src/translations/bitmessage_ru_RU.ts b/src/translations/bitmessage_ru_RU.ts index 7bb06bc1..98981c04 100644 --- a/src/translations/bitmessage_ru_RU.ts +++ b/src/translations/bitmessage_ru_RU.ts @@ -86,7 +86,7 @@ Force send - + Форсировать отправку @@ -96,17 +96,17 @@ Waiting on their encryption key. Will request it again soon. - + Ожидаем ключ шифрования от Вашего собеседника. Запрос будет повторен через некоторое время. Encryption key request queued. - + Запрос ключа шифрования поставлен в очередь. Queued. - + В очереди. @@ -116,7 +116,7 @@ Need to do work to send message. Work is queued. - + Нужно провести требуемые вычисления, чтобы отправить сообщение. Вычисления ожидают очереди. @@ -126,27 +126,27 @@ Broadcast queued. - + Рассылка ожидает очереди. Broadcast on %1 - + Рассылка на %1 Problem: The work demanded by the recipient is more difficult than you are willing to do. %1 - + Проблема: Ваш получатель требует более сложных вычислений, чем максимум, указанный в Ваших настройках. %1 Problem: The recipient's encryption key is no good. Could not encrypt message. %1 - + Проблема: ключ получателя неправильный. Невозможно зашифровать сообщение. %1 Forced difficulty override. Send should start soon. - + Форсирована смена сложности. Отправляем через некоторое время. @@ -156,7 +156,7 @@ Since startup on %1 - + С начала работы %1 @@ -166,7 +166,7 @@ Show Bitmessage - + Показать Bitmessage @@ -191,41 +191,49 @@ You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. - + Вы можете управлять Вашими ключами, отредактировав файл keys.dat, находящийся в той же папке, что и эта программа. +Создайте резервную копию этого файла перед тем как будете его редактировать. You may manage your keys by editing the keys.dat file stored in %1 It is important that you back up this file. - + Вы можете управлять Вашими ключами, отредактировав файл keys.dat, находящийся в + %1 +Создайте резервную копию этого файла перед тем как будете его редактировать. Open keys.dat? - + Открыть файл keys.dat? You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.) - + Вы можете управлять Вашими ключами, отредактировав файл keys.dat, находящийся в той же папке, что и эта программа. +Создайте резервную копию этого файла перед тем как будете его редактировать. Хотели бы Вы открыть этот файл сейчас? +(пожалуйста, закройте Bitmessage до того как Вы внесете в этот файл какие-либо изменения.) You may manage your keys by editing the keys.dat file stored in %1 It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.) - + Вы можете управлять Вашими ключами, отредактировав файл keys.dat, находящийся в + %1 +Создайте резервную копию этого файла перед тем как будете его редактировать. Хотели бы Вы открыть этот файл сейчас? +(пожалуйста, закройте Bitmessage до того как Вы внесете в этот файл какие-либо изменения.) Delete trash? - + Очистить корзину? Are you sure you want to delete all trashed messages? - + Вы уверены, что хотите очистить корзину? @@ -240,17 +248,17 @@ It is important that you back up this file. Would you like to open the file now? Processed %1 person-to-person messages. - + Обработано %1 сообщений. Processed %1 broadcast messages. - + Обработано %1 рассылок. Processed %1 public keys. - + Обработано %1 открытых ключей. @@ -270,67 +278,67 @@ It is important that you back up this file. Would you like to open the file now? Message trashed - + Сообщение удалено Error: Bitmessage addresses start with BM- Please check %1 - + Ошибка: Bitmessage адреса начинаются с BM- Пожалуйста, проверьте %1 Error: The address %1 is not typed or copied correctly. Please check it. - + Ошибка: адрес %1 внесен или скопирован неправильно. Пожалуйста, перепроверьте. Error: The address %1 contains invalid characters. Please check it. - + Ошибка: адрес %1 содержит запрещенные символы. Пожалуйста, перепроверьте. Error: The address version in %1 is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever. - + Ошибка: версия адреса в %1 слишком новая. Либо Вам нужно обновить Bitmessage, либо Ваш собеседник дал неправильный адрес. Error: Some data encoded in the address %1 is too short. There might be something wrong with the software of your acquaintance. - + Ошибка: некоторые данные, закодированные в адресе %1, слишком короткие. Возможно, что-то не так с программой Вашего собеседника. Error: Some data encoded in the address %1 is too long. There might be something wrong with the software of your acquaintance. - + Ошибка: некоторые данные, закодированные в адресе %1, слишком длинные. Возможно, что-то не так с программой Вашего собеседника. Error: Something is wrong with the address %1. - + Ошибка: что-то не так с адресом %1. Error: You must specify a From address. If you don't have one, go to the 'Your Identities' tab. - + Вы должны указать адрес в поле "От кого". Вы можете найти Ваш адрес во вкладе "Ваши Адреса". Sending to your address - + Отправка на Ваш собственный адрес Error: One of the addresses to which you are sending a message, %1, is yours. Unfortunately the Bitmessage client cannot process its own messages. Please try running a second client on a different computer or within a VM. - + Ошибка: Один из адресов, на который Вы отправляете сообщение, %1, принадлежит Вам. К сожалению, Bitmessage не может отправлять сообщения самому себе. Попробуйте запустить второго клиента на другом компьютере или на виртуальной машине. Address version number - + Версия адреса Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version. - + По поводу адреса %1: Bitmessage не поддерживаем адреса версии %2. Возможно, Вам нужно обновить клиент Bitmessage. @@ -340,22 +348,22 @@ It is important that you back up this file. Would you like to open the file now? Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version. - + По поводу адреса %1: Bitmessage не поддерживаем стрим номер %2. Возможно, Вам нужно обновить клиент Bitmessage. Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won't send until you connect. - + Внимание: Вы не подключены к сети. Bitmessage проделает необходимые вычисления, чтобы отправить сообщение, но не отправит его до тех пор, пока Вы не подсоединитесь к сети. Your 'To' field is empty. - + Вы не заполнили поле 'Кому'. Work is queued. - + Вычисления поставлены в очередь. @@ -365,12 +373,12 @@ It is important that you back up this file. Would you like to open the file now? Work is queued. %1 - + Вычисления поставлены в очередь. %1 New Message - + Новое сообщение @@ -380,52 +388,52 @@ It is important that you back up this file. Would you like to open the file now? Address is valid. - + Адрес введен правильно. Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want. - + Ошибка: Вы не можете добавлять один и тот же адрес в Адресную Книгу несколько раз. Просто переименуйте существующий адрес. The address you entered was invalid. Ignoring it. - + Вы ввели неправильный адрес. Это адрес проигнорирован. Error: You cannot add the same address to your subsciptions twice. Perhaps rename the existing one if you want. - + Ошибка: Вы не можете добавлять один и тот же адрес в подписку несколько раз. Просто переименуйте существующую подписку. Restart - + Перезапустить You must restart Bitmessage for the port number change to take effect. - + Вы должны перезапустить Bitmessage, чтобы смена номера порта имела эффект. Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections. - + Bitmessage будет использовать Ваш прокси в дальнейшем, тем не менее, мы рекомендуем перезапустить Bitmessage в ручную, чтобы закрыть уже существующие соединения. Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want. - + Ошибка: Вы не можете добавлять один и тот же адрес в список несколько раз. Просто переименуйте существующий адрес. Passphrase mismatch - + Секретная фраза не подходит The passphrase you entered twice doesn't match. Try again. - + Вы ввели две разные секретные фразы. Пожалуйста, повторите заново. @@ -440,32 +448,32 @@ It is important that you back up this file. Would you like to open the file now? All done. Closing user interface... - + Программа завершена. Закрываем пользовательский интерфейс... Address is gone - + Адрес утерян Bitmessage cannot find your address %1. Perhaps you removed it? - + Bitmessage не может найти Ваш адрес %1. Возможно Вы удалили его? Address disabled - + Адрес выключен Error: The address from which you are trying to send is disabled. You'll have to enable it on the 'Your Identities' tab before using it. - + Ошибка: адрес, с которого Вы пытаетесь отправить, выключен. Вам нужно будет включить этот адрес во вкладке "Ваши адреса". Entry added to the Address Book. Edit the label to your liking. - + Запись добавлена в Адресную Книгу. Вы можете ее отредактировать. @@ -475,22 +483,22 @@ It is important that you back up this file. Would you like to open the file now? Save As... - + Сохранить как ... Write error. - + Ошибка записи. No addresses selected. - + Вы не выбрали адрес. Options have been disabled because they either aren't applicable or because they haven't yet been implemented for your operating system. - + Опции были отключены, потому что ли они либо не подходят, либо еще не выполнены под Вашу операционную систему. @@ -500,27 +508,27 @@ It is important that you back up this file. Would you like to open the file now? The address is not typed or copied correctly (the checksum failed). - + Адрес введен или скопирован неверно (контрольная сумма не сходится). The version number of this address is higher than this software can support. Please upgrade Bitmessage. - + Версия этого адреса более поздняя, чем Ваша программа. Пожалуйста, обновите программу Bitmessage. The address contains invalid characters. - + Адрес содержит запрещенные символы. Some data encoded in the address is too short. - + Данные, закодированные в адресе, слишком короткие. Some data encoded in the address is too long. - + Данные, закодированные в адресе, слишком длинные. @@ -584,7 +592,11 @@ It is important that you back up this file. Would you like to open the file now? p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> @@ -659,7 +671,7 @@ p, li { white-space: pre-wrap; } The Address book is useful for adding names or labels to other people's Bitmessage addresses so that you can recognize them more easily in your inbox. You can add entries here using the 'Add' button, or from your inbox by right-clicking on a message. - + Адресная книга удобна для присвоения осмысленных имен Bitmessage адресам Ваших друзей. Вы можете добавлять новые записи с помощью кнопки "Добавить новую запись", или же правым кликом мышки на сообщении. @@ -699,22 +711,22 @@ p, li { white-space: pre-wrap; } Since startup at asdf: - + С начала работы программы в asdf: Processed 0 person-to-person message. - + Обработано 0 сообщений. Processed 0 public key. - + Обработано 0 открытых ключей. Processed 0 broadcast. - + Обработано 0 рассылок. @@ -739,7 +751,7 @@ p, li { white-space: pre-wrap; } Import keys - + Импортировать ключи @@ -866,42 +878,42 @@ The 'Random Number' option is selected by default but deterministic ad Dialog - + Новый chan Create a new chan - + Создать новый chan Join a chan - + Присоединиться к chan <html><head/><body><p>A chan is a set of encryption keys that is shared by a group of people. The keys and bitmessage address used by a chan is generated from a human-friendly word or phrase (the chan name).</p><p>Chans are experimental and are unmoderatable.</p></body></html> - + <html><head/><body><p>Chan - это набор ключей шифрования, которые известны некоторой группе людей. Ключи и Bitmessage-адрес используемый chan-ом генерируется из слова или фразы (имя chan-а).</p><p>Chan-ы - это экспериментальная новинка.</p></body></html> Chan name: - + Имя chan: Chan bitmessage address: - + Bitmessage адрес chan: Create a chan - + Создать chan Enter a name for your chan. If you choose a sufficiently complex chan name (like a strong and unique passphrase) and none of your friends share it publicly then the chan will be secure and private. - + Введите имя Вашего chan-a. Если Вы выберете достаточно сложное имя для chan-а (например, сложную и необычную секретную фразу) и никто из Ваших друзей не опубликует эту фразу, то Вам chan будет надежно зашифрован. From 1b722dca5c7577532995851320157c7003536192 Mon Sep 17 00:00:00 2001 From: akh81 Date: Mon, 15 Jul 2013 23:12:07 -0500 Subject: [PATCH 25/43] all translations complete --- src/translations/bitmessage_ru_RU.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/translations/bitmessage_ru_RU.ts b/src/translations/bitmessage_ru_RU.ts index 98981c04..338a6505 100644 --- a/src/translations/bitmessage_ru_RU.ts +++ b/src/translations/bitmessage_ru_RU.ts @@ -1,6 +1,5 @@ - - + MainWindow @@ -979,7 +978,7 @@ The 'Random Number' option is selected by default but deterministic ad version ? версия ? - + Copyright © 2013 Jonathan Warren Копирайт © 2013 Джонатан Уоррен From d1ea944f0e251fb3939bd8b8fe52b85f03c55a10 Mon Sep 17 00:00:00 2001 From: akh81 Date: Mon, 15 Jul 2013 23:52:08 -0500 Subject: [PATCH 26/43] complete Russian translation --- src/translations/bitmessage_ru_RU.qm | Bin 51726 -> 51720 bytes src/translations/bitmessage_ru_RU.ts | 25 +++++++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/translations/bitmessage_ru_RU.qm b/src/translations/bitmessage_ru_RU.qm index 560b57b741c60cd9664f2f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5AztVc}c_24N`Nb1~%_imTI(zEq zeZjtzoaFPi5Yg367Mm%oZjGfn_X<&^L~!p-Axp0X46;!0iW6D!pF(9y12FS|P@VY> zHMT)GUGgK{1r_)E2a279Rs%6>(hK*Ex5?X?!l)||NV=t3q5b+p@c2yO95z&N&#odg(Z?sdG#5m=&0zzYOG$o!pPS}tE_q?4p!wx+4tc&+RA-X(j(MVn z?EseS6lV;#(4CRQS(jpg7YaoG=Skw%<3wXPd3?`T<5*oHt{x*r&fXQ{vjWMQda-zS zKIPddmR_b7hdYav9-YBN;FegW_9DqHi#KwUfLM)q<6qRPh#~QAg%PMN61y@7fzNH` zd%WImND7!sv~zYzVddM2?lH5hbTs`UmH9i<#e7*Rdm|j!eL*^vVWX#MSZaJC|LQ#H zyx}O3$dZ~;N!7iq)Xb2vL;J?DF;%+cK)DJYN#7|1bNfR z3Q}{6oDgw^*6+$GBRN3gBYB%+I~o1&a(X+B-A~B7gAb9~Uhle|J!)R|-(F=0eL)$)& z+9S*u$D$@}mobm@`(Yf9v)Z17SYV2i&TwNYaGKG*TH^<78Pmml+5%MU(={xo0uDv% zn)DX>J9O2xP9P$yj_dw+fNoM_J+-WriLq7-`yE9`&Xe=!0yqN~WH#vCWP8qqW_*61 zSz%4l_e@}l%&!=ltSaxA#A!D7+$$t!N?YFjYO72C@j|;FiH2tJ_y6aEr%_o{~JafUCe{r_v>B^r1 Oo3E7Vtv`G - + + MainWindow @@ -40,12 +41,12 @@ Enable - Разрешить + Включить Disable - Запретить + Выключить @@ -650,7 +651,7 @@ p, li { white-space: pre-wrap; } Here you can subscribe to 'broadcast messages' that are sent by other users. Messages will appear in your Inbox. Addresses here override those on the Blacklist tab. - Здесь Вы можете подписаться на рассылки от других пользователей. Все рассылки будут появлять у Вас во Входящих. Вы будете следить за всеми адресами, указанными здесь, даже если они в черном списке. + Здесь Вы можете подписаться на рассылки от других пользователей. Все рассылки будут появляться у Вас во Входящих. Вы будете следить за всеми адресами, указанными здесь, даже если они в черном списке. @@ -978,7 +979,7 @@ The 'Random Number' option is selected by default but deterministic ad version ? версия ? - + Copyright © 2013 Jonathan Warren Копирайт © 2013 Джонатан Уоррен @@ -1009,7 +1010,7 @@ The 'Random Number' option is selected by default but deterministic ad As Bitmessage is a collaborative project, help can be found online in the Bitmessage Wiki: - Битмесседж - это общественный проект. Вы можете найти подсказки и советы на Wiki-страничке Битмесседж: + Bitmessage - общественный проект. Вы можете найти подсказки и советы на Wiki-страничке Bitmessage: @@ -1027,7 +1028,7 @@ The 'Random Number' option is selected by default but deterministic ad You have made at least one connection to a peer using an outgoing connection but you have not yet received any incoming connections. Your firewall or home router probably isn't configured to forward incoming TCP connections to your computer. Bitmessage will work just fine but it would help the Bitmessage network if you allowed for incoming connections and will help you be a better-connected node. - На текущий момент Вы установили по-крайней мере одно исходящее соединение, но пока ни одного входящего. Ваш файрвол или маршрутизатор скорее всего не настроен на переброс входящих TCP соединений к Вашему компьютеру. Битмесседж будет прекрасно работать и без этого, но Вы могли бы помочь сети если бы разрешили и входящие соединения тоже. Это помогло бы Вам стать более важным узлом сети. + На текущий момент Вы установили по-крайней мере одно исходящее соединение, но пока ни одного входящего. Ваш файрвол или маршрутизатор скорее всего не настроен на переброс входящих TCP соединений к Вашему компьютеру. Bitmessage будет прекрасно работать и без этого, но Вы могли бы помочь сети если бы разрешили и входящие соединения тоже. Это помогло бы Вам стать более важным узлом сети. @@ -1108,12 +1109,12 @@ The 'Random Number' option is selected by default but deterministic ad Start Bitmessage on user login - Запускать Битмесседж при входе в систему + Запускать Bitmessage при входе в систему Start Bitmessage in the tray (don't show main window) - Запускать Битмесседж в свернутом виде (не показывать главное окно) + Запускать Bitmessage в свернутом виде (не показывать главное окно) @@ -1133,7 +1134,7 @@ The 'Random Number' option is selected by default but deterministic ad In Portable Mode, messages and config files are stored in the same directory as the program rather than the normal application-data folder. This makes it convenient to run Bitmessage from a USB thumb drive. - В переносном режиме, все сообщения и конфигурационные файлы сохраняются в той же самой папке что и сама программа. Это делает более удобным использование БитМесседж с USB-флэшки. + В переносном режиме, все сообщения и конфигурационные файлы сохраняются в той же самой папке что и сама программа. Это делает более удобным использование Bitmessage с USB-флэшки. @@ -1153,7 +1154,7 @@ The 'Random Number' option is selected by default but deterministic ad Proxy server / Tor - Прокси сервер / Тор + Прокси сервер / Tor @@ -1208,7 +1209,7 @@ The 'Random Number' option is selected by default but deterministic ad When someone sends you a message, their computer must first complete some work. The difficulty of this work, by default, is 1. You may raise this default for new addresses you create by changing the values here. Any new addresses you create will require senders to meet the higher difficulty. There is one exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically notify them when you next send a message that they need only complete the minimum amount of work: difficulty 1. - Когда кто-либо отправляет Вам сообщение, его компьютер должен сперва решить определенную вычислительную задачу. Сложность этой задачи по умолчанию равна 1. Вы можете повысить эту сложность для новых адресов, которые Вы создадите, здесь. Таким образом, любые новые адреса, которые Вы создадите, могут требовать от отправителей сложность большую чем 1. Однако, есть одно исключение: если Вы специально добавите Вашего собеседника в адресную книгу, то БитМесседж автоматически уведомит его о том, что для него минимальная сложность будет составлять всегда всего лишь 1. + Когда кто-либо отправляет Вам сообщение, его компьютер должен сперва решить определенную вычислительную задачу. Сложность этой задачи по умолчанию равна 1. Вы можете повысить эту сложность для новых адресов, которые Вы создадите, здесь. Таким образом, любые новые адреса, которые Вы создадите, могут требовать от отправителей сложность большую чем 1. Однако, есть одно исключение: если Вы специально добавите Вашего собеседника в адресную книгу, то Bitmessage автоматически уведомит его о том, что для него минимальная сложность будет составлять всегда всего лишь 1. From cfc23718eddb322033e382fcbac83885a7ed87d6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 20 Jul 2013 10:55:03 +0100 Subject: [PATCH 27/43] Added exception handling for sound playing dependencies --- src/bitmessageqt/__init__.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index e61c351d..2c2c7276 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -937,13 +937,19 @@ class MyForm(QtGui.QMainWindow): if 'linux' in sys.platform: # Note: QSound was a nice idea but it didn't work if '.mp3' in soundFilename: - subprocess.call(["gst123", soundFilename], - stdin=subprocess.PIPE, - stdout=subprocess.PIPE) + try: + subprocess.call(["gst123", soundFilename], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE) + except: + print "WARNING: gst123 must be installed in order to play mp3 sounds" else: - subprocess.call(["aplay", soundFilename], - stdin=subprocess.PIPE, - stdout=subprocess.PIPE) + try: + subprocess.call(["aplay", soundFilename], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE) + except: + print "WARNING: aplay must be installed in order to play WAV sounds" elif sys.platform[0:3] == 'win': # use winsound on Windows import winsound From d036ca18edd278f55473fcd49b014ba9479f850e Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Mon, 22 Jul 2013 01:10:22 -0400 Subject: [PATCH 28/43] Completed chan integration in the GUI --- src/bitmessageqt/__init__.py | 215 ++++++++++++++++++++---------- src/bitmessageqt/bitmessageui.py | 6 +- src/bitmessageqt/bitmessageui.ui | 26 ++-- src/bitmessageqt/newchandialog.py | 85 ++++++------ src/bitmessageqt/newchandialog.ui | 109 ++++++++------- src/class_addressGenerator.py | 31 ++--- src/class_outgoingSynSender.py | 1 - src/class_receiveDataThread.py | 33 +++-- src/class_singleWorker.py | 96 ++++++++----- src/message_data_reader.py | 4 +- src/shared.py | 4 +- 11 files changed, 374 insertions(+), 236 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 46bac1f3..dc12fcf8 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -17,6 +17,7 @@ from bitmessageui import * from newaddressdialog import * from newsubscriptiondialog import * from regenerateaddresses import * +from newchandialog import * from specialaddressbehavior import * from settings import * from about import * @@ -53,6 +54,7 @@ def _translate(context, text): class MyForm(QtGui.QMainWindow): str_broadcast_subscribers = '[Broadcast subscribers]' + str_chan = '[chan]' def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) @@ -105,6 +107,8 @@ class MyForm(QtGui.QMainWindow): "triggered()"), self.click_actionDeleteAllTrashedMessages) QtCore.QObject.connect(self.ui.actionRegenerateDeterministicAddresses, QtCore.SIGNAL( "triggered()"), self.click_actionRegenerateDeterministicAddresses) + QtCore.QObject.connect(self.ui.actionJoinChan, QtCore.SIGNAL( + "triggered()"), self.click_actionJoinChan) # also used for creating chans. QtCore.QObject.connect(self.ui.pushButtonNewAddress, QtCore.SIGNAL( "clicked()"), self.click_NewAddressDialog) QtCore.QObject.connect(self.ui.comboBoxSendFrom, QtCore.SIGNAL( @@ -293,6 +297,8 @@ class MyForm(QtGui.QMainWindow): newItem = QtGui.QTableWidgetItem(addressInKeysFile) newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + if shared.safeConfigGetBoolean(addressInKeysFile, 'chan'): + newItem.setTextColor(QtGui.QColor(216, 119, 0)) # orange if not isEnabled: newItem.setTextColor(QtGui.QColor(128, 128, 128)) if shared.safeConfigGetBoolean(addressInKeysFile, 'mailinglist'): @@ -594,6 +600,9 @@ class MyForm(QtGui.QMainWindow): elif status == 'msgsent': statusText = _translate("MainWindow", "Message sent. Waiting on acknowledgement. Sent at %1").arg( unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) + elif status == 'msgsentnoackexpected': + statusText = _translate("MainWindow", "Message sent. Sent at %1").arg( + unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) elif status == 'doingmsgpow': statusText = _translate( "MainWindow", "Need to do work to send message. Work is queued.") @@ -709,6 +718,8 @@ class MyForm(QtGui.QMainWindow): newItem.setData(Qt.UserRole, str(toAddress)) if shared.safeConfigGetBoolean(toAddress, 'mailinglist'): newItem.setTextColor(QtGui.QColor(137, 04, 177)) + if shared.safeConfigGetBoolean(str(toAddress), 'chan'): + newItem.setTextColor(QtGui.QColor(216, 119, 0)) # orange self.ui.tableWidgetInbox.setItem(0, 0, newItem) if fromLabel == '': newItem = QtGui.QTableWidgetItem( @@ -1032,6 +1043,57 @@ class MyForm(QtGui.QMainWindow): ), self.regenerateAddressesDialogInstance.ui.lineEditPassphrase.text().toUtf8(), self.regenerateAddressesDialogInstance.ui.checkBoxEighteenByteRipe.isChecked())) self.ui.tabWidget.setCurrentIndex(3) + def click_actionJoinChan(self): + self.newChanDialogInstance = newChanDialog(self) + if self.newChanDialogInstance.exec_(): + if self.newChanDialogInstance.ui.radioButtonCreateChan.isChecked(): + if self.newChanDialogInstance.ui.lineEditChanNameCreate.text() == "": + QMessageBox.about(self, _translate("MainWindow", "Chan name needed"), _translate( + "MainWindow", "You didn't enter a chan name.")) + return + shared.apiAddressGeneratorReturnQueue.queue.clear() + shared.addressGeneratorQueue.put(('createChan', 3, 1, self.str_chan + ' ' + str(self.newChanDialogInstance.ui.lineEditChanNameCreate.text().toUtf8()), self.newChanDialogInstance.ui.lineEditChanNameCreate.text().toUtf8())) + addressGeneratorReturnValue = shared.apiAddressGeneratorReturnQueue.get() + print 'addressGeneratorReturnValue', addressGeneratorReturnValue + if len(addressGeneratorReturnValue) == 0: + QMessageBox.about(self, _translate("MainWindow", "Address already present"), _translate( + "MainWindow", "Could not add chan because it appears to already be one of your identities.")) + return + createdAddress = addressGeneratorReturnValue[0] + self.addEntryToAddressBook(createdAddress, self.str_chan + ' ' + str(self.newChanDialogInstance.ui.lineEditChanNameCreate.text().toUtf8())) + QMessageBox.about(self, _translate("MainWindow", "Success"), _translate( + "MainWindow", "Successfully created chan. To let others join your chan, give them the chan name and this Bitmessage address: %1. This address also appears in 'Your Identities'.").arg(createdAddress)) + self.ui.tabWidget.setCurrentIndex(3) + elif self.newChanDialogInstance.ui.radioButtonJoinChan.isChecked(): + if self.newChanDialogInstance.ui.lineEditChanNameJoin.text() == "": + QMessageBox.about(self, _translate("MainWindow", "Chan name needed"), _translate( + "MainWindow", "You didn't enter a chan name.")) + return + if decodeAddress(self.newChanDialogInstance.ui.lineEditChanBitmessageAddress.text())[0] == 'versiontoohigh': + QMessageBox.about(self, _translate("MainWindow", "Address too new"), _translate( + "MainWindow", "Although that Bitmessage address might be valid, its version number is too new for us to handle. Perhaps you need to upgrade Bitmessage.")) + return + if decodeAddress(self.newChanDialogInstance.ui.lineEditChanBitmessageAddress.text())[0] != 'success': + QMessageBox.about(self, _translate("MainWindow", "Address invalid"), _translate( + "MainWindow", "That Bitmessage address is not valid.")) + return + shared.apiAddressGeneratorReturnQueue.queue.clear() + shared.addressGeneratorQueue.put(('joinChan', addBMIfNotPresent(self.newChanDialogInstance.ui.lineEditChanBitmessageAddress.text()), self.str_chan + ' ' + str(self.newChanDialogInstance.ui.lineEditChanNameJoin.text()), self.newChanDialogInstance.ui.lineEditChanNameJoin.text().toUtf8())) + addressGeneratorReturnValue = shared.apiAddressGeneratorReturnQueue.get() + print 'addressGeneratorReturnValue', addressGeneratorReturnValue + if addressGeneratorReturnValue == 'chan name does not match address': + QMessageBox.about(self, _translate("MainWindow", "Address does not match chan name"), _translate( + "MainWindow", "Although the Bitmessage address you entered was valid, it doesn\'t match the chan name.")) + return + if len(addressGeneratorReturnValue) == 0: + QMessageBox.about(self, _translate("MainWindow", "Address already present"), _translate( + "MainWindow", "Could not add chan because it appears to already be one of your identities.")) + return + self.addEntryToAddressBook(createdAddress, self.str_chan + ' ' + self.str_chan + ' ' + str(self.newChanDialogInstance.ui.lineEditChanNameJoin.text())) + QMessageBox.about(self, _translate("MainWindow", "Success"), _translate( + "MainWindow", "Successfully joined chan. ")) + self.ui.tabWidget.setCurrentIndex(3) + def openKeysFile(self): if 'linux' in sys.platform: subprocess.call(["xdg-open", shared.appdata + 'keys.dat']) @@ -1379,12 +1441,11 @@ class MyForm(QtGui.QMainWindow): toAddress = addBMIfNotPresent(toAddress) try: shared.config.get(toAddress, 'enabled') - # The toAddress is one owned by me. We cannot send - # messages to ourselves without significant changes - # to the codebase. - QMessageBox.about(self, _translate("MainWindow", "Sending to your address"), _translate( - "MainWindow", "Error: One of the addresses to which you are sending a message, %1, is yours. Unfortunately the Bitmessage client cannot process its own messages. Please try running a second client on a different computer or within a VM.").arg(toAddress)) - continue + # The toAddress is one owned by me. + if not shared.safeConfigGetBoolean(toAddress, 'chan'): + QMessageBox.about(self, _translate("MainWindow", "Sending to your address"), _translate( + "MainWindow", "Error: One of the addresses to which you are sending a message, %1, is yours. Unfortunately the Bitmessage client cannot process its own messages. Please try running a second client on a different computer or within a VM.").arg(toAddress)) + continue except: pass if addressVersionNumber > 3 or addressVersionNumber <= 1: @@ -1517,6 +1578,16 @@ class MyForm(QtGui.QMainWindow): def redrawLabelFrom(self, index): self.ui.labelFrom.setText( self.ui.comboBoxSendFrom.itemData(index).toPyObject()) + self.setBroadcastEnablementDependingOnWhetherThisIsAChanAddress(self.ui.comboBoxSendFrom.itemData(index).toPyObject()) + + def setBroadcastEnablementDependingOnWhetherThisIsAChanAddress(self, address): + # If this is a chan then don't let people broadcast because no one + # should subscribe to chan addresses. + if shared.safeConfigGetBoolean(str(address), 'chan'): + self.ui.radioButtonSpecific.click() + self.ui.radioButtonBroadcast.setEnabled(False) + else: + self.ui.radioButtonBroadcast.setEnabled(True) def rerenderComboBoxSendFrom(self): self.ui.comboBoxSendFrom.clear() @@ -1633,6 +1704,8 @@ class MyForm(QtGui.QMainWindow): newItem.setData(Qt.UserRole, str(toAddress)) if shared.safeConfigGetBoolean(str(toAddress), 'mailinglist'): newItem.setTextColor(QtGui.QColor(137, 04, 177)) + if shared.safeConfigGetBoolean(str(toAddress), 'chan'): + newItem.setTextColor(QtGui.QColor(216, 119, 0)) # orange self.ui.tableWidgetInbox.insertRow(0) self.ui.tableWidgetInbox.setItem(0, 0, newItem) @@ -1672,45 +1745,47 @@ class MyForm(QtGui.QMainWindow): # First we must check to see if the address is already in the # address book. The user cannot add it again or else it will # cause problems when updating and deleting the entry. - shared.sqlLock.acquire() - t = (addBMIfNotPresent(str( - self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())),) - shared.sqlSubmitQueue.put( - '''select * from addressbook where address=?''') - shared.sqlSubmitQueue.put(t) - queryreturn = shared.sqlReturnQueue.get() - shared.sqlLock.release() - if queryreturn == []: - self.ui.tableWidgetAddressBook.setSortingEnabled(False) - self.ui.tableWidgetAddressBook.insertRow(0) - newItem = QtGui.QTableWidgetItem(unicode( - self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8(), 'utf-8')) - self.ui.tableWidgetAddressBook.setItem(0, 0, newItem) - newItem = QtGui.QTableWidgetItem(addBMIfNotPresent( - self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - self.ui.tableWidgetAddressBook.setItem(0, 1, newItem) - self.ui.tableWidgetAddressBook.setSortingEnabled(True) - t = (str(self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8()), addBMIfNotPresent( - str(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text()))) - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put( - '''INSERT INTO addressbook VALUES (?,?)''') - shared.sqlSubmitQueue.put(t) - queryreturn = shared.sqlReturnQueue.get() - shared.sqlSubmitQueue.put('commit') - shared.sqlLock.release() - self.rerenderInboxFromLabels() - self.rerenderSentToLabels() - else: - self.statusBar().showMessage(_translate( - "MainWindow", "Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want.")) + address = addBMIfNotPresent(str( + self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())) + label = self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8() + self.addEntryToAddressBook(address,label) else: self.statusBar().showMessage(_translate( "MainWindow", "The address you entered was invalid. Ignoring it.")) - def addSubscription(self, label, address): + def addEntryToAddressBook(self,address,label): + shared.sqlLock.acquire() + t = (address,) + shared.sqlSubmitQueue.put( + '''select * from addressbook where address=?''') + shared.sqlSubmitQueue.put(t) + queryreturn = shared.sqlReturnQueue.get() + shared.sqlLock.release() + if queryreturn == []: + self.ui.tableWidgetAddressBook.setSortingEnabled(False) + self.ui.tableWidgetAddressBook.insertRow(0) + newItem = QtGui.QTableWidgetItem(unicode(label, 'utf-8')) + self.ui.tableWidgetAddressBook.setItem(0, 0, newItem) + newItem = QtGui.QTableWidgetItem(address) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + self.ui.tableWidgetAddressBook.setItem(0, 1, newItem) + self.ui.tableWidgetAddressBook.setSortingEnabled(True) + t = (str(label), address) + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put( + '''INSERT INTO addressbook VALUES (?,?)''') + shared.sqlSubmitQueue.put(t) + queryreturn = shared.sqlReturnQueue.get() + shared.sqlSubmitQueue.put('commit') + shared.sqlLock.release() + self.rerenderInboxFromLabels() + self.rerenderSentToLabels() + else: + self.statusBar().showMessage(_translate( + "MainWindow", "Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want.")) + + def addSubscription(self, address, label): address = addBMIfNotPresent(address) #This should be handled outside of this function, for error displaying and such, but it must also be checked here. if shared.isAddressInMySubscriptionsList(address): @@ -1747,7 +1822,7 @@ class MyForm(QtGui.QMainWindow): self.statusBar().showMessage(_translate("MainWindow", "Error: You cannot add the same address to your subsciptions twice. Perhaps rename the existing one if you want.")) return label = self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8() - self.addSubscription(label, address) + self.addSubscription(address, label) def loadBlackWhiteList(self): # Initialize the Blacklist or Whitelist table @@ -1990,6 +2065,8 @@ class MyForm(QtGui.QMainWindow): currentRow = self.ui.tableWidgetYourIdentities.currentRow() addressAtCurrentRow = str( self.ui.tableWidgetYourIdentities.item(currentRow, 1).text()) + if shared.safeConfigGetBoolean(addressAtCurrentRow, 'chan'): + return if self.dialog.ui.radioButtonBehaveNormalAddress.isChecked(): shared.config.set(str( addressAtCurrentRow), 'mailinglist', 'false') @@ -2023,12 +2100,6 @@ class MyForm(QtGui.QMainWindow): # address.' streamNumberForAddress = addressStream( self.dialog.ui.comboBoxExisting.currentText()) - - # self.addressGenerator = addressGenerator() - # self.addressGenerator.setup(3,streamNumberForAddress,str(self.dialog.ui.newaddresslabel.text().toUtf8()),1,"",self.dialog.ui.checkBoxEighteenByteRipe.isChecked()) - # QtCore.QObject.connect(self.addressGenerator, SIGNAL("writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable) - # QtCore.QObject.connect(self.addressGenerator, QtCore.SIGNAL("updateStatusBar(PyQt_PyObject)"), self.updateStatusBar) - # self.addressGenerator.start() shared.addressGeneratorQueue.put(('createRandomAddress', 3, streamNumberForAddress, str( self.dialog.ui.newaddresslabel.text().toUtf8()), 1, "", self.dialog.ui.checkBoxEighteenByteRipe.isChecked())) else: @@ -2040,11 +2111,6 @@ class MyForm(QtGui.QMainWindow): "MainWindow", "Choose a passphrase"), _translate("MainWindow", "You really do need a passphrase.")) else: streamNumberForAddress = 1 # this will eventually have to be replaced by logic to determine the most available stream number. - # self.addressGenerator = addressGenerator() - # self.addressGenerator.setup(3,streamNumberForAddress,"unused address",self.dialog.ui.spinBoxNumberOfAddressesToMake.value(),self.dialog.ui.lineEditPassphrase.text().toUtf8(),self.dialog.ui.checkBoxEighteenByteRipe.isChecked()) - # QtCore.QObject.connect(self.addressGenerator, SIGNAL("writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable) - # QtCore.QObject.connect(self.addressGenerator, QtCore.SIGNAL("updateStatusBar(PyQt_PyObject)"), self.updateStatusBar) - # self.addressGenerator.start() shared.addressGeneratorQueue.put(('createDeterministicAddresses', 3, streamNumberForAddress, "unused deterministic address", self.dialog.ui.spinBoxNumberOfAddressesToMake.value( ), self.dialog.ui.lineEditPassphrase.text().toUtf8(), self.dialog.ui.checkBoxEighteenByteRipe.isChecked())) else: @@ -2121,6 +2187,7 @@ class MyForm(QtGui.QMainWindow): self.ui.labelFrom.setText('') else: self.ui.labelFrom.setText(toAddressAtCurrentInboxRow) + self.setBroadcastEnablementDependingOnWhetherThisIsAChanAddress(toAddressAtCurrentInboxRow) self.ui.lineEditTo.setText(str(fromAddressAtCurrentInboxRow)) self.ui.comboBoxSendFrom.setCurrentIndex(0) # self.ui.comboBoxSendFrom.setEditText(str(self.ui.tableWidgetInbox.item(currentInboxRow,0).text)) @@ -2344,7 +2411,7 @@ class MyForm(QtGui.QMainWindow): self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: You cannot add the same address to your subsciptions twice. Perhaps rename the existing one if you want.")) continue labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,0).text().toUtf8() - self.addSubscription(labelAtCurrentRow, addressAtCurrentRow) + self.addSubscription(addressAtCurrentRow, labelAtCurrentRow) self.ui.tabWidget.setCurrentIndex(4) def on_context_menuAddressBook(self, point): @@ -2527,6 +2594,8 @@ class MyForm(QtGui.QMainWindow): currentRow, 2).setTextColor(QtGui.QColor(0, 0, 0)) if shared.safeConfigGetBoolean(addressAtCurrentRow, 'mailinglist'): self.ui.tableWidgetYourIdentities.item(currentRow, 1).setTextColor(QtGui.QColor(137, 04, 177)) + if shared.safeConfigGetBoolean(addressAtCurrentRow, 'chan'): + self.ui.tableWidgetYourIdentities.item(currentRow, 1).setTextColor(QtGui.QColor(216, 119, 0)) # orange shared.reloadMyAddressHashes() def on_action_YourIdentitiesDisable(self): @@ -2695,11 +2764,14 @@ class MyForm(QtGui.QMainWindow): def writeNewAddressToTable(self, label, address, streamNumber): self.ui.tableWidgetYourIdentities.setSortingEnabled(False) self.ui.tableWidgetYourIdentities.insertRow(0) + newItem = QtGui.QTableWidgetItem(unicode(label, 'utf-8')) self.ui.tableWidgetYourIdentities.setItem( - 0, 0, QtGui.QTableWidgetItem(unicode(label, 'utf-8'))) + 0, 0, newItem) newItem = QtGui.QTableWidgetItem(address) newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + if shared.safeConfigGetBoolean(address, 'chan'): + newItem.setTextColor(QtGui.QColor(216, 119, 0)) # orange self.ui.tableWidgetYourIdentities.setItem(0, 1, newItem) newItem = QtGui.QTableWidgetItem(streamNumber) newItem.setFlags( @@ -2746,7 +2818,6 @@ class regenerateAddressesDialog(QtGui.QDialog): self.parent = parent QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self)) - class settingsDialog(QtGui.QDialog): def __init__(self, parent): @@ -2869,17 +2940,23 @@ class SpecialAddressBehaviorDialog(QtGui.QDialog): currentRow = parent.ui.tableWidgetYourIdentities.currentRow() addressAtCurrentRow = str( parent.ui.tableWidgetYourIdentities.item(currentRow, 1).text()) - if shared.safeConfigGetBoolean(addressAtCurrentRow, 'mailinglist'): - self.ui.radioButtonBehaviorMailingList.click() - else: - self.ui.radioButtonBehaveNormalAddress.click() - try: - mailingListName = shared.config.get( - addressAtCurrentRow, 'mailinglistname') - except: - mailingListName = '' - self.ui.lineEditMailingListName.setText( - unicode(mailingListName, 'utf-8')) + if not shared.safeConfigGetBoolean(addressAtCurrentRow, 'chan'): + if shared.safeConfigGetBoolean(addressAtCurrentRow, 'mailinglist'): + self.ui.radioButtonBehaviorMailingList.click() + else: + self.ui.radioButtonBehaveNormalAddress.click() + try: + mailingListName = shared.config.get( + addressAtCurrentRow, 'mailinglistname') + except: + mailingListName = '' + self.ui.lineEditMailingListName.setText( + unicode(mailingListName, 'utf-8')) + else: # if addressAtCurrentRow is a chan address + self.ui.radioButtonBehaviorMailingList.setDisabled(True) + self.ui.lineEditMailingListName.setText(_translate( + "MainWindow", "This is a chan address. You cannot use it as a pseudo-mailing list.")) + QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self)) @@ -2938,11 +3015,11 @@ class NewAddressDialog(QtGui.QDialog): self.ui.groupBoxDeterministic.setHidden(True) QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self)) -class NewChanDialog(QtGui.QDialog): +class newChanDialog(QtGui.QDialog): def __init__(self, parent): QtGui.QWidget.__init__(self, parent) - self.ui = Ui_NewChanDialog() + self.ui = Ui_newChanDialog() self.ui.setupUi(self) self.parent = parent self.ui.groupBoxCreateChan.setHidden(True) diff --git a/src/bitmessageqt/bitmessageui.py b/src/bitmessageqt/bitmessageui.py index 1d04e5f1..4efecb97 100644 --- a/src/bitmessageqt/bitmessageui.py +++ b/src/bitmessageqt/bitmessageui.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'bitmessageui.ui' # -# Created: Sat Jul 13 20:23:44 2013 +# Created: Sun Jul 21 17:50:02 2013 # by: PyQt4 UI code generator 4.10.2 # # WARNING! All changes made in this file will be lost! @@ -453,9 +453,12 @@ class Ui_MainWindow(object): self.actionRegenerateDeterministicAddresses.setObjectName(_fromUtf8("actionRegenerateDeterministicAddresses")) self.actionDeleteAllTrashedMessages = QtGui.QAction(MainWindow) self.actionDeleteAllTrashedMessages.setObjectName(_fromUtf8("actionDeleteAllTrashedMessages")) + self.actionJoinChan = QtGui.QAction(MainWindow) + self.actionJoinChan.setObjectName(_fromUtf8("actionJoinChan")) self.menuFile.addAction(self.actionManageKeys) self.menuFile.addAction(self.actionDeleteAllTrashedMessages) self.menuFile.addAction(self.actionRegenerateDeterministicAddresses) + self.menuFile.addAction(self.actionJoinChan) self.menuFile.addAction(self.actionExit) self.menuSettings.addAction(self.actionSettings) self.menuHelp.addAction(self.actionHelp) @@ -599,5 +602,6 @@ class Ui_MainWindow(object): self.actionSettings.setText(_translate("MainWindow", "Settings", None)) self.actionRegenerateDeterministicAddresses.setText(_translate("MainWindow", "Regenerate deterministic addresses", None)) self.actionDeleteAllTrashedMessages.setText(_translate("MainWindow", "Delete all trashed messages", None)) + self.actionJoinChan.setText(_translate("MainWindow", "Join / Create chan", None)) import bitmessage_icons_rc diff --git a/src/bitmessageqt/bitmessageui.ui b/src/bitmessageqt/bitmessageui.ui index 6c18cbe0..d4478fc8 100644 --- a/src/bitmessageqt/bitmessageui.ui +++ b/src/bitmessageqt/bitmessageui.ui @@ -14,7 +14,7 @@ Bitmessage - + :/newPrefix/images/can-icon-24px.png:/newPrefix/images/can-icon-24px.png @@ -61,7 +61,7 @@ - + :/newPrefix/images/inbox.png:/newPrefix/images/inbox.png @@ -188,7 +188,7 @@ - + :/newPrefix/images/send.png:/newPrefix/images/send.png @@ -346,7 +346,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/sent.png:/newPrefix/images/sent.png @@ -466,7 +466,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/identities.png:/newPrefix/images/identities.png @@ -566,7 +566,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/subscriptions.png:/newPrefix/images/subscriptions.png @@ -651,7 +651,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/addressbook.png:/newPrefix/images/addressbook.png @@ -733,7 +733,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/blacklist.png:/newPrefix/images/blacklist.png @@ -825,7 +825,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/networkstatus.png:/newPrefix/images/networkstatus.png @@ -844,7 +844,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/redicon.png:/newPrefix/images/redicon.png @@ -1021,6 +1021,7 @@ p, li { white-space: pre-wrap; } + @@ -1094,6 +1095,11 @@ p, li { white-space: pre-wrap; } Delete all trashed messages + + + Join / Create chan + + tabWidget diff --git a/src/bitmessageqt/newchandialog.py b/src/bitmessageqt/newchandialog.py index 5c5e11f2..43235bfa 100644 --- a/src/bitmessageqt/newchandialog.py +++ b/src/bitmessageqt/newchandialog.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'newchandialog.ui' # -# Created: Tue Jun 25 17:03:01 2013 +# Created: Mon Jul 22 01:05:35 2013 # by: PyQt4 UI code generator 4.10.2 # # WARNING! All changes made in this file will be lost! @@ -23,20 +23,36 @@ except AttributeError: def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig) -class Ui_NewChanDialog(object): - def setupUi(self, NewChanDialog): - NewChanDialog.setObjectName(_fromUtf8("NewChanDialog")) - NewChanDialog.resize(447, 441) - self.formLayout = QtGui.QFormLayout(NewChanDialog) +class Ui_newChanDialog(object): + def setupUi(self, newChanDialog): + newChanDialog.setObjectName(_fromUtf8("newChanDialog")) + newChanDialog.resize(530, 422) + newChanDialog.setMinimumSize(QtCore.QSize(0, 0)) + self.formLayout = QtGui.QFormLayout(newChanDialog) self.formLayout.setObjectName(_fromUtf8("formLayout")) - self.radioButtonCreateChan = QtGui.QRadioButton(NewChanDialog) + self.radioButtonCreateChan = QtGui.QRadioButton(newChanDialog) self.radioButtonCreateChan.setObjectName(_fromUtf8("radioButtonCreateChan")) self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.radioButtonCreateChan) - self.radioButtonJoinChan = QtGui.QRadioButton(NewChanDialog) + self.radioButtonJoinChan = QtGui.QRadioButton(newChanDialog) self.radioButtonJoinChan.setChecked(True) self.radioButtonJoinChan.setObjectName(_fromUtf8("radioButtonJoinChan")) self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.radioButtonJoinChan) - self.groupBoxJoinChan = QtGui.QGroupBox(NewChanDialog) + self.groupBoxCreateChan = QtGui.QGroupBox(newChanDialog) + self.groupBoxCreateChan.setObjectName(_fromUtf8("groupBoxCreateChan")) + self.gridLayout = QtGui.QGridLayout(self.groupBoxCreateChan) + self.gridLayout.setObjectName(_fromUtf8("gridLayout")) + self.label_4 = QtGui.QLabel(self.groupBoxCreateChan) + self.label_4.setWordWrap(True) + self.label_4.setObjectName(_fromUtf8("label_4")) + self.gridLayout.addWidget(self.label_4, 0, 0, 1, 1) + self.label_5 = QtGui.QLabel(self.groupBoxCreateChan) + self.label_5.setObjectName(_fromUtf8("label_5")) + self.gridLayout.addWidget(self.label_5, 1, 0, 1, 1) + self.lineEditChanNameCreate = QtGui.QLineEdit(self.groupBoxCreateChan) + self.lineEditChanNameCreate.setObjectName(_fromUtf8("lineEditChanNameCreate")) + self.gridLayout.addWidget(self.lineEditChanNameCreate, 2, 0, 1, 1) + self.formLayout.setWidget(2, QtGui.QFormLayout.SpanningRole, self.groupBoxCreateChan) + self.groupBoxJoinChan = QtGui.QGroupBox(newChanDialog) self.groupBoxJoinChan.setObjectName(_fromUtf8("groupBoxJoinChan")) self.gridLayout_2 = QtGui.QGridLayout(self.groupBoxJoinChan) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) @@ -57,43 +73,30 @@ class Ui_NewChanDialog(object): self.lineEditChanBitmessageAddress.setObjectName(_fromUtf8("lineEditChanBitmessageAddress")) self.gridLayout_2.addWidget(self.lineEditChanBitmessageAddress, 4, 0, 1, 1) self.formLayout.setWidget(3, QtGui.QFormLayout.SpanningRole, self.groupBoxJoinChan) - self.groupBoxCreateChan = QtGui.QGroupBox(NewChanDialog) - self.groupBoxCreateChan.setObjectName(_fromUtf8("groupBoxCreateChan")) - self.gridLayout = QtGui.QGridLayout(self.groupBoxCreateChan) - self.gridLayout.setObjectName(_fromUtf8("gridLayout")) - self.label_4 = QtGui.QLabel(self.groupBoxCreateChan) - self.label_4.setWordWrap(True) - self.label_4.setObjectName(_fromUtf8("label_4")) - self.gridLayout.addWidget(self.label_4, 0, 0, 1, 1) - self.label_5 = QtGui.QLabel(self.groupBoxCreateChan) - self.label_5.setObjectName(_fromUtf8("label_5")) - self.gridLayout.addWidget(self.label_5, 1, 0, 1, 1) - self.lineEditChanNameCreate = QtGui.QLineEdit(self.groupBoxCreateChan) - self.lineEditChanNameCreate.setObjectName(_fromUtf8("lineEditChanNameCreate")) - self.gridLayout.addWidget(self.lineEditChanNameCreate, 2, 0, 1, 1) - self.formLayout.setWidget(2, QtGui.QFormLayout.SpanningRole, self.groupBoxCreateChan) - self.buttonBox = QtGui.QDialogButtonBox(NewChanDialog) + spacerItem = QtGui.QSpacerItem(389, 2, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.formLayout.setItem(4, QtGui.QFormLayout.FieldRole, spacerItem) + self.buttonBox = QtGui.QDialogButtonBox(newChanDialog) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) self.buttonBox.setObjectName(_fromUtf8("buttonBox")) - self.formLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.buttonBox) + self.formLayout.setWidget(5, QtGui.QFormLayout.FieldRole, self.buttonBox) - self.retranslateUi(NewChanDialog) - QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), NewChanDialog.accept) - QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), NewChanDialog.reject) + self.retranslateUi(newChanDialog) + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), newChanDialog.accept) + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), newChanDialog.reject) QtCore.QObject.connect(self.radioButtonJoinChan, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.groupBoxJoinChan.setShown) QtCore.QObject.connect(self.radioButtonCreateChan, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.groupBoxCreateChan.setShown) - QtCore.QMetaObject.connectSlotsByName(NewChanDialog) + QtCore.QMetaObject.connectSlotsByName(newChanDialog) - def retranslateUi(self, NewChanDialog): - NewChanDialog.setWindowTitle(_translate("NewChanDialog", "Dialog", None)) - self.radioButtonCreateChan.setText(_translate("NewChanDialog", "Create a new chan", None)) - self.radioButtonJoinChan.setText(_translate("NewChanDialog", "Join a chan", None)) - self.groupBoxJoinChan.setTitle(_translate("NewChanDialog", "Join a chan", None)) - self.label.setText(_translate("NewChanDialog", "

A chan is a set of encryption keys that is shared by a group of people. The keys and bitmessage address used by a chan is generated from a human-friendly word or phrase (the chan name).

Chans are experimental and are unmoderatable.

", None)) - self.label_2.setText(_translate("NewChanDialog", "Chan name:", None)) - self.label_3.setText(_translate("NewChanDialog", "Chan bitmessage address:", None)) - self.groupBoxCreateChan.setTitle(_translate("NewChanDialog", "Create a chan", None)) - self.label_4.setText(_translate("NewChanDialog", "Enter a name for your chan. If you choose a sufficiently complex chan name (like a strong and unique passphrase) and none of your friends share it publicly then the chan will be secure and private.", None)) - self.label_5.setText(_translate("NewChanDialog", "Chan name:", None)) + def retranslateUi(self, newChanDialog): + newChanDialog.setWindowTitle(_translate("newChanDialog", "Dialog", None)) + self.radioButtonCreateChan.setText(_translate("newChanDialog", "Create a new chan", None)) + self.radioButtonJoinChan.setText(_translate("newChanDialog", "Join a chan", None)) + self.groupBoxCreateChan.setTitle(_translate("newChanDialog", "Create a chan", None)) + self.label_4.setText(_translate("newChanDialog", "Enter a name for your chan. If you choose a sufficiently complex chan name (like a strong and unique passphrase) and none of your friends share it publicly then the chan will be secure and private.", None)) + self.label_5.setText(_translate("newChanDialog", "Chan name:", None)) + self.groupBoxJoinChan.setTitle(_translate("newChanDialog", "Join a chan", None)) + self.label.setText(_translate("newChanDialog", "

A chan exists when a group of people share the same decryption keys. The keys and bitmessage address used by a chan are generated from a human-friendly word or phrase (the chan name). To send a message to everyone in the chan, send a normal person-to-person message to the chan address.

Chans are experimental and completely unmoderatable.

", None)) + self.label_2.setText(_translate("newChanDialog", "Chan name:", None)) + self.label_3.setText(_translate("newChanDialog", "Chan bitmessage address:", None)) diff --git a/src/bitmessageqt/newchandialog.ui b/src/bitmessageqt/newchandialog.ui index 2e6e4657..3713c6a3 100644 --- a/src/bitmessageqt/newchandialog.ui +++ b/src/bitmessageqt/newchandialog.ui @@ -1,15 +1,21 @@ - NewChanDialog - + newChanDialog + 0 0 - 447 - 441 + 530 + 422 + + + 0 + 0 + + Dialog @@ -31,45 +37,6 @@ - - - - Join a chan - - - - - - <html><head/><body><p>A chan is a set of encryption keys that is shared by a group of people. The keys and bitmessage address used by a chan is generated from a human-friendly word or phrase (the chan name).</p><p>Chans are experimental and are unmoderatable.</p></body></html> - - - true - - - - - - - Chan name: - - - - - - - - - - Chan bitmessage address: - - - - - - - - - @@ -99,7 +66,59 @@ + + + + Join a chan + + + + + + <html><head/><body><p>A chan exists when a group of people share the same decryption keys. The keys and bitmessage address used by a chan are generated from a human-friendly word or phrase (the chan name). To send a message to everyone in the chan, send a normal person-to-person message to the chan address.</p><p>Chans are experimental and completely unmoderatable.</p></body></html> + + + true + + + + + + + Chan name: + + + + + + + + + + Chan bitmessage address: + + + + + + + + + + + + Qt::Vertical + + + + 389 + 2 + + + + + Qt::Horizontal @@ -116,7 +135,7 @@ buttonBox accepted() - NewChanDialog + newChanDialog accept() @@ -132,7 +151,7 @@ buttonBox rejected() - NewChanDialog + newChanDialog reject() diff --git a/src/class_addressGenerator.py b/src/class_addressGenerator.py index 08c7773e..54582541 100644 --- a/src/class_addressGenerator.py +++ b/src/class_addressGenerator.py @@ -28,6 +28,8 @@ class addressGenerator(threading.Thread): elif queueValue[0] == 'joinChan': command, chanAddress, label, deterministicPassphrase = queueValue eighteenByteRipe = False + addressVersionNumber = decodeAddress(chanAddress)[1] + streamNumber = decodeAddress(chanAddress)[2] numberOfAddressesToMake = 1 elif len(queueValue) == 7: command, addressVersionNumber, streamNumber, label, numberOfAddressesToMake, deterministicPassphrase, eighteenByteRipe = queueValue @@ -35,7 +37,7 @@ class addressGenerator(threading.Thread): command, addressVersionNumber, streamNumber, label, numberOfAddressesToMake, deterministicPassphrase, eighteenByteRipe, nonceTrialsPerByte, payloadLengthExtraBytes = queueValue else: sys.stderr.write( - 'Programming error: A structure with the wrong number of values was passed into the addressGeneratorQueue. Here is the queueValue: %s\n' % queueValue) + 'Programming error: A structure with the wrong number of values was passed into the addressGeneratorQueue. Here is the queueValue: %s\n' % repr(queueValue)) if addressVersionNumber < 3 or addressVersionNumber > 3: sys.stderr.write( 'Program error: For some reason the address generator queue has been given a request to create at least one version %s address which it cannot do.\n' % addressVersionNumber) @@ -117,9 +119,8 @@ class addressGenerator(threading.Thread): with open(shared.appdata + 'keys.dat', 'wb') as configfile: shared.config.write(configfile) - # It may be the case that this address is being generated - # as a result of a call to the API. Let us put the result - # in the necessary queue. + # The API and the join and create Chan functionality + # both need information back from the address generator. shared.apiAddressGeneratorReturnQueue.put(address) shared.UISignalQueue.put(( @@ -128,7 +129,7 @@ class addressGenerator(threading.Thread): label, address, streamNumber))) shared.reloadMyAddressHashes() shared.workerQueue.put(( - 'doPOWForMyV3Pubkey', ripe.digest())) + 'sendOutOrStoreMyV3Pubkey', ripe.digest())) elif command == 'createDeterministicAddresses' or command == 'getDeterministicAddress' or command == 'createChan' or command == 'joinChan': if len(deterministicPassphrase) == 0: @@ -188,8 +189,7 @@ class addressGenerator(threading.Thread): # If we are joining an existing chan, let us check to make sure it matches the provided Bitmessage address if command == 'joinChan': if address != chanAddress: - #todo: show an error message in the UI - shared.apiAddressGeneratorReturnQueue.put('API Error 0018: Chan name does not match address.') + shared.apiAddressGeneratorReturnQueue.put('chan name does not match address') saveAddressToDisk = False if command == 'getDeterministicAddress': saveAddressToDisk = False @@ -210,8 +210,13 @@ class addressGenerator(threading.Thread): privEncryptionKeyWIF = arithmetic.changebase( privEncryptionKey + checksum, 256, 58) + addressAlreadyExists = False try: shared.config.add_section(address) + except: + print address, 'already exists. Not adding it again.' + addressAlreadyExists = True + if not addressAlreadyExists: print 'label:', label shared.config.set(address, 'label', label) shared.config.set(address, 'enabled', 'true') @@ -237,17 +242,13 @@ class addressGenerator(threading.Thread): potentialPrivEncryptionKey.encode('hex')) shared.myAddressesByHash[ ripe.digest()] = address - #todo: don't send out pubkey if dealing with a chan; save in pubkeys table instead. shared.workerQueue.put(( - 'doPOWForMyV3Pubkey', ripe.digest())) - except: - print address, 'already exists. Not adding it again.' + 'sendOutOrStoreMyV3Pubkey', ripe.digest())) # If this is a chan address, + # the worker thread won't send out the pubkey over the network. + # Done generating addresses. - if command == 'createDeterministicAddresses': - # It may be the case that this address is being - # generated as a result of a call to the API. Let us - # put the result in the necessary queue. + if command == 'createDeterministicAddresses' or command == 'joinChan' or command == 'createChan': shared.apiAddressGeneratorReturnQueue.put( listOfNewAddressesToSendOutThroughTheAPI) shared.UISignalQueue.put(( diff --git a/src/class_outgoingSynSender.py b/src/class_outgoingSynSender.py index 2c4766f4..5c21d72c 100644 --- a/src/class_outgoingSynSender.py +++ b/src/class_outgoingSynSender.py @@ -7,7 +7,6 @@ import socket import sys import tr -#import bitmessagemain from class_sendDataThread import * from class_receiveDataThread import * diff --git a/src/class_receiveDataThread.py b/src/class_receiveDataThread.py index e73f3d2b..2693b293 100644 --- a/src/class_receiveDataThread.py +++ b/src/class_receiveDataThread.py @@ -1412,34 +1412,39 @@ class receiveDataThread(threading.Thread): if len(requestedHash) != 20: print 'The length of the requested hash is not 20 bytes. Something is wrong. Ignoring.' return - print 'the hash requested in this getpubkey request is:', requestedHash.encode('hex') + with shared.printLock: + print 'the hash requested in this getpubkey request is:', requestedHash.encode('hex') if requestedHash in shared.myAddressesByHash: # if this address hash is one of mine if decodeAddress(shared.myAddressesByHash[requestedHash])[1] != requestedAddressVersionNumber: with shared.printLock: sys.stderr.write( - '(Within the recgetpubkey function) Someone requested one of my pubkeys but the requestedAddressVersionNumber doesn\'t match my actual address version number. That shouldn\'t have happened. Ignoring.\n') - + '(Within the recgetpubkey function) Someone requested one of my pubkeys but the requestedAddressVersionNumber doesn\'t match my actual address version number. They shouldn\'t have done that. Ignoring.\n') return + if shared.safeConfigGetBoolean(shared.myAddressesByHash[requestedHash], 'chan'): + with shared.printLock: + print 'Ignoring getpubkey request because it is for one of my chan addresses. The other party should already have the pubkey.' + return try: lastPubkeySendTime = int(shared.config.get( shared.myAddressesByHash[requestedHash], 'lastpubkeysendtime')) except: lastPubkeySendTime = 0 - if lastPubkeySendTime < time.time() - shared.lengthOfTimeToHoldOnToAllPubkeys: # If the last time we sent our pubkey was at least 28 days ago... - with shared.printLock: - print 'Found getpubkey-requested-hash in my list of EC hashes. Telling Worker thread to do the POW for a pubkey message and send it out.' - - if requestedAddressVersionNumber == 2: - shared.workerQueue.put(( - 'doPOWForMyV2Pubkey', requestedHash)) - elif requestedAddressVersionNumber == 3: - shared.workerQueue.put(( - 'doPOWForMyV3Pubkey', requestedHash)) - else: + if lastPubkeySendTime > time.time() - shared.lengthOfTimeToHoldOnToAllPubkeys: # If the last time we sent our pubkey was more recent than 28 days ago... with shared.printLock: print 'Found getpubkey-requested-hash in my list of EC hashes BUT we already sent it recently. Ignoring request. The lastPubkeySendTime is:', lastPubkeySendTime + return + with shared.printLock: + print 'Found getpubkey-requested-hash in my list of EC hashes. Telling Worker thread to do the POW for a pubkey message and send it out.' + if requestedAddressVersionNumber == 2: + shared.workerQueue.put(( + 'doPOWForMyV2Pubkey', requestedHash)) + elif requestedAddressVersionNumber == 3: + shared.workerQueue.put(( + 'sendOutOrStoreMyV3Pubkey', requestedHash)) + + else: with shared.printLock: print 'This getpubkey request is not for any of my keys.' diff --git a/src/class_singleWorker.py b/src/class_singleWorker.py index 56b7be6e..2ba34eeb 100644 --- a/src/class_singleWorker.py +++ b/src/class_singleWorker.py @@ -72,8 +72,8 @@ class singleWorker(threading.Thread): self.sendBroadcast() elif command == 'doPOWForMyV2Pubkey': self.doPOWForMyV2Pubkey(data) - elif command == 'doPOWForMyV3Pubkey': - self.doPOWForMyV3Pubkey(data) + elif command == 'sendOutOrStoreMyV3Pubkey': + self.sendOutOrStoreMyV3Pubkey(data) """elif command == 'newpubkey': toAddressVersion,toStreamNumber,toRipe = data if toRipe in shared.neededPubkeys: @@ -173,7 +173,11 @@ class singleWorker(threading.Thread): with open(shared.appdata + 'keys.dat', 'wb') as configfile: shared.config.write(configfile) - def doPOWForMyV3Pubkey(self, hash): # This function also broadcasts out the pubkey message once it is done with the POW + # If this isn't a chan address, this function assembles the pubkey data, + # does the necessary POW and sends it out. If it *is* a chan then it + # assembles the pubkey and stores is in the pubkey table so that we can + # send messages to "ourselves". + def sendOutOrStoreMyV3Pubkey(self, hash): myAddress = shared.myAddressesByHash[hash] status, addressVersionNumber, streamNumber, hash = decodeAddress( myAddress) @@ -192,7 +196,7 @@ class singleWorker(threading.Thread): except Exception as err: with shared.printLock: sys.stderr.write( - 'Error within doPOWForMyV3Pubkey. Could not read the keys from the keys.dat file for a requested address. %s\n' % err) + 'Error within sendOutOrStoreMyV3Pubkey. Could not read the keys from the keys.dat file for a requested address. %s\n' % err) return @@ -216,34 +220,40 @@ class singleWorker(threading.Thread): payload += encodeVarint(len(signature)) payload += signature - # Do the POW for this pubkey message - target = 2 ** 64 / ((len(payload) + shared.networkDefaultPayloadLengthExtraBytes + - 8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte) - print '(For pubkey message) Doing proof of work...' - initialHash = hashlib.sha512(payload).digest() - trialValue, nonce = proofofwork.run(target, initialHash) - print '(For pubkey message) Found proof of work', trialValue, 'Nonce:', nonce + if not shared.safeConfigGetBoolean(myAddress, 'chan'): + # Do the POW for this pubkey message + target = 2 ** 64 / ((len(payload) + shared.networkDefaultPayloadLengthExtraBytes + + 8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte) + print '(For pubkey message) Doing proof of work...' + initialHash = hashlib.sha512(payload).digest() + trialValue, nonce = proofofwork.run(target, initialHash) + print '(For pubkey message) Found proof of work', trialValue, 'Nonce:', nonce - payload = pack('>Q', nonce) + payload - """t = (hash,payload,embeddedTime,'no') - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put('''INSERT INTO pubkeys VALUES (?,?,?,?)''') - shared.sqlSubmitQueue.put(t) - queryreturn = shared.sqlReturnQueue.get() - shared.sqlSubmitQueue.put('commit') - shared.sqlLock.release()""" + payload = pack('>Q', nonce) + payload + inventoryHash = calculateInventoryHash(payload) + objectType = 'pubkey' + shared.inventory[inventoryHash] = ( + objectType, streamNumber, payload, embeddedTime) - inventoryHash = calculateInventoryHash(payload) - objectType = 'pubkey' - shared.inventory[inventoryHash] = ( - objectType, streamNumber, payload, embeddedTime) + with shared.printLock: + print 'broadcasting inv with hash:', inventoryHash.encode('hex') - with shared.printLock: - print 'broadcasting inv with hash:', inventoryHash.encode('hex') - - shared.broadcastToSendDataQueues(( - streamNumber, 'sendinv', inventoryHash)) - shared.UISignalQueue.put(('updateStatusBar', '')) + shared.broadcastToSendDataQueues(( + streamNumber, 'sendinv', inventoryHash)) + shared.UISignalQueue.put(('updateStatusBar', '')) + # If this is a chan address then we won't send out the pubkey over the + # network but rather will only store it in our pubkeys table so that + # we can send messages to "ourselves". + if shared.safeConfigGetBoolean(myAddress, 'chan'): + payload = '\x00' * 8 + payload # Attach a fake nonce on the front + # just so that it is in the correct format. + t = (hash,payload,embeddedTime,'yes') + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put('''INSERT INTO pubkeys VALUES (?,?,?,?)''') + shared.sqlSubmitQueue.put(t) + shared.sqlReturnQueue.get() + shared.sqlSubmitQueue.put('commit') + shared.sqlLock.release() shared.config.set( myAddress, 'lastpubkeysendtime', str(int(time.time()))) with open(shared.appdata + 'keys.dat', 'wb') as configfile: @@ -722,8 +732,13 @@ class singleWorker(threading.Thread): subject + '\n' + 'Body:' + message payload += encodeVarint(len(messageToTransmit)) payload += messageToTransmit - fullAckPayload = self.generateFullAckMessage( - ackdata, toStreamNumber, embeddedTime) # The fullAckPayload is a normal msg protocol message with the proof of work already completed that the receiver of this message can easily send out. + if shared.safeConfigGetBoolean(toaddress, 'chan'): + with shared.printLock: + print 'Not bothering to generate ackdata because we are sending to a chan.' + fullAckPayload = '' + else: + fullAckPayload = self.generateFullAckMessage( + ackdata, toStreamNumber, embeddedTime) # The fullAckPayload is a normal msg protocol message with the proof of work already completed that the receiver of this message can easily send out. payload += encodeVarint(len(fullAckPayload)) payload += fullAckPayload signature = highlevelcrypto.sign(payload, privSigningKeyHex) @@ -765,17 +780,26 @@ class singleWorker(threading.Thread): objectType = 'msg' shared.inventory[inventoryHash] = ( objectType, toStreamNumber, encryptedPayload, int(time.time())) - shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (ackdata, tr.translateText("MainWindow", "Message sent. Waiting on acknowledgement. Sent on %1").arg(unicode( - strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(time.time()))), 'utf-8'))))) + if shared.safeConfigGetBoolean(toaddress, 'chan'): + shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (ackdata, tr.translateText("MainWindow", "Message sent. Sent on %1").arg(unicode( + strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(time.time()))), 'utf-8'))))) + else: + # not sending to a chan + shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (ackdata, tr.translateText("MainWindow", "Message sent. Waiting on acknowledgement. Sent on %1").arg(unicode( + strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(time.time()))), 'utf-8'))))) print 'Broadcasting inv for my msg(within sendmsg function):', inventoryHash.encode('hex') shared.broadcastToSendDataQueues(( streamNumber, 'sendinv', inventoryHash)) # Update the status of the message in the 'sent' table to have a - # 'msgsent' status + # 'msgsent' status or 'msgsentnoackexpected' status. + if shared.safeConfigGetBoolean(toaddress, 'chan'): + newStatus = 'msgsentnoackexpected' + else: + newStatus = 'msgsent' shared.sqlLock.acquire() - t = (inventoryHash,ackdata,) - shared.sqlSubmitQueue.put('''UPDATE sent SET msgid=?, status='msgsent' WHERE ackdata=?''') + t = (inventoryHash,newStatus,ackdata,) + shared.sqlSubmitQueue.put('''UPDATE sent SET msgid=?, status=? WHERE ackdata=?''') shared.sqlSubmitQueue.put(t) queryreturn = shared.sqlReturnQueue.get() shared.sqlSubmitQueue.put('commit') diff --git a/src/message_data_reader.py b/src/message_data_reader.py index 90f4bedc..c600935d 100644 --- a/src/message_data_reader.py +++ b/src/message_data_reader.py @@ -107,8 +107,8 @@ def vacuum(): #takeInboxMessagesOutOfTrash() #takeSentMessagesOutOfTrash() #markAllInboxMessagesAsUnread() -#readInbox() -readSent() +readInbox() +#readSent() #readPubkeys() #readSubscriptions() #readInventory() diff --git a/src/shared.py b/src/shared.py index 557b332d..aead1f8a 100644 --- a/src/shared.py +++ b/src/shared.py @@ -195,8 +195,8 @@ def isAddressInMyAddressBookSubscriptionsListOrWhitelist(address): def safeConfigGetBoolean(section,field): try: return config.getboolean(section,field) - except: - return False + except Exception, err: + return False def decodeWalletImportFormat(WIFstring): fullString = arithmetic.changebase(WIFstring,58,256) From a3dd730c2adc0c715299443b8649cd13bebdb59d Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Mon, 22 Jul 2013 01:20:36 -0400 Subject: [PATCH 29/43] add one line to last commit --- src/bitmessageqt/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index dc12fcf8..cbfc069b 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1089,6 +1089,7 @@ class MyForm(QtGui.QMainWindow): QMessageBox.about(self, _translate("MainWindow", "Address already present"), _translate( "MainWindow", "Could not add chan because it appears to already be one of your identities.")) return + createdAddress = addressGeneratorReturnValue[0] self.addEntryToAddressBook(createdAddress, self.str_chan + ' ' + self.str_chan + ' ' + str(self.newChanDialogInstance.ui.lineEditChanNameJoin.text())) QMessageBox.about(self, _translate("MainWindow", "Success"), _translate( "MainWindow", "Successfully joined chan. ")) From 9c7e6600fa1af29a2073a3f2a5203a892abf6518 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Mon, 22 Jul 2013 01:41:50 -0400 Subject: [PATCH 30/43] Modified one line to support international characters --- src/bitmessageqt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index cbfc069b..d624a11b 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1078,7 +1078,7 @@ class MyForm(QtGui.QMainWindow): "MainWindow", "That Bitmessage address is not valid.")) return shared.apiAddressGeneratorReturnQueue.queue.clear() - shared.addressGeneratorQueue.put(('joinChan', addBMIfNotPresent(self.newChanDialogInstance.ui.lineEditChanBitmessageAddress.text()), self.str_chan + ' ' + str(self.newChanDialogInstance.ui.lineEditChanNameJoin.text()), self.newChanDialogInstance.ui.lineEditChanNameJoin.text().toUtf8())) + shared.addressGeneratorQueue.put(('joinChan', addBMIfNotPresent(self.newChanDialogInstance.ui.lineEditChanBitmessageAddress.text()), self.str_chan + ' ' + str(self.newChanDialogInstance.ui.lineEditChanNameJoin.text().toUtf8()), self.newChanDialogInstance.ui.lineEditChanNameJoin.text().toUtf8())) addressGeneratorReturnValue = shared.apiAddressGeneratorReturnQueue.get() print 'addressGeneratorReturnValue', addressGeneratorReturnValue if addressGeneratorReturnValue == 'chan name does not match address': From b488bb5cda1b86bd6dcd612798b391c88ec1abd9 Mon Sep 17 00:00:00 2001 From: DivineOmega Date: Mon, 22 Jul 2013 10:40:19 +0100 Subject: [PATCH 31/43] Fixes double [chan] appearing when adding chan to address book --- src/bitmessageqt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index d624a11b..5caa58f5 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1090,7 +1090,7 @@ class MyForm(QtGui.QMainWindow): "MainWindow", "Could not add chan because it appears to already be one of your identities.")) return createdAddress = addressGeneratorReturnValue[0] - self.addEntryToAddressBook(createdAddress, self.str_chan + ' ' + self.str_chan + ' ' + str(self.newChanDialogInstance.ui.lineEditChanNameJoin.text())) + self.addEntryToAddressBook(createdAddress, self.str_chan + ' ' + str(self.newChanDialogInstance.ui.lineEditChanNameJoin.text())) QMessageBox.about(self, _translate("MainWindow", "Success"), _translate( "MainWindow", "Successfully joined chan. ")) self.ui.tabWidget.setCurrentIndex(3) From 3638ed88563ff8d6edbed20e4bd09ca8263af0ea Mon Sep 17 00:00:00 2001 From: neko259 Date: Mon, 22 Jul 2013 21:28:51 +0300 Subject: [PATCH 32/43] Use system text color for enabled addresses instead of black --- src/bitmessageqt/__init__.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 5caa58f5..624b3842 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1338,7 +1338,7 @@ class MyForm(QtGui.QMainWindow): self.ui.tableWidgetInbox.item(i, 0).setTextColor(QtGui.QColor(137, 04, 177)) else: self.ui.tableWidgetInbox.item( - i, 0).setTextColor(QtGui.QColor(0, 0, 0)) + i, 0).setTextColor(QApplication.palette().text().color()) def rerenderSentFromLabels(self): for i in range(self.ui.tableWidgetSent.rowCount()): @@ -2074,7 +2074,8 @@ class MyForm(QtGui.QMainWindow): # Set the color to either black or grey if shared.config.getboolean(addressAtCurrentRow, 'enabled'): self.ui.tableWidgetYourIdentities.item( - currentRow, 1).setTextColor(QtGui.QColor(0, 0, 0)) + currentRow, 1).setTextColor(QApplication.palette() + .text().color()) else: self.ui.tableWidgetYourIdentities.item( currentRow, 1).setTextColor(QtGui.QColor(128, 128, 128)) @@ -2464,9 +2465,9 @@ class MyForm(QtGui.QMainWindow): shared.sqlSubmitQueue.put('commit') shared.sqlLock.release() self.ui.tableWidgetSubscriptions.item( - currentRow, 0).setTextColor(QtGui.QColor(0, 0, 0)) + currentRow, 0).setTextColor(QApplication.palette().text().color()) self.ui.tableWidgetSubscriptions.item( - currentRow, 1).setTextColor(QtGui.QColor(0, 0, 0)) + currentRow, 1).setTextColor(QApplication.palette().text().color()) shared.reloadBroadcastSendersForWhichImWatching() def on_action_SubscriptionsDisable(self): @@ -2535,9 +2536,9 @@ class MyForm(QtGui.QMainWindow): addressAtCurrentRow = self.ui.tableWidgetBlacklist.item( currentRow, 1).text() self.ui.tableWidgetBlacklist.item( - currentRow, 0).setTextColor(QtGui.QColor(0, 0, 0)) + currentRow, 0).setTextColor(QApplication.palette().text().color()) self.ui.tableWidgetBlacklist.item( - currentRow, 1).setTextColor(QtGui.QColor(0, 0, 0)) + currentRow, 1).setTextColor(QApplication.palette().text().color()) t = (str(addressAtCurrentRow),) shared.sqlLock.acquire() if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'black': @@ -2588,11 +2589,11 @@ class MyForm(QtGui.QMainWindow): with open(shared.appdata + 'keys.dat', 'wb') as configfile: shared.config.write(configfile) self.ui.tableWidgetYourIdentities.item( - currentRow, 0).setTextColor(QtGui.QColor(0, 0, 0)) + currentRow, 0).setTextColor(QApplication.palette().text().color()) self.ui.tableWidgetYourIdentities.item( - currentRow, 1).setTextColor(QtGui.QColor(0, 0, 0)) + currentRow, 1).setTextColor(QApplication.palette().text().color()) self.ui.tableWidgetYourIdentities.item( - currentRow, 2).setTextColor(QtGui.QColor(0, 0, 0)) + currentRow, 2).setTextColor(QApplication.palette().text().color()) if shared.safeConfigGetBoolean(addressAtCurrentRow, 'mailinglist'): self.ui.tableWidgetYourIdentities.item(currentRow, 1).setTextColor(QtGui.QColor(137, 04, 177)) if shared.safeConfigGetBoolean(addressAtCurrentRow, 'chan'): From 8649b72ae99b6e19ea74d5174b707f648f018e23 Mon Sep 17 00:00:00 2001 From: Postmodern Date: Mon, 22 Jul 2013 23:22:22 -0700 Subject: [PATCH 33/43] Add a missing `rm -f` to the uninstall task. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b9a85ff7..cd4a0ee4 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ uninstall: rm -f /usr/bin/${APP} rm -f /usr/share/applications/${APP}.desktop rm -f /usr/share/icons/hicolor/scalable/apps/${APP}.svg - /usr/share/pixmaps/${APP}.svg + rm -f /usr/share/pixmaps/${APP}.svg clean: rm -f ${APP} \#* \.#* gnuplot* *.png debian/*.substvars debian/*.log rm -fr deb.* debian/${APP} rpmpackage/${ARCH_TYPE} From 84f952d76c999ba2b25a23644e2ef29dcfcb68fc Mon Sep 17 00:00:00 2001 From: Postmodern Date: Mon, 22 Jul 2013 23:31:30 -0700 Subject: [PATCH 34/43] Install into /usr/local by default. --- Makefile | 57 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index cd4a0ee4..a83a6db1 100644 --- a/Makefile +++ b/Makefile @@ -2,41 +2,42 @@ APP=pybitmessage VERSION=0.3.4 RELEASE=1 ARCH_TYPE=`uname -m` +PREFIX?=/usr/local all: debug: source: tar -cvzf ../${APP}_${VERSION}.orig.tar.gz ../${APP}-${VERSION} --exclude-vcs install: - mkdir -p ${DESTDIR}/usr - mkdir -p ${DESTDIR}/usr/bin - mkdir -m 755 -p ${DESTDIR}/usr/share - mkdir -m 755 -p ${DESTDIR}/usr/share/man - mkdir -m 755 -p ${DESTDIR}/usr/share/man/man1 - install -m 644 man/${APP}.1.gz ${DESTDIR}/usr/share/man/man1 - mkdir -m 755 -p ${DESTDIR}/usr/share/${APP} - mkdir -m 755 -p ${DESTDIR}/usr/share/applications - mkdir -m 755 -p ${DESTDIR}/usr/share/pixmaps - mkdir -m 755 -p ${DESTDIR}/usr/share/icons - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/scalable - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/scalable/apps - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/24x24 - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/24x24/apps - install -m 644 desktop/${APP}.desktop ${DESTDIR}/usr/share/applications/${APP}.desktop - install -m 644 desktop/icon24.png ${DESTDIR}/usr/share/icons/hicolor/24x24/apps/${APP}.png - cp -rf src/* ${DESTDIR}/usr/share/${APP} - echo '#!/bin/sh' > ${DESTDIR}/usr/bin/${APP} - echo 'cd /usr/share/pybitmessage' >> ${DESTDIR}/usr/bin/${APP} - echo 'LD_LIBRARY_PATH="/opt/openssl-compat-bitcoin/lib/" exec python2 bitmessagemain.py' >> ${DESTDIR}/usr/bin/${APP} - chmod +x ${DESTDIR}/usr/bin/${APP} + mkdir -p ${DESTDIR}${PREFIX} + mkdir -p ${DESTDIR}${PREFIX}/bin + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man/man1 + install -m 644 man/${APP}.1.gz ${DESTDIR}${PREFIX}/share/man/man1 + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/${APP} + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/applications + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/pixmaps + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor/24x24 + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor/24x24/apps + install -m 644 desktop/${APP}.desktop ${DESTDIR}${PREFIX}/share/applications/${APP}.desktop + install -m 644 desktop/icon24.png ${DESTDIR}${PREFIX}/share/icons/hicolor/24x24/apps/${APP}.png + cp -rf src/* ${DESTDIR}${PREFIX}/share/${APP} + echo '#!/bin/sh' > ${DESTDIR}${PREFIX}/bin/${APP} + echo 'cd ${PREFIX}/share/pybitmessage' >> ${DESTDIR}${PREFIX}/bin/${APP} + echo 'LD_LIBRARY_PATH="/opt/openssl-compat-bitcoin/lib/" exec python2 bitmessagemain.py' >> ${DESTDIR}${PREFIX}/bin/${APP} + chmod +x ${DESTDIR}${PREFIX}/bin/${APP} uninstall: - rm -f /usr/share/man/man1/${APP}.1.gz - rm -rf /usr/share/${APP} - rm -f /usr/bin/${APP} - rm -f /usr/share/applications/${APP}.desktop - rm -f /usr/share/icons/hicolor/scalable/apps/${APP}.svg - rm -f /usr/share/pixmaps/${APP}.svg + rm -f ${PREFIX}/share/man/man1/${APP}.1.gz + rm -rf ${PREFIX}/share/${APP} + rm -f ${PREFIX}/bin/${APP} + rm -f ${PREFIX}/share/applications/${APP}.desktop + rm -f ${PREFIX}/share/icons/hicolor/scalable/apps/${APP}.svg + rm -f ${PREFIX}/share/pixmaps/${APP}.svg clean: rm -f ${APP} \#* \.#* gnuplot* *.png debian/*.substvars debian/*.log rm -fr deb.* debian/${APP} rpmpackage/${ARCH_TYPE} From 2af86c8296e0c577f8ac48a56e9a3582ddd87473 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Jul 2013 16:04:44 +0100 Subject: [PATCH 35/43] Improving the Ebuild --- Makefile | 56 ++++++++++++----------- archpackage/PKGBUILD | 2 +- debian/control | 2 +- debian/rules | 3 +- ebuildpackage/pybitmessage-0.3.4-1.ebuild | 20 ++++++-- generate.sh | 2 +- puppy.sh | 2 +- puppypackage/pybitmessage-0.3.4.pet.specs | 2 +- rpmpackage/pybitmessage.spec | 2 +- slack.sh | 2 +- 10 files changed, 53 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index b9a85ff7..adda5583 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ APP=pybitmessage VERSION=0.3.4 RELEASE=1 ARCH_TYPE=`uname -m` +PREFIX?=/usr/local all: debug: @@ -9,34 +10,35 @@ source: tar -cvzf ../${APP}_${VERSION}.orig.tar.gz ../${APP}-${VERSION} --exclude-vcs install: mkdir -p ${DESTDIR}/usr - mkdir -p ${DESTDIR}/usr/bin - mkdir -m 755 -p ${DESTDIR}/usr/share - mkdir -m 755 -p ${DESTDIR}/usr/share/man - mkdir -m 755 -p ${DESTDIR}/usr/share/man/man1 - install -m 644 man/${APP}.1.gz ${DESTDIR}/usr/share/man/man1 - mkdir -m 755 -p ${DESTDIR}/usr/share/${APP} - mkdir -m 755 -p ${DESTDIR}/usr/share/applications - mkdir -m 755 -p ${DESTDIR}/usr/share/pixmaps - mkdir -m 755 -p ${DESTDIR}/usr/share/icons - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/scalable - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/scalable/apps - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/24x24 - mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/24x24/apps - install -m 644 desktop/${APP}.desktop ${DESTDIR}/usr/share/applications/${APP}.desktop - install -m 644 desktop/icon24.png ${DESTDIR}/usr/share/icons/hicolor/24x24/apps/${APP}.png - cp -rf src/* ${DESTDIR}/usr/share/${APP} - echo '#!/bin/sh' > ${DESTDIR}/usr/bin/${APP} - echo 'cd /usr/share/pybitmessage' >> ${DESTDIR}/usr/bin/${APP} - echo 'LD_LIBRARY_PATH="/opt/openssl-compat-bitcoin/lib/" exec python2 bitmessagemain.py' >> ${DESTDIR}/usr/bin/${APP} - chmod +x ${DESTDIR}/usr/bin/${APP} + mkdir -p ${DESTDIR}${PREFIX} + mkdir -p ${DESTDIR}${PREFIX}/bin + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man/man1 + install -m 644 man/${APP}.1.gz ${DESTDIR}${PREFIX}/share/man/man1 + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/${APP} + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/applications + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/pixmaps + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor/24x24 + mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor/24x24/apps + install -m 644 desktop/${APP}.desktop ${DESTDIR}${PREFIX}/share/applications/${APP}.desktop + install -m 644 desktop/icon24.png ${DESTDIR}${PREFIX}/share/icons/hicolor/24x24/apps/${APP}.png + cp -rf src/* ${DESTDIR}${PREFIX}/share/${APP} + echo '#!/bin/sh' > ${DESTDIR}${PREFIX}/bin/${APP} + echo 'cd ${PREFIX}/share/pybitmessage' >> ${DESTDIR}${PREFIX}/bin/${APP} + echo 'LD_LIBRARY_PATH="/opt/openssl-compat-bitcoin/lib/" exec python2 bitmessagemain.py' >> ${DESTDIR}${PREFIX}/bin/${APP} + chmod +x ${DESTDIR}${PREFIX}/bin/${APP} uninstall: - rm -f /usr/share/man/man1/${APP}.1.gz - rm -rf /usr/share/${APP} - rm -f /usr/bin/${APP} - rm -f /usr/share/applications/${APP}.desktop - rm -f /usr/share/icons/hicolor/scalable/apps/${APP}.svg - /usr/share/pixmaps/${APP}.svg + rm -f ${PREFIX}/share/man/man1/${APP}.1.gz + rm -rf ${PREFIX}/share/${APP} + rm -f ${PREFIX}/bin/${APP} + rm -f ${PREFIX}/share/applications/${APP}.desktop + rm -f ${PREFIX}/share/icons/hicolor/scalable/apps/${APP}.svg + ${PREFIX}/share/pixmaps/${APP}.svg clean: rm -f ${APP} \#* \.#* gnuplot* *.png debian/*.substvars debian/*.log rm -fr deb.* debian/${APP} rpmpackage/${ARCH_TYPE} diff --git a/archpackage/PKGBUILD b/archpackage/PKGBUILD index e9ab0f74..e36c1a11 100644 --- a/archpackage/PKGBUILD +++ b/archpackage/PKGBUILD @@ -27,5 +27,5 @@ build() { } package() { cd "$srcdir/$pkgname-$pkgver" - make DESTDIR="$pkgdir/" install + make DESTDIR="$pkgdir/" PREFIX="/usr" install } diff --git a/debian/control b/debian/control index d9ed8704..b2ec3268 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Maintainer: Bob Mottram (4096 bits) Build-Depends: debhelper (>= 9.0.0) Standards-Version: 3.9.4 Homepage: https://github.com/Bitmessage/PyBitmessage -Vcs-Git: https://github.com/fuzzgun/fin.git +Vcs-Git: https://github.com/fuzzgun/packagemonkey.git Package: pybitmessage Section: mail diff --git a/debian/rules b/debian/rules index 233679ca..5b29d243 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,7 @@ #!/usr/bin/make -f APP=pybitmessage +PREFIX=/usr build: build-stamp make build-arch: build-stamp @@ -20,7 +21,7 @@ install: build clean dh_testroot dh_prep dh_installdirs - ${MAKE} install -B DESTDIR=${CURDIR}/debian/${APP} + ${MAKE} install -B DESTDIR=${CURDIR}/debian/${APP} PREFIX=/usr binary-indep: build install dh_testdir dh_testroot diff --git a/ebuildpackage/pybitmessage-0.3.4-1.ebuild b/ebuildpackage/pybitmessage-0.3.4-1.ebuild index 20f056e4..fba11f74 100755 --- a/ebuildpackage/pybitmessage-0.3.4-1.ebuild +++ b/ebuildpackage/pybitmessage-0.3.4-1.ebuild @@ -1,22 +1,32 @@ # $Header: $ -EAPI=4 +EAPI=5 +inherit git-2 python-r1 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" DESCRIPTION="Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide "non-content" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." HOMEPAGE="https://github.com/Bitmessage/PyBitmessage" -SRC_URI="${PN}/${P}.tar.gz" +EGIT_REPO_URI="https://github.com/fuzzgun/packagemonkey.git" LICENSE="MIT" SLOT="0" KEYWORDS="x86" -RDEPEND="dev-libs/popt" -DEPEND="${RDEPEND}" +DEPEND="dev-libs/popt + ${PYTHON_DEPS}" +RDEPEND="${DEPEND} + dev-libs/openssl + dev-python/PyQt4[]" src_configure() { econf --with-popt } +src_compile() { :; } + src_install() { - emake DESTDIR="${D}" install + emake DESTDIR="${D}" PREFIX="/usr" install # Install README and (Debian) changelog dodoc README.md debian/changelog } diff --git a/generate.sh b/generate.sh index 8489f024..7aa46e75 100755 --- a/generate.sh +++ b/generate.sh @@ -4,4 +4,4 @@ rm -f Makefile rpmpackage/*.spec -packagemonkey -n "PyBitmessage" --version "0.3.4" --dir "." -l "mit" -e "Bob Mottram (4096 bits) " --brief "Send encrypted messages" --desc "Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide \"non-content\" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." --homepage "https://github.com/Bitmessage/PyBitmessage" --section "mail" --categories "Office/Email" --dependsdeb "python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev, gst123" --dependsrpm "python, PyQt4, openssl-compat-bitcoin-libs, gst123" --mainscript "bitmessagemain.py" --librarypath "/opt/openssl-compat-bitcoin/lib/" --suggestsdeb "libmessaging-menu-dev" --dependspuppy "openssl, python-qt4, sqlite3, sqlite3-dev, python-openssl, python-sip, gst123" --dependsarch "python2, qt4, python2-pyqt4, sqlite, openssl, gst123" --suggestsarch "python2-gevent" --pythonversion 2 +packagemonkey -n "PyBitmessage" --version "0.3.4" --dir "." -l "mit" -e "Bob Mottram (4096 bits) " --brief "Send encrypted messages" --desc "Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide \"non-content\" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." --homepage "https://github.com/Bitmessage/PyBitmessage" --section "mail" --categories "Office/Email" --dependsdeb "python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev, gst123" --dependsrpm "python, PyQt4, openssl-compat-bitcoin-libs, gst123" --mainscript "bitmessagemain.py" --librarypath "/opt/openssl-compat-bitcoin/lib/" --suggestsdeb "libmessaging-menu-dev" --dependspuppy "openssl, python-qt4, sqlite3, sqlite3-dev, python-openssl, python-sip, gst123" --dependsarch "python2, qt4, python2-pyqt4, sqlite, openssl, gst123" --suggestsarch "python2-gevent" --pythonversion 2 --dependsebuild "dev-libs/openssl, dev-python/PyQt4[${PYTHON_USEDEP}]" --buildebuild "\${PYTHON_DEPS}" --pythonreq "sqlite" diff --git a/puppy.sh b/puppy.sh index dd54ecc9..efe1d7da 100755 --- a/puppy.sh +++ b/puppy.sh @@ -27,7 +27,7 @@ mkdir -p ${PROJECTDIR} # Build the project make clean make -make install -B DESTDIR=${PROJECTDIR} +make install -B DESTDIR=${PROJECTDIR} PREFIX=/usr # Alter the desktop file categories sed -i "s/Categories=Office;Email;/Categories=Internet;mailnews;/g" ${PROJECTDIR}/usr/share/applications/${APP}.desktop diff --git a/puppypackage/pybitmessage-0.3.4.pet.specs b/puppypackage/pybitmessage-0.3.4.pet.specs index 42d99ac3..4bcf119b 100644 --- a/puppypackage/pybitmessage-0.3.4.pet.specs +++ b/puppypackage/pybitmessage-0.3.4.pet.specs @@ -1 +1 @@ -pybitmessage-0.3.4-1|PyBitmessage|0.3.4|1|Internet;mailnews;|5.3M||pybitmessage-0.3.4-1.pet|+openssl,+python-qt4,+sqlite3,+sqlite3-dev,+python-openssl,+python-sip,+gst123|Send encrypted messages|ubuntu|precise|5| +pybitmessage-0.3.4-1|PyBitmessage|0.3.4|1|Internet;mailnews;|3.9M||pybitmessage-0.3.4-1.pet|+openssl,+python-qt4,+sqlite3,+sqlite3-dev,+python-openssl,+python-sip,+gst123|Send encrypted messages|ubuntu|precise|5| diff --git a/rpmpackage/pybitmessage.spec b/rpmpackage/pybitmessage.spec index c9254dec..9c12661a 100644 --- a/rpmpackage/pybitmessage.spec +++ b/rpmpackage/pybitmessage.spec @@ -48,7 +48,7 @@ mkdir -p %{buildroot}/usr/share/pixmaps mkdir -p %{buildroot}/usr/share/icons/hicolor/scalable mkdir -p %{buildroot}/usr/share/icons/hicolor/scalable/apps # Make install but to the RPM BUILDROOT directory -make install -B DESTDIR=%{buildroot} +make install -B DESTDIR=%{buildroot} PREFIX=/usr %files %doc README.md LICENSE diff --git a/slack.sh b/slack.sh index cc71e1f3..5d826e0b 100755 --- a/slack.sh +++ b/slack.sh @@ -28,7 +28,7 @@ mkdir -p ${PROJECTDIR} # Build the project make clean make -make install -B DESTDIR=${PROJECTDIR} +make install -B DESTDIR=${PROJECTDIR} PREFIX=/usr # Copy the slack-desc and doinst.sh files into the build install directory mkdir ${PROJECTDIR}/install From ba2958d076a2214feee3a7ad2136826a46c272c0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Jul 2013 21:20:58 +0100 Subject: [PATCH 36/43] Fixing /usr versus /usr/local dilemmas --- Makefile | 10 +++++++--- puppypackage/pybitmessage-0.3.4.pet.specs | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index adda5583..72a86ba2 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,11 @@ install: install -m 644 desktop/icon24.png ${DESTDIR}${PREFIX}/share/icons/hicolor/24x24/apps/${APP}.png cp -rf src/* ${DESTDIR}${PREFIX}/share/${APP} echo '#!/bin/sh' > ${DESTDIR}${PREFIX}/bin/${APP} - echo 'cd ${PREFIX}/share/pybitmessage' >> ${DESTDIR}${PREFIX}/bin/${APP} + echo 'if [ -d /usr/local/share/${APP} ]; then' >> ${DESTDIR}${PREFIX}/bin/${APP} + echo ' cd /usr/local/share/${APP}' >> ${DESTDIR}${PREFIX}/bin/${APP} + echo 'else' >> ${DESTDIR}${PREFIX}/bin/${APP} + echo ' cd /usr/share/pybitmessage' >> ${DESTDIR}${PREFIX}/bin/${APP} + echo 'fi' >> ${DESTDIR}${PREFIX}/bin/${APP} echo 'LD_LIBRARY_PATH="/opt/openssl-compat-bitcoin/lib/" exec python2 bitmessagemain.py' >> ${DESTDIR}${PREFIX}/bin/${APP} chmod +x ${DESTDIR}${PREFIX}/bin/${APP} uninstall: @@ -38,10 +42,10 @@ uninstall: rm -f ${PREFIX}/bin/${APP} rm -f ${PREFIX}/share/applications/${APP}.desktop rm -f ${PREFIX}/share/icons/hicolor/scalable/apps/${APP}.svg - ${PREFIX}/share/pixmaps/${APP}.svg + rm -f ${PREFIX}/share/pixmaps/${APP}.svg clean: rm -f ${APP} \#* \.#* gnuplot* *.png debian/*.substvars debian/*.log rm -fr deb.* debian/${APP} rpmpackage/${ARCH_TYPE} rm -f ../${APP}*.deb ../${APP}*.changes ../${APP}*.asc ../${APP}*.dsc rm -f rpmpackage/*.src.rpm archpackage/*.gz archpackage/*.xz - rm -f puppypackage/*.gz puppypackage/*.pet slackpackage/*.txz + rm -f puppypackage/*.gz puppypackage/*.pet slackpackage/*.txz diff --git a/puppypackage/pybitmessage-0.3.4.pet.specs b/puppypackage/pybitmessage-0.3.4.pet.specs index 4bcf119b..01e8ed0d 100644 --- a/puppypackage/pybitmessage-0.3.4.pet.specs +++ b/puppypackage/pybitmessage-0.3.4.pet.specs @@ -1 +1 @@ -pybitmessage-0.3.4-1|PyBitmessage|0.3.4|1|Internet;mailnews;|3.9M||pybitmessage-0.3.4-1.pet|+openssl,+python-qt4,+sqlite3,+sqlite3-dev,+python-openssl,+python-sip,+gst123|Send encrypted messages|ubuntu|precise|5| +pybitmessage-0.3.4-1|PyBitmessage|0.3.4|1|Internet;mailnews;|5.5M||pybitmessage-0.3.4-1.pet|+openssl,+python-qt4,+sqlite3,+sqlite3-dev,+python-openssl,+python-sip,+gst123|Send encrypted messages|ubuntu|precise|5| From 1e78685a987e4ec765deb3738f8c241f42356aa7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Jul 2013 21:31:55 +0100 Subject: [PATCH 37/43] Fixed missing repository --- debian/control | 2 +- ebuildpackage/pybitmessage-0.3.4-1.ebuild | 2 +- generate.sh | 2 +- puppypackage/pybitmessage-0.3.4.pet.specs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index b2ec3268..5e016a1c 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Maintainer: Bob Mottram (4096 bits) Build-Depends: debhelper (>= 9.0.0) Standards-Version: 3.9.4 Homepage: https://github.com/Bitmessage/PyBitmessage -Vcs-Git: https://github.com/fuzzgun/packagemonkey.git +Vcs-Git: https://github.com/Bitmessage/PyBitmessage.git Package: pybitmessage Section: mail diff --git a/ebuildpackage/pybitmessage-0.3.4-1.ebuild b/ebuildpackage/pybitmessage-0.3.4-1.ebuild index fba11f74..01eddc4f 100755 --- a/ebuildpackage/pybitmessage-0.3.4-1.ebuild +++ b/ebuildpackage/pybitmessage-0.3.4-1.ebuild @@ -9,7 +9,7 @@ PYTHON_REQ_USE="sqlite" REQUIRED_USE="${PYTHON_REQUIRED_USE}" DESCRIPTION="Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide "non-content" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." HOMEPAGE="https://github.com/Bitmessage/PyBitmessage" -EGIT_REPO_URI="https://github.com/fuzzgun/packagemonkey.git" +EGIT_REPO_URI="https://github.com/Bitmessage/PyBitmessage.git" LICENSE="MIT" SLOT="0" KEYWORDS="x86" diff --git a/generate.sh b/generate.sh index 7aa46e75..173e3c79 100755 --- a/generate.sh +++ b/generate.sh @@ -4,4 +4,4 @@ rm -f Makefile rpmpackage/*.spec -packagemonkey -n "PyBitmessage" --version "0.3.4" --dir "." -l "mit" -e "Bob Mottram (4096 bits) " --brief "Send encrypted messages" --desc "Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide \"non-content\" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." --homepage "https://github.com/Bitmessage/PyBitmessage" --section "mail" --categories "Office/Email" --dependsdeb "python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev, gst123" --dependsrpm "python, PyQt4, openssl-compat-bitcoin-libs, gst123" --mainscript "bitmessagemain.py" --librarypath "/opt/openssl-compat-bitcoin/lib/" --suggestsdeb "libmessaging-menu-dev" --dependspuppy "openssl, python-qt4, sqlite3, sqlite3-dev, python-openssl, python-sip, gst123" --dependsarch "python2, qt4, python2-pyqt4, sqlite, openssl, gst123" --suggestsarch "python2-gevent" --pythonversion 2 --dependsebuild "dev-libs/openssl, dev-python/PyQt4[${PYTHON_USEDEP}]" --buildebuild "\${PYTHON_DEPS}" --pythonreq "sqlite" +packagemonkey -n "PyBitmessage" --version "0.3.4" --dir "." -l "mit" -e "Bob Mottram (4096 bits) " --brief "Send encrypted messages" --desc "Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide \"non-content\" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." --homepage "https://github.com/Bitmessage/PyBitmessage" --section "mail" --categories "Office/Email" --dependsdeb "python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev, gst123" --dependsrpm "python, PyQt4, openssl-compat-bitcoin-libs, gst123" --mainscript "bitmessagemain.py" --librarypath "/opt/openssl-compat-bitcoin/lib/" --suggestsdeb "libmessaging-menu-dev" --dependspuppy "openssl, python-qt4, sqlite3, sqlite3-dev, python-openssl, python-sip, gst123" --dependsarch "python2, qt4, python2-pyqt4, sqlite, openssl, gst123" --suggestsarch "python2-gevent" --pythonversion 2 --dependsebuild "dev-libs/openssl, dev-python/PyQt4[${PYTHON_USEDEP}]" --buildebuild "\${PYTHON_DEPS}" --pythonreq "sqlite" --repository "https://github.com/Bitmessage/PyBitmessage.git" diff --git a/puppypackage/pybitmessage-0.3.4.pet.specs b/puppypackage/pybitmessage-0.3.4.pet.specs index 01e8ed0d..aac180a9 100644 --- a/puppypackage/pybitmessage-0.3.4.pet.specs +++ b/puppypackage/pybitmessage-0.3.4.pet.specs @@ -1 +1 @@ -pybitmessage-0.3.4-1|PyBitmessage|0.3.4|1|Internet;mailnews;|5.5M||pybitmessage-0.3.4-1.pet|+openssl,+python-qt4,+sqlite3,+sqlite3-dev,+python-openssl,+python-sip,+gst123|Send encrypted messages|ubuntu|precise|5| +pybitmessage-0.3.4-1|PyBitmessage|0.3.4|1|Internet;mailnews;|5.8M||pybitmessage-0.3.4-1.pet|+openssl,+python-qt4,+sqlite3,+sqlite3-dev,+python-openssl,+python-sip,+gst123|Send encrypted messages|ubuntu|precise|5| From a76939114ecf167ccefd6c5f5da3e4000c0e5d9e Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Tue, 23 Jul 2013 17:05:42 -0400 Subject: [PATCH 38/43] manual merge2 --- src/bitmessageqt/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 405ea1f8..3ee43370 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -30,12 +30,10 @@ import os from pyelliptic.openssl import OpenSSL import pickle import platform -<<<<<<< HEAD import debug from debug import logger -======= import subprocess ->>>>>>> 2af86c8296e0c577f8ac48a56e9a3582ddd87473 + try: from PyQt4 import QtCore, QtGui From f5e17eeeaa425f0a4a0c79e0305087b2b16ed44f Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 24 Jul 2013 00:29:30 -0400 Subject: [PATCH 39/43] Moved code to add the sockslisten config option to a spot where it will actually work properly --- src/bitmessageqt/__init__.py | 2 +- src/class_sqlThread.py | 3 +++ src/helper_startup.py | 6 ------ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index d624a11b..b105881a 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1885,7 +1885,7 @@ class MyForm(QtGui.QMainWindow): if shared.config.get('bitmessagesettings', 'socksproxytype') == 'none' and str(self.settingsDialogInstance.ui.comboBoxProxyType.currentText())[0:5] == 'SOCKS': if shared.statusIconColor != 'red': QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate( - "MainWindow", "Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections.")) + "MainWindow", "Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections (if any).")) if shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and str(self.settingsDialogInstance.ui.comboBoxProxyType.currentText()) == 'none': self.statusBar().showMessage('') shared.config.set('bitmessagesettings', 'socksproxytype', str( diff --git a/src/class_sqlThread.py b/src/class_sqlThread.py index f1a428d2..e07850e4 100644 --- a/src/class_sqlThread.py +++ b/src/class_sqlThread.py @@ -186,6 +186,9 @@ class sqlThread(threading.Thread): self.cur.execute( '''update sent set status='broadcastqueued' where status='broadcastpending' ''') self.conn.commit() + + if not shared.config.has_option('bitmessagesettings', 'sockslisten'): + shared.config.set('bitmessagesettings', 'sockslisten', 'false') try: testpayload = '\x00\x00' diff --git a/src/helper_startup.py b/src/helper_startup.py index 46150d4d..f3069658 100644 --- a/src/helper_startup.py +++ b/src/helper_startup.py @@ -80,9 +80,3 @@ def loadConfig(): os.umask(0o077) with open(shared.appdata + 'keys.dat', 'wb') as configfile: shared.config.write(configfile) - - # Initialize settings that may be missing due to upgrades and could - # cause errors if missing. - if not shared.config.has_option('bitmessagesettings', 'sockslisten'): - shared.config.set('bitmessagesettings', 'sockslisten', 'false') - From 79ecaf42854ecf2712a17abb555882b0e10d6396 Mon Sep 17 00:00:00 2001 From: gnumac Date: Wed, 24 Jul 2013 05:23:24 +0000 Subject: [PATCH 40/43] Added 'sqlite3' as to the includes when building for OS X --- src/build_osx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build_osx.py b/src/build_osx.py index aac551b9..ff33f6c1 100644 --- a/src/build_osx.py +++ b/src/build_osx.py @@ -21,7 +21,7 @@ if sys.platform == 'darwin': setup_requires=['py2app'], app=[mainscript], options=dict(py2app=dict(argv_emulation=True, - includes = ['PyQt4.QtCore','PyQt4.QtGui', 'sip'], + includes = ['PyQt4.QtCore','PyQt4.QtGui', 'sip', 'sqlite3'], packages = ['bitmessageqt'], frameworks = ['/usr/local/opt/openssl/lib/libcrypto.dylib'], iconfile='images/bitmessage.icns', From 350e8d66c755038d499a27325d26e038bdc22c85 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 24 Jul 2013 11:46:28 -0400 Subject: [PATCH 41/43] Prompt user to connect at first startup --- src/bitmessageqt/__init__.py | 28 ++++++++++++++++++++++++++-- src/class_outgoingSynSender.py | 3 ++- src/class_singleListener.py | 4 +++- src/helper_startup.py | 1 + 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 3ee43370..a7206c75 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -23,6 +23,7 @@ from settings import * from about import * from help import * from iconglossary import * +from connect import * import sys from time import strftime, localtime, gmtime import time @@ -424,6 +425,8 @@ class MyForm(QtGui.QMainWindow): self.rerenderComboBoxSendFrom() + + # Show or hide the application window after clicking an item within the # tray icon or, on Windows, the try icon itself. def appIndicatorShowOrHideWindow(self): @@ -1160,6 +1163,16 @@ class MyForm(QtGui.QMainWindow): "MainWindow", "Successfully joined chan. ")) self.ui.tabWidget.setCurrentIndex(3) + def showConnectDialog(self): + self.connectDialogInstance = connectDialog(self) + if self.connectDialogInstance.exec_(): + if self.connectDialogInstance.ui.radioButtonConnectNow.isChecked(): + shared.config.remove_option('bitmessagesettings', 'dontconnect') + with open(shared.appdata + 'keys.dat', 'wb') as configfile: + shared.config.write(configfile) + else: + self.click_actionSettings() + def openKeysFile(self): if 'linux' in sys.platform: subprocess.call(["xdg-open", shared.appdata + 'keys.dat']) @@ -1946,8 +1959,9 @@ class MyForm(QtGui.QMainWindow): shared.config.set('bitmessagesettings', 'startintray', str( self.settingsDialogInstance.ui.checkBoxStartInTray.isChecked())) if int(shared.config.get('bitmessagesettings', 'port')) != int(self.settingsDialogInstance.ui.lineEditTCPPort.text()): - QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate( - "MainWindow", "You must restart Bitmessage for the port number change to take effect.")) + if not shared.safeConfigGetBoolean('bitmessagesettings', 'dontconnect'): + QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate( + "MainWindow", "You must restart Bitmessage for the port number change to take effect.")) shared.config.set('bitmessagesettings', 'port', str( self.settingsDialogInstance.ui.lineEditTCPPort.text())) if shared.config.get('bitmessagesettings', 'socksproxytype') == 'none' and str(self.settingsDialogInstance.ui.comboBoxProxyType.currentText())[0:5] == 'SOCKS': @@ -2867,7 +2881,15 @@ class helpDialog(QtGui.QDialog): self.parent = parent self.ui.labelHelpURI.setOpenExternalLinks(True) QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self)) + +class connectDialog(QtGui.QDialog): + def __init__(self, parent): + QtGui.QWidget.__init__(self, parent) + self.ui = Ui_connectDialog() + self.ui.setupUi(self) + self.parent = parent + QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self)) class aboutDialog(QtGui.QDialog): @@ -3211,6 +3233,8 @@ def run(): myapp.appIndicatorInit(app) myapp.ubuntuMessagingMenuInit() myapp.notifierInit() + if shared.safeConfigGetBoolean('bitmessagesettings', 'dontconnect'): + myapp.showConnectDialog() # ask the user if we may connect if gevent is None: sys.exit(app.exec_()) else: diff --git a/src/class_outgoingSynSender.py b/src/class_outgoingSynSender.py index 5c21d72c..ac0b11ac 100644 --- a/src/class_outgoingSynSender.py +++ b/src/class_outgoingSynSender.py @@ -23,7 +23,8 @@ class outgoingSynSender(threading.Thread): self.selfInitiatedConnections = selfInitiatedConnections def run(self): - time.sleep(1) + while shared.safeConfigGetBoolean('bitmessagesettings', 'dontconnect'): + time.sleep(2) while True: while len(self.selfInitiatedConnections[self.streamNumber]) >= 8: # maximum number of outgoing connections = 8 time.sleep(10) diff --git a/src/class_singleListener.py b/src/class_singleListener.py index d6b46643..f339b2ba 100644 --- a/src/class_singleListener.py +++ b/src/class_singleListener.py @@ -26,7 +26,9 @@ class singleListener(threading.Thread): # proxy 'none' or configure SOCKS listening then this will start listening for # connections. while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and not shared.config.getboolean('bitmessagesettings', 'sockslisten'): - time.sleep(300) + time.sleep(10) + while shared.safeConfigGetBoolean('bitmessagesettings', 'dontconnect'): + time.sleep(1) with shared.printLock: print 'Listening for incoming connections.' diff --git a/src/helper_startup.py b/src/helper_startup.py index 46150d4d..3359a080 100644 --- a/src/helper_startup.py +++ b/src/helper_startup.py @@ -66,6 +66,7 @@ def loadConfig(): 'bitmessagesettings', 'maxacceptablenoncetrialsperbyte', '0') shared.config.set( 'bitmessagesettings', 'maxacceptablepayloadlengthextrabytes', '0') + shared.config.set('bitmessagesettings', 'dontconnect', 'true') if storeConfigFilesInSameDirectoryAsProgramByDefault: # Just use the same directory as the program and forget about From bfd2d35a573c0e314588ffbbf7dd4eaa0d5ab7e4 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 24 Jul 2013 11:49:48 -0400 Subject: [PATCH 42/43] add the connect.py file --- src/bitmessageqt/connect.py | 60 +++++++++++++++++++++ src/bitmessageqt/connect.ui | 101 ++++++++++++++++++++++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 src/bitmessageqt/connect.py create mode 100644 src/bitmessageqt/connect.ui diff --git a/src/bitmessageqt/connect.py b/src/bitmessageqt/connect.py new file mode 100644 index 00000000..de950cdb --- /dev/null +++ b/src/bitmessageqt/connect.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'connect.ui' +# +# Created: Wed Jul 24 10:41:58 2013 +# by: PyQt4 UI code generator 4.10 +# +# WARNING! All changes made in this file will be lost! + +from PyQt4 import QtCore, QtGui + +try: + _fromUtf8 = QtCore.QString.fromUtf8 +except AttributeError: + def _fromUtf8(s): + return s + +try: + _encoding = QtGui.QApplication.UnicodeUTF8 + def _translate(context, text, disambig): + return QtGui.QApplication.translate(context, text, disambig, _encoding) +except AttributeError: + def _translate(context, text, disambig): + return QtGui.QApplication.translate(context, text, disambig) + +class Ui_connectDialog(object): + def setupUi(self, connectDialog): + connectDialog.setObjectName(_fromUtf8("connectDialog")) + connectDialog.resize(400, 124) + self.gridLayout = QtGui.QGridLayout(connectDialog) + self.gridLayout.setObjectName(_fromUtf8("gridLayout")) + self.label = QtGui.QLabel(connectDialog) + self.label.setObjectName(_fromUtf8("label")) + self.gridLayout.addWidget(self.label, 0, 0, 1, 2) + self.radioButtonConnectNow = QtGui.QRadioButton(connectDialog) + self.radioButtonConnectNow.setChecked(True) + self.radioButtonConnectNow.setObjectName(_fromUtf8("radioButtonConnectNow")) + self.gridLayout.addWidget(self.radioButtonConnectNow, 1, 0, 1, 2) + self.radioButton = QtGui.QRadioButton(connectDialog) + self.radioButton.setObjectName(_fromUtf8("radioButton")) + self.gridLayout.addWidget(self.radioButton, 2, 0, 1, 2) + spacerItem = QtGui.QSpacerItem(185, 24, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.gridLayout.addItem(spacerItem, 3, 0, 1, 1) + self.buttonBox = QtGui.QDialogButtonBox(connectDialog) + self.buttonBox.setOrientation(QtCore.Qt.Horizontal) + self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok) + self.buttonBox.setObjectName(_fromUtf8("buttonBox")) + self.gridLayout.addWidget(self.buttonBox, 3, 1, 1, 1) + + self.retranslateUi(connectDialog) + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), connectDialog.accept) + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), connectDialog.reject) + QtCore.QMetaObject.connectSlotsByName(connectDialog) + + def retranslateUi(self, connectDialog): + connectDialog.setWindowTitle(_translate("connectDialog", "Dialog", None)) + self.label.setText(_translate("connectDialog", "Bitmessage won\'t connect to anyone until you let it. ", None)) + self.radioButtonConnectNow.setText(_translate("connectDialog", "Connect now", None)) + self.radioButton.setText(_translate("connectDialog", "Let me configure special network settings first", None)) + diff --git a/src/bitmessageqt/connect.ui b/src/bitmessageqt/connect.ui new file mode 100644 index 00000000..a5e390dd --- /dev/null +++ b/src/bitmessageqt/connect.ui @@ -0,0 +1,101 @@ + + + connectDialog + + + + 0 + 0 + 400 + 124 + + + + Dialog + + + + + + Bitmessage won't connect to anyone until you let it. + + + + + + + Connect now + + + true + + + + + + + Let me configure special network settings first + + + + + + + Qt::Horizontal + + + + 185 + 24 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + connectDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + connectDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + From c27494ace9decd24f47960b667c2a23272a0de6c Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 24 Jul 2013 12:43:51 -0400 Subject: [PATCH 43/43] Further work to implement the Connect dialog on startup --- src/bitmessagemain.py | 35 +++++++++++++-------------------- src/bitmessageqt/connect.py | 12 ++++++------ src/bitmessageqt/connect.ui | 4 ++-- src/class_singleListener.py | 8 +++++--- src/helper_bootstrap.py | 39 +++++++++++++++++-------------------- 5 files changed, 44 insertions(+), 54 deletions(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 15acf545..9f87e80e 100644 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -9,7 +9,7 @@ # The software version variable is now held in shared.py -#import ctypes +# import ctypes try: from gevent import monkey monkey.patch_all() @@ -36,7 +36,7 @@ import helper_bootstrap import sys if sys.platform == 'darwin': - if float( "{1}.{2}".format(*sys.version_info) ) < 7.5: + if float("{1}.{2}".format(*sys.version_info)) < 7.5: print "You should use python 2.7.5 or greater." print "Your version: {0}.{1}.{2}".format(*sys.version_info) sys.exit(0) @@ -56,8 +56,6 @@ def connectToStream(streamNumber): # This is one of several classes that constitute the API # This class was written by Vaibhav Bhatia. Modified by Jonathan Warren (Atheros). # http://code.activestate.com/recipes/501148-xmlrpc-serverclient-which-does-cookie-handling-and/ - - class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): def do_POST(self): @@ -342,7 +340,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): msgid, toAddress, fromAddress, subject, received, message, encodingtype = row subject = shared.fixPotentiallyInvalidUTF8Data(subject) message = shared.fixPotentiallyInvalidUTF8Data(message) - data += json.dumps({'msgid':msgid.encode('hex'),'toAddress':toAddress,'fromAddress':fromAddress,'subject':subject.encode('base64'),'message':message.encode('base64'),'encodingType':encodingtype,'receivedTime':received},indent=4, separators=(',', ': ')) + data += json.dumps({'msgid':msgid.encode('hex'), 'toAddress':toAddress, 'fromAddress':fromAddress, 'subject':subject.encode('base64'), 'message':message.encode('base64'), 'encodingType':encodingtype, 'receivedTime':received}, indent=4, separators=(',', ': ')) data += ']}' return data elif method == 'getAllSentMessages': @@ -358,7 +356,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): message = shared.fixPotentiallyInvalidUTF8Data(message) if len(data) > 25: data += ',' - data += json.dumps({'msgid':msgid.encode('hex'),'toAddress':toAddress,'fromAddress':fromAddress,'subject':subject.encode('base64'),'message':message.encode('base64'),'encodingType':encodingtype,'lastActionTime':lastactiontime,'status':status,'ackData':ackdata.encode('hex')},indent=4, separators=(',', ': ')) + data += json.dumps({'msgid':msgid.encode('hex'), 'toAddress':toAddress, 'fromAddress':fromAddress, 'subject':subject.encode('base64'), 'message':message.encode('base64'), 'encodingType':encodingtype, 'lastActionTime':lastactiontime, 'status':status, 'ackData':ackdata.encode('hex')}, indent=4, separators=(',', ': ')) data += ']}' return data elif method == 'getInboxMessagesByAddress': @@ -373,12 +371,12 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): shared.sqlLock.release() data = '{"inboxMessages":[' for row in queryreturn: - msgid, toAddress, fromAddress, subject, received, message, encodingtype= row + msgid, toAddress, fromAddress, subject, received, message, encodingtype = row subject = shared.fixPotentiallyInvalidUTF8Data(subject) message = shared.fixPotentiallyInvalidUTF8Data(message) if len(data) > 25: data += ',' - data += json.dumps({'msgid':msgid.encode('hex'),'toAddress':toAddress,'fromAddress':fromAddress,'subject':subject.encode('base64'),'message':message.encode('base64'),'encodingType':encodingtype,'receivedTime':received},indent=4, separators=(',', ': ')) + data += json.dumps({'msgid':msgid.encode('hex'), 'toAddress':toAddress, 'fromAddress':fromAddress, 'subject':subject.encode('base64'), 'message':message.encode('base64'), 'encodingType':encodingtype, 'receivedTime':received}, indent=4, separators=(',', ': ')) data += ']}' return data elif method == 'getSentMessageById': @@ -396,7 +394,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): msgid, toAddress, fromAddress, subject, lastactiontime, message, encodingtype, status, ackdata = row subject = shared.fixPotentiallyInvalidUTF8Data(subject) message = shared.fixPotentiallyInvalidUTF8Data(message) - data += json.dumps({'msgid':msgid.encode('hex'),'toAddress':toAddress,'fromAddress':fromAddress,'subject':subject.encode('base64'),'message':message.encode('base64'),'encodingType':encodingtype,'lastActionTime':lastactiontime,'status':status,'ackData':ackdata.encode('hex')},indent=4, separators=(',', ': ')) + data += json.dumps({'msgid':msgid.encode('hex'), 'toAddress':toAddress, 'fromAddress':fromAddress, 'subject':subject.encode('base64'), 'message':message.encode('base64'), 'encodingType':encodingtype, 'lastActionTime':lastactiontime, 'status':status, 'ackData':ackdata.encode('hex')}, indent=4, separators=(',', ': ')) data += ']}' return data elif method == 'getSentMessagesByAddress': @@ -416,7 +414,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): message = shared.fixPotentiallyInvalidUTF8Data(message) if len(data) > 25: data += ',' - data += json.dumps({'msgid':msgid.encode('hex'),'toAddress':toAddress,'fromAddress':fromAddress,'subject':subject.encode('base64'),'message':message.encode('base64'),'encodingType':encodingtype,'lastActionTime':lastactiontime,'status':status,'ackData':ackdata.encode('hex')},indent=4, separators=(',', ': ')) + data += json.dumps({'msgid':msgid.encode('hex'), 'toAddress':toAddress, 'fromAddress':fromAddress, 'subject':subject.encode('base64'), 'message':message.encode('base64'), 'encodingType':encodingtype, 'lastActionTime':lastactiontime, 'status':status, 'ackData':ackdata.encode('hex')}, indent=4, separators=(',', ': ')) data += ']}' return data elif method == 'getSentMessageByAckData': @@ -434,7 +432,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): msgid, toAddress, fromAddress, subject, lastactiontime, message, encodingtype, status, ackdata = row subject = shared.fixPotentiallyInvalidUTF8Data(subject) message = shared.fixPotentiallyInvalidUTF8Data(message) - data += json.dumps({'msgid':msgid.encode('hex'),'toAddress':toAddress,'fromAddress':fromAddress,'subject':subject.encode('base64'),'message':message.encode('base64'),'encodingType':encodingtype,'lastActionTime':lastactiontime,'status':status,'ackData':ackdata.encode('hex')},indent=4, separators=(',', ': ')) + data += json.dumps({'msgid':msgid.encode('hex'), 'toAddress':toAddress, 'fromAddress':fromAddress, 'subject':subject.encode('base64'), 'message':message.encode('base64'), 'encodingType':encodingtype, 'lastActionTime':lastactiontime, 'status':status, 'ackData':ackdata.encode('hex')}, indent=4, separators=(',', ': ')) data += ']}' return data elif (method == 'trashMessage') or (method == 'trashInboxMessage'): @@ -454,7 +452,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): shared.sqlReturnQueue.get() shared.sqlSubmitQueue.put('commit') shared.sqlLock.release() - #shared.UISignalQueue.put(('removeSentRowByMsgid',msgid)) This function doesn't exist yet. + # shared.UISignalQueue.put(('removeSentRowByMsgid',msgid)) This function doesn't exist yet. return 'Trashed sent message (assuming message existed).' elif method == 'sendMessage': if len(params) == 0: @@ -513,7 +511,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): return 'API Error 0014: Your fromAddress is disabled. Cannot send.' ackdata = OpenSSL.rand(32) - + t = ('', toAddress, toRipe, fromAddress, subject, message, ackdata, int( time.time()), 'msgqueued', 1, 1, 'sent', 2) helper_sent.insert(t) @@ -577,7 +575,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): toAddress = '[Broadcast subscribers]' ripe = '' - + t = ('', toAddress, ripe, fromAddress, subject, message, ackdata, int( time.time()), 'broadcastqueued', 1, 1, 'sent', 2) helper_sent.insert(t) @@ -719,7 +717,6 @@ if __name__ == "__main__": # signal.signal(signal.SIGINT, signal.SIG_DFL) helper_bootstrap.knownNodes() - helper_bootstrap.dns() # Start the address generation thread addressGeneratorThread = addressGenerator() addressGeneratorThread.daemon = True # close the main program even if there are threads left @@ -757,13 +754,6 @@ if __name__ == "__main__": singleAPIThread = singleAPI() singleAPIThread.daemon = True # close the main program even if there are threads left singleAPIThread.start() - # self.singleAPISignalHandlerThread = singleAPISignalHandler() - # self.singleAPISignalHandlerThread.start() - # QtCore.QObject.connect(self.singleAPISignalHandlerThread, QtCore.SIGNAL("updateStatusBar(PyQt_PyObject)"), self.updateStatusBar) - # QtCore.QObject.connect(self.singleAPISignalHandlerThread, QtCore.SIGNAL("passAddressGeneratorObjectThrough(PyQt_PyObject)"), self.connectObjectToAddressGeneratorSignals) - # QtCore.QObject.connect(self.singleAPISignalHandlerThread, - # QtCore.SIGNAL("displayNewSentMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), - # self.displayNewSentMessage) connectToStream(1) @@ -783,6 +773,7 @@ if __name__ == "__main__": import bitmessageqt bitmessageqt.run() else: + shared.config.remove_option('bitmessagesettings', 'dontconnect') with shared.printLock: print 'Running as a daemon. You can use Ctrl+C to exit.' diff --git a/src/bitmessageqt/connect.py b/src/bitmessageqt/connect.py index de950cdb..1e224afb 100644 --- a/src/bitmessageqt/connect.py +++ b/src/bitmessageqt/connect.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'connect.ui' # -# Created: Wed Jul 24 10:41:58 2013 +# Created: Wed Jul 24 12:42:01 2013 # by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! @@ -36,9 +36,9 @@ class Ui_connectDialog(object): self.radioButtonConnectNow.setChecked(True) self.radioButtonConnectNow.setObjectName(_fromUtf8("radioButtonConnectNow")) self.gridLayout.addWidget(self.radioButtonConnectNow, 1, 0, 1, 2) - self.radioButton = QtGui.QRadioButton(connectDialog) - self.radioButton.setObjectName(_fromUtf8("radioButton")) - self.gridLayout.addWidget(self.radioButton, 2, 0, 1, 2) + self.radioButtonConfigureNetwork = QtGui.QRadioButton(connectDialog) + self.radioButtonConfigureNetwork.setObjectName(_fromUtf8("radioButtonConfigureNetwork")) + self.gridLayout.addWidget(self.radioButtonConfigureNetwork, 2, 0, 1, 2) spacerItem = QtGui.QSpacerItem(185, 24, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem, 3, 0, 1, 1) self.buttonBox = QtGui.QDialogButtonBox(connectDialog) @@ -53,8 +53,8 @@ class Ui_connectDialog(object): QtCore.QMetaObject.connectSlotsByName(connectDialog) def retranslateUi(self, connectDialog): - connectDialog.setWindowTitle(_translate("connectDialog", "Dialog", None)) + connectDialog.setWindowTitle(_translate("connectDialog", "Bitmessage", None)) self.label.setText(_translate("connectDialog", "Bitmessage won\'t connect to anyone until you let it. ", None)) self.radioButtonConnectNow.setText(_translate("connectDialog", "Connect now", None)) - self.radioButton.setText(_translate("connectDialog", "Let me configure special network settings first", None)) + self.radioButtonConfigureNetwork.setText(_translate("connectDialog", "Let me configure special network settings first", None)) diff --git a/src/bitmessageqt/connect.ui b/src/bitmessageqt/connect.ui index a5e390dd..74173860 100644 --- a/src/bitmessageqt/connect.ui +++ b/src/bitmessageqt/connect.ui @@ -11,7 +11,7 @@ - Dialog + Bitmessage @@ -32,7 +32,7 @@ - + Let me configure special network settings first diff --git a/src/class_singleListener.py b/src/class_singleListener.py index f339b2ba..3890447a 100644 --- a/src/class_singleListener.py +++ b/src/class_singleListener.py @@ -3,6 +3,7 @@ import shared import socket from class_sendDataThread import * from class_receiveDataThread import * +import helper_bootstrap # Only one singleListener thread will ever exist. It creates the # receiveDataThread and sendDataThread for each incoming connection. Note @@ -21,14 +22,15 @@ class singleListener(threading.Thread): self.selfInitiatedConnections = selfInitiatedConnections def run(self): + while shared.safeConfigGetBoolean('bitmessagesettings', 'dontconnect'): + time.sleep(1) + helper_bootstrap.dns() # We typically don't want to accept incoming connections if the user is using a # SOCKS proxy, unless they have configured otherwise. If they eventually select # proxy 'none' or configure SOCKS listening then this will start listening for # connections. while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and not shared.config.getboolean('bitmessagesettings', 'sockslisten'): - time.sleep(10) - while shared.safeConfigGetBoolean('bitmessagesettings', 'dontconnect'): - time.sleep(1) + time.sleep(5) with shared.printLock: print 'Listening for incoming connections.' diff --git a/src/helper_bootstrap.py b/src/helper_bootstrap.py index c3d5c1fd..e0056342 100644 --- a/src/helper_bootstrap.py +++ b/src/helper_bootstrap.py @@ -12,14 +12,10 @@ def knownNodes(): shared.knownNodes = pickle.load(pickleFile) pickleFile.close() except: - defaultKnownNodes.createDefaultKnownNodes(shared.appdata) - pickleFile = open(shared.appdata + 'knownnodes.dat', 'rb') - shared.knownNodes = pickle.load(pickleFile) - pickleFile.close() + shared.knownNodes = defaultKnownNodes.createDefaultKnownNodes(shared.appdata) if shared.config.getint('bitmessagesettings', 'settingsversion') > 6: print 'Bitmessage cannot read future versions of the keys file (keys.dat). Run the newer version of Bitmessage.' raise SystemExit - def dns(): # DNS bootstrap. This could be programmed to use the SOCKS proxy to do the @@ -27,19 +23,20 @@ def dns(): # defaultKnownNodes.py. Hopefully either they are up to date or the user # has run Bitmessage recently without SOCKS turned on and received good # bootstrap nodes using that method. - if shared.config.get('bitmessagesettings', 'socksproxytype') == 'none': - try: - for item in socket.getaddrinfo('bootstrap8080.bitmessage.org', 80): - print 'Adding', item[4][0], 'to knownNodes based on DNS boostrap method' - shared.knownNodes[1][item[4][0]] = (8080, int(time.time())) - except: - print 'bootstrap8080.bitmessage.org DNS bootstrapping failed.' - try: - for item in socket.getaddrinfo('bootstrap8444.bitmessage.org', 80): - print 'Adding', item[4][0], 'to knownNodes based on DNS boostrap method' - shared.knownNodes[1][item[4][0]] = (8444, int(time.time())) - except: - print 'bootstrap8444.bitmessage.org DNS bootstrapping failed.' - else: - print 'DNS bootstrap skipped because SOCKS is used.' - + with shared.printLock: + if shared.config.get('bitmessagesettings', 'socksproxytype') == 'none': + try: + for item in socket.getaddrinfo('bootstrap8080.bitmessage.org', 80): + print 'Adding', item[4][0], 'to knownNodes based on DNS boostrap method' + shared.knownNodes[1][item[4][0]] = (8080, int(time.time())) + except: + print 'bootstrap8080.bitmessage.org DNS bootstrapping failed.' + try: + for item in socket.getaddrinfo('bootstrap8444.bitmessage.org', 80): + print 'Adding', item[4][0], 'to knownNodes based on DNS boostrap method' + shared.knownNodes[1][item[4][0]] = (8444, int(time.time())) + except: + print 'bootstrap8444.bitmessage.org DNS bootstrapping failed.' + else: + print 'DNS bootstrap skipped because SOCKS is used.' +