V0.6 #852

Merged
Atheros1 merged 399 commits from v0.6 into master 2016-05-03 01:58:38 +02:00
3 changed files with 13 additions and 16 deletions
Showing only changes of commit 25cc1dc287 - Show all commits

View File

@ -67,13 +67,7 @@ def _translate(context, text):
def change_translation(locale):
global qtranslator
qtranslator = QtCore.QTranslator()
if shared.frozen == "macosx_app":
translationpath = os.environ.get("RESOURCEPATH")
elif shared.frozen: # windows
translationpath = sys._MEIPASS
else:
translationpath = os.path.dirname(os.path.dirname(__file__))
translationpath = os.path.join (translationpath, 'translations', 'bitmessage_' + locale)
translationpath = os.path.join (shared.codePath(), 'translations', 'bitmessage_' + locale)
qtranslator.load(translationpath)
QtGui.QApplication.installTranslator(qtranslator)

View File

@ -4,18 +4,12 @@
import hashlib
from struct import unpack, pack
import sys
from shared import config, frozen
from shared import config, frozen, codePath
import shared
import openclpow
import os
import ctypes
if frozen == "macosx_app":
curdir = os.environ.get("RESOURCEPATH")
elif frozen: # windows
curdir = sys._MEIPASS
else:
curdir = os.path.dirname(__file__)
bitmsglib = 'bitmsghash.so'
if "win32" == sys.platform:
if ctypes.sizeof(ctypes.c_voidp) == 4:
@ -23,12 +17,12 @@ if "win32" == sys.platform:
else:
bitmsglib = 'bitmsghash64.dll'
try:
bso = ctypes.WinDLL(os.path.join(curdir, "bitmsghash", bitmsglib))
bso = ctypes.WinDLL(os.path.join(codePath(), "bitmsghash", bitmsglib))
except:
bso = None
else:
try:
bso = ctypes.CDLL(os.path.join(curdir, "bitmsghash", bitmsglib))
bso = ctypes.CDLL(os.path.join(codePath(), "bitmsghash", bitmsglib))
except:
bso = None
if bso:

View File

@ -218,6 +218,15 @@ def lookupAppdataFolder():
dataFolder = dataFolder + '/'
return dataFolder
def codePath():
if frozen == "macosx_app":
codePath = os.environ.get("RESOURCEPATH")
elif frozen: # windows
codePath = sys._MEIPASS
else:
codePath = os.path.dirname(__file__)
return codePath
def isAddressInMyAddressBook(address):
queryreturn = sqlQuery(
'''select address from addressbook where address=?''',