Chan UI fix

Minor chan UI fix. Still not completely smooth but mostly working.
This commit is contained in:
mailchuck 2015-10-05 17:07:23 +02:00
parent 0bbd853341
commit e3ffc560cb
2 changed files with 11 additions and 2 deletions

View File

@ -2665,7 +2665,7 @@ more work your computer must do to send the message. A Time-To-Live of four or f
acct = accountClass(addressAtCurrentRow) acct = accountClass(addressAtCurrentRow)
# no chans / mailinglists # no chans / mailinglists
if acct.type != 'normal': if acct.type != 'normal':
continue return
if self.dialog.ui.radioButtonUnregister.isChecked(): if self.dialog.ui.radioButtonUnregister.isChecked():
print "unregister" print "unregister"
acct.unregister() acct.unregister()
@ -3479,7 +3479,10 @@ more work your computer must do to send the message. A Time-To-Live of four or f
if column != 0: if column != 0:
return return
# only account names of normal addresses (no chans/mailinglists) # only account names of normal addresses (no chans/mailinglists)
if (not isinstance(item, Ui_AddressWidget)) or item.type != 'normal': if (not isinstance(item, Ui_AddressWidget)) or item.type != 'normal' or self.getCurrentTreeWidget().currentItem() is None:
return
# not visible
if (not self.getCurrentAccount()) or (not isinstance (self.getCurrentAccount(), Ui_AddressWidget)):
return return
# only currently selected item # only currently selected item
if item.address != self.getCurrentTreeWidget().currentItem().address: if item.address != self.getCurrentTreeWidget().currentItem().address:

View File

@ -28,6 +28,12 @@ def accountClass(address):
class BMAccount(object): class BMAccount(object):
def __init__(self, address = None): def __init__(self, address = None):
self.address = address self.address = address
self.type = 'normal'
if shared.config.has_section(address):
if shared.safeConfigGetBoolean(self.address, 'chan'):
self.type = "chan"
elif shared.safeConfigGetBoolean(self.address, 'mailinglist'):
self.type = "mailinglist"
def getLabel(self, address = None): def getLabel(self, address = None):
if address is None: if address is None: