Add 'People' shortcut to create custom

This commit is contained in:
Charles Haley 2011-03-22 17:16:10 +00:00
parent fddc52a735
commit b5b397dd82

View File

@ -63,7 +63,7 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn):
for col, name in [('isbn', _('ISBN')), ('formats', _('Formats')),
('last_modified', _('Modified Date')), ('yesno', _('Yes/No')),
('tags', _('Tags')), ('series', _('Series')), ('rating',
_('Rating'))]:
_('Rating')), ('people', _("People's names"))]:
text += ' <a href="col:%s">%s</a>,'%(col, name)
text = text[:-1]
self.shortcuts.setText(text)
@ -136,6 +136,7 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn):
'tags' : 1,
'series': 3,
'rating': 8,
'people': 1,
}.get(which, 10))
self.column_name_box.setText(which)
self.column_heading_box.setText({
@ -145,7 +146,10 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn):
'tags': _('My Tags'),
'series': _('My Series'),
'rating': _('My Rating'),
'last_modified':_('Modified Date')}[which])
'last_modified':_('Modified Date'),
'people': _('People')}[which])
if which == 'people':
self.is_names.setChecked(True)
if self.composite_box.isVisible():
self.composite_box.setText(
{
@ -155,7 +159,6 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn):
}[which])
self.composite_sort_by.setCurrentIndex(2 if which == 'last_modified' else 0)
def datatype_changed(self, *args):
try:
col_type = self.column_types[self.column_type_box.currentIndex()]['datatype']