def _createColumns(self): # pylint: disable-msg=W0142 kwargs = dict(renderDescriptionCallback=lambda category: category.description(), resizeCallback=self.onResizeColumn) columns = [widgets.Column('subject', _('Subject'), category.Category.subjectChangedEventType(), sortCallback=uicommand.ViewerSortByCommand(viewer=self, value='subject'), imageIndexCallback=self.subjectImageIndex, width=self.getColumnWidth('subject'), **kwargs), widgets.Column('description', _('Description'), category.Category.descriptionChangedEventType(), sortCallback=uicommand.ViewerSortByCommand(viewer=self, value='description'), renderCallback=lambda category: category.description(), width=self.getColumnWidth('description'), **kwargs), widgets.Column('attachments', '', category.Category.attachmentsChangedEventType(), # pylint: disable-msg=E1101 width=self.getColumnWidth('attachments'), alignment=wx.LIST_FORMAT_LEFT, imageIndexCallback=self.attachmentImageIndex, headerImageIndex=self.imageIndex['paperclip_icon'], renderCallback=lambda category: '', **kwargs)] if self.settings.getboolean('feature', 'notes'): columns.append(widgets.Column('notes', '', category.Category.notesChangedEventType(), # pylint: disable-msg=E1101 width=self.getColumnWidth('notes'), alignment=wx.LIST_FORMAT_LEFT, imageIndexCallback=self.noteImageIndex, headerImageIndex=self.imageIndex['note_icon'], renderCallback=lambda category: '', **kwargs)) return columns
def _createColumns(self): # pylint: disable-msg=W0142 kwargs = dict( renderDescriptionCallback=lambda category: category.description(), resizeCallback=self.onResizeColumn) columns = [ widgets.Column('subject', _('Subject'), category.Category.subjectChangedEventType(), sortCallback=uicommand.ViewerSortByCommand( viewer=self, value='subject'), imageIndexCallback=self.subjectImageIndex, width=self.getColumnWidth('subject'), **kwargs), widgets.Column( 'description', _('Description'), category.Category.descriptionChangedEventType(), sortCallback=uicommand.ViewerSortByCommand( viewer=self, value='description'), renderCallback=lambda category: category.description(), width=self.getColumnWidth('description'), **kwargs), widgets.Column( 'attachments', '', category.Category.attachmentsChangedEventType( ), # pylint: disable-msg=E1101 width=self.getColumnWidth('attachments'), alignment=wx.LIST_FORMAT_LEFT, imageIndexCallback=self.attachmentImageIndex, headerImageIndex=self.imageIndex['paperclip_icon'], renderCallback=lambda category: '', **kwargs) ] if self.settings.getboolean('feature', 'notes'): columns.append( widgets.Column( 'notes', '', category.Category.notesChangedEventType( ), # pylint: disable-msg=E1101 width=self.getColumnWidth('notes'), alignment=wx.LIST_FORMAT_LEFT, imageIndexCallback=self.noteImageIndex, headerImageIndex=self.imageIndex['note_icon'], renderCallback=lambda category: '', **kwargs)) return columns
def _createColumns(self): # pylint: disable=W0142,E1101 kwargs = dict(renderDescriptionCallback=lambda category: category.description(), resizeCallback=self.onResizeColumn) columns = [widgets.Column('subject', _('Subject'), category.Category.subjectChangedEventType(), sortCallback=uicommand.ViewerSortByCommand(viewer=self, value='subject'), imageIndicesCallback=self.subjectImageIndices, width=self.getColumnWidth('subject'), editCallback=self.onEditSubject, editControl=inplace_editor.SubjectCtrl, **kwargs), widgets.Column('description', _('Description'), category.Category.descriptionChangedEventType(), sortCallback=uicommand.ViewerSortByCommand(viewer=self, value='description'), renderCallback=lambda category: category.description(), width=self.getColumnWidth('description'), editCallback=self.onEditDescription, editControl=inplace_editor.DescriptionCtrl, **kwargs), widgets.Column('attachments', '', category.Category.attachmentsChangedEventType(), # pylint: disable=E1101 width=self.getColumnWidth('attachments'), alignment=wx.LIST_FORMAT_LEFT, imageIndicesCallback=self.attachmentImageIndices, headerImageIndex=self.imageIndex['paperclip_icon'], renderCallback=lambda category: '', **kwargs)] if self.settings.getboolean('feature', 'notes'): columns.append(widgets.Column('notes', '', category.Category.notesChangedEventType(), # pylint: disable=E1101 width=self.getColumnWidth('notes'), alignment=wx.LIST_FORMAT_LEFT, imageIndicesCallback=self.noteImageIndices, headerImageIndex=self.imageIndex['note_icon'], renderCallback=lambda category: '', **kwargs)) columns.append(widgets.Column('creationDateTime', _('Creation date'), width=self.getColumnWidth('creationDateTime'), renderCallback=self.renderCreationDateTime, sortCallback=uicommand.ViewerSortByCommand(viewer=self, value='creationDateTime'), **kwargs)) columns.append(widgets.Column('modificationDateTime', _('Modification date'), width=self.getColumnWidth('modificationDateTime'), renderCallback=self.renderModificationDateTime, sortCallback=uicommand.ViewerSortByCommand(viewer=self, value='modificationDateTime'), *category.Category.modificationEventTypes(), **kwargs)) #columns.append(widgets.Column('Create global category')) return columns
def _createColumns(self): # pylint: disable=W0142,E1101 kwargs = dict( renderDescriptionCallback=lambda category: category.description(), resizeCallback=self.onResizeColumn) columns = [ widgets.Column('subject', _('Subject'), category.Category.subjectChangedEventType(), sortCallback=uicommand.ViewerSortByCommand( viewer=self, value='subject'), imageIndicesCallback=self.subjectImageIndices, width=self.getColumnWidth('subject'), editCallback=self.onEditSubject, editControl=inplace_editor.SubjectCtrl, **kwargs), widgets.Column( 'description', _('Description'), category.Category.descriptionChangedEventType(), sortCallback=uicommand.ViewerSortByCommand( viewer=self, value='description'), renderCallback=lambda category: category.description(), width=self.getColumnWidth('description'), editCallback=self.onEditDescription, editControl=inplace_editor.DescriptionCtrl, **kwargs), widgets.Column( 'attachments', '', category.Category.attachmentsChangedEventType(), # pylint: disable=E1101 width=self.getColumnWidth('attachments'), alignment=wx.LIST_FORMAT_LEFT, imageIndicesCallback=self.attachmentImageIndices, headerImageIndex=self.imageIndex['paperclip_icon'], renderCallback=lambda category: '', **kwargs) ] if self.settings.getboolean('feature', 'notes'): columns.append( widgets.Column( 'notes', '', category.Category.notesChangedEventType(), # pylint: disable=E1101 width=self.getColumnWidth('notes'), alignment=wx.LIST_FORMAT_LEFT, imageIndicesCallback=self.noteImageIndices, headerImageIndex=self.imageIndex['note_icon'], renderCallback=lambda category: '', **kwargs)) columns.append( widgets.Column('creationDateTime', _('Creation date'), width=self.getColumnWidth('creationDateTime'), renderCallback=self.renderCreationDateTime, sortCallback=uicommand.ViewerSortByCommand( viewer=self, value='creationDateTime'), **kwargs)) columns.append( widgets.Column('modificationDateTime', _('Modification date'), width=self.getColumnWidth('modificationDateTime'), renderCallback=self.renderModificationDateTime, sortCallback=uicommand.ViewerSortByCommand( viewer=self, value='modificationDateTime'), *category.Category.modificationEventTypes(), **kwargs)) #columns.append(widgets.Column('Create global category')) return columns