shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(encryptedData[readPosition:],_translate("MainWindow",'Acknowledgement of the message received. %1').arg(unicode(
@ -4654,6 +4645,18 @@ class singleAPI(threading.Thread):
se.register_introspection_functions()
se.serve_forever()
# This is used so that the _translate function can be used when we are in daemon mode and not using any QT functions.
classtranslateClass:
def__init__(self,context,text):
self.context=context
self.text=text
defarg(self,argument):
if'%'inself.text:
returntranslateClass(self.context,self.text.replace('%','',1))# This doesn't actually do anything with the arguments because we don't have a UI in which to display this information anyway.
else:
returnself.text
selfInitiatedConnections={}
# This is a list of current connections (the thread pointers at least)
alreadyAttemptedConnectionsList={
@ -4867,19 +4870,34 @@ if __name__ == "__main__":
try:
fromPyQt4.QtCoreimport*
fromPyQt4.QtGuiimport*
fromPyQt4importQtCore,QtGui
exceptExceptionaserr:
print'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download PyQt from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\'. If you want to run in daemon mode, see https://bitmessage.org/wiki/Daemon'
print'Error message:',err
os._exit(0)
try:
_encoding=QtGui.QApplication.UnicodeUTF8
def_translate(context,text):# A non-QT version of _translate is defined below.
returnQtGui.QApplication.translate(context,text)
exceptExceptionaserr:
print'Error:',err
importbitmessageqt
bitmessageqt.run()
else:
def_translate(context,text):# A QT version of _translate is defined above.
print'PyBitmessage requires PyQt. You can download it from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\' (without quotes).'
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
sys.exit()
@ -1122,9 +1122,9 @@ class MyForm(QtGui.QMainWindow):