From 98aacd16ffb9ecc29ca21ecede475aee4a41da28 Mon Sep 17 00:00:00 2001 From: nimda Date: Thu, 13 Jun 2013 21:55:38 -0400 Subject: [PATCH 01/12] Subscribe to an address in the addressbook --- src/bitmessageqt/__init__.py | 67 ++++++++++++++++++++++-------------- src/shared.py | 11 +++++- 2 files changed, 52 insertions(+), 26 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 195403ea..f37e3b34 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -139,6 +139,7 @@ class MyForm(QtGui.QMainWindow): # Actions self.actionAddressBookSend = self.ui.addressBookContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Send message to this address"), self.on_action_AddressBookSend) self.actionAddressBookClipboard = self.ui.addressBookContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Copy address to clipboard"), self.on_action_AddressBookClipboard) + self.actionAddressBookSubscribe = self.ui.addressBookContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Subscribe to this address"), self.on_action_AddressBookSubscribe) self.actionAddressBookNew = self.ui.addressBookContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Add New Address"), self.on_action_AddressBookNew) self.actionAddressBookDelete = self.ui.addressBookContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Delete"), self.on_action_AddressBookDelete) self.ui.tableWidgetAddressBook.setContextMenuPolicy( QtCore.Qt.CustomContextMenu ) @@ -146,6 +147,7 @@ class MyForm(QtGui.QMainWindow): self.popMenuAddressBook = QtGui.QMenu( self ) self.popMenuAddressBook.addAction( self.actionAddressBookSend ) self.popMenuAddressBook.addAction( self.actionAddressBookClipboard ) + self.popMenuAddressBook.addAction( self.actionAddressBookSubscribe ) self.popMenuAddressBook.addSeparator() self.popMenuAddressBook.addAction( self.actionAddressBookNew ) self.popMenuAddressBook.addAction( self.actionAddressBookDelete ) @@ -1380,37 +1382,41 @@ class MyForm(QtGui.QMainWindow): self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want.")) else: self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "The address you entered was invalid. Ignoring it.")) + def addSubscription(self, label, address): + 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): + return + #Add to UI list + self.ui.tableWidgetSubscriptions.setSortingEnabled(False) + self.ui.tableWidgetSubscriptions.insertRow(0) + newItem = QtGui.QTableWidgetItem(unicode(label, 'utf-8')) + self.ui.tableWidgetSubscriptions.setItem(0,0,newItem) + newItem = QtGui.QTableWidgetItem(address) + newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled ) + self.ui.tableWidgetSubscriptions.setItem(0,1,newItem) + self.ui.tableWidgetSubscriptions.setSortingEnabled(True) + #Add to database (perhaps this should be separated from the MyForm class) + t = (str(label),address,True) + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put('''INSERT INTO subscriptions VALUES (?,?,?)''') + shared.sqlSubmitQueue.put(t) + queryreturn = shared.sqlReturnQueue.get() + shared.sqlSubmitQueue.put('commit') + shared.sqlLock.release() + self.rerenderInboxFromLabels() + shared.reloadBroadcastSendersForWhichImWatching() def click_pushButtonAddSubscription(self): self.NewSubscriptionDialogInstance = NewSubscriptionDialog(self) if self.NewSubscriptionDialogInstance.exec_(): if self.NewSubscriptionDialogInstance.ui.labelSubscriptionAddressCheck.text() == 'Address is valid.': - #First we must check to see if the address is already in the subscriptions list. 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 subscriptions where address=?''') - shared.sqlSubmitQueue.put(t) - queryreturn = shared.sqlReturnQueue.get() - shared.sqlLock.release() - if queryreturn == []: - self.ui.tableWidgetSubscriptions.setSortingEnabled(False) - self.ui.tableWidgetSubscriptions.insertRow(0) - newItem = QtGui.QTableWidgetItem(unicode(self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8(),'utf-8')) - self.ui.tableWidgetSubscriptions.setItem(0,0,newItem) - newItem = QtGui.QTableWidgetItem(addBMIfNotPresent(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())) - newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled ) - self.ui.tableWidgetSubscriptions.setItem(0,1,newItem) - self.ui.tableWidgetSubscriptions.setSortingEnabled(True) - t = (str(self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8()),addBMIfNotPresent(str(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())),True) - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put('''INSERT INTO subscriptions VALUES (?,?,?)''') - shared.sqlSubmitQueue.put(t) - queryreturn = shared.sqlReturnQueue.get() - shared.sqlSubmitQueue.put('commit') - shared.sqlLock.release() - self.rerenderInboxFromLabels() - shared.reloadBroadcastSendersForWhichImWatching() + address = str(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text()) + #We must check to see if the address is already in the subscriptions list. The user cannot add it again or else it will cause problems when updating and deleting the entry. + if not shared.isAddressInMySubscriptionsList(address): + label = self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8() + self.addSubscription(label, address) else: 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.")) else: @@ -1880,6 +1886,17 @@ class MyForm(QtGui.QMainWindow): else: self.statusBar().showMessage('') self.ui.tabWidget.setCurrentIndex(1) + def on_action_AddressBookSubscribe(self): + listOfSelectedRows = {} + for i in range(len(self.ui.tableWidgetAddressBook.selectedIndexes())): + listOfSelectedRows[self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0 + for currentRow in listOfSelectedRows: + addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,1).text() + # Then subscribe to it... provided it's not already in the address book + if shared.isAddressInMySubscriptionsList(addressAtCurrentRow): + continue # maybe set the status bar or something + labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,0).text() + self.addSubscription(labelAtCurrentRow, addressAtCurrentRow) def on_context_menuAddressBook(self, point): self.popMenuAddressBook.exec_( self.ui.tableWidgetAddressBook.mapToGlobal(point) ) diff --git a/src/shared.py b/src/shared.py index d91c99c1..111016a0 100644 --- a/src/shared.py +++ b/src/shared.py @@ -59,6 +59,15 @@ def isAddressInMyAddressBook(address): sqlLock.release() return queryreturn != [] +#At this point we should really just have a isAddressInMy(book, address)... +def isAddressInMySubscriptionsList(address): + t = (addBMIfNotPresent(address),) + sqlLock.acquire() + sqlSubmitQueue.put('''select * from subscriptions where address=?''') + sqlSubmitQueue.put(t) + queryreturn = sqlReturnQueue.get() + sqlLock.release() + return queryreturn != [] def isAddressInMyAddressBookSubscriptionsListOrWhitelist(address): if isAddressInMyAddressBook(address): return True @@ -185,7 +194,7 @@ def doCleanShutdown(): printLock.release() os._exit(0) -#Wen 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' for q in sendDataQueues: From 5b6a3d419ebb3891c02bf91f88a6ac1c6189546c Mon Sep 17 00:00:00 2001 From: nimda Date: Thu, 13 Jun 2013 22:03:03 -0400 Subject: [PATCH 02/12] cleanup --- src/shared.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shared.py b/src/shared.py index 111016a0..f945b168 100644 --- a/src/shared.py +++ b/src/shared.py @@ -51,7 +51,7 @@ def lookupAppdataFolder(): return dataFolder def isAddressInMyAddressBook(address): - t = (address,) + t = (addBMIfNotPresent(address,) sqlLock.acquire() sqlSubmitQueue.put('''select address from addressbook where address=?''') sqlSubmitQueue.put(t) @@ -68,6 +68,7 @@ def isAddressInMySubscriptionsList(address): queryreturn = sqlReturnQueue.get() sqlLock.release() return queryreturn != [] + def isAddressInMyAddressBookSubscriptionsListOrWhitelist(address): if isAddressInMyAddressBook(address): return True @@ -219,4 +220,4 @@ def fixPotentiallyInvalidUTF8Data(text): return text except: output = 'Part of the message is corrupt. The message cannot be displayed the normal way.\n\n' + repr(text) - return output \ No newline at end of file + return output From 3539160bd4c5050fcbcf66b2178f1c41dcf929f8 Mon Sep 17 00:00:00 2001 From: nimda Date: Thu, 13 Jun 2013 22:07:19 -0400 Subject: [PATCH 03/12] I can't believe I forgot that bracket. --- src/shared.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared.py b/src/shared.py index f945b168..a5867026 100644 --- a/src/shared.py +++ b/src/shared.py @@ -51,7 +51,7 @@ def lookupAppdataFolder(): return dataFolder def isAddressInMyAddressBook(address): - t = (addBMIfNotPresent(address,) + t = (addBMIfNotPresent(address,)) sqlLock.acquire() sqlSubmitQueue.put('''select address from addressbook where address=?''') sqlSubmitQueue.put(t) From 06ca8625f500009c77768a3a12f4495bdaa5a29f Mon Sep 17 00:00:00 2001 From: nimda Date: Thu, 13 Jun 2013 22:16:37 -0400 Subject: [PATCH 04/12] try to fix SQL error --- src/shared.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared.py b/src/shared.py index a5867026..8c6a834c 100644 --- a/src/shared.py +++ b/src/shared.py @@ -51,7 +51,7 @@ def lookupAppdataFolder(): return dataFolder def isAddressInMyAddressBook(address): - t = (addBMIfNotPresent(address,)) + t = (address,) sqlLock.acquire() sqlSubmitQueue.put('''select address from addressbook where address=?''') sqlSubmitQueue.put(t) @@ -61,7 +61,7 @@ def isAddressInMyAddressBook(address): #At this point we should really just have a isAddressInMy(book, address)... def isAddressInMySubscriptionsList(address): - t = (addBMIfNotPresent(address),) + t = (address,) sqlLock.acquire() sqlSubmitQueue.put('''select * from subscriptions where address=?''') sqlSubmitQueue.put(t) From f264c22ffb5d6bd15e9f05d4e2100841fd0a172e Mon Sep 17 00:00:00 2001 From: nimda Date: Thu, 13 Jun 2013 22:27:14 -0400 Subject: [PATCH 05/12] actually fix SQL error, add status bar message. --- src/shared.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared.py b/src/shared.py index 8c6a834c..256008c1 100644 --- a/src/shared.py +++ b/src/shared.py @@ -61,7 +61,7 @@ def isAddressInMyAddressBook(address): #At this point we should really just have a isAddressInMy(book, address)... def isAddressInMySubscriptionsList(address): - t = (address,) + t = (str(address),) # As opposed to Qt str sqlLock.acquire() sqlSubmitQueue.put('''select * from subscriptions where address=?''') sqlSubmitQueue.put(t) From e7378cffccbb4fe998be249a16f4f26c02110c70 Mon Sep 17 00:00:00 2001 From: nimda Date: Thu, 13 Jun 2013 22:27:52 -0400 Subject: [PATCH 06/12] actually add status bar message. --- src/bitmessageqt/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index f37e3b34..d6916059 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1382,6 +1382,7 @@ class MyForm(QtGui.QMainWindow): self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want.")) else: self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "The address you entered was invalid. Ignoring it.")) + def addSubscription(self, label, address): address = addBMIfNotPresent(address) #This should be handled outside of this function, for error displaying and such, but it must also be checked here. @@ -1894,7 +1895,8 @@ class MyForm(QtGui.QMainWindow): addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,1).text() # Then subscribe to it... provided it's not already in the address book if shared.isAddressInMySubscriptionsList(addressAtCurrentRow): - continue # maybe set the status bar or something + 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() self.addSubscription(labelAtCurrentRow, addressAtCurrentRow) def on_context_menuAddressBook(self, point): From e6beeedea1f0c7e394f39b85624786cd4d6b5246 Mon Sep 17 00:00:00 2001 From: nimda Date: Thu, 13 Jun 2013 22:28:33 -0400 Subject: [PATCH 07/12] str() for luck --- src/bitmessageqt/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index d6916059..90a9aba0 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1892,12 +1892,12 @@ class MyForm(QtGui.QMainWindow): for i in range(len(self.ui.tableWidgetAddressBook.selectedIndexes())): listOfSelectedRows[self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0 for currentRow in listOfSelectedRows: - addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,1).text() + addressAtCurrentRow = str(self.ui.tableWidgetAddressBook.item(currentRow,1).text()) # Then subscribe to it... provided it's not already in the address book if shared.isAddressInMySubscriptionsList(addressAtCurrentRow): 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() + labelAtCurrentRow = str(self.ui.tableWidgetAddressBook.item(currentRow,0).text()) self.addSubscription(labelAtCurrentRow, addressAtCurrentRow) def on_context_menuAddressBook(self, point): self.popMenuAddressBook.exec_( self.ui.tableWidgetAddressBook.mapToGlobal(point) ) From e3bb756ea30fea6342a0f65ed46e262dcce22b75 Mon Sep 17 00:00:00 2001 From: Maran Date: Sat, 15 Jun 2013 21:07:22 +0200 Subject: [PATCH 08/12] Added OS X DS_Store files to git ignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 36fbec0d..f1e78ac6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ **pyc -**dat \ No newline at end of file +**dat +**.DS_Store From 1f622103ad15648a84e957b65b2a59437967b94c Mon Sep 17 00:00:00 2001 From: Maran Date: Sat, 15 Jun 2013 21:08:41 +0200 Subject: [PATCH 09/12] Added OS X Build directories to ignore file --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index f1e78ac6..acfa0ca1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ **pyc **dat **.DS_Store +src/build +src/dist From 3475000902d423a12afd6b59a70ef149ccebd9bf Mon Sep 17 00:00:00 2001 From: Maran Date: Sat, 15 Jun 2013 21:09:15 +0200 Subject: [PATCH 10/12] Added OS X Build scripts --- osx.sh | 23 ++++++++++++ src/build_osx.py | 71 +++++++++++++++++++++++++++++++++++++ src/images/bitmessage.icns | Bin 0 -> 39467 bytes 3 files changed, 94 insertions(+) create mode 100755 osx.sh create mode 100644 src/build_osx.py create mode 100644 src/images/bitmessage.icns diff --git a/osx.sh b/osx.sh new file mode 100755 index 00000000..ca05ffde --- /dev/null +++ b/osx.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# OS X Build script wrapper around the py2app script. +# These build can only be generated on OS X. +# Requires all build dependencies for Bitmessage + +export ARCHFLAGS="-arch i386 -arch x86_64" + +if [[ -z "$1" ]]; then + echo "Please supply a version number for this release as the first argument." + exit +fi + +echo "Creating OS X packages for Bitmessage. This script will ask for sudo to create the dmg volume" + +cd src && python build_osx.py py2app + +if [[ $? = "0" ]]; then + sudo hdiutil create -fs HFS+ -volname "Bitmessage" -srcfolder dist/Bitmessage.app dist/bitmessage-v$1.dmg +else + echo "Problem creating Bitmessage.app, stopping." + exit +fi diff --git a/src/build_osx.py b/src/build_osx.py new file mode 100644 index 00000000..ded1be4a --- /dev/null +++ b/src/build_osx.py @@ -0,0 +1,71 @@ +""" +py2app/py2exe build script for Bitmessage + +Usage (Mac OS X): + python setup.py py2app + +Usage (Windows): + python setup.py py2exe +""" + +import sys, os, shutil, re +from setuptools import setup + + +name = "Bitmessage" +mainscript = 'bitmessagemain.py' +version = "0.3.3" + +if sys.platform == 'darwin': + extra_options = dict( + setup_requires=['py2app'], + app=[mainscript], + options=dict(py2app=dict(argv_emulation=True, + includes = ['PyQt4.QtCore','PyQt4.QtGui', 'sip', 'sqlite'], + packages = ['bitmessageqt'], + iconfile='images/bitmessage.icns', + resources=["images"])), + ) +elif sys.platform == 'win32': + extra_options = dict( + setup_requires=['py2exe'], + app=[mainscript], + ) +else: + extra_options = dict( + # Normally unix-like platforms will use "setup.py install" + # and install the main script as such + scripts=[mainscript], + ) + +setup( + name = name, + version = version, + **extra_options +) +from distutils import dir_util + +if sys.platform == 'darwin': + resource = "dist/" + name + ".app/Contents/Resources/" + + # Try to locate qt_menu + # Let's try the port version first! + if os.path.isfile("/opt/local/lib/Resources/qt_menu.nib"): + qt_menu_location = "/opt/local/lib/Resources/qt_menu.nib" + else: + # No dice? Then let's try the brew version + qt_menu_location = os.popen("find /usr/local/Cellar -name qt_menu.nib | tail -n 1").read() + qt_menu_location = re.sub('\n','', qt_menu_location) + + if(len(qt_menu_location) == 0): + print "Sorry couldn't find your qt_menu.nib this probably won't work" + else: + print "Found your qib: " + qt_menu_location + + # Need to include a copy of qt_menu.nib + shutil.copytree(qt_menu_location, resource + "qt_menu.nib") + # Need to touch qt.conf to avoid loading 2 sets of Qt libraries + fname = resource + "qt.conf" + with file(fname, 'a'): + os.utime(fname, None) + diff --git a/src/images/bitmessage.icns b/src/images/bitmessage.icns new file mode 100644 index 0000000000000000000000000000000000000000..a796f9d46a94f3562bf5a283857c7d943d3c78e4 GIT binary patch literal 39467 zcmeIa2b5jamFF$H2?m3~2HO}L+v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literal 0 HcmV?d00001 From 5e66e81ab7ef5c15be162575ff261f0891fb3de3 Mon Sep 17 00:00:00 2001 From: Maran Date: Mon, 17 Jun 2013 00:25:03 +0200 Subject: [PATCH 11/12] Make sure libcrypto from brew is linked. In the resulting .app --- osx.sh | 1 + src/build_osx.py | 11 ++++++++++- src/pyelliptic/openssl.py | 30 +++++++++++++++++------------- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/osx.sh b/osx.sh index ca05ffde..e5d2e371 100755 --- a/osx.sh +++ b/osx.sh @@ -3,6 +3,7 @@ # OS X Build script wrapper around the py2app script. # These build can only be generated on OS X. # Requires all build dependencies for Bitmessage +# Especially important is openssl installed through brew export ARCHFLAGS="-arch i386 -arch x86_64" diff --git a/src/build_osx.py b/src/build_osx.py index ded1be4a..de08da4c 100644 --- a/src/build_osx.py +++ b/src/build_osx.py @@ -21,8 +21,9 @@ if sys.platform == 'darwin': setup_requires=['py2app'], app=[mainscript], options=dict(py2app=dict(argv_emulation=True, - includes = ['PyQt4.QtCore','PyQt4.QtGui', 'sip', 'sqlite'], + includes = ['PyQt4.QtCore','PyQt4.QtGui', 'sip'], packages = ['bitmessageqt'], + frameworks = ['/usr/local/opt/openssl/lib/libcrypto.dylib'], iconfile='images/bitmessage.icns', resources=["images"])), ) @@ -44,9 +45,17 @@ setup( **extra_options ) from distutils import dir_util +import glob if sys.platform == 'darwin': resource = "dist/" + name + ".app/Contents/Resources/" + framework = "dist/" + name + ".app/Contents/Frameworks/" + + # The pyElliptive module only works with hardcoded libcrypto paths so rename it so it can actually find it. + libs = glob.glob(framework + "libcrypto*.dylib") + for lib in libs: + os.rename(lib, framework + "libcrypto.dylib") + break # Try to locate qt_menu # Let's try the port version first! diff --git a/src/pyelliptic/openssl.py b/src/pyelliptic/openssl.py index 59a0d324..de073fab 100644 --- a/src/pyelliptic/openssl.py +++ b/src/pyelliptic/openssl.py @@ -419,17 +419,21 @@ except: OpenSSL = _OpenSSL('/usr/local/opt/openssl/lib/libcrypto.dylib') except: try: - from os import path - lib_path = path.join(sys._MEIPASS, "libeay32.dll") - OpenSSL = _OpenSSL(lib_path) + # Load it from an Bitmessage.app on OSX + OpenSSL = _OpenSSL('./../Frameworks/libcrypto.dylib') 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.") + 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.") From 69267fb6feca16cc02da34cc24392a3b48092cbc Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 19 Jun 2013 13:10:43 -0400 Subject: [PATCH 12/12] Fix issue #212 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 0e6f50af..28c33adf 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -2248,7 +2248,7 @@ class MyForm(QtGui.QMainWindow): if shared.isAddressInMySubscriptionsList(addressAtCurrentRow): 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 = str(self.ui.tableWidgetAddressBook.item(currentRow,0).text()) + labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,0).text().toUtf8() self.addSubscription(labelAtCurrentRow, addressAtCurrentRow) self.ui.tabWidget.setCurrentIndex(4)