diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index e8bc6b58..d83c0fa4 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -626,6 +626,11 @@ class MyForm(QtGui.QMainWindow): if not withMessagingMenu: return + # if there are no items on the messaging menu then + # the subsequent query can be avoided + if not (self.mmapp.has_source("Subscriptions") or self.mmapp.has_source("Messages")): + return + shared.sqlLock.acquire() shared.sqlSubmitQueue.put('''SELECT toaddress, read FROM inbox WHERE msgid=?''') shared.sqlSubmitQueue.put(inventoryHash) @@ -909,7 +914,7 @@ class MyForm(QtGui.QMainWindow): shared.statusIconColor = 'red' # if the connection is lost then show a notification if self.connected: - self.notifierShow('Bitmessage','Connection lost') + self.notifierShow('PyBitmessage','Connection lost') self.connected = False if self.actionStatus != None: @@ -923,7 +928,7 @@ class MyForm(QtGui.QMainWindow): shared.statusIconColor = 'yellow' # if a new connection has been established then show a notification if not self.connected: - self.notifierShow('Bitmessage','Connected') + self.notifierShow('PyBitmessage','Connected') self.connected = True if self.actionStatus != None: @@ -934,8 +939,6 @@ class MyForm(QtGui.QMainWindow): self.statusBar().showMessage('') self.ui.pushButtonStatusIcon.setIcon(QIcon(":/newPrefix/images/greenicon.png")) shared.statusIconColor = 'green' - if not self.connected: - self.notifierShow('Bitmessage','Connected') self.connected = True if self.actionStatus != None: diff --git a/src/pyelliptic/openssl.py b/src/pyelliptic/openssl.py index 59a0d324..6a7dedbc 100644 --- a/src/pyelliptic/openssl.py +++ b/src/pyelliptic/openssl.py @@ -415,21 +415,17 @@ except: OpenSSL = _OpenSSL('libcrypto.dylib') except: try: - # try homebrew installation - OpenSSL = _OpenSSL('/usr/local/opt/openssl/lib/libcrypto.dylib') + from os import path + lib_path = path.join(sys._MEIPASS, "libeay32.dll") + OpenSSL = _OpenSSL(lib_path) except: - try: - from os import path - lib_path = path.join(sys._MEIPASS, "libeay32.dll") - OpenSSL = _OpenSSL(lib_path) - except: - if 'linux' in sys.platform or 'darwin' in sys.platform: - try: - from ctypes.util import find_library - OpenSSL = _OpenSSL(find_library('ssl')) - except Exception, err: - sys.stderr.write('(On Linux) Couldn\'t find and load the OpenSSL library. You must install it. If you believe that you already have it installed, this exception information might be of use:\n') - from ctypes.util import find_library - OpenSSL = _OpenSSL(find_library('ssl')) - else: - raise Exception("Couldn't find and load the OpenSSL library. You must install it.") + if 'linux' in sys.platform or 'darwin' in sys.platform: + try: + from ctypes.util import find_library + OpenSSL = _OpenSSL(find_library('ssl')) + except Exception, err: + sys.stderr.write('(On Linux) Couldn\'t find and load the OpenSSL library. You must install it. If you believe that you already have it installed, this exception information might be of use:\n') + from ctypes.util import find_library + OpenSSL = _OpenSSL(find_library('ssl')) + else: + raise Exception("Couldn't find and load the OpenSSL library. You must install it.")