mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Simplify identifier search/replace.
This commit is contained in:
parent
b670fe2194
commit
db47b8c067
@ -396,7 +396,10 @@ class MetadataBulkDialog(ResizableDialog, Ui_MetadataBulkDialog):
|
||||
|
||||
ident_types = sorted(self.db.get_all_identifier_types(), key=sort_key)
|
||||
self.s_r_dst_ident.setCompleter(QCompleter(ident_types))
|
||||
ident_types.insert(0, '')
|
||||
try:
|
||||
self.s_r_dst_ident.setPlaceholderText(_('Enter an identifier type'))
|
||||
except:
|
||||
pass
|
||||
self.s_r_src_ident.addItems(ident_types)
|
||||
|
||||
self.main_heading = _(
|
||||
@ -644,6 +647,10 @@ class MetadataBulkDialog(ResizableDialog, Ui_MetadataBulkDialog):
|
||||
dest = src
|
||||
dest_mode = self.replace_mode.currentIndex()
|
||||
|
||||
if self.destination_field_fm['is_csp']:
|
||||
if not unicode(self.s_r_dst_ident.text()):
|
||||
raise Exception(_('You must specify a destination identifier type'))
|
||||
|
||||
if self.destination_field_fm['is_multiple']:
|
||||
if self.comma_separated.isChecked():
|
||||
if dest == 'authors':
|
||||
|
@ -735,7 +735,7 @@ Future conversion of these books will use the default settings.</string>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="s_r_src_ident_label">
|
||||
<property name="text">
|
||||
<string>Identifier:</string>
|
||||
<string>Identifier type:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>s_r_src_ident</cstring>
|
||||
@ -751,7 +751,7 @@ Future conversion of these books will use the default settings.</string>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Choose which identifier to operate upon</string>
|
||||
<string>Choose which identifier type to operate upon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -936,7 +936,7 @@ not multiple and the destination field is multiple</string>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="s_r_dst_ident_label">
|
||||
<property name="text">
|
||||
<string>Identifier:</string>
|
||||
<string>Identifier type:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>s_r_dst_ident</cstring>
|
||||
@ -952,7 +952,7 @@ not multiple and the destination field is multiple</string>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Choose which identifier to operate upon</string>
|
||||
<string>Choose which identifier type to operate upon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user