mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge from trunk
This commit is contained in:
commit
37307c7c5c
@ -691,8 +691,8 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog):
|
|||||||
title = self.title.text()
|
title = self.title.text()
|
||||||
self.title.setText(self.authors.text())
|
self.title.setText(self.authors.text())
|
||||||
self.authors.setText(title)
|
self.authors.setText(title)
|
||||||
self.author_sort.setText('')
|
self.deduce_author_sort()
|
||||||
|
self.deduce_title_sort()
|
||||||
|
|
||||||
def initialize_combos(self):
|
def initialize_combos(self):
|
||||||
self.initalize_authors()
|
self.initalize_authors()
|
||||||
|
@ -100,30 +100,10 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2">
|
|
||||||
<widget class="QToolButton" name="swap_button">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Swap the author and title</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../../../resources/images.qrc">
|
|
||||||
<normaloff>:/images/swap.png</normaloff>:/images/swap.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>16</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Title sort: </string>
|
<string>Title &sort: </string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
@ -136,22 +116,7 @@
|
|||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="EnLineEdit" name="title_sort">
|
<widget class="EnLineEdit" name="title_sort">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Specify how this book should be sorted when by title. For example, The Exorcist might be sorted as Exorcist, The.</string>
|
<string>Specify how this book should be sorted when by title. For example, The Exorcist might be sorted as Exorcist, The.</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QToolButton" name="auto_title_sort">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Automatically create the title sort entry based on the current title entry.
|
|
||||||
Using this button to create title sort will change title sort from red to green.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../../../resources/images.qrc">
|
|
||||||
<normaloff>:/images/auto_author_sort.png</normaloff>:/images/auto_author_sort.png</iconset>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -168,6 +133,13 @@ Using this button to create title sort will change title sort from red to green.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="EnComboBox" name="authors">
|
||||||
|
<property name="editable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_8">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -181,32 +153,13 @@ Using this button to create title sort will change title sort from red to green.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1" colspan="2">
|
<item row="3" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<widget class="EnLineEdit" name="author_sort">
|
||||||
<item>
|
<property name="toolTip">
|
||||||
<widget class="EnLineEdit" name="author_sort">
|
<string>Specify how the author(s) of this book should be sorted. For example Charles Dickens should be sorted as Dickens, Charles.
|
||||||
<property name="toolTip">
|
|
||||||
<string>Specify how the author(s) of this book should be sorted. For example Charles Dickens should be sorted as Dickens, Charles.
|
|
||||||
If the box is colored green, then text matches the individual author's sort strings. If it is colored red, then the authors and this text do not match.</string>
|
If the box is colored green, then text matches the individual author's sort strings. If it is colored red, then the authors and this text do not match.</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="auto_author_sort">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Automatically create the author sort entry based on the current author entry.
|
|
||||||
Using this button to create author sort will change author sort from red to green.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../../../resources/images.qrc">
|
|
||||||
<normaloff>:/images/auto_author_sort.png</normaloff>:/images/auto_author_sort.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_6">
|
||||||
@ -253,6 +206,13 @@ Using this button to create author sort will change author sort from red to gree
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="1" colspan="2">
|
||||||
|
<widget class="EnComboBox" name="publisher">
|
||||||
|
<property name="editable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -266,31 +226,6 @@ Using this button to create author sort will change author sort from red to gree
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1" colspan="2">
|
|
||||||
<layout class="QHBoxLayout" name="_2">
|
|
||||||
<item>
|
|
||||||
<widget class="TagsLineEdit" name="tags">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Tags categorize the book. This is particularly useful while searching. <br><br>They can be any words or phrases, separated by commas.</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="tag_editor_button">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Open Tag Editor</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Open Tag Editor</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../../../resources/images.qrc">
|
|
||||||
<normaloff>:/images/chapters.png</normaloff>:/images/chapters.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0">
|
<item row="7" column="0">
|
||||||
<widget class="QLabel" name="label_7">
|
<widget class="QLabel" name="label_7">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -307,7 +242,7 @@ Using this button to create author sort will change author sort from red to gree
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1" colspan="2">
|
<item row="7" column="1">
|
||||||
<layout class="QHBoxLayout" name="_3">
|
<layout class="QHBoxLayout" name="_3">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>5</number>
|
<number>5</number>
|
||||||
@ -328,22 +263,21 @@ Using this button to create author sort will change author sort from red to gree
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="remove_series_button">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Remove unused series (Series that have no books)</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../../../resources/images.qrc">
|
|
||||||
<normaloff>:/images/trash.png</normaloff>:/images/trash.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="8" column="1" colspan="2">
|
||||||
|
<widget class="QDoubleSpinBox" name="series_index">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="prefix">
|
||||||
|
<string>Book </string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>9999.989999999999782</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="9" column="0">
|
<item row="9" column="0">
|
||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_9">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -360,66 +294,6 @@ Using this button to create author sort will change author sort from red to gree
|
|||||||
<item row="9" column="1" colspan="2">
|
<item row="9" column="1" colspan="2">
|
||||||
<widget class="QLineEdit" name="isbn"/>
|
<widget class="QLineEdit" name="isbn"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="0">
|
|
||||||
<widget class="QLabel" name="label_10">
|
|
||||||
<property name="text">
|
|
||||||
<string>Publishe&d:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>pubdate</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1" colspan="2">
|
|
||||||
<widget class="EnComboBox" name="publisher">
|
|
||||||
<property name="editable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="1" colspan="2">
|
|
||||||
<widget class="QDoubleSpinBox" name="series_index">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="prefix">
|
|
||||||
<string>Book </string>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>9999.989999999999782</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="1" colspan="2">
|
|
||||||
<widget class="QDateEdit" name="pubdate">
|
|
||||||
<property name="displayFormat">
|
|
||||||
<string>MMM yyyy</string>
|
|
||||||
</property>
|
|
||||||
<property name="calendarPopup">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="EnComboBox" name="authors">
|
|
||||||
<property name="editable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="1" colspan="2">
|
|
||||||
<widget class="QDateEdit" name="date">
|
|
||||||
<property name="displayFormat">
|
|
||||||
<string>dd MMM yyyy</string>
|
|
||||||
</property>
|
|
||||||
<property name="calendarPopup">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="0">
|
<item row="10" column="0">
|
||||||
<widget class="QLabel" name="label_11">
|
<widget class="QLabel" name="label_11">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -433,9 +307,194 @@ Using this button to create author sort will change author sort from red to gree
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="10" column="1" colspan="2">
|
||||||
|
<widget class="QDateEdit" name="date">
|
||||||
|
<property name="displayFormat">
|
||||||
|
<string>dd MMM yyyy</string>
|
||||||
|
</property>
|
||||||
|
<property name="calendarPopup">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="0">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>Publishe&d:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>pubdate</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="1" colspan="2">
|
||||||
|
<widget class="QDateEdit" name="pubdate">
|
||||||
|
<property name="displayFormat">
|
||||||
|
<string>MMM yyyy</string>
|
||||||
|
</property>
|
||||||
|
<property name="calendarPopup">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2" rowspan="4">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="auto_title_sort">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Automatically create the author sort entry based on the current author entry.
|
||||||
|
Using this button to create author sort will change author sort from red to green.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../../../resources/images.qrc">
|
||||||
|
<normaloff>:/images/auto_author_sort.png</normaloff>:/images/auto_author_sort.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="swap_button">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Swap the author and title</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../../../resources/images.qrc">
|
||||||
|
<normaloff>:/images/swap.png</normaloff>:/images/swap.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="auto_author_sort">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Automatically create the title sort entry based on the current title entry.
|
||||||
|
Using this button to create title sort will change title sort from red to green.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../../../resources/images.qrc">
|
||||||
|
<normaloff>:/images/auto_author_sort.png</normaloff>:/images/auto_author_sort.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="_2">
|
||||||
|
<item>
|
||||||
|
<widget class="TagsLineEdit" name="tags">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Tags categorize the book. This is particularly useful while searching. <br><br>They can be any words or phrases, separated by commas.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="2">
|
||||||
|
<widget class="QToolButton" name="tag_editor_button">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Open Tag Editor</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open Tag Editor</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../../../resources/images.qrc">
|
||||||
|
<normaloff>:/images/chapters.png</normaloff>:/images/chapters.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="2">
|
||||||
|
<widget class="QToolButton" name="remove_series_button">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Remove unused series (Series that have no books)</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../../../resources/images.qrc">
|
||||||
|
<normaloff>:/images/trash.png</normaloff>:/images/trash.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="fetch_metadata_button">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Fetch metadata from server</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -455,13 +514,6 @@ Using this button to create author sort will change author sort from red to gree
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="fetch_metadata_button">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Fetch metadata from server</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="layoutWidget_2">
|
<widget class="QWidget" name="layoutWidget_2">
|
||||||
@ -779,13 +831,12 @@ Using this button to create author sort will change author sort from red to gree
|
|||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>title</tabstop>
|
<tabstop>title</tabstop>
|
||||||
<tabstop>title_sort</tabstop>
|
|
||||||
<tabstop>auto_title_sort</tabstop>
|
<tabstop>auto_title_sort</tabstop>
|
||||||
|
<tabstop>title_sort</tabstop>
|
||||||
<tabstop>swap_button</tabstop>
|
<tabstop>swap_button</tabstop>
|
||||||
<tabstop>authors</tabstop>
|
<tabstop>authors</tabstop>
|
||||||
<tabstop>swap_button</tabstop>
|
|
||||||
<tabstop>author_sort</tabstop>
|
|
||||||
<tabstop>auto_author_sort</tabstop>
|
<tabstop>auto_author_sort</tabstop>
|
||||||
|
<tabstop>author_sort</tabstop>
|
||||||
<tabstop>rating</tabstop>
|
<tabstop>rating</tabstop>
|
||||||
<tabstop>publisher</tabstop>
|
<tabstop>publisher</tabstop>
|
||||||
<tabstop>tags</tabstop>
|
<tabstop>tags</tabstop>
|
||||||
@ -796,20 +847,22 @@ Using this button to create author sort will change author sort from red to gree
|
|||||||
<tabstop>isbn</tabstop>
|
<tabstop>isbn</tabstop>
|
||||||
<tabstop>date</tabstop>
|
<tabstop>date</tabstop>
|
||||||
<tabstop>pubdate</tabstop>
|
<tabstop>pubdate</tabstop>
|
||||||
<tabstop>comments</tabstop>
|
|
||||||
<tabstop>fetch_metadata_button</tabstop>
|
<tabstop>fetch_metadata_button</tabstop>
|
||||||
<tabstop>add_format_button</tabstop>
|
<tabstop>comments</tabstop>
|
||||||
<tabstop>remove_format_button</tabstop>
|
|
||||||
<tabstop>button_set_cover</tabstop>
|
<tabstop>button_set_cover</tabstop>
|
||||||
<tabstop>button_set_metadata</tabstop>
|
<tabstop>button_set_metadata</tabstop>
|
||||||
<tabstop>formats</tabstop>
|
<tabstop>formats</tabstop>
|
||||||
|
<tabstop>add_format_button</tabstop>
|
||||||
|
<tabstop>remove_format_button</tabstop>
|
||||||
<tabstop>cover_path</tabstop>
|
<tabstop>cover_path</tabstop>
|
||||||
|
<tabstop>cover_button</tabstop>
|
||||||
|
<tabstop>trim_cover_button</tabstop>
|
||||||
<tabstop>reset_cover</tabstop>
|
<tabstop>reset_cover</tabstop>
|
||||||
<tabstop>fetch_cover_button</tabstop>
|
<tabstop>fetch_cover_button</tabstop>
|
||||||
<tabstop>generate_cover_button</tabstop>
|
<tabstop>generate_cover_button</tabstop>
|
||||||
|
<tabstop>button_box</tabstop>
|
||||||
<tabstop>scrollArea</tabstop>
|
<tabstop>scrollArea</tabstop>
|
||||||
<tabstop>central_widget</tabstop>
|
<tabstop>central_widget</tabstop>
|
||||||
<tabstop>button_box</tabstop>
|
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../../../resources/images.qrc"/>
|
<include location="../../../../resources/images.qrc"/>
|
||||||
|
@ -266,6 +266,7 @@ def run_in_debug_mode(logpath=None):
|
|||||||
exe = base + '-debug' + ext
|
exe = base + '-debug' + ext
|
||||||
print 'Starting debug executable:', exe
|
print 'Starting debug executable:', exe
|
||||||
subprocess.Popen([exe, '--gui-debug', logpath], stdout=fd, stderr=fd)
|
subprocess.Popen([exe, '--gui-debug', logpath], stdout=fd, stderr=fd)
|
||||||
|
time.sleep(1) # Give subprocess a change to launch, before fd is closed
|
||||||
|
|
||||||
def run_gui(opts, args, actions, listener, app, gui_debug=None):
|
def run_gui(opts, args, actions, listener, app, gui_debug=None):
|
||||||
initialize_file_icon_provider()
|
initialize_file_icon_provider()
|
||||||
|
@ -137,13 +137,13 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
|||||||
# if we are to copy the prefs and structure from some other DB, then
|
# if we are to copy the prefs and structure from some other DB, then
|
||||||
# we need to do it before we call initialize_dynamic
|
# we need to do it before we call initialize_dynamic
|
||||||
if apply_default_prefs and default_prefs is not None:
|
if apply_default_prefs and default_prefs is not None:
|
||||||
prefs = DBPrefs(self)
|
dbprefs = DBPrefs(self)
|
||||||
for key in default_prefs:
|
for key in default_prefs:
|
||||||
# be sure that prefs not to be copied are listed below
|
# be sure that prefs not to be copied are listed below
|
||||||
if key in ['news_to_be_synced']:
|
if key in ['news_to_be_synced']:
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
prefs[key] = default_prefs[key]
|
dbprefs[key] = default_prefs[key]
|
||||||
except:
|
except:
|
||||||
pass # ignore options that don't exist anymore
|
pass # ignore options that don't exist anymore
|
||||||
fmvals = [f for f in default_prefs['field_metadata'].values() if f['is_custom']]
|
fmvals = [f for f in default_prefs['field_metadata'].values() if f['is_custom']]
|
||||||
@ -1400,7 +1400,6 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
|||||||
return float(tweaks['series_index_auto_increment'])
|
return float(tweaks['series_index_auto_increment'])
|
||||||
return 1.0
|
return 1.0
|
||||||
series_indices = [x[0] for x in series_indices]
|
series_indices = [x[0] for x in series_indices]
|
||||||
print series_indices
|
|
||||||
if tweaks['series_index_auto_increment'] == 'next':
|
if tweaks['series_index_auto_increment'] == 'next':
|
||||||
return series_indices[-1] + 1
|
return series_indices[-1] + 1
|
||||||
if tweaks['series_index_auto_increment'] == 'first_free':
|
if tweaks['series_index_auto_increment'] == 'first_free':
|
||||||
@ -1613,13 +1612,13 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
|||||||
if notify:
|
if notify:
|
||||||
self.notify('metadata', [id])
|
self.notify('metadata', [id])
|
||||||
|
|
||||||
def set_title_sort(self, id, title_sort, notify=True, commit=True):
|
def set_title_sort(self, id, title_sort_, notify=True, commit=True):
|
||||||
if not title_sort:
|
if not title_sort_:
|
||||||
return False
|
return False
|
||||||
if isbytestring(title_sort):
|
if isbytestring(title_sort_):
|
||||||
title_sort = title_sort.decode(preferred_encoding, 'replace')
|
title_sort_ = title_sort_.decode(preferred_encoding, 'replace')
|
||||||
self.conn.execute('UPDATE books SET sort=? WHERE id=?', (title_sort, id))
|
self.conn.execute('UPDATE books SET sort=? WHERE id=?', (title_sort_, id))
|
||||||
self.data.set(id, self.FIELD_MAP['sort'], title_sort, row_is_id=True)
|
self.data.set(id, self.FIELD_MAP['sort'], title_sort_, row_is_id=True)
|
||||||
self.dirtied([id], commit=False)
|
self.dirtied([id], commit=False)
|
||||||
if commit:
|
if commit:
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
|
@ -437,5 +437,5 @@ class SchemaUpgrade(object):
|
|||||||
BEGIN
|
BEGIN
|
||||||
UPDATE books SET sort=title_sort(NEW.title)
|
UPDATE books SET sort=title_sort(NEW.title)
|
||||||
WHERE id=NEW.id AND OLD.title <> NEW.title;
|
WHERE id=NEW.id AND OLD.title <> NEW.title;
|
||||||
END;
|
END;
|
||||||
''')
|
''')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user