Skip to content

Commit 8a0d093

Browse files
author
Jonathan Warren
committed
Merge pull request #316 from Atheros1/master
Chan support in the UI
2 parents 5f10b6b + 9c7e660 commit 8a0d093

11 files changed

+362
-223
lines changed

src/bitmessageqt/__init__.py

Lines changed: 147 additions & 69 deletions
Large diffs are not rendered by default.

src/bitmessageqt/bitmessageui.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Form implementation generated from reading ui file 'bitmessageui.ui'
44
#
5-
# Created: Sat Jul 13 20:23:44 2013
5+
# Created: Sun Jul 21 17:50:02 2013
66
# by: PyQt4 UI code generator 4.10.2
77
#
88
# WARNING! All changes made in this file will be lost!
@@ -453,9 +453,12 @@ def setupUi(self, MainWindow):
453453
self.actionRegenerateDeterministicAddresses.setObjectName(_fromUtf8("actionRegenerateDeterministicAddresses"))
454454
self.actionDeleteAllTrashedMessages = QtGui.QAction(MainWindow)
455455
self.actionDeleteAllTrashedMessages.setObjectName(_fromUtf8("actionDeleteAllTrashedMessages"))
456+
self.actionJoinChan = QtGui.QAction(MainWindow)
457+
self.actionJoinChan.setObjectName(_fromUtf8("actionJoinChan"))
456458
self.menuFile.addAction(self.actionManageKeys)
457459
self.menuFile.addAction(self.actionDeleteAllTrashedMessages)
458460
self.menuFile.addAction(self.actionRegenerateDeterministicAddresses)
461+
self.menuFile.addAction(self.actionJoinChan)
459462
self.menuFile.addAction(self.actionExit)
460463
self.menuSettings.addAction(self.actionSettings)
461464
self.menuHelp.addAction(self.actionHelp)
@@ -599,5 +602,6 @@ def retranslateUi(self, MainWindow):
599602
self.actionSettings.setText(_translate("MainWindow", "Settings", None))
600603
self.actionRegenerateDeterministicAddresses.setText(_translate("MainWindow", "Regenerate deterministic addresses", None))
601604
self.actionDeleteAllTrashedMessages.setText(_translate("MainWindow", "Delete all trashed messages", None))
605+
self.actionJoinChan.setText(_translate("MainWindow", "Join / Create chan", None))
602606

603607
import bitmessage_icons_rc

src/bitmessageqt/bitmessageui.ui

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<string>Bitmessage</string>
1515
</property>
1616
<property name="windowIcon">
17-
<iconset>
17+
<iconset resource="bitmessage_icons.qrc">
1818
<normaloff>:/newPrefix/images/can-icon-24px.png</normaloff>:/newPrefix/images/can-icon-24px.png</iconset>
1919
</property>
2020
<property name="tabShape">
@@ -61,7 +61,7 @@
6161
</property>
6262
<widget class="QWidget" name="inbox">
6363
<attribute name="icon">
64-
<iconset>
64+
<iconset resource="bitmessage_icons.qrc">
6565
<normaloff>:/newPrefix/images/inbox.png</normaloff>:/newPrefix/images/inbox.png</iconset>
6666
</attribute>
6767
<attribute name="title">
@@ -188,7 +188,7 @@
188188
</widget>
189189
<widget class="QWidget" name="send">
190190
<attribute name="icon">
191-
<iconset>
191+
<iconset resource="bitmessage_icons.qrc">
192192
<normaloff>:/newPrefix/images/send.png</normaloff>:/newPrefix/images/send.png</iconset>
193193
</attribute>
194194
<attribute name="title">
@@ -346,7 +346,7 @@ p, li { white-space: pre-wrap; }
346346
</widget>
347347
<widget class="QWidget" name="sent">
348348
<attribute name="icon">
349-
<iconset>
349+
<iconset resource="bitmessage_icons.qrc">
350350
<normaloff>:/newPrefix/images/sent.png</normaloff>:/newPrefix/images/sent.png</iconset>
351351
</attribute>
352352
<attribute name="title">
@@ -466,7 +466,7 @@ p, li { white-space: pre-wrap; }
466466
</widget>
467467
<widget class="QWidget" name="youridentities">
468468
<attribute name="icon">
469-
<iconset>
469+
<iconset resource="bitmessage_icons.qrc">
470470
<normaloff>:/newPrefix/images/identities.png</normaloff>:/newPrefix/images/identities.png</iconset>
471471
</attribute>
472472
<attribute name="title">
@@ -566,7 +566,7 @@ p, li { white-space: pre-wrap; }
566566
</widget>
567567
<widget class="QWidget" name="subscriptions">
568568
<attribute name="icon">
569-
<iconset>
569+
<iconset resource="bitmessage_icons.qrc">
570570
<normaloff>:/newPrefix/images/subscriptions.png</normaloff>:/newPrefix/images/subscriptions.png</iconset>
571571
</attribute>
572572
<attribute name="title">
@@ -651,7 +651,7 @@ p, li { white-space: pre-wrap; }
651651
</widget>
652652
<widget class="QWidget" name="addressbook">
653653
<attribute name="icon">
654-
<iconset>
654+
<iconset resource="bitmessage_icons.qrc">
655655
<normaloff>:/newPrefix/images/addressbook.png</normaloff>:/newPrefix/images/addressbook.png</iconset>
656656
</attribute>
657657
<attribute name="title">
@@ -733,7 +733,7 @@ p, li { white-space: pre-wrap; }
733733
</widget>
734734
<widget class="QWidget" name="blackwhitelist">
735735
<attribute name="icon">
736-
<iconset>
736+
<iconset resource="bitmessage_icons.qrc">
737737
<normaloff>:/newPrefix/images/blacklist.png</normaloff>:/newPrefix/images/blacklist.png</iconset>
738738
</attribute>
739739
<attribute name="title">
@@ -825,7 +825,7 @@ p, li { white-space: pre-wrap; }
825825
</widget>
826826
<widget class="QWidget" name="networkstatus">
827827
<attribute name="icon">
828-
<iconset>
828+
<iconset resource="bitmessage_icons.qrc">
829829
<normaloff>:/newPrefix/images/networkstatus.png</normaloff>:/newPrefix/images/networkstatus.png</iconset>
830830
</attribute>
831831
<attribute name="title">
@@ -844,7 +844,7 @@ p, li { white-space: pre-wrap; }
844844
<string/>
845845
</property>
846846
<property name="icon">
847-
<iconset>
847+
<iconset resource="bitmessage_icons.qrc">
848848
<normaloff>:/newPrefix/images/redicon.png</normaloff>:/newPrefix/images/redicon.png</iconset>
849849
</property>
850850
<property name="flat">
@@ -1021,6 +1021,7 @@ p, li { white-space: pre-wrap; }
10211021
<addaction name="actionManageKeys"/>
10221022
<addaction name="actionDeleteAllTrashedMessages"/>
10231023
<addaction name="actionRegenerateDeterministicAddresses"/>
1024+
<addaction name="actionJoinChan"/>
10241025
<addaction name="actionExit"/>
10251026
</widget>
10261027
<widget class="QMenu" name="menuSettings">
@@ -1094,6 +1095,11 @@ p, li { white-space: pre-wrap; }
10941095
<string>Delete all trashed messages</string>
10951096
</property>
10961097
</action>
1098+
<action name="actionJoinChan">
1099+
<property name="text">
1100+
<string>Join / Create chan</string>
1101+
</property>
1102+
</action>
10971103
</widget>
10981104
<tabstops>
10991105
<tabstop>tabWidget</tabstop>

src/bitmessageqt/newchandialog.py

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Form implementation generated from reading ui file 'newchandialog.ui'
44
#
5-
# Created: Tue Jun 25 17:03:01 2013
5+
# Created: Mon Jul 22 01:05:35 2013
66
# by: PyQt4 UI code generator 4.10.2
77
#
88
# WARNING! All changes made in this file will be lost!
@@ -23,20 +23,36 @@ def _translate(context, text, disambig):
2323
def _translate(context, text, disambig):
2424
return QtGui.QApplication.translate(context, text, disambig)
2525

26-
class Ui_NewChanDialog(object):
27-
def setupUi(self, NewChanDialog):
28-
NewChanDialog.setObjectName(_fromUtf8("NewChanDialog"))
29-
NewChanDialog.resize(447, 441)
30-
self.formLayout = QtGui.QFormLayout(NewChanDialog)
26+
class Ui_newChanDialog(object):
27+
def setupUi(self, newChanDialog):
28+
newChanDialog.setObjectName(_fromUtf8("newChanDialog"))
29+
newChanDialog.resize(530, 422)
30+
newChanDialog.setMinimumSize(QtCore.QSize(0, 0))
31+
self.formLayout = QtGui.QFormLayout(newChanDialog)
3132
self.formLayout.setObjectName(_fromUtf8("formLayout"))
32-
self.radioButtonCreateChan = QtGui.QRadioButton(NewChanDialog)
33+
self.radioButtonCreateChan = QtGui.QRadioButton(newChanDialog)
3334
self.radioButtonCreateChan.setObjectName(_fromUtf8("radioButtonCreateChan"))
3435
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.radioButtonCreateChan)
35-
self.radioButtonJoinChan = QtGui.QRadioButton(NewChanDialog)
36+
self.radioButtonJoinChan = QtGui.QRadioButton(newChanDialog)
3637
self.radioButtonJoinChan.setChecked(True)
3738
self.radioButtonJoinChan.setObjectName(_fromUtf8("radioButtonJoinChan"))
3839
self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.radioButtonJoinChan)
39-
self.groupBoxJoinChan = QtGui.QGroupBox(NewChanDialog)
40+
self.groupBoxCreateChan = QtGui.QGroupBox(newChanDialog)
41+
self.groupBoxCreateChan.setObjectName(_fromUtf8("groupBoxCreateChan"))
42+
self.gridLayout = QtGui.QGridLayout(self.groupBoxCreateChan)
43+
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
44+
self.label_4 = QtGui.QLabel(self.groupBoxCreateChan)
45+
self.label_4.setWordWrap(True)
46+
self.label_4.setObjectName(_fromUtf8("label_4"))
47+
self.gridLayout.addWidget(self.label_4, 0, 0, 1, 1)
48+
self.label_5 = QtGui.QLabel(self.groupBoxCreateChan)
49+
self.label_5.setObjectName(_fromUtf8("label_5"))
50+
self.gridLayout.addWidget(self.label_5, 1, 0, 1, 1)
51+
self.lineEditChanNameCreate = QtGui.QLineEdit(self.groupBoxCreateChan)
52+
self.lineEditChanNameCreate.setObjectName(_fromUtf8("lineEditChanNameCreate"))
53+
self.gridLayout.addWidget(self.lineEditChanNameCreate, 2, 0, 1, 1)
54+
self.formLayout.setWidget(2, QtGui.QFormLayout.SpanningRole, self.groupBoxCreateChan)
55+
self.groupBoxJoinChan = QtGui.QGroupBox(newChanDialog)
4056
self.groupBoxJoinChan.setObjectName(_fromUtf8("groupBoxJoinChan"))
4157
self.gridLayout_2 = QtGui.QGridLayout(self.groupBoxJoinChan)
4258
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
@@ -57,43 +73,30 @@ def setupUi(self, NewChanDialog):
5773
self.lineEditChanBitmessageAddress.setObjectName(_fromUtf8("lineEditChanBitmessageAddress"))
5874
self.gridLayout_2.addWidget(self.lineEditChanBitmessageAddress, 4, 0, 1, 1)
5975
self.formLayout.setWidget(3, QtGui.QFormLayout.SpanningRole, self.groupBoxJoinChan)
60-
self.groupBoxCreateChan = QtGui.QGroupBox(NewChanDialog)
61-
self.groupBoxCreateChan.setObjectName(_fromUtf8("groupBoxCreateChan"))
62-
self.gridLayout = QtGui.QGridLayout(self.groupBoxCreateChan)
63-
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
64-
self.label_4 = QtGui.QLabel(self.groupBoxCreateChan)
65-
self.label_4.setWordWrap(True)
66-
self.label_4.setObjectName(_fromUtf8("label_4"))
67-
self.gridLayout.addWidget(self.label_4, 0, 0, 1, 1)
68-
self.label_5 = QtGui.QLabel(self.groupBoxCreateChan)
69-
self.label_5.setObjectName(_fromUtf8("label_5"))
70-
self.gridLayout.addWidget(self.label_5, 1, 0, 1, 1)
71-
self.lineEditChanNameCreate = QtGui.QLineEdit(self.groupBoxCreateChan)
72-
self.lineEditChanNameCreate.setObjectName(_fromUtf8("lineEditChanNameCreate"))
73-
self.gridLayout.addWidget(self.lineEditChanNameCreate, 2, 0, 1, 1)
74-
self.formLayout.setWidget(2, QtGui.QFormLayout.SpanningRole, self.groupBoxCreateChan)
75-
self.buttonBox = QtGui.QDialogButtonBox(NewChanDialog)
76+
spacerItem = QtGui.QSpacerItem(389, 2, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
77+
self.formLayout.setItem(4, QtGui.QFormLayout.FieldRole, spacerItem)
78+
self.buttonBox = QtGui.QDialogButtonBox(newChanDialog)
7679
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
7780
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
7881
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
79-
self.formLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.buttonBox)
82+
self.formLayout.setWidget(5, QtGui.QFormLayout.FieldRole, self.buttonBox)
8083

81-
self.retranslateUi(NewChanDialog)
82-
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), NewChanDialog.accept)
83-
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), NewChanDialog.reject)
84+
self.retranslateUi(newChanDialog)
85+
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), newChanDialog.accept)
86+
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), newChanDialog.reject)
8487
QtCore.QObject.connect(self.radioButtonJoinChan, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.groupBoxJoinChan.setShown)
8588
QtCore.QObject.connect(self.radioButtonCreateChan, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.groupBoxCreateChan.setShown)
86-
QtCore.QMetaObject.connectSlotsByName(NewChanDialog)
89+
QtCore.QMetaObject.connectSlotsByName(newChanDialog)
8790

88-
def retranslateUi(self, NewChanDialog):
89-
NewChanDialog.setWindowTitle(_translate("NewChanDialog", "Dialog", None))
90-
self.radioButtonCreateChan.setText(_translate("NewChanDialog", "Create a new chan", None))
91-
self.radioButtonJoinChan.setText(_translate("NewChanDialog", "Join a chan", None))
92-
self.groupBoxJoinChan.setTitle(_translate("NewChanDialog", "Join a chan", None))
93-
self.label.setText(_translate("NewChanDialog", "<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>", None))
94-
self.label_2.setText(_translate("NewChanDialog", "Chan name:", None))
95-
self.label_3.setText(_translate("NewChanDialog", "Chan bitmessage address:", None))
96-
self.groupBoxCreateChan.setTitle(_translate("NewChanDialog", "Create a chan", None))
97-
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))
98-
self.label_5.setText(_translate("NewChanDialog", "Chan name:", None))
91+
def retranslateUi(self, newChanDialog):
92+
newChanDialog.setWindowTitle(_translate("newChanDialog", "Dialog", None))
93+
self.radioButtonCreateChan.setText(_translate("newChanDialog", "Create a new chan", None))
94+
self.radioButtonJoinChan.setText(_translate("newChanDialog", "Join a chan", None))
95+
self.groupBoxCreateChan.setTitle(_translate("newChanDialog", "Create a chan", None))
96+
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))
97+
self.label_5.setText(_translate("newChanDialog", "Chan name:", None))
98+
self.groupBoxJoinChan.setTitle(_translate("newChanDialog", "Join a chan", None))
99+
self.label.setText(_translate("newChanDialog", "<html><head/><body><p>A chan exists when a group of people share the same decryption keys. The keys and bitmessage address used by a chan are generated from a human-friendly word or phrase (the chan name). To send a message to everyone in the chan, send a normal person-to-person message to the chan address.</p><p>Chans are experimental and completely unmoderatable.</p></body></html>", None))
100+
self.label_2.setText(_translate("newChanDialog", "Chan name:", None))
101+
self.label_3.setText(_translate("newChanDialog", "Chan bitmessage address:", None))
99102

0 commit comments

Comments
 (0)