diff --git a/src/calibre/gui2/custom_column_widgets.py b/src/calibre/gui2/custom_column_widgets.py
index 287d89aa84..79faff3bb9 100644
--- a/src/calibre/gui2/custom_column_widgets.py
+++ b/src/calibre/gui2/custom_column_widgets.py
@@ -160,7 +160,7 @@ class Comments(Base):
self._layout = QVBoxLayout()
self._tb = QPlainTextEdit(self._box)
self._tb.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
- self._tb.setTabChangesFocus()
+ self._tb.setTabChangesFocus(True)
self._layout.addWidget(self._tb)
self._box.setLayout(self._layout)
self.widgets = [self._box]
@@ -275,3 +275,6 @@ def populate_single_metadata_page(left, right, db, book_id, parent=None):
return ans, items
+def populate_bulk_metadata_page(left, right, db, book_id, parent=None):
+ pass
+
diff --git a/src/calibre/gui2/dialogs/metadata_bulk.py b/src/calibre/gui2/dialogs/metadata_bulk.py
index 5909f56c28..3e2f98af71 100644
--- a/src/calibre/gui2/dialogs/metadata_bulk.py
+++ b/src/calibre/gui2/dialogs/metadata_bulk.py
@@ -10,6 +10,7 @@ from calibre.gui2.dialogs.metadata_bulk_ui import Ui_MetadataBulkDialog
from calibre.gui2.dialogs.tag_editor import TagEditor
from calibre.ebooks.metadata import string_to_authors, authors_to_sort_string, \
authors_to_string
+from calibre.gui2.custom_column_widgets import populate_bulk_metadata_page
class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
@@ -19,7 +20,8 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
self.setupUi(self)
self.db = db
self.ids = [db.id(r) for r in rows]
- self.groupBox.setTitle(_('Editing meta information for %d books') %
+ self.box_title.setText('
' +
+ _('Editing meta information for %d books') %
len(rows))
self.write_series = False
self.changed = False
@@ -38,9 +40,16 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
QObject.connect(self.series, SIGNAL('currentIndexChanged(int)'), self.series_changed)
QObject.connect(self.series, SIGNAL('editTextChanged(QString)'), self.series_changed)
QObject.connect(self.tag_editor_button, SIGNAL('clicked()'), self.tag_editor)
+ if len(db.custom_column_label_map) == 0:
+ self.central_widget.tabBar().setVisible(False)
+ else:
+ self.create_custom_column_editors()
self.exec_()
+ def create_custom_column_editors(self):
+ pass
+
def initialize_combos(self):
self.initalize_authors()
self.initialize_series()
diff --git a/src/calibre/gui2/dialogs/metadata_bulk.ui b/src/calibre/gui2/dialogs/metadata_bulk.ui
index 01b5fc0adb..a69c02dbc4 100644
--- a/src/calibre/gui2/dialogs/metadata_bulk.ui
+++ b/src/calibre/gui2/dialogs/metadata_bulk.ui
@@ -6,8 +6,8 @@
0
0
- 495
- 468
+ 526
+ 499
@@ -18,6 +18,16 @@
:/images/edit_input.svg:/images/edit_input.svg
+ -
+
+
+
+
+
+ Qt::AlignCenter
+
+
+
-
@@ -27,239 +37,249 @@
0
-
-
-
- Meta information
+
+
+ 0
-
-
-
-
-
- &Author(s):
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- authors
-
-
-
- -
-
-
- A&utomatically set author sort
-
-
-
- -
-
-
- Author s&ort:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- author_sort
-
-
-
- -
-
-
- Specify how the author(s) of this book should be sorted. For example Charles Dickens should be sorted as Dickens, Charles.
-
-
-
- -
-
-
- &Rating:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- rating
-
-
-
- -
-
-
- Rating of this book. 0-5 stars
-
-
- Rating of this book. 0-5 stars
-
-
- QAbstractSpinBox::PlusMinus
-
-
- No change
-
-
- stars
-
-
- -1
-
-
- 5
-
-
- -1
-
-
-
- -
-
-
- &Publisher:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- publisher
-
-
-
- -
-
-
- true
-
-
-
- -
-
-
- Add ta&gs:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- tags
-
-
-
- -
-
-
- Tags categorize the book. This is particularly useful while searching. <br><br>They can be any words or phrases, separated by commas.
-
-
-
- -
-
-
- Open Tag Editor
-
-
- Open Tag Editor
-
-
-
- :/images/chapters.svg:/images/chapters.svg
-
-
-
- -
-
-
- &Remove tags:
-
-
- remove_tags
-
-
-
- -
-
-
- Comma separated list of tags to remove from the books.
-
-
-
- -
-
-
- &Series:
-
-
- Qt::PlainText
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- series
-
-
-
- -
-
-
- List of known series. You can add new series.
-
-
- List of known series. You can add new series.
-
-
- true
-
-
- QComboBox::InsertAlphabetically
-
-
- QComboBox::AdjustToContents
-
-
-
- -
-
-
- Remove &format:
-
-
- remove_format
-
-
-
- -
-
-
- -
-
-
- true
-
-
-
- -
-
-
- &Swap title and author
-
-
-
- -
-
-
- Selected books will be automatically numbered,
+
+
+ &Basic metadata
+
+
+
-
+
+
+ &Author(s):
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ authors
+
+
+
+ -
+
+
+ A&utomatically set author sort
+
+
+
+ -
+
+
+ Author s&ort:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ author_sort
+
+
+
+ -
+
+
+ Specify how the author(s) of this book should be sorted. For example Charles Dickens should be sorted as Dickens, Charles.
+
+
+
+ -
+
+
+ &Rating:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ rating
+
+
+
+ -
+
+
+ Rating of this book. 0-5 stars
+
+
+ Rating of this book. 0-5 stars
+
+
+ QAbstractSpinBox::PlusMinus
+
+
+ No change
+
+
+ stars
+
+
+ -1
+
+
+ 5
+
+
+ -1
+
+
+
+ -
+
+
+ &Publisher:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ publisher
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ Add ta&gs:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ tags
+
+
+
+ -
+
+
+ Tags categorize the book. This is particularly useful while searching. <br><br>They can be any words or phrases, separated by commas.
+
+
+
+ -
+
+
+ Open Tag Editor
+
+
+ Open Tag Editor
+
+
+
+ :/images/chapters.svg:/images/chapters.svg
+
+
+
+ -
+
+
+ &Remove tags:
+
+
+ remove_tags
+
+
+
+ -
+
+
+ Comma separated list of tags to remove from the books.
+
+
+
+ -
+
+
+ &Series:
+
+
+ Qt::PlainText
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ series
+
+
+
+ -
+
+
+ List of known series. You can add new series.
+
+
+ List of known series. You can add new series.
+
+
+ true
+
+
+ QComboBox::InsertAlphabetically
+
+
+ QComboBox::AdjustToContents
+
+
+
+ -
+
+
+ Remove &format:
+
+
+ remove_format
+
+
+
+ -
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ &Swap title and author
+
+
+
+ -
+
+
+ Selected books will be automatically numbered,
in the order you selected them.
So if you selected Book A and then Book B,
Book A will have series number 1 and Book B series number 2.
-
-
- Automatically number books in this series
-
-
-
-
+
+
+ Automatically number books in this series
+
+
+
+
+
+
+
+ &Custom metadata
+
+
@@ -342,21 +362,5 @@ Book A will have series number 1 and Book B series number 2.
-
- auto_author_sort
- toggled(bool)
- author_sort
- setDisabled(bool)
-
-
- 240
- 95
-
-
- 240
- 113
-
-
-