From 8bd00dc730b277a3541c133f42da40696ede0718 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Tue, 25 Jun 2013 17:14:44 -0400 Subject: [PATCH] added newchandialog.py --- src/bitmessageqt/__init__.py | 10 ++ src/bitmessageqt/newchandialog.py | 99 ++++++++++++++ src/bitmessageqt/newchandialog.ui | 181 ++++++++++++++++++++++++++ src/translations/bitmessage_fr_BE.pro | 43 +++--- 4 files changed, 317 insertions(+), 16 deletions(-) create mode 100644 src/bitmessageqt/newchandialog.py create mode 100644 src/bitmessageqt/newchandialog.ui diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index e11b537a..ce477836 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -2844,6 +2844,16 @@ class NewAddressDialog(QtGui.QDialog): self.ui.groupBoxDeterministic.setHidden(True) QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self)) +class NewChanDialog(QtGui.QDialog): + + def __init__(self, parent): + QtGui.QWidget.__init__(self, parent) + self.ui = Ui_NewChanDialog() + self.ui.setupUi(self) + self.parent = parent + self.ui.groupBoxCreateChan.setHidden(True) + QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self)) + class iconGlossaryDialog(QtGui.QDialog): diff --git a/src/bitmessageqt/newchandialog.py b/src/bitmessageqt/newchandialog.py new file mode 100644 index 00000000..5c5e11f2 --- /dev/null +++ b/src/bitmessageqt/newchandialog.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'newchandialog.ui' +# +# Created: Tue Jun 25 17:03:01 2013 +# by: PyQt4 UI code generator 4.10.2 +# +# WARNING! All changes made in this file will be lost! + +from PyQt4 import QtCore, QtGui + +try: + _fromUtf8 = QtCore.QString.fromUtf8 +except AttributeError: + 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_NewChanDialog(object): + def setupUi(self, NewChanDialog): + NewChanDialog.setObjectName(_fromUtf8("NewChanDialog")) + NewChanDialog.resize(447, 441) + self.formLayout = QtGui.QFormLayout(NewChanDialog) + self.formLayout.setObjectName(_fromUtf8("formLayout")) + self.radioButtonCreateChan = QtGui.QRadioButton(NewChanDialog) + self.radioButtonCreateChan.setObjectName(_fromUtf8("radioButtonCreateChan")) + self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.radioButtonCreateChan) + self.radioButtonJoinChan = QtGui.QRadioButton(NewChanDialog) + self.radioButtonJoinChan.setChecked(True) + self.radioButtonJoinChan.setObjectName(_fromUtf8("radioButtonJoinChan")) + self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.radioButtonJoinChan) + self.groupBoxJoinChan = QtGui.QGroupBox(NewChanDialog) + self.groupBoxJoinChan.setObjectName(_fromUtf8("groupBoxJoinChan")) + self.gridLayout_2 = QtGui.QGridLayout(self.groupBoxJoinChan) + self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) + self.label = QtGui.QLabel(self.groupBoxJoinChan) + self.label.setWordWrap(True) + self.label.setObjectName(_fromUtf8("label")) + self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1) + self.label_2 = QtGui.QLabel(self.groupBoxJoinChan) + self.label_2.setObjectName(_fromUtf8("label_2")) + self.gridLayout_2.addWidget(self.label_2, 1, 0, 1, 1) + self.lineEditChanNameJoin = QtGui.QLineEdit(self.groupBoxJoinChan) + self.lineEditChanNameJoin.setObjectName(_fromUtf8("lineEditChanNameJoin")) + self.gridLayout_2.addWidget(self.lineEditChanNameJoin, 2, 0, 1, 1) + self.label_3 = QtGui.QLabel(self.groupBoxJoinChan) + self.label_3.setObjectName(_fromUtf8("label_3")) + self.gridLayout_2.addWidget(self.label_3, 3, 0, 1, 1) + self.lineEditChanBitmessageAddress = QtGui.QLineEdit(self.groupBoxJoinChan) + self.lineEditChanBitmessageAddress.setObjectName(_fromUtf8("lineEditChanBitmessageAddress")) + self.gridLayout_2.addWidget(self.lineEditChanBitmessageAddress, 4, 0, 1, 1) + self.formLayout.setWidget(3, QtGui.QFormLayout.SpanningRole, self.groupBoxJoinChan) + self.groupBoxCreateChan = QtGui.QGroupBox(NewChanDialog) + self.groupBoxCreateChan.setObjectName(_fromUtf8("groupBoxCreateChan")) + self.gridLayout = QtGui.QGridLayout(self.groupBoxCreateChan) + self.gridLayout.setObjectName(_fromUtf8("gridLayout")) + self.label_4 = QtGui.QLabel(self.groupBoxCreateChan) + self.label_4.setWordWrap(True) + self.label_4.setObjectName(_fromUtf8("label_4")) + self.gridLayout.addWidget(self.label_4, 0, 0, 1, 1) + self.label_5 = QtGui.QLabel(self.groupBoxCreateChan) + self.label_5.setObjectName(_fromUtf8("label_5")) + self.gridLayout.addWidget(self.label_5, 1, 0, 1, 1) + self.lineEditChanNameCreate = QtGui.QLineEdit(self.groupBoxCreateChan) + self.lineEditChanNameCreate.setObjectName(_fromUtf8("lineEditChanNameCreate")) + self.gridLayout.addWidget(self.lineEditChanNameCreate, 2, 0, 1, 1) + self.formLayout.setWidget(2, QtGui.QFormLayout.SpanningRole, self.groupBoxCreateChan) + self.buttonBox = QtGui.QDialogButtonBox(NewChanDialog) + self.buttonBox.setOrientation(QtCore.Qt.Horizontal) + self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) + self.buttonBox.setObjectName(_fromUtf8("buttonBox")) + self.formLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.buttonBox) + + self.retranslateUi(NewChanDialog) + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), NewChanDialog.accept) + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), NewChanDialog.reject) + QtCore.QObject.connect(self.radioButtonJoinChan, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.groupBoxJoinChan.setShown) + QtCore.QObject.connect(self.radioButtonCreateChan, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.groupBoxCreateChan.setShown) + QtCore.QMetaObject.connectSlotsByName(NewChanDialog) + + def retranslateUi(self, NewChanDialog): + NewChanDialog.setWindowTitle(_translate("NewChanDialog", "Dialog", None)) + self.radioButtonCreateChan.setText(_translate("NewChanDialog", "Create a new chan", None)) + self.radioButtonJoinChan.setText(_translate("NewChanDialog", "Join a chan", None)) + self.groupBoxJoinChan.setTitle(_translate("NewChanDialog", "Join a chan", None)) + self.label.setText(_translate("NewChanDialog", "

A chan is a set of encryption keys that is shared by a group of people. The keys and bitmessage address used by a chan is generated from a human-friendly word or phrase (the chan name).

Chans are experimental and are unmoderatable.

", None)) + self.label_2.setText(_translate("NewChanDialog", "Chan name:", None)) + self.label_3.setText(_translate("NewChanDialog", "Chan bitmessage address:", None)) + self.groupBoxCreateChan.setTitle(_translate("NewChanDialog", "Create a chan", None)) + self.label_4.setText(_translate("NewChanDialog", "Enter a name for your chan. If you choose a sufficiently complex chan name (like a strong and unique passphrase) and none of your friends share it publicly then the chan will be secure and private.", None)) + self.label_5.setText(_translate("NewChanDialog", "Chan name:", None)) + diff --git a/src/bitmessageqt/newchandialog.ui b/src/bitmessageqt/newchandialog.ui new file mode 100644 index 00000000..2e6e4657 --- /dev/null +++ b/src/bitmessageqt/newchandialog.ui @@ -0,0 +1,181 @@ + + + NewChanDialog + + + + 0 + 0 + 447 + 441 + + + + Dialog + + + + + + Create a new chan + + + + + + + Join a chan + + + true + + + + + + + Join a chan + + + + + + <html><head/><body><p>A chan is a set of encryption keys that is shared by a group of people. The keys and bitmessage address used by a chan is generated from a human-friendly word or phrase (the chan name).</p><p>Chans are experimental and are unmoderatable.</p></body></html> + + + true + + + + + + + Chan name: + + + + + + + + + + Chan bitmessage address: + + + + + + + + + + + + + Create a chan + + + + + + Enter a name for your chan. If you choose a sufficiently complex chan name (like a strong and unique passphrase) and none of your friends share it publicly then the chan will be secure and private. + + + true + + + + + + + Chan name: + + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + NewChanDialog + accept() + + + 428 + 454 + + + 157 + 274 + + + + + buttonBox + rejected() + NewChanDialog + reject() + + + 430 + 460 + + + 286 + 274 + + + + + radioButtonJoinChan + toggled(bool) + groupBoxJoinChan + setShown(bool) + + + 74 + 49 + + + 96 + 227 + + + + + radioButtonCreateChan + toggled(bool) + groupBoxCreateChan + setShown(bool) + + + 72 + 28 + + + 65 + 92 + + + + + diff --git a/src/translations/bitmessage_fr_BE.pro b/src/translations/bitmessage_fr_BE.pro index 7b0a8814..d86fdc4d 100644 --- a/src/translations/bitmessage_fr_BE.pro +++ b/src/translations/bitmessage_fr_BE.pro @@ -1,21 +1,32 @@ -SOURCES = ../about.py\ - ../addresses.py\ - ../bitmessage_icons_rc.py\ +SOURCES = ../addresses.py\ ../bitmessagemain.py\ + ../class_addressGenerator.py\ + ../class_outgoingSynSender.py\ + ../class_receiveDataThread.py\ + ../class_sendDataThread.py\ + ../class_singleCleaner.py\ + ../class_singleListener.py\ + ../class_singleWorker.py\ + ../class_sqlThread.py\ + ../helper_bitcoin.py\ + ../helper_bootstrap.py\ + ../helper_generic.py\ + ../helper_inbox.py\ + ../helper_sent.py\ + ../helper_startup.py\ + ../shared.py ../bitmessageqt/__init__.py\ - ../bitmessageui.py\ - ../defaultKnownNodes.py\ - ../help.py\ - ../highlevelcrypto.py\ - ../iconglossary.py\ - ../newaddressdialog.py\ - ../newsubscriptiondialog.py\ - ../proofofwork.py\ - ../regenerateaddresses.py\ - ../settings.py\ - ../shared.py\ - ../singleton.py\ - ../specialaddressbehavior.py + ../bitmessageqt/about.py\ + ../bitmessageqt/bitmessageui.py\ + ../bitmessageqt/help.py\ + ../bitmessageqt/iconglossary.py\ + ../bitmessageqt/newaddressdialog.py\ + ../bitmessageqt/newchandialog.py\ + ../bitmessageqt/newsubscriptiondialog.py\ + ../bitmessageqt/regenerateaddresses.py\ + ../bitmessageqt/settings.py\ + ../bitmessageqt/specialaddressbehavior.py + TRANSLATIONS = bitmessage_fr_BE.ts