commit
113745a3a7
3
COPYING
3
COPYING
|
@ -1,4 +1,5 @@
|
|||
Copyright (c) 2012 Jonathan Warren
|
||||
Copyright (c) 2012-2013 Jonathan Warren
|
||||
Copyright (c) 2013 The Bitmessage Developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
3
LICENSE
3
LICENSE
|
@ -1,5 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
Copyright (c) 2013 Bitmessage
|
||||
Copyright (c) 2012-2013 Jonathan Warren
|
||||
Copyright (c) 2013 The Bitmessage Developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
|
|
@ -1218,7 +1218,14 @@ class MyForm(QtGui.QMainWindow):
|
|||
if withMessagingMenu:
|
||||
n = Notify.Notification.new(
|
||||
title, subtitle, 'notification-message-email')
|
||||
n.show()
|
||||
try:
|
||||
n.show()
|
||||
except:
|
||||
# n.show() has been known to throw this exception:
|
||||
# gi._glib.GError: GDBus.Error:org.freedesktop.Notifications.
|
||||
# MaxNotificationsExceeded: Exceeded maximum number of
|
||||
# notifications
|
||||
pass
|
||||
return
|
||||
else:
|
||||
self.tray.showMessage(title, subtitle, 1, 2000)
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
# Form implementation generated from reading ui file 'about.ui'
|
||||
#
|
||||
# Created: Mon Mar 11 11:19:35 2013
|
||||
# by: PyQt4 UI code generator 4.9.4
|
||||
# Created: Wed Nov 06 23:01:43 2013
|
||||
# by: PyQt4 UI code generator 4.10.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
|
@ -12,7 +12,16 @@ from PyQt4 import QtCore, QtGui
|
|||
try:
|
||||
_fromUtf8 = QtCore.QString.fromUtf8
|
||||
except AttributeError:
|
||||
_fromUtf8 = lambda s: s
|
||||
def _fromUtf8(s):
|
||||
return s
|
||||
|
||||
try:
|
||||
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||
except AttributeError:
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig)
|
||||
|
||||
class Ui_aboutDialog(object):
|
||||
def setupUi(self, aboutDialog):
|
||||
|
@ -35,7 +44,7 @@ class Ui_aboutDialog(object):
|
|||
self.labelVersion.setGeometry(QtCore.QRect(190, 126, 161, 20))
|
||||
self.labelVersion.setObjectName(_fromUtf8("labelVersion"))
|
||||
self.label_2 = QtGui.QLabel(aboutDialog)
|
||||
self.label_2.setGeometry(QtCore.QRect(10, 150, 341, 20))
|
||||
self.label_2.setGeometry(QtCore.QRect(10, 150, 341, 41))
|
||||
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||
self.label_3 = QtGui.QLabel(aboutDialog)
|
||||
|
@ -44,7 +53,7 @@ class Ui_aboutDialog(object):
|
|||
self.label_3.setOpenExternalLinks(True)
|
||||
self.label_3.setObjectName(_fromUtf8("label_3"))
|
||||
self.label_5 = QtGui.QLabel(aboutDialog)
|
||||
self.label_5.setGeometry(QtCore.QRect(10, 180, 341, 20))
|
||||
self.label_5.setGeometry(QtCore.QRect(10, 190, 341, 20))
|
||||
self.label_5.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_5.setObjectName(_fromUtf8("label_5"))
|
||||
|
||||
|
@ -54,10 +63,10 @@ class Ui_aboutDialog(object):
|
|||
QtCore.QMetaObject.connectSlotsByName(aboutDialog)
|
||||
|
||||
def retranslateUi(self, aboutDialog):
|
||||
aboutDialog.setWindowTitle(QtGui.QApplication.translate("aboutDialog", "About", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label.setText(QtGui.QApplication.translate("aboutDialog", "PyBitmessage", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.labelVersion.setText(QtGui.QApplication.translate("aboutDialog", "version ?", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label_2.setText(QtGui.QApplication.translate("aboutDialog", "Copyright © 2013 Jonathan Warren", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label_3.setText(QtGui.QApplication.translate("aboutDialog", "<html><head/><body><p>Distributed under the MIT/X11 software license; see <a href=\"http://www.opensource.org/licenses/mit-license.php\"><span style=\" text-decoration: underline; color:#0000ff;\">http://www.opensource.org/licenses/mit-license.php</span></a></p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label_5.setText(QtGui.QApplication.translate("aboutDialog", "This is Beta software.", None, QtGui.QApplication.UnicodeUTF8))
|
||||
aboutDialog.setWindowTitle(_translate("aboutDialog", "About", None))
|
||||
self.label.setText(_translate("aboutDialog", "PyBitmessage", None))
|
||||
self.labelVersion.setText(_translate("aboutDialog", "version ?", None))
|
||||
self.label_2.setText(_translate("aboutDialog", "<html><head/><body><p>Copyright © 2012-2013 Jonathan Warren<br/>Copyright © 2013 The Bitmessage Developers</p></body></html>", None))
|
||||
self.label_3.setText(_translate("aboutDialog", "<html><head/><body><p>Distributed under the MIT/X11 software license; see <a href=\"http://www.opensource.org/licenses/mit-license.php\"><span style=\" text-decoration: underline; color:#0000ff;\">http://www.opensource.org/licenses/mit-license.php</span></a></p></body></html>", None))
|
||||
self.label_5.setText(_translate("aboutDialog", "This is Beta software.", None))
|
||||
|
||||
|
|
|
@ -70,11 +70,11 @@
|
|||
<x>10</x>
|
||||
<y>150</y>
|
||||
<width>341</width>
|
||||
<height>20</height>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Copyright © 2013 Jonathan Warren</string>
|
||||
<string><html><head/><body><p>Copyright © 2012-2013 Jonathan Warren<br/>Copyright © 2013 The Bitmessage Developers</p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
|
@ -103,7 +103,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>180</y>
|
||||
<y>190</y>
|
||||
<width>341</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
|
|
|
@ -147,17 +147,26 @@ class singleWorker(threading.Thread):
|
|||
shared.broadcastToSendDataQueues((
|
||||
streamNumber, 'advertiseobject', inventoryHash))
|
||||
shared.UISignalQueue.put(('updateStatusBar', ''))
|
||||
shared.config.set(
|
||||
myAddress, 'lastpubkeysendtime', str(int(time.time())))
|
||||
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
|
||||
shared.config.write(configfile)
|
||||
try:
|
||||
shared.config.set(
|
||||
myAddress, 'lastpubkeysendtime', str(int(time.time())))
|
||||
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
|
||||
shared.config.write(configfile)
|
||||
except:
|
||||
# The user deleted the address out of the keys.dat file before this
|
||||
# finished.
|
||||
pass
|
||||
|
||||
# If this isn't a chan address, this function assembles the pubkey data,
|
||||
# does the necessary POW and sends it out. If it *is* a chan then it
|
||||
# assembles the pubkey and stores is in the pubkey table so that we can
|
||||
# send messages to "ourselves".
|
||||
def sendOutOrStoreMyV3Pubkey(self, hash):
|
||||
myAddress = shared.myAddressesByHash[hash]
|
||||
try:
|
||||
myAddress = shared.myAddressesByHash[hash]
|
||||
except:
|
||||
#The address has been deleted.
|
||||
return
|
||||
if shared.safeConfigGetBoolean(myAddress, 'chan'):
|
||||
with shared.printLock:
|
||||
print 'This is a chan address. Not sending pubkey.'
|
||||
|
@ -224,14 +233,22 @@ class singleWorker(threading.Thread):
|
|||
shared.broadcastToSendDataQueues((
|
||||
streamNumber, 'advertiseobject', inventoryHash))
|
||||
shared.UISignalQueue.put(('updateStatusBar', ''))
|
||||
shared.config.set(
|
||||
myAddress, 'lastpubkeysendtime', str(int(time.time())))
|
||||
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
|
||||
shared.config.write(configfile)
|
||||
try:
|
||||
shared.config.set(
|
||||
myAddress, 'lastpubkeysendtime', str(int(time.time())))
|
||||
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
|
||||
shared.config.write(configfile)
|
||||
except:
|
||||
# The user deleted the address out of the keys.dat file before this
|
||||
# finished.
|
||||
pass
|
||||
|
||||
# If this isn't a chan address, this function assembles the pubkey data,
|
||||
# does the necessary POW and sends it out.
|
||||
def sendOutOrStoreMyV4Pubkey(self, myAddress):
|
||||
if not shared.config.has_section(myAddress):
|
||||
#The address has been deleted.
|
||||
return
|
||||
if shared.safeConfigGetBoolean(myAddress, 'chan'):
|
||||
with shared.printLock:
|
||||
print 'This is a chan address. Not sending pubkey.'
|
||||
|
|
Reference in New Issue
Block a user