comparison browser_side/richtext.py @ 263:d3c734669577

browser_side: improvements for lists and contact groups manager: - use DockPanel to deal with UI problems - fixed issues with the autocomplete list - avoid duplicate contacts in a contact list - signal invalid contacts with a red border - check for invalid contacts in the form before saving - better genericity for the class DragAutoCompleteTextBox
author souliane <souliane@mailoo.org>
date Mon, 11 Nov 2013 12:48:33 +0100
parents 28d3315a8003
children 52e60dd2bc43
comparison
equal deleted inserted replaced
262:30c01671e338 263:d3c734669577
257 257
258 def __init__(self, parent): 258 def __init__(self, parent):
259 # TODO: be sure we also display empty groups and disconnected contacts + their groups 259 # TODO: be sure we also display empty groups and disconnected contacts + their groups
260 # store the full list of potential recipients (groups and contacts) 260 # store the full list of potential recipients (groups and contacts)
261 list_ = [] 261 list_ = []
262 list_.append("@@")
262 list_.extend("@%s" % group for group in parent.host.contact_panel.getGroups()) 263 list_.extend("@%s" % group for group in parent.host.contact_panel.getGroups())
263 list_.extend(contact for contact in parent.host.contact_panel.getContacts()) 264 list_.extend(contact for contact in parent.host.contact_panel.getContacts())
264 ListManager.__init__(self, parent, composition.RECIPIENT_TYPES, list_) 265 ListManager.__init__(self, parent, composition.RECIPIENT_TYPES, list_)
265 266
266 self.registerPopupMenuPanel(entries=composition.RECIPIENT_TYPES, 267 self.registerPopupMenuPanel(entries=composition.RECIPIENT_TYPES,