mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
c7c3027c8d
commit
b02186802f
@ -70,9 +70,6 @@ class MetadataWidget(Widget, Ui_Form):
|
||||
def initialize_metadata_options(self):
|
||||
self.initialize_combos()
|
||||
self.author.editTextChanged.connect(self.deduce_author_sort)
|
||||
self.author.set_separator('&')
|
||||
self.author.set_space_before_sep(True)
|
||||
self.author.update_items_cache(self.db.all_author_names())
|
||||
|
||||
mi = self.db.get_metadata(self.book_id, index_is_id=True)
|
||||
self.title.setText(mi.title)
|
||||
@ -109,6 +106,9 @@ class MetadataWidget(Widget, Ui_Form):
|
||||
def initalize_authors(self):
|
||||
all_authors = self.db.all_authors()
|
||||
all_authors.sort(key=lambda x : sort_key(x[1]))
|
||||
self.author.set_separator('&')
|
||||
self.author.set_space_before_sep(True)
|
||||
self.author.update_items_cache(self.db.all_author_names())
|
||||
|
||||
for i in all_authors:
|
||||
id, name = i
|
||||
@ -124,6 +124,8 @@ class MetadataWidget(Widget, Ui_Form):
|
||||
def initialize_series(self):
|
||||
all_series = self.db.all_series()
|
||||
all_series.sort(key=lambda x : sort_key(x[1]))
|
||||
self.series.set_separator(None)
|
||||
self.series.update_items_cache([x[1] for x in all_series])
|
||||
|
||||
for i in all_series:
|
||||
id, name = i
|
||||
@ -133,6 +135,8 @@ class MetadataWidget(Widget, Ui_Form):
|
||||
def initialize_publisher(self):
|
||||
all_publishers = self.db.all_publishers()
|
||||
all_publishers.sort(key=lambda x : sort_key(x[1]))
|
||||
self.publisher.set_separator(None)
|
||||
self.publisher.update_items_cache([x[1] for x in all_publishers])
|
||||
|
||||
for i in all_publishers:
|
||||
id, name = i
|
||||
|
@ -213,7 +213,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="EnComboBox" name="series">
|
||||
<widget class="MultiCompleteComboBox" name="series">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>10</horstretch>
|
||||
@ -248,7 +248,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="EnComboBox" name="publisher">
|
||||
<widget class="MultiCompleteComboBox" name="publisher">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -276,11 +276,6 @@
|
||||
<extends>QLineEdit</extends>
|
||||
<header>widgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>EnComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>widgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MultiCompleteComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
|
@ -233,6 +233,7 @@ class Text(Base):
|
||||
w.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Preferred)
|
||||
else:
|
||||
w = MultiCompleteComboBox(parent)
|
||||
w.set_separator(None)
|
||||
w.setSizeAdjustPolicy(w.AdjustToMinimumContentsLengthWithIcon)
|
||||
w.setMinimumContentsLength(25)
|
||||
self.widgets = [QLabel('&'+self.col_metadata['name']+':', parent), w]
|
||||
@ -708,6 +709,7 @@ class BulkSeries(BulkBase):
|
||||
|
||||
def initialize(self, book_id):
|
||||
self.idx_widget.setChecked(False)
|
||||
self.main_widget.set_separator(None)
|
||||
self.main_widget.update_items_cache(self.all_values)
|
||||
for c in self.all_values:
|
||||
self.main_widget.addItem(c)
|
||||
@ -835,6 +837,7 @@ class BulkText(BulkBase):
|
||||
w.checkbox.stateChanged.connect(self.a_c_checkbox_changed)
|
||||
else:
|
||||
self.make_widgets(parent, MultiCompleteComboBox)
|
||||
self.main_widget.set_separator(None)
|
||||
self.main_widget.setSizeAdjustPolicy(
|
||||
self.main_widget.AdjustToMinimumContentsLengthWithIcon)
|
||||
self.main_widget.setMinimumContentsLength(25)
|
||||
|
@ -764,6 +764,7 @@ class MetadataBulkDialog(ResizableDialog, Ui_MetadataBulkDialog):
|
||||
def initialize_series(self):
|
||||
all_series = self.db.all_series()
|
||||
all_series.sort(key=lambda x : sort_key(x[1]))
|
||||
self.series.set_separator(None)
|
||||
self.series.update_items_cache([x[1] for x in all_series])
|
||||
|
||||
for i in all_series:
|
||||
@ -774,6 +775,7 @@ class MetadataBulkDialog(ResizableDialog, Ui_MetadataBulkDialog):
|
||||
def initialize_publisher(self):
|
||||
all_publishers = self.db.all_publishers()
|
||||
all_publishers.sort(key=lambda x : sort_key(x[1]))
|
||||
self.publisher.set_separator(None)
|
||||
self.publisher.update_items_cache([x[1] for x in all_publishers])
|
||||
|
||||
for i in all_publishers:
|
||||
|
@ -35,6 +35,7 @@ class SearchDialog(QDialog, Ui_Dialog):
|
||||
|
||||
all_series = db.all_series()
|
||||
all_series.sort(key=lambda x : sort_key(x[1]))
|
||||
self.series_box.set_separator(None)
|
||||
self.series_box.update_items_cache([x[1] for x in all_series])
|
||||
for i in all_series:
|
||||
id, name = i
|
||||
|
Loading…
x
Reference in New Issue
Block a user