Skip to content

Commit 321bf9a

Browse files
mailchuckPeterSurda
authored andcommitted
Chan UI fix
Minor chan UI fix. Still not completely smooth but mostly working.
1 parent 552876e commit 321bf9a

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/bitmessageqt/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2667,7 +2667,7 @@ def on_action_EmailGatewayDialog(self):
26672667
acct = accountClass(addressAtCurrentRow)
26682668
# no chans / mailinglists
26692669
if acct.type != 'normal':
2670-
continue
2670+
return
26712671
if self.dialog.ui.radioButtonUnregister.isChecked():
26722672
print "unregister"
26732673
acct.unregister()
@@ -3481,7 +3481,10 @@ def treeWidgetItemChanged(self, item, column):
34813481
if column != 0:
34823482
return
34833483
# only account names of normal addresses (no chans/mailinglists)
3484-
if (not isinstance(item, Ui_AddressWidget)) or item.type != 'normal':
3484+
if (not isinstance(item, Ui_AddressWidget)) or item.type != 'normal' or self.getCurrentTreeWidget().currentItem() is None:
3485+
return
3486+
# not visible
3487+
if (not self.getCurrentAccount()) or (not isinstance (self.getCurrentAccount(), Ui_AddressWidget)):
34853488
return
34863489
# only currently selected item
34873490
if item.address != self.getCurrentTreeWidget().currentItem().address:

src/bitmessageqt/account.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ def accountClass(address):
2828
class BMAccount(object):
2929
def __init__(self, address = None):
3030
self.address = address
31+
self.type = 'normal'
32+
if shared.config.has_section(address):
33+
if shared.safeConfigGetBoolean(self.address, 'chan'):
34+
self.type = "chan"
35+
elif shared.safeConfigGetBoolean(self.address, 'mailinglist'):
36+
self.type = "mailinglist"
3137

3238
def getLabel(self, address = None):
3339
if address is None:

0 commit comments

Comments
 (0)