diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index ff384f79..5863eeaf 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -72,7 +72,7 @@ class outgoingSynSender(QThread): time.sleep(1) global alreadyAttemptedConnectionsListResetTime while True: - #time.sleep(999999)#I sometimes use this to prevent connections for testing. + time.sleep(999999)#I sometimes use this to prevent connections for testing. if len(selfInitiatedConnections[self.streamNumber]) < 8: #maximum number of outgoing connections = 8 random.seed() HOST, = random.sample(knownNodes[self.streamNumber], 1) @@ -3439,6 +3439,8 @@ class MyForm(QtGui.QMainWindow): if 'darwin' in sys.platform: self.trayIcon.show() + self.ui.labelSendBroadcastWarning.setVisible(False) + #FILE MENU and other buttons QtCore.QObject.connect(self.ui.actionExit, QtCore.SIGNAL("triggered()"), self.close) QtCore.QObject.connect(self.ui.actionManageKeys, QtCore.SIGNAL("triggered()"), self.click_actionManageKeys) diff --git a/src/bitmessageui.py b/src/bitmessageui.py index 55e65e6c..20e5b973 100644 --- a/src/bitmessageui.py +++ b/src/bitmessageui.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'bitmessageui.ui' # -# Created: Mon Apr 08 11:57:15 2013 +# Created: Mon Apr 22 16:34:47 2013 # by: PyQt4 UI code generator 4.9.4 # # WARNING! All changes made in this file will be lost! @@ -81,59 +81,66 @@ class Ui_MainWindow(object): self.send.setObjectName(_fromUtf8("send")) self.gridLayout_2 = QtGui.QGridLayout(self.send) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) - self.lineEditTo = QtGui.QLineEdit(self.send) - self.lineEditTo.setObjectName(_fromUtf8("lineEditTo")) - self.gridLayout_2.addWidget(self.lineEditTo, 3, 1, 1, 1) - self.label_3 = QtGui.QLabel(self.send) - self.label_3.setObjectName(_fromUtf8("label_3")) - self.gridLayout_2.addWidget(self.label_3, 4, 0, 1, 1) - spacerItem = QtGui.QSpacerItem(20, 297, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) - self.gridLayout_2.addItem(spacerItem, 6, 0, 1, 1) - self.label_2 = QtGui.QLabel(self.send) - self.label_2.setObjectName(_fromUtf8("label_2")) - self.gridLayout_2.addWidget(self.label_2, 2, 0, 1, 1) - self.comboBoxSendFrom = QtGui.QComboBox(self.send) - self.comboBoxSendFrom.setObjectName(_fromUtf8("comboBoxSendFrom")) - self.gridLayout_2.addWidget(self.comboBoxSendFrom, 2, 1, 1, 1) - self.label_4 = QtGui.QLabel(self.send) - self.label_4.setObjectName(_fromUtf8("label_4")) - self.gridLayout_2.addWidget(self.label_4, 5, 0, 1, 1) - self.label = QtGui.QLabel(self.send) - self.label.setObjectName(_fromUtf8("label")) - self.gridLayout_2.addWidget(self.label, 3, 0, 1, 1) - self.radioButtonBroadcast = QtGui.QRadioButton(self.send) - self.radioButtonBroadcast.setObjectName(_fromUtf8("radioButtonBroadcast")) - self.gridLayout_2.addWidget(self.radioButtonBroadcast, 1, 1, 1, 3) self.pushButtonLoadFromAddressBook = QtGui.QPushButton(self.send) font = QtGui.QFont() font.setPointSize(7) self.pushButtonLoadFromAddressBook.setFont(font) self.pushButtonLoadFromAddressBook.setObjectName(_fromUtf8("pushButtonLoadFromAddressBook")) self.gridLayout_2.addWidget(self.pushButtonLoadFromAddressBook, 3, 2, 1, 2) - spacerItem1 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.gridLayout_2.addItem(spacerItem1, 6, 6, 1, 1) - self.radioButtonSpecific = QtGui.QRadioButton(self.send) - self.radioButtonSpecific.setChecked(True) - self.radioButtonSpecific.setObjectName(_fromUtf8("radioButtonSpecific")) - self.gridLayout_2.addWidget(self.radioButtonSpecific, 0, 1, 1, 1) - spacerItem2 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.gridLayout_2.addItem(spacerItem2, 3, 4, 1, 1) - self.pushButtonSend = QtGui.QPushButton(self.send) - self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend")) - self.gridLayout_2.addWidget(self.pushButtonSend, 7, 5, 1, 1) - spacerItem3 = QtGui.QSpacerItem(192, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.gridLayout_2.addItem(spacerItem3, 7, 4, 1, 1) - self.lineEditSubject = QtGui.QLineEdit(self.send) - self.lineEditSubject.setText(_fromUtf8("")) - self.lineEditSubject.setObjectName(_fromUtf8("lineEditSubject")) - self.gridLayout_2.addWidget(self.lineEditSubject, 4, 1, 1, 5) - self.textEditMessage = QtGui.QTextEdit(self.send) - self.textEditMessage.setObjectName(_fromUtf8("textEditMessage")) - self.gridLayout_2.addWidget(self.textEditMessage, 5, 1, 2, 5) + self.label_4 = QtGui.QLabel(self.send) + self.label_4.setObjectName(_fromUtf8("label_4")) + self.gridLayout_2.addWidget(self.label_4, 5, 0, 1, 1) + self.comboBoxSendFrom = QtGui.QComboBox(self.send) + self.comboBoxSendFrom.setMinimumSize(QtCore.QSize(300, 0)) + self.comboBoxSendFrom.setObjectName(_fromUtf8("comboBoxSendFrom")) + self.gridLayout_2.addWidget(self.comboBoxSendFrom, 2, 1, 1, 1) + self.label_3 = QtGui.QLabel(self.send) + self.label_3.setObjectName(_fromUtf8("label_3")) + self.gridLayout_2.addWidget(self.label_3, 4, 0, 1, 1) self.labelFrom = QtGui.QLabel(self.send) self.labelFrom.setText(_fromUtf8("")) self.labelFrom.setObjectName(_fromUtf8("labelFrom")) self.gridLayout_2.addWidget(self.labelFrom, 2, 2, 1, 3) + self.radioButtonSpecific = QtGui.QRadioButton(self.send) + self.radioButtonSpecific.setChecked(True) + self.radioButtonSpecific.setObjectName(_fromUtf8("radioButtonSpecific")) + self.gridLayout_2.addWidget(self.radioButtonSpecific, 0, 1, 1, 1) + self.lineEditTo = QtGui.QLineEdit(self.send) + self.lineEditTo.setObjectName(_fromUtf8("lineEditTo")) + self.gridLayout_2.addWidget(self.lineEditTo, 3, 1, 1, 1) + self.textEditMessage = QtGui.QTextEdit(self.send) + self.textEditMessage.setObjectName(_fromUtf8("textEditMessage")) + self.gridLayout_2.addWidget(self.textEditMessage, 5, 1, 2, 5) + self.label = QtGui.QLabel(self.send) + self.label.setObjectName(_fromUtf8("label")) + self.gridLayout_2.addWidget(self.label, 3, 0, 1, 1) + self.label_2 = QtGui.QLabel(self.send) + self.label_2.setObjectName(_fromUtf8("label_2")) + self.gridLayout_2.addWidget(self.label_2, 2, 0, 1, 1) + spacerItem = QtGui.QSpacerItem(20, 297, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.gridLayout_2.addItem(spacerItem, 6, 0, 1, 1) + self.radioButtonBroadcast = QtGui.QRadioButton(self.send) + self.radioButtonBroadcast.setObjectName(_fromUtf8("radioButtonBroadcast")) + self.gridLayout_2.addWidget(self.radioButtonBroadcast, 1, 1, 1, 3) + self.lineEditSubject = QtGui.QLineEdit(self.send) + self.lineEditSubject.setText(_fromUtf8("")) + self.lineEditSubject.setObjectName(_fromUtf8("lineEditSubject")) + self.gridLayout_2.addWidget(self.lineEditSubject, 4, 1, 1, 5) + spacerItem1 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.gridLayout_2.addItem(spacerItem1, 3, 4, 1, 1) + self.pushButtonSend = QtGui.QPushButton(self.send) + self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend")) + self.gridLayout_2.addWidget(self.pushButtonSend, 7, 5, 1, 1) + self.labelSendBroadcastWarning = QtGui.QLabel(self.send) + self.labelSendBroadcastWarning.setEnabled(True) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Ignored, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.labelSendBroadcastWarning.sizePolicy().hasHeightForWidth()) + self.labelSendBroadcastWarning.setSizePolicy(sizePolicy) + self.labelSendBroadcastWarning.setIndent(-1) + self.labelSendBroadcastWarning.setObjectName(_fromUtf8("labelSendBroadcastWarning")) + self.gridLayout_2.addWidget(self.labelSendBroadcastWarning, 7, 1, 1, 4) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/send.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.send, icon2, _fromUtf8("")) @@ -179,8 +186,8 @@ class Ui_MainWindow(object): self.pushButtonNewAddress = QtGui.QPushButton(self.youridentities) self.pushButtonNewAddress.setObjectName(_fromUtf8("pushButtonNewAddress")) self.gridLayout_3.addWidget(self.pushButtonNewAddress, 0, 0, 1, 1) - spacerItem4 = QtGui.QSpacerItem(689, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.gridLayout_3.addItem(spacerItem4, 0, 1, 1, 1) + spacerItem2 = QtGui.QSpacerItem(689, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.gridLayout_3.addItem(spacerItem2, 0, 1, 1, 1) self.tableWidgetYourIdentities = QtGui.QTableWidget(self.youridentities) self.tableWidgetYourIdentities.setFrameShadow(QtGui.QFrame.Sunken) self.tableWidgetYourIdentities.setLineWidth(1) @@ -223,8 +230,8 @@ class Ui_MainWindow(object): self.pushButtonAddSubscription = QtGui.QPushButton(self.subscriptions) self.pushButtonAddSubscription.setObjectName(_fromUtf8("pushButtonAddSubscription")) self.gridLayout_4.addWidget(self.pushButtonAddSubscription, 1, 0, 1, 1) - spacerItem5 = QtGui.QSpacerItem(689, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.gridLayout_4.addItem(spacerItem5, 1, 1, 1, 1) + spacerItem3 = QtGui.QSpacerItem(689, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.gridLayout_4.addItem(spacerItem3, 1, 1, 1, 1) self.tableWidgetSubscriptions = QtGui.QTableWidget(self.subscriptions) self.tableWidgetSubscriptions.setAlternatingRowColors(True) self.tableWidgetSubscriptions.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) @@ -257,8 +264,8 @@ class Ui_MainWindow(object): self.pushButtonAddAddressBook = QtGui.QPushButton(self.addressbook) self.pushButtonAddAddressBook.setObjectName(_fromUtf8("pushButtonAddAddressBook")) self.gridLayout_5.addWidget(self.pushButtonAddAddressBook, 1, 0, 1, 1) - spacerItem6 = QtGui.QSpacerItem(689, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.gridLayout_5.addItem(spacerItem6, 1, 1, 1, 1) + spacerItem4 = QtGui.QSpacerItem(689, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.gridLayout_5.addItem(spacerItem4, 1, 1, 1, 1) self.tableWidgetAddressBook = QtGui.QTableWidget(self.addressbook) self.tableWidgetAddressBook.setAlternatingRowColors(True) self.tableWidgetAddressBook.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) @@ -293,8 +300,8 @@ class Ui_MainWindow(object): self.pushButtonAddBlacklist = QtGui.QPushButton(self.blackwhitelist) self.pushButtonAddBlacklist.setObjectName(_fromUtf8("pushButtonAddBlacklist")) self.gridLayout_6.addWidget(self.pushButtonAddBlacklist, 2, 0, 1, 1) - spacerItem7 = QtGui.QSpacerItem(689, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.gridLayout_6.addItem(spacerItem7, 2, 1, 1, 1) + spacerItem5 = QtGui.QSpacerItem(689, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.gridLayout_6.addItem(spacerItem5, 2, 1, 1, 1) self.tableWidgetBlacklist = QtGui.QTableWidget(self.blackwhitelist) self.tableWidgetBlacklist.setAlternatingRowColors(True) self.tableWidgetBlacklist.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) @@ -418,6 +425,8 @@ class Ui_MainWindow(object): self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) QtCore.QObject.connect(self.radioButtonSpecific, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.lineEditTo.setEnabled) + QtCore.QObject.connect(self.radioButtonSpecific, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.labelSendBroadcastWarning.hide) + QtCore.QObject.connect(self.radioButtonBroadcast, QtCore.SIGNAL(_fromUtf8("clicked()")), self.labelSendBroadcastWarning.show) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): @@ -432,19 +441,20 @@ class Ui_MainWindow(object): item = self.tableWidgetInbox.horizontalHeaderItem(3) item.setText(QtGui.QApplication.translate("MainWindow", "Received", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), QtGui.QApplication.translate("MainWindow", "Inbox", None, QtGui.QApplication.UnicodeUTF8)) - self.label_3.setText(QtGui.QApplication.translate("MainWindow", "Subject:", None, QtGui.QApplication.UnicodeUTF8)) - self.label_2.setText(QtGui.QApplication.translate("MainWindow", "From:", None, QtGui.QApplication.UnicodeUTF8)) - self.label_4.setText(QtGui.QApplication.translate("MainWindow", "Message:", None, QtGui.QApplication.UnicodeUTF8)) - self.label.setText(QtGui.QApplication.translate("MainWindow", "To:", None, QtGui.QApplication.UnicodeUTF8)) - self.radioButtonBroadcast.setText(QtGui.QApplication.translate("MainWindow", "Broadcast to everyone who is subscribed to your address", None, QtGui.QApplication.UnicodeUTF8)) self.pushButtonLoadFromAddressBook.setText(QtGui.QApplication.translate("MainWindow", "Load from Address book", None, QtGui.QApplication.UnicodeUTF8)) + self.label_4.setText(QtGui.QApplication.translate("MainWindow", "Message:", None, QtGui.QApplication.UnicodeUTF8)) + self.label_3.setText(QtGui.QApplication.translate("MainWindow", "Subject:", None, QtGui.QApplication.UnicodeUTF8)) self.radioButtonSpecific.setText(QtGui.QApplication.translate("MainWindow", "Send to one or more specific people", None, QtGui.QApplication.UnicodeUTF8)) - self.pushButtonSend.setText(QtGui.QApplication.translate("MainWindow", "Send", None, QtGui.QApplication.UnicodeUTF8)) self.textEditMessage.setHtml(QtGui.QApplication.translate("MainWindow", "\n" "\n" "


", None, QtGui.QApplication.UnicodeUTF8)) + self.label.setText(QtGui.QApplication.translate("MainWindow", "To:", None, QtGui.QApplication.UnicodeUTF8)) + self.label_2.setText(QtGui.QApplication.translate("MainWindow", "From:", None, QtGui.QApplication.UnicodeUTF8)) + self.radioButtonBroadcast.setText(QtGui.QApplication.translate("MainWindow", "Broadcast to everyone who is subscribed to your address", None, QtGui.QApplication.UnicodeUTF8)) + self.pushButtonSend.setText(QtGui.QApplication.translate("MainWindow", "Send", None, QtGui.QApplication.UnicodeUTF8)) + self.labelSendBroadcastWarning.setText(QtGui.QApplication.translate("MainWindow", "Be aware that broadcasts are only encrypted with your address. Anyone who knows your address can read them.", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), QtGui.QApplication.translate("MainWindow", "Send", None, QtGui.QApplication.UnicodeUTF8)) self.tableWidgetSent.setSortingEnabled(True) item = self.tableWidgetSent.horizontalHeaderItem(0) diff --git a/src/bitmessageui.ui b/src/bitmessageui.ui index 2ee477c1..e1b1e319 100644 --- a/src/bitmessageui.ui +++ b/src/bitmessageui.ui @@ -152,8 +152,34 @@ Send - - + + + + + 7 + + + + Load from Address book + + + + + + + Message: + + + + + + + + 300 + 0 + + + @@ -162,6 +188,51 @@ + + + + + + + + + + + Send to one or more specific people + + + true + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> + + + + + + + To: + + + + + + + From: + + + @@ -175,30 +246,6 @@ - - - - From: - - - - - - - - - - Message: - - - - - - - To: - - - @@ -206,38 +253,10 @@ - - - - - 7 - - + + - Load from Address book - - - - - - - Qt::Horizontal - - - - 28 - 20 - - - - - - - - Send to one or more specific people - - - true + @@ -261,41 +280,22 @@ - - - - Qt::Horizontal + + + + true - - - 192 - 20 - + + + 0 + 0 + - - - - - + Be aware that broadcasts are only encrypted with your address. Anyone who knows your address can read them. - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> - - - - - - - + + -1 @@ -1018,8 +1018,40 @@ p, li { white-space: pre-wrap; } 60 - 133 - 149 + 175 + 147 + + + + + radioButtonSpecific + clicked(bool) + labelSendBroadcastWarning + hide() + + + 95 + 59 + + + 129 + 528 + + + + + radioButtonBroadcast + clicked() + labelSendBroadcastWarning + show() + + + 108 + 84 + + + 177 + 519