From f6b9c234f70695ccbdb0e5d1c03e284555ba7c38 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Sat, 5 Oct 2013 12:23:34 -0400 Subject: [PATCH 1/3] pull translations properly when running from Windows EXE --- src/bitmessageqt/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 2bd2bb6b..768e681b 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -3234,7 +3234,10 @@ def run(): locale_lang = locale_countrycode[0:2] user_countrycode = str(shared.config.get('bitmessagesettings', 'userlocale')) user_lang = user_countrycode[0:2] - translation_path = "translations/bitmessage_" + try: + translation_path = os.path.join(sys._MEIPASS, "translations/bitmessage_") + except Exception, e: + translation_path = "translations/bitmessage_" if shared.config.get('bitmessagesettings', 'userlocale') == 'system': # try to detect the users locale otherwise fallback to English From a20711c2abab2694ee43bddea878538ceccaf988 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Sat, 5 Oct 2013 13:39:53 -0400 Subject: [PATCH 2/3] Fix whitelist functionality --- src/class_receiveDataThread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class_receiveDataThread.py b/src/class_receiveDataThread.py index 59597711..b1a62261 100644 --- a/src/class_receiveDataThread.py +++ b/src/class_receiveDataThread.py @@ -1120,7 +1120,7 @@ class receiveDataThread(threading.Thread): else: # We're using a whitelist queryreturn = sqlQuery( '''SELECT label FROM whitelist where address=? and enabled='1' ''', - toAddress) + fromAddress) if queryreturn == []: print 'Message ignored because address not in whitelist.' blockMessage = True From 6787e4b932ff95fdc932445c6ea4f4a9dd72e531 Mon Sep 17 00:00:00 2001 From: John Kozan Date: Sun, 6 Oct 2013 22:04:09 -0600 Subject: [PATCH 3/3] == should be = --- src/bitmessagemain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 90e02cc1..ef2a2ddd 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -643,7 +643,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): raise APIError(0, 'I need parameters!') if len(params) == 1: address, = params - label == '' + label = '' if len(params) == 2: address, label = params label = self._decode(label, "base64")