mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add 'People' shortcut to create custom
This commit is contained in:
parent
fddc52a735
commit
b5b397dd82
@ -63,7 +63,7 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn):
|
|||||||
for col, name in [('isbn', _('ISBN')), ('formats', _('Formats')),
|
for col, name in [('isbn', _('ISBN')), ('formats', _('Formats')),
|
||||||
('last_modified', _('Modified Date')), ('yesno', _('Yes/No')),
|
('last_modified', _('Modified Date')), ('yesno', _('Yes/No')),
|
||||||
('tags', _('Tags')), ('series', _('Series')), ('rating',
|
('tags', _('Tags')), ('series', _('Series')), ('rating',
|
||||||
_('Rating'))]:
|
_('Rating')), ('people', _("People's names"))]:
|
||||||
text += ' <a href="col:%s">%s</a>,'%(col, name)
|
text += ' <a href="col:%s">%s</a>,'%(col, name)
|
||||||
text = text[:-1]
|
text = text[:-1]
|
||||||
self.shortcuts.setText(text)
|
self.shortcuts.setText(text)
|
||||||
@ -136,6 +136,7 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn):
|
|||||||
'tags' : 1,
|
'tags' : 1,
|
||||||
'series': 3,
|
'series': 3,
|
||||||
'rating': 8,
|
'rating': 8,
|
||||||
|
'people': 1,
|
||||||
}.get(which, 10))
|
}.get(which, 10))
|
||||||
self.column_name_box.setText(which)
|
self.column_name_box.setText(which)
|
||||||
self.column_heading_box.setText({
|
self.column_heading_box.setText({
|
||||||
@ -145,7 +146,10 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn):
|
|||||||
'tags': _('My Tags'),
|
'tags': _('My Tags'),
|
||||||
'series': _('My Series'),
|
'series': _('My Series'),
|
||||||
'rating': _('My Rating'),
|
'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():
|
if self.composite_box.isVisible():
|
||||||
self.composite_box.setText(
|
self.composite_box.setText(
|
||||||
{
|
{
|
||||||
@ -155,7 +159,6 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn):
|
|||||||
}[which])
|
}[which])
|
||||||
self.composite_sort_by.setCurrentIndex(2 if which == 'last_modified' else 0)
|
self.composite_sort_by.setCurrentIndex(2 if which == 'last_modified' else 0)
|
||||||
|
|
||||||
|
|
||||||
def datatype_changed(self, *args):
|
def datatype_changed(self, *args):
|
||||||
try:
|
try:
|
||||||
col_type = self.column_types[self.column_type_box.currentIndex()]['datatype']
|
col_type = self.column_types[self.column_type_box.currentIndex()]['datatype']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user