Mailing list archives: August 2007

Site index · List index
Message listThread · Author · Date
+ def advanceState(self, item, attributeName): + # If there is one, remove the existing reminder + remindable = pim.Remindable(item) + if remindable.getUserReminder(expiredToo=False) is not None: + remindable.userReminderTime = None + return + + # No existing one -- create one. + # @@@ unless this is a recurring event, for now. + if pim.has_stamp(item, pim.EventStamp) and pim.EventStamp(item).isRecurring(): + return # ignore the click. + remindable.userReminderTime = pim.Reminder.defaultTime() + + def ReadOnly (self, (item, attribute)): + """ + Until the Detail View supports read-only reminders, always allow + reminders to be removed. + + """ + return False + +# These flag bits govern the sort position of each communications state: +# Update = 1 +# In = 1 +# Out = 1 +# Draft = 1 +# Queued = 1 +# Sent = 1 +# NeedsReply = 1 +# Read = 1 +# Error = 1 +updateBit = 1 +inBit = updateBit * 2 +outBit = inBit * 2 +draftBit = outBit * 2 +queuedBit = draftBit * 2 +sentBit = queuedBit * 2 +needsReplyBit = sentBit * 2 +readBit = needsReplyBit * 2 +errorBit = readBit * 2 + +# For each bit, the attribute that contributes to it +# @@@ The ones given as strings are just placeholders. +bitSources = ( + (updateBit, 'isUpdate'), + (inBit, 'toMe'), + (outBit, 'fromMe'), + (draftBit, 'isDraft'), + (queuedBit, 'isQueued'), + (sentBit, 'isSent'), + (needsReplyBit, pim.ContentItem.needsReply.name), + (readBit, pim.ContentItem.read.name), + (errorBit, 'error'), +) + +# All the attribute names from the above, to use for +# monitoring on the index we build +bitSourceAttributes = map(lambda x: x[1], bitSources) + +# Each entry in this list corresponds to a row in the icon grid in +# the spec. Each will have "Read", "Unread", and "NeedsReply" tacked on +# when we ask the domain model. +statePairNames = ( + # Base name, True if it shows an icon when 'read' + ("Plain", False), + ("InDraft", True), + ("In", False), + ("OutDraft", True), + ("Out", False), + ("OutdateDraft", True), + ("Outdate", False), + ("IndateDraft", True), + ("Indate", False), + ("Queued", True), + ("Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show
Parlante    + def advanceState(self, item, attributeName): + # If there is one, remove the existing reminder + remindable = pim.Remindable(item) + if remindable.getUserReminder(expiredToo=False) is not None: + remindable.userReminderTime = None + return + + # No existing one -- create one. + # @@@ unless this is a recurring event, for now. + if pim.has_stamp(item, pim.EventStamp) and pim.EventStamp(item).isRecurring(): + return # ignore the click. + remindable.userReminderTime = pim.Reminder.defaultTime() + + def ReadOnly (self, (item, attribute)): + """ + Until the Detail View supports read-only reminders, always allow + reminders to be removed. + + """ + return False + +# These flag bits govern the sort position of each communications state: +# Update = 1 +# In = 1 +# Out = 1 +# Draft = 1 +# Queued = 1 +# Sent = 1 +# NeedsReply = 1 +# Read = 1 +# Error = 1 +updateBit = 1 +inBit = updateBit * 2 +outBit = inBit * 2 +draftBit = outBit * 2 +queuedBit = draftBit * 2 +sentBit = queuedBit * 2 +needsReplyBit = sentBit * 2 +readBit = needsReplyBit * 2 +errorBit = readBit * 2 + +# For each bit, the attribute that contributes to it +# @@@ The ones given as strings are just placeholders. +bitSources = ( + (updateBit, 'isUpdate'), + (inBit, 'toMe'), + (outBit, 'fromMe'), + (draftBit, 'isDraft'), + (queuedBit, 'isQueued'), + (sentBit, 'isSent'), + (needsReplyBit, pim.ContentItem.needsReply.name), + (readBit, pim.ContentItem.read.name), + (errorBit, 'error'), +) + +# All the attribute names from the above, to use for +# monitoring on the index we build +bitSourceAttributes = map(lambda x: x[1], bitSources) + +# Each entry in this list corresponds to a row in the icon grid in +# the spec. Each will have "Read", "Unread", and "NeedsReply" tacked on +# when we ask the domain model. +statePairNames = ( + # Base name, True if it shows an icon when 'read' + ("Plain", False), + ("InDraft", True), + ("In", False), + ("OutDraft", True), + ("Out", False), + ("OutdateDraft", True), + ("Outdate", False), + ("IndateDraft", True), + ("Indate", False), + ("Queued", True), + ("Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sat, 09 Apr, 03:30
Parlante    + def advanceState(self, item, attributeName): + # If there is one, remove the existing reminder + remindable = pim.Remindable(item) + if remindable.getUserReminder(expiredToo=False) is not None: + remindable.userReminderTime = None + return + + # No existing one -- create one. + # @@@ unless this is a recurring event, for now. + if pim.has_stamp(item, pim.EventStamp) and pim.EventStamp(item).isRecurring(): + return # ignore the click. + remindable.userReminderTime = pim.Reminder.defaultTime() + + def ReadOnly (self, (item, attribute)): + """ + Until the Detail View supports read-only reminders, always allow + reminders to be removed. + + """ + return False + +# These flag bits govern the sort position of each communications state: +# Update = 1 +# In = 1 +# Out = 1 +# Draft = 1 +# Queued = 1 +# Sent = 1 +# NeedsReply = 1 +# Read = 1 +# Error = 1 +updateBit = 1 +inBit = updateBit * 2 +outBit = inBit * 2 +draftBit = outBit * 2 +queuedBit = draftBit * 2 +sentBit = queuedBit * 2 +needsReplyBit = sentBit * 2 +readBit = needsReplyBit * 2 +errorBit = readBit * 2 + +# For each bit, the attribute that contributes to it +# @@@ The ones given as strings are just placeholders. +bitSources = ( + (updateBit, 'isUpdate'), + (inBit, 'toMe'), + (outBit, 'fromMe'), + (draftBit, 'isDraft'), + (queuedBit, 'isQueued'), + (sentBit, 'isSent'), + (needsReplyBit, pim.ContentItem.needsReply.name), + (readBit, pim.ContentItem.read.name), + (errorBit, 'error'), +) + +# All the attribute names from the above, to use for +# monitoring on the index we build +bitSourceAttributes = map(lambda x: x[1], bitSources) + +# Each entry in this list corresponds to a row in the icon grid in +# the spec. Each will have "Read", "Unread", and "NeedsReply" tacked on +# when we ask the domain model. +statePairNames = ( + # Base name, True if it shows an icon when 'read' + ("Plain", False), + ("InDraft", True), + ("In", False), + ("OutDraft", True), + ("Out", False), + ("OutdateDraft", True), + ("Outdate", False), + ("IndateDraft", True), + ("Indate", False), + ("Queued", True), + ("Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sat, 09 Apr, 03:30
Parlante    + def advanceState(self, item, attributeName): + # If there is one, remove the existing reminder + remindable = pim.Remindable(item) + if remindable.getUserReminder(expiredToo=False) is not None: + remindable.userReminderTime = None + return + + # No existing one -- create one. + # @@@ unless this is a recurring event, for now. + if pim.has_stamp(item, pim.EventStamp) and pim.EventStamp(item).isRecurring(): + return # ignore the click. + remindable.userReminderTime = pim.Reminder.defaultTime() + + def ReadOnly (self, (item, attribute)): + """ + Until the Detail View supports read-only reminders, always allow + reminders to be removed. + + """ + return False + +# These flag bits govern the sort position of each communications state: +# Update = 1 +# In = 1 +# Out = 1 +# Draft = 1 +# Queued = 1 +# Sent = 1 +# NeedsReply = 1 +# Read = 1 +# Error = 1 +updateBit = 1 +inBit = updateBit * 2 +outBit = inBit * 2 +draftBit = outBit * 2 +queuedBit = draftBit * 2 +sentBit = queuedBit * 2 +needsReplyBit = sentBit * 2 +readBit = needsReplyBit * 2 +errorBit = readBit * 2 + +# For each bit, the attribute that contributes to it +# @@@ The ones given as strings are just placeholders. +bitSources = ( + (updateBit, 'isUpdate'), + (inBit, 'toMe'), + (outBit, 'fromMe'), + (draftBit, 'isDraft'), + (queuedBit, 'isQueued'), + (sentBit, 'isSent'), + (needsReplyBit, pim.ContentItem.needsReply.name), + (readBit, pim.ContentItem.read.name), + (errorBit, 'error'), +) + +# All the attribute names from the above, to use for +# monitoring on the index we build +bitSourceAttributes = map(lambda x: x[1], bitSources) + +# Each entry in this list corresponds to a row in the icon grid in +# the spec. Each will have "Read", "Unread", and "NeedsReply" tacked on +# when we ask the domain model. +statePairNames = ( + # Base name, True if it shows an icon when 'read' + ("Plain", False), + ("InDraft", True), + ("In", False), + ("OutDraft", True), + ("Out", False), + ("OutdateDraft", True), + ("Outdate", False), + ("IndateDraft", True), + ("Indate", False), + ("Queued", True), + ("Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sat, 09 Apr, 03:30
Parlante    + def advanceState(self, item, attributeName): + # If there is one, remove the existing reminder + remindable = pim.Remindable(item) + if remindable.getUserReminder(expiredToo=False) is not None: + remindable.userReminderTime = None + return + + # No existing one -- create one. + # @@@ unless this is a recurring event, for now. + if pim.has_stamp(item, pim.EventStamp) and pim.EventStamp(item).isRecurring(): + return # ignore the click. + remindable.userReminderTime = pim.Reminder.defaultTime() + + def ReadOnly (self, (item, attribute)): + """ + Until the Detail View supports read-only reminders, always allow + reminders to be removed. + + """ + return False + +# These flag bits govern the sort position of each communications state: +# Update = 1 +# In = 1 +# Out = 1 +# Draft = 1 +# Queued = 1 +# Sent = 1 +# NeedsReply = 1 +# Read = 1 +# Error = 1 +updateBit = 1 +inBit = updateBit * 2 +outBit = inBit * 2 +draftBit = outBit * 2 +queuedBit = draftBit * 2 +sentBit = queuedBit * 2 +needsReplyBit = sentBit * 2 +readBit = needsReplyBit * 2 +errorBit = readBit * 2 + +# For each bit, the attribute that contributes to it +# @@@ The ones given as strings are just placeholders. +bitSources = ( + (updateBit, 'isUpdate'), + (inBit, 'toMe'), + (outBit, 'fromMe'), + (draftBit, 'isDraft'), + (queuedBit, 'isQueued'), + (sentBit, 'isSent'), + (needsReplyBit, pim.ContentItem.needsReply.name), + (readBit, pim.ContentItem.read.name), + (errorBit, 'error'), +) + +# All the attribute names from the above, to use for +# monitoring on the index we build +bitSourceAttributes = map(lambda x: x[1], bitSources) + +# Each entry in this list corresponds to a row in the icon grid in +# the spec. Each will have "Read", "Unread", and "NeedsReply" tacked on +# when we ask the domain model. +statePairNames = ( + # Base name, True if it shows an icon when 'read' + ("Plain", False), + ("InDraft", True), + ("In", False), + ("OutDraft", True), + ("Out", False), + ("OutdateDraft", True), + ("Outdate", False), + ("IndateDraft", True), + ("Indate", False), + ("Queued", True), + ("Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sat, 09 Apr, 03:30
Parlante    + def advanceState(self, item, attributeName): + # If there is one, remove the existing reminder + remindable = pim.Remindable(item) + if remindable.getUserReminder(expiredToo=False) is not None: + remindable.userReminderTime = None + return + + # No existing one -- create one. + # @@@ unless this is a recurring event, for now. + if pim.has_stamp(item, pim.EventStamp) and pim.EventStamp(item).isRecurring(): + return # ignore the click. + remindable.userReminderTime = pim.Reminder.defaultTime() + + def ReadOnly (self, (item, attribute)): + """ + Until the Detail View supports read-only reminders, always allow + reminders to be removed. + + """ + return False + +# These flag bits govern the sort position of each communications state: +# Update = 1 +# In = 1 +# Out = 1 +# Draft = 1 +# Queued = 1 +# Sent = 1 +# NeedsReply = 1 +# Read = 1 +# Error = 1 +updateBit = 1 +inBit = updateBit * 2 +outBit = inBit * 2 +draftBit = outBit * 2 +queuedBit = draftBit * 2 +sentBit = queuedBit * 2 +needsReplyBit = sentBit * 2 +readBit = needsReplyBit * 2 +errorBit = readBit * 2 + +# For each bit, the attribute that contributes to it +# @@@ The ones given as strings are just placeholders. +bitSources = ( + (updateBit, 'isUpdate'), + (inBit, 'toMe'), + (outBit, 'fromMe'), + (draftBit, 'isDraft'), + (queuedBit, 'isQueued'), + (sentBit, 'isSent'), + (needsReplyBit, pim.ContentItem.needsReply.name), + (readBit, pim.ContentItem.read.name), + (errorBit, 'error'), +) + +# All the attribute names from the above, to use for +# monitoring on the index we build +bitSourceAttributes = map(lambda x: x[1], bitSources) + +# Each entry in this list corresponds to a row in the icon grid in +# the spec. Each will have "Read", "Unread", and "NeedsReply" tacked on +# when we ask the domain model. +statePairNames = ( + # Base name, True if it shows an icon when 'read' + ("Plain", False), + ("InDraft", True), + ("In", False), + ("OutDraft", True), + ("Out", False), + ("OutdateDraft", True), + ("Outdate", False), + ("IndateDraft", True), + ("Indate", False), + ("Queued", True), + ("Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sat, 09 Apr, 03:30
h will have "Read", "Unread", and "NeedsReply" tacked on +# when we ask the domain model. +statePairNames = ( + # Base name, True if it shows an icon when 'read' + ("Plain", False), + ("InDraft", True), + ("In", False), + ("OutDraft", True), + ("Out", False), + ("OutdateDraft", True), + ("Outdate", False), + ("IndateDraft", True), + ("Indate", False), + ("Queued", True), + ("Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show
  h will have "Read", "Unread", and "NeedsReply" tacked on +# when we ask the domain model. +statePairNames = ( + # Base name, True if it shows an icon when 'read' + ("Plain", False), + ("InDraft", True), + ("In", False), + ("OutDraft", True), + ("Out", False), + ("OutdateDraft", True), + ("Outdate", False), + ("IndateDraft", True), + ("Indate", False), + ("Queued", True), + ("Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sat, 07 Apr, 02:32
;"" + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show
ic   ;"" + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sun, 07 Jun, 03:49
ic   ;"" + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sun, 07 Jun, 03:49
ic   ;"" + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sun, 07 Jun, 03:49
uot;Plain", False), + ("InDraft", True), + ("In", False), + ("OutDraft", True), + ("Out", False), + ("OutdateDraft", True), + ("Outdate", False), + ("IndateDraft", True), + ("Indate", False), + ("Queued", True), + ("Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show
m.@osafoundation.org>   uot;Plain", False), + ("InDraft", True), + ("In", False), + ("OutDraft", True), + ("Out", False), + ("OutdateDraft", True), + ("Outdate", False), + ("IndateDraft", True), + ("Indate", False), + ("Queued", True), + ("Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Mon, 03 May, 09:42
m.@osafoundation.org>   uot;Plain", False), + ("InDraft", True), + ("In", False), + ("OutDraft", True), + ("Out", False), + ("OutdateDraft", True), + ("Outdate", False), + ("IndateDraft", True), + ("Indate", False), + ("Queued", True), + ("Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Mon, 03 May, 09:42
;quot;Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show
ia   ;quot;Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Mon, 26 May, 09:29
ot;Plain", False), + ("InDraft", True), + ("In", False), + ("OutDraft", True), + ("Out", False), + ("OutdateDraft", True), + ("Outdate", False), + ("IndateDraft", True), + ("Indate", False), + ("Queued", True), + ("Error", True), +) + +def getItemCommState(itemOrUUID): + """ Given an item or a UUID, determine its communications state """ + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + """ Return the actual name for this state """ + + read = (commState & readBit) and "Read" or "Unread&amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show
<andre_mueningh...@fastmail.fm>   ot;Plain&amp;amp;quot;, False), + (&amp;amp;quot;InDraft&amp;amp;quot;, True), + (&amp;amp;quot;In&amp;amp;quot;, False), + (&amp;amp;quot;OutDraft&amp;amp;quot;, True), + (&amp;amp;quot;Out&amp;amp;quot;, False), + (&amp;amp;quot;OutdateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Outdate&amp;amp;quot;, False), + (&amp;amp;quot;IndateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Indate&amp;amp;quot;, False), + (&amp;amp;quot;Queued&amp;amp;quot;, True), + (&amp;amp;quot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Wed, 28 May, 18:41
&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/demo/bmp_source/wiztest1.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythondemobmp_sourcewiztest2bmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/demo/bmp_source/wiztest2.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythondemodatapic2bmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/demo/data/pic2.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesduplicatebmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/duplicate.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesellipseIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/ellipseIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesellipseIconSelbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/ellipseIconSel.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesfillOptIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/fillOptIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslineIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/lineIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslineIconSelbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/lineIconSel.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslineOptIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/lineOptIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslogobmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/logo.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesmoveBackbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/moveBack.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesmoveForwardbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/moveForward.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonEnddate/time&lt;/li&gt;</span>
is   &gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/demo/bmp_source/wiztest1.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythondemobmp_sourcewiztest2bmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/demo/bmp_source/wiztest2.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythondemodatapic2bmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/demo/data/pic2.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesduplicatebmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/duplicate.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesellipseIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/ellipseIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesellipseIconSelbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/ellipseIconSel.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesfillOptIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/fillOptIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslineIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/lineIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslineIconSelbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/lineIconSel.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslineOptIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/lineOptIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslogobmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/logo.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesmoveBackbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/moveBack.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesmoveForwardbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/moveForward.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonEnddate/time&lt;/li&gt;</span> Sun, 22 Jun, 20:09
/li&gt;</span>
is   /li&gt;</span> Sun, 22 Jun, 20:09
is   /li&gt;</span> Sun, 22 Jun, 20:09
lways allow + reminders to be removed. + + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + return False + +# These flag bits govern the sort position of each communications state: +# Update = 1 +# In = 1 +# Out = 1 +# Draft = 1 +# Queued = 1 +# Sent = 1 +# NeedsReply = 1 +# Read = 1 +# Error = 1 +updateBit = 1 +inBit = updateBit * 2 +outBit = inBit * 2 +draftBit = outBit * 2 +queuedBit = draftBit * 2 +sentBit = queuedBit * 2 +needsReplyBit = sentBit * 2 +readBit = needsReplyBit * 2 +errorBit = readBit * 2 + +# For each bit, the attribute that contributes to it +# @@@ The ones given as strings are just placeholders. +bitSources = ( + (updateBit, 'isUpdate'), + (inBit, 'toMe'), + (outBit, 'fromMe'), + (draftBit, 'isDraft'), + (queuedBit, 'isQueued'), + (sentBit, 'isSent'), + (needsReplyBit, pim.ContentItem.needsReply.name), + (readBit, pim.ContentItem.read.name), + (errorBit, 'error'), +) + +# All the attribute names from the above, to use for +# monitoring on the index we build +bitSourceAttributes = map(lambda x: x[1], bitSources) + +# Each entry in this list corresponds to a row in the icon grid in +# the spec. Each will have &amp;amp;quot;Read&amp;amp;quot;, &amp;amp;quot;Unread&amp;amp;quot;, and &amp;amp;quot;NeedsReply&amp;amp;quot; tacked on +# when we ask the domain model. +statePairNames = ( + # Base name, True if it shows an icon when 'read' + (&amp;amp;quot;Plain&amp;amp;quot;, False), + (&amp;amp;quot;InDraft&amp;amp;quot;, True), + (&amp;amp;quot;In&amp;amp;quot;, False), + (&amp;amp;quot;OutDraft&amp;amp;quot;, True), + (&amp;amp;quot;Out&amp;amp;quot;, False), + (&amp;amp;quot;OutdateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Outdate&amp;amp;quot;, False), + (&amp;amp;quot;IndateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Indate&amp;amp;quot;, False), + (&amp;amp;quot;Queued&amp;amp;quot;, True), + (&amp;amp;quot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show
<dmlyn...@gmail.com>   lways allow + reminders to be removed. + + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + return False + +# These flag bits govern the sort position of each communications state: +# Update = 1 +# In = 1 +# Out = 1 +# Draft = 1 +# Queued = 1 +# Sent = 1 +# NeedsReply = 1 +# Read = 1 +# Error = 1 +updateBit = 1 +inBit = updateBit * 2 +outBit = inBit * 2 +draftBit = outBit * 2 +queuedBit = draftBit * 2 +sentBit = queuedBit * 2 +needsReplyBit = sentBit * 2 +readBit = needsReplyBit * 2 +errorBit = readBit * 2 + +# For each bit, the attribute that contributes to it +# @@@ The ones given as strings are just placeholders. +bitSources = ( + (updateBit, 'isUpdate'), + (inBit, 'toMe'), + (outBit, 'fromMe'), + (draftBit, 'isDraft'), + (queuedBit, 'isQueued'), + (sentBit, 'isSent'), + (needsReplyBit, pim.ContentItem.needsReply.name), + (readBit, pim.ContentItem.read.name), + (errorBit, 'error'), +) + +# All the attribute names from the above, to use for +# monitoring on the index we build +bitSourceAttributes = map(lambda x: x[1], bitSources) + +# Each entry in this list corresponds to a row in the icon grid in +# the spec. Each will have &amp;amp;quot;Read&amp;amp;quot;, &amp;amp;quot;Unread&amp;amp;quot;, and &amp;amp;quot;NeedsReply&amp;amp;quot; tacked on +# when we ask the domain model. +statePairNames = ( + # Base name, True if it shows an icon when 'read' + (&amp;amp;quot;Plain&amp;amp;quot;, False), + (&amp;amp;quot;InDraft&amp;amp;quot;, True), + (&amp;amp;quot;In&amp;amp;quot;, False), + (&amp;amp;quot;OutDraft&amp;amp;quot;, True), + (&amp;amp;quot;Out&amp;amp;quot;, False), + (&amp;amp;quot;OutdateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Outdate&amp;amp;quot;, False), + (&amp;amp;quot;IndateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Indate&amp;amp;quot;, False), + (&amp;amp;quot;Queued&amp;amp;quot;, True), + (&amp;amp;quot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Mon, 22 Nov, 00:00
<dmlyn...@gmail.com>   lways allow + reminders to be removed. + + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + return False + +# These flag bits govern the sort position of each communications state: +# Update = 1 +# In = 1 +# Out = 1 +# Draft = 1 +# Queued = 1 +# Sent = 1 +# NeedsReply = 1 +# Read = 1 +# Error = 1 +updateBit = 1 +inBit = updateBit * 2 +outBit = inBit * 2 +draftBit = outBit * 2 +queuedBit = draftBit * 2 +sentBit = queuedBit * 2 +needsReplyBit = sentBit * 2 +readBit = needsReplyBit * 2 +errorBit = readBit * 2 + +# For each bit, the attribute that contributes to it +# @@@ The ones given as strings are just placeholders. +bitSources = ( + (updateBit, 'isUpdate'), + (inBit, 'toMe'), + (outBit, 'fromMe'), + (draftBit, 'isDraft'), + (queuedBit, 'isQueued'), + (sentBit, 'isSent'), + (needsReplyBit, pim.ContentItem.needsReply.name), + (readBit, pim.ContentItem.read.name), + (errorBit, 'error'), +) + +# All the attribute names from the above, to use for +# monitoring on the index we build +bitSourceAttributes = map(lambda x: x[1], bitSources) + +# Each entry in this list corresponds to a row in the icon grid in +# the spec. Each will have &amp;amp;quot;Read&amp;amp;quot;, &amp;amp;quot;Unread&amp;amp;quot;, and &amp;amp;quot;NeedsReply&amp;amp;quot; tacked on +# when we ask the domain model. +statePairNames = ( + # Base name, True if it shows an icon when 'read' + (&amp;amp;quot;Plain&amp;amp;quot;, False), + (&amp;amp;quot;InDraft&amp;amp;quot;, True), + (&amp;amp;quot;In&amp;amp;quot;, False), + (&amp;amp;quot;OutDraft&amp;amp;quot;, True), + (&amp;amp;quot;Out&amp;amp;quot;, False), + (&amp;amp;quot;OutdateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Outdate&amp;amp;quot;, False), + (&amp;amp;quot;IndateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Indate&amp;amp;quot;, False), + (&amp;amp;quot;Queued&amp;amp;quot;, True), + (&amp;amp;quot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Mon, 22 Nov, 00:00
in&amp;amp;quot;, False), + (&amp;amp;quot;InDraft&amp;amp;quot;, True), + (&amp;amp;quot;In&amp;amp;quot;, False), + (&amp;amp;quot;OutDraft&amp;amp;quot;, True), + (&amp;amp;quot;Out&amp;amp;quot;, False), + (&amp;amp;quot;OutdateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Outdate&amp;amp;quot;, False), + (&amp;amp;quot;IndateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Indate&amp;amp;quot;, False), + (&amp;amp;quot;Queued&amp;amp;quot;, True), + (&amp;amp;quot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show
<rcott...@cottiss.com>   in&amp;amp;quot;, False), + (&amp;amp;quot;InDraft&amp;amp;quot;, True), + (&amp;amp;quot;In&amp;amp;quot;, False), + (&amp;amp;quot;OutDraft&amp;amp;quot;, True), + (&amp;amp;quot;Out&amp;amp;quot;, False), + (&amp;amp;quot;OutdateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Outdate&amp;amp;quot;, False), + (&amp;amp;quot;IndateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Indate&amp;amp;quot;, False), + (&amp;amp;quot;Queued&amp;amp;quot;, True), + (&amp;amp;quot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sat, 22 Jun, 00:06
<rcott...@cottiss.com>   in&amp;amp;quot;, False), + (&amp;amp;quot;InDraft&amp;amp;quot;, True), + (&amp;amp;quot;In&amp;amp;quot;, False), + (&amp;amp;quot;OutDraft&amp;amp;quot;, True), + (&amp;amp;quot;Out&amp;amp;quot;, False), + (&amp;amp;quot;OutdateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Outdate&amp;amp;quot;, False), + (&amp;amp;quot;IndateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Indate&amp;amp;quot;, False), + (&amp;amp;quot;Queued&amp;amp;quot;, True), + (&amp;amp;quot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sat, 22 Jun, 00:06
<rcott...@cottiss.com>   in&amp;amp;quot;, False), + (&amp;amp;quot;InDraft&amp;amp;quot;, True), + (&amp;amp;quot;In&amp;amp;quot;, False), + (&amp;amp;quot;OutDraft&amp;amp;quot;, True), + (&amp;amp;quot;Out&amp;amp;quot;, False), + (&amp;amp;quot;OutdateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Outdate&amp;amp;quot;, False), + (&amp;amp;quot;IndateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Indate&amp;amp;quot;, False), + (&amp;amp;quot;Queued&amp;amp;quot;, True), + (&amp;amp;quot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sat, 22 Jun, 00:06
<rcott...@cottiss.com>   in&amp;amp;quot;, False), + (&amp;amp;quot;InDraft&amp;amp;quot;, True), + (&amp;amp;quot;In&amp;amp;quot;, False), + (&amp;amp;quot;OutDraft&amp;amp;quot;, True), + (&amp;amp;quot;Out&amp;amp;quot;, False), + (&amp;amp;quot;OutdateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Outdate&amp;amp;quot;, False), + (&amp;amp;quot;IndateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Indate&amp;amp;quot;, False), + (&amp;amp;quot;Queued&amp;amp;quot;, True), + (&amp;amp;quot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sat, 22 Jun, 00:06
<rcott...@cottiss.com>   in&amp;amp;quot;, False), + (&amp;amp;quot;InDraft&amp;amp;quot;, True), + (&amp;amp;quot;In&amp;amp;quot;, False), + (&amp;amp;quot;OutDraft&amp;amp;quot;, True), + (&amp;amp;quot;Out&amp;amp;quot;, False), + (&amp;amp;quot;OutdateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Outdate&amp;amp;quot;, False), + (&amp;amp;quot;IndateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Indate&amp;amp;quot;, False), + (&amp;amp;quot;Queued&amp;amp;quot;, True), + (&amp;amp;quot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sat, 22 Jun, 00:06
<rcott...@cottiss.com>   in&amp;amp;quot;, False), + (&amp;amp;quot;InDraft&amp;amp;quot;, True), + (&amp;amp;quot;In&amp;amp;quot;, False), + (&amp;amp;quot;OutDraft&amp;amp;quot;, True), + (&amp;amp;quot;Out&amp;amp;quot;, False), + (&amp;amp;quot;OutdateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Outdate&amp;amp;quot;, False), + (&amp;amp;quot;IndateDraft&amp;amp;quot;, True), + (&amp;amp;quot;Indate&amp;amp;quot;, False), + (&amp;amp;quot;Queued&amp;amp;quot;, True), + (&amp;amp;quot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Sat, 22 Jun, 00:06
x"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythondemobmp_sourcewiztest1bmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/demo/bmp_source/wiztest1.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythondemobmp_sourcewiztest2bmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/demo/bmp_source/wiztest2.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythondemodatapic2bmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/demo/data/pic2.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesduplicatebmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/duplicate.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesellipseIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/ellipseIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesellipseIconSelbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/ellipseIconSel.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesfillOptIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/fillOptIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslineIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/lineIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslineIconSelbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/lineIconSel.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslineOptIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/lineOptIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslogobmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/logo.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesmoveBackbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/moveBack.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesmoveForwardbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/moveForward.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonEnddate/time&lt;/li&gt;</span>
sut   x"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythondemobmp_sourcewiztest1bmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/demo/bmp_source/wiztest1.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythondemobmp_sourcewiztest2bmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/demo/bmp_source/wiztest2.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythondemodatapic2bmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/demo/data/pic2.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesduplicatebmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/duplicate.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesellipseIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/ellipseIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesellipseIconSelbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/ellipseIconSel.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesfillOptIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/fillOptIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslineIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/lineIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslineIconSelbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/lineIconSel.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslineOptIconbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/lineOptIcon.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimageslogobmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/logo.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesmoveBackbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/moveBack.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonsamplespySketchimagesmoveForwardbmp"&gt;&lt;/a&gt;&lt;divclass="propset"&gt;&lt;h4&gt;Propertychanges:trunk/internal/wxPython-2.5/wxPython/samples/pySketch/images/moveForward.bmp&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="cx"&gt;Name:svn:mime-type-application/octet-stream+image/x-ms-bmp&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkinternalwxPython25wxPythonEnddate/time&lt;/li&gt;</span> Fri, 06 Mar, 15:55
uot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show
e   uot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Tue, 21 Mar, 19:22
e   uot;Error&amp;amp;quot;, True), +) + +def getItemCommState(itemOrUUID): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Given an item or a UUID, determine its communications state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + result = 0 + if isinstance(itemOrUUID, UUID): + values = view.findValues(itemOrUUID, bitSourceAttributes) + for (bit, ignored), v in izip(bitSources, values): + if v: + result |= bit + else: + for (bit, attributeName) in bitSources: + if getattr(itemOrUUID, attributeName, False): + result |= bit + return result + +def getCommStateName(commState): + &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; Return the actual name for this state &amp;amp;quot;&amp;amp;quot;&amp;amp;quot; + + read = (commState &amp;amp;amp; readBit) and &amp;amp;quot;Read&amp;amp;quot; or &amp;amp;quot;Unread&amp;amuteEditor(attributeEditors.BaseAttributeEditor): + # Set this to '' to show Tue, 21 Mar, 19:22
Message listThread · Author · Date
Box list
Jan 200827
Dec 2007224
Nov 2007217
Oct 2007105
Sep 200793
Aug 200727
Jul 2007105
Jun 2007108
May 2007292
Apr 2007276
Mar 2007275
Feb 2007303
Jan 2007183
Dec 2006232
Nov 2006183
Oct 200697
Sep 2006163
Aug 2006162
Jul 2006265
Jun 2006136
May 2006105
Apr 2006208
Mar 2006229
Feb 2006230
Jan 2006260
Dec 2005128
Nov 2005246
Oct 2005123
Sep 200572
Aug 200524
Jul 200517
Jun 20054
May 200520
Apr 20059
Mar 200519
Feb 200514
Jan 200548
Dec 200448
Nov 200410
Oct 20043
Aug 200411
Jul 20045
Jun 200412
May 20041
Apr 200421
Mar 200419
Feb 20047
Jan 200463
Dec 200344
Nov 200335
Oct 200343
Sep 200338
Aug 200354
Jul 200314
Jun 200360
May 2003125
Apr 2003117
Mar 2003166
Feb 2003220
Jan 2003408
Dec 2002297
Nov 2002728
Oct 2002479