|
3 | 3 | ================================= |
4 | 4 |
|
5 | 5 | """ |
6 | | -# pylint: disable=import-error,relative-import,ungrouped-imports |
| 6 | +# pylint: disable=import-error,ungrouped-imports,wrong-import-order |
7 | 7 | from PyQt4 import QtCore, QtGui |
8 | 8 |
|
9 | 9 | import widgets |
@@ -67,20 +67,28 @@ def accept(self): |
67 | 67 | self.chanPassPhrase.text().toUtf8(), |
68 | 68 | True)) |
69 | 69 | addressGeneratorReturnValue = apiAddressGeneratorReturnQueue.get(True) |
70 | | - if addressGeneratorReturnValue and addressGeneratorReturnValue[0] != 'chan name does not match address': |
71 | | - UISignalQueue.put(('updateStatusBar', _translate( |
72 | | - "newchandialog", "Successfully created / joined chan %1").arg(unicode(self.chanPassPhrase.text())))) |
| 70 | + if addressGeneratorReturnValue \ |
| 71 | + and addressGeneratorReturnValue[0] \ |
| 72 | + != 'chan name does not match address': |
| 73 | + UISignalQueue.put(('updateStatusBar', |
| 74 | + _translate("newchandialog", |
| 75 | + "Successfully created / joined chan %1"). |
| 76 | + arg(unicode(self.chanPassPhrase.text())))) # pylint: disable=undefined-variable |
73 | 77 | self.parent.ui.tabWidget.setCurrentIndex( |
74 | 78 | self.parent.ui.tabWidget.indexOf(self.parent.ui.chans) |
75 | 79 | ) |
76 | 80 | self.done(QtGui.QDialog.Accepted) |
77 | 81 | else: |
78 | | - UISignalQueue.put(('updateStatusBar', _translate("newchandialog", "Chan creation / joining failed"))) |
| 82 | + UISignalQueue.put(('updateStatusBar', |
| 83 | + _translate("newchandialog", |
| 84 | + "Chan creation / joining failed"))) |
79 | 85 | self.done(QtGui.QDialog.Rejected) |
80 | 86 |
|
81 | 87 | def reject(self): |
82 | 88 | """Cancel joining the chan""" |
83 | 89 | self.timer.stop() |
84 | 90 | self.hide() |
85 | | - UISignalQueue.put(('updateStatusBar', _translate("newchandialog", "Chan creation / joining cancelled"))) |
| 91 | + UISignalQueue.put(('updateStatusBar', |
| 92 | + _translate("newchandialog", |
| 93 | + "Chan creation / joining cancelled"))) |
86 | 94 | self.done(QtGui.QDialog.Rejected) |
0 commit comments