mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
6e9f81954a
commit
941849c58f
@ -160,7 +160,7 @@ class Comments(Base):
|
|||||||
self._layout = QVBoxLayout()
|
self._layout = QVBoxLayout()
|
||||||
self._tb = QPlainTextEdit(self._box)
|
self._tb = QPlainTextEdit(self._box)
|
||||||
self._tb.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
|
self._tb.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||||
self._tb.setTabChangesFocus()
|
self._tb.setTabChangesFocus(True)
|
||||||
self._layout.addWidget(self._tb)
|
self._layout.addWidget(self._tb)
|
||||||
self._box.setLayout(self._layout)
|
self._box.setLayout(self._layout)
|
||||||
self.widgets = [self._box]
|
self.widgets = [self._box]
|
||||||
@ -275,3 +275,6 @@ def populate_single_metadata_page(left, right, db, book_id, parent=None):
|
|||||||
|
|
||||||
return ans, items
|
return ans, items
|
||||||
|
|
||||||
|
def populate_bulk_metadata_page(left, right, db, book_id, parent=None):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ from calibre.gui2.dialogs.metadata_bulk_ui import Ui_MetadataBulkDialog
|
|||||||
from calibre.gui2.dialogs.tag_editor import TagEditor
|
from calibre.gui2.dialogs.tag_editor import TagEditor
|
||||||
from calibre.ebooks.metadata import string_to_authors, authors_to_sort_string, \
|
from calibre.ebooks.metadata import string_to_authors, authors_to_sort_string, \
|
||||||
authors_to_string
|
authors_to_string
|
||||||
|
from calibre.gui2.custom_column_widgets import populate_bulk_metadata_page
|
||||||
|
|
||||||
class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
||||||
|
|
||||||
@ -19,7 +20,8 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
self.db = db
|
self.db = db
|
||||||
self.ids = [db.id(r) for r in rows]
|
self.ids = [db.id(r) for r in rows]
|
||||||
self.groupBox.setTitle(_('Editing meta information for %d books') %
|
self.box_title.setText('<p>' +
|
||||||
|
_('Editing meta information for <b>%d books</b>') %
|
||||||
len(rows))
|
len(rows))
|
||||||
self.write_series = False
|
self.write_series = False
|
||||||
self.changed = 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('currentIndexChanged(int)'), self.series_changed)
|
||||||
QObject.connect(self.series, SIGNAL('editTextChanged(QString)'), self.series_changed)
|
QObject.connect(self.series, SIGNAL('editTextChanged(QString)'), self.series_changed)
|
||||||
QObject.connect(self.tag_editor_button, SIGNAL('clicked()'), self.tag_editor)
|
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_()
|
self.exec_()
|
||||||
|
|
||||||
|
def create_custom_column_editors(self):
|
||||||
|
pass
|
||||||
|
|
||||||
def initialize_combos(self):
|
def initialize_combos(self):
|
||||||
self.initalize_authors()
|
self.initalize_authors()
|
||||||
self.initialize_series()
|
self.initialize_series()
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>495</width>
|
<width>526</width>
|
||||||
<height>468</height>
|
<height>499</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -18,6 +18,16 @@
|
|||||||
<normaloff>:/images/edit_input.svg</normaloff>:/images/edit_input.svg</iconset>
|
<normaloff>:/images/edit_input.svg</normaloff>:/images/edit_input.svg</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="box_title">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
@ -27,10 +37,14 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QTabWidget" name="central_widget">
|
||||||
<property name="title">
|
<property name="currentIndex">
|
||||||
<string>Meta information</string>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
<widget class="QWidget" name="tabWidgetPage1">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>&Basic metadata</string>
|
||||||
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
@ -261,6 +275,12 @@ Book A will have series number 1 and Book B series number 2.</string>
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>&Custom metadata</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -342,21 +362,5 @@ Book A will have series number 1 and Book B series number 2.</string>
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>auto_author_sort</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>author_sort</receiver>
|
|
||||||
<slot>setDisabled(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>240</x>
|
|
||||||
<y>95</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>240</x>
|
|
||||||
<y>113</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user