diff --git a/src/calibre/gui2/dialogs/epub.py b/src/calibre/gui2/dialogs/epub.py index af5622169a..c9bd3e6c46 100644 --- a/src/calibre/gui2/dialogs/epub.py +++ b/src/calibre/gui2/dialogs/epub.py @@ -14,7 +14,7 @@ from lxml.etree import XPath from calibre.gui2.dialogs.choose_format import ChooseFormatDialog from calibre.gui2.dialogs.epub_ui import Ui_Dialog -from calibre.gui2 import error_dialog, choose_images, pixmap_to_data +from calibre.gui2 import error_dialog, choose_images, pixmap_to_data, ResizableDialog from calibre.ebooks.epub.from_any import SOURCE_FORMATS, config as epubconfig from calibre.ebooks.metadata import MetaInformation from calibre.ptempfile import PersistentTemporaryFile @@ -22,13 +22,12 @@ from calibre.ebooks.metadata.opf import OPFCreator from calibre.ebooks.metadata import authors_to_string, string_to_authors -class Config(QDialog, Ui_Dialog): +class Config(ResizableDialog, Ui_Dialog): OUTPUT = 'EPUB' def __init__(self, parent, db, row=None, config=epubconfig): - QDialog.__init__(self, parent) - self.setupUi(self) + ResizableDialog.__init__(self, parent) self.hide_controls() self.connect(self.category_list, SIGNAL('itemEntered(QListWidgetItem *)'), self.show_category_help) @@ -68,11 +67,11 @@ class Config(QDialog, Ui_Dialog): self.__w.append(QIcon(':/images/dialog_information.svg')) self.item1 = QListWidgetItem(self.__w[-1], _('Metadata'), self.category_list) self.__w.append(QIcon(':/images/lookfeel.svg')) - self.item2 = QListWidgetItem(self.__w[-1], _('Look & Feel'), self.category_list) + self.item2 = QListWidgetItem(self.__w[-1], _('Look & Feel').replace(' ','\n'), self.category_list) self.__w.append(QIcon(':/images/page.svg')) - self.item3 = QListWidgetItem(self.__w[-1], _('Page Setup'), self.category_list) + self.item3 = QListWidgetItem(self.__w[-1], _('Page Setup').replace(' ','\n'), self.category_list) self.__w.append(QIcon(':/images/chapters.svg')) - self.item4 = QListWidgetItem(self.__w[-1], _('Chapter Detection'), self.category_list) + self.item4 = QListWidgetItem(self.__w[-1], _('Chapter Detection').replace(' ','\n'), self.category_list) self.setup_tooltips() self.initialize_options() @@ -98,7 +97,7 @@ class Config(QDialog, Ui_Dialog): _('Page Setup') : _('Specify the page layout settings like margins.'), _('Chapter Detection') : _('Fine tune the detection of chapter and section headings.'), } - self.set_help(help[text]) + self.set_help(help[text.replace('\n', ' ')]) def select_cover(self): files = choose_images(self, 'change cover dialog', diff --git a/src/calibre/gui2/dialogs/epub.ui b/src/calibre/gui2/dialogs/epub.ui index 7e3ad344ce..27627cccf8 100644 --- a/src/calibre/gui2/dialogs/epub.ui +++ b/src/calibre/gui2/dialogs/epub.ui @@ -5,8 +5,8 @@ 0 0 - 868 - 670 + 965 + 698 @@ -21,94 +21,92 @@ - - - - - - 172 - 16777215 - - - - - 75 - true - - - - true - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - 48 - 48 - - - - QListView::TopToBottom - - - false - - - 10 - - - QListView::IconMode - - - true - - - -1 - - - - - - + + + + 0 + 0 + + + + + 75 + true + + + + true + + + Qt::ScrollBarAlwaysOff + + + true + + + + 48 + 48 + + + + 20 + + + true + + + + + + + + 10 + 0 + + + + QFrame::NoFrame + + + true + + + + + 0 + 0 + 697 + 554 + + + + + 680 + 520 + + + + 0 - - - - - - - - Book Cover - - - - - - 6 - - - 0 - - - - - Change &cover image: - - - cover_path - - - - - + + + + 0 + + + + + + + + + Book Cover + + + + 6 @@ -116,677 +114,687 @@ 0 - - - true + + + Change &cover image: + + + cover_path - - - Browse for an image to use as the cover of this book. + + + 6 + + 0 + + + + + true + + + + + + + Browse for an image to use as the cover of this book. + + + ... + + + + :/images/document_open.svg:/images/document_open.svg + + + + + + + + + + + Use cover from &source file + + + true + + + + + + + - ... + - - - :/images/document_open.svg:/images/document_open.svg + + :/images/book.svg + + + true + + + Qt::AlignCenter - - - - - Use cover from &source file - - - true - - - - - - - - - - - - :/images/book.svg - - - true - - - Qt::AlignCenter - - - - - - - opt_prefer_metadata_cover - - - - - + opt_prefer_metadata_cover + + + - - - - - &Title: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - title - - + + + + + + + &Title: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + title + + + + + + + Change the title of this book + + + + + + + &Author(s): + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + author + + + + + + + + 1 + 0 + + + + Change the author(s) of this book. Multiple authors should be separated by an &. If the author name contains an &, use && to represent it. + + + + + + + Author So&rt: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + author_sort + + + + + + + + 0 + 0 + + + + Change the author(s) of this book. Multiple authors should be separated by a comma + + + + + + + &Publisher: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + publisher + + + + + + + Change the publisher of this book + + + + + + + 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. + + + + + + + &Series: + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + series + + + + + + + + 10 + 0 + + + + List of known series. You can add new series. + + + List of known series. You can add new series. + + + true + + + QComboBox::InsertAlphabetically + + + QComboBox::AdjustToContents + + + + + + + true + + + Series index. + + + Series index. + + + Book + + + 1 + + + 10000 + + + + - - - - Change the title of this book - - - - - - - &Author(s): - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - author - - - - - + + - - 1 - 0 - - - - Change the author(s) of this book. Multiple authors should be separated by an &. If the author name contains an &, use && to represent it. - - - - - - - Author So&rt: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - author_sort - - - - - - - + 0 0 - - Change the author(s) of this book. Multiple authors should be separated by a comma + + + 16777215 + 200 + - - - - - - &Publisher: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - publisher - - - - - - - Change the publisher of this book - - - - - - - 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. - - - - - - - &Series: - - - Qt::PlainText - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - series - - - - - - - - 10 - 0 - - - - List of known series. You can add new series. - - - List of known series. You can add new series. - - - true - - - QComboBox::InsertAlphabetically - - - QComboBox::AdjustToContents - - - - - - - true - - - Series index. - - - Series index. - - - Book - - - 1 - - - 10000 + + Comments + + + + + + 16777215 + 180 + + + + + - - - - - 0 - 0 - + + + + + + + + + + + + Source en&coding: - - - 16777215 - 200 - + + opt_encoding - - Comments + + + + + + + + + Base &font size: + + + opt_base_font_size2 + + + + + + + pt + + + 0 + + + 0.000000000000000 + + + 30.000000000000000 + + + 1.000000000000000 + + + 30.000000000000000 + + + + + + + Remove &spacing between paragraphs + + + + + + + Preserve &tag structure when splitting + + + + + + + &Rescale images - - - - - - 16777215 - 180 - - - - - + + + + Override &CSS + + + + + + + + - - - - - - - + + + - + - Source en&coding: + &Profile: - opt_encoding + opt_profile - - - - - - - Base &font size: + + + + -1 - - opt_base_font_size2 - - - - - - - pt - - - 0 - - - 0.000000000000000 - - - 30.000000000000000 - - - 1.000000000000000 - - - 30.000000000000000 - - - - - - - Remove &spacing between paragraphs + + 1 - + - Preserve &tag structure when splitting + &Left Margin: + + + opt_margin_left + + + + + + + pt + + + 200 + + + 20 - + - &Rescale images + &Right Margin: + + + opt_margin_right + + + + pt + + + 200 + + + 20 + + + + + + + &Top Margin: + + + opt_margin_top + + + + + + + pt + + + 200 + + + 10 + + + + + + + &Bottom Margin: + + + opt_margin_bottom + + + + + + + pt + + + 200 + + + 0 + + + + + + + Do not &split on page breaks + + + + + + + &Source profile: + + + opt_source_profile + + + + + + + + + + &Destination profile: + + + opt_dest_profile + + + + + + - - - - - Override &CSS - - - - - - - - - - - - - - - - &Profile: - - - opt_profile - - - - - - - -1 - - - 1 - - - - - - - &Left Margin: - - - opt_margin_left - - - - - - - pt - - - 200 - - - 20 - - - - - - - &Right Margin: - - - opt_margin_right - - - - - - - pt - - - 200 - - - 20 - - - - - - - &Top Margin: - - - opt_margin_top - - - - - - - pt - - - 200 - - - 10 - - - - - - - &Bottom Margin: - - - opt_margin_bottom - - - - - - - pt - - - 200 - - - 0 - - - - - - - Do not &split on page breaks - - - - - - - &Source profile: - - - opt_source_profile - - - - - - - - - - &Destination profile: - - - opt_dest_profile - - - - - - - - - - - - - - Automatic &chapter detection - - - - - - &XPath: - - - opt_chapter - - - - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + + + + + + + Automatic &chapter detection + + + + + + &XPath: + + + opt_chapter + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You can control how calibre detects chapters using a XPath expression. To learn how to use XPath expressions see the <a href="https://calibre.kovidgoyal.net/user_manual/xpath.html"><span style=" text-decoration: underline; color:#0000ff;">XPath tutorial</span></a></p></body></html> - - - Qt::RichText - - - true - - - - - - - - - - Chapter &mark: - - - opt_chapter_mark - - - - - - - - - - Automatic &Table of Contents - - - - - - - - - Number of &links to add to Table of Contents - - - opt_max_toc_links - - - - - - - Do not add &detected chapters to the Table of Contents - - - - - - - - - - Chapter &threshold - - - opt_toc_threshold - - - - - - - &Force use of auto-generated Table of Contents - - - - - - - - - - Level &1 TOC - - - opt_level1_toc - - - - - - - Level &2 TOC - - - opt_level2_toc - - - - - - - - - - - - - &Title for generated TOC - - - opt_toc_title - - - - - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - + + + Qt::RichText + + + true + + + + + + + + + + Chapter &mark: + + + opt_chapter_mark + + + + + + + + + + Automatic &Table of Contents + + + + + + + + + Number of &links to add to Table of Contents + + + opt_max_toc_links + + + + + + + Do not add &detected chapters to the Table of Contents + + + + + + + + + + Chapter &threshold + + + opt_toc_threshold + + + + + + + &Force use of auto-generated Table of Contents + + + + + + + + + + Level &1 TOC + + + opt_level1_toc + + + + + + + Level &2 TOC + + + opt_level2_toc + + + + + + + + + + + + + &Title for generated TOC + + + opt_toc_title + + + + + + + + + + + + - + @@ -799,6 +807,16 @@ p, li { white-space: pre-wrap; } + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + @@ -820,8 +838,8 @@ p, li { white-space: pre-wrap; } accept() - 222 - 652 + 226 + 684 157 @@ -852,12 +870,12 @@ p, li { white-space: pre-wrap; } setCurrentIndex(int) - 88 - 42 + 81 + 118 - 659 - 12 + 866 + 11 diff --git a/src/calibre/gui2/dialogs/lrf_single.ui b/src/calibre/gui2/dialogs/lrf_single.ui index 8ed4799342..12b7bb44f5 100644 --- a/src/calibre/gui2/dialogs/lrf_single.ui +++ b/src/calibre/gui2/dialogs/lrf_single.ui @@ -16,8 +16,8 @@ :/images/convert.svg:/images/convert.svg - - + + @@ -96,936 +96,903 @@ - - - - + + + + QFrame::NoFrame + + + true + + + + + 0 + 0 + 664 + 515 + + + + + 0 + - - - - 10 - 0 - + + + 0 - - Options - - - - - - 1 - - - - - - - Book Cover - - - - - - - - - - - :/images/book.svg - - - true - - - Qt::AlignCenter - - - - - - - - - 6 - - - 0 - - - - - Change &cover image: - - - cover_path - - - - - - - 6 - - - 0 - - - - - true - - - - - - - Browse for an image to use as the cover of this book. - - - ... - - - - :/images/document_open.svg:/images/document_open.svg - - - - - - - - - - - Use cover from &source file - - - true - - - - - - - - + + + + + + Book Cover + + + + - - - - - &Title: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - gui_title - - - - - - - Change the title of this book - - - - - - - &Author(s): - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - gui_author - - - - - - - - 1 - 0 - - - - Change the author(s) of this book. Multiple authors should be separated by an &. If the author name contains an &, use && to represent it. - - - - - - - Author So&rt: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - gui_author_sort - - - - - - - - 0 - 0 - - - - Change the author(s) of this book. Multiple authors should be separated by a comma - - - - - - - &Publisher: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - gui_publisher - - - - - - - Change the publisher of this book - - - - - - - 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. - - - - - - - &Series: - - - Qt::PlainText - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - series - - - - - - - - 10 - 0 - - - - List of known series. You can add new series. - - - List of known series. You can add new series. - - + + + + + + :/images/book.svg + + + true + + + Qt::AlignCenter + + + + + + + + + 6 + + + 0 + + + + + Change &cover image: + + + cover_path + + + + + + + 6 + + + 0 + + + + true - - QComboBox::InsertAlphabetically - - - QComboBox::AdjustToContents - - - + + - Series index. + Browse for an image to use as the cover of this book. - - Series index. + + ... - - Book - - - 1 - - - 10000 + + + :/images/document_open.svg:/images/document_open.svg - - - - - 0 - 0 - - - - - 16777215 - 110 - - - - Comments - - - - - - - 16777215 - 60 - - - - - - - + + + + Use cover from &source file + + + true + + + - - - - - - Base &font size: - - - gui_base_font_size - - - - - - - QAbstractSpinBox::PlusMinus - - - pts - - - 1 - - - 2.000000000000000 - - - 20.000000000000000 - - - 0.100000000000000 - - - 10.000000000000000 - - - - - - - Embedded Fonts - - - - - - &Serif: - - - gui_serif_family - - - - - - - - 0 - 0 - - - - - - - - S&ans-serif: - - - gui_sans_family - - - - - - - - - - &Monospace: - - - gui_mono_family - - - - - - - - - - Source en&coding: - - - gui_encoding - - - - - - - - - - - - - Minimum &indent: - - - gui_minimum_indent - - - - - - - QAbstractSpinBox::PlusMinus - - - pts - - - 1 - - - - - - - &Word spacing: - - - Qt::PlainText - - - gui_wordspace - - - - - - - QAbstractSpinBox::PlusMinus - - - pts - - - 1 - - - 0.000000000000000 - - - 10.000000000000000 - - - 0.100000000000000 - - - 2.500000000000000 - - - - - - - - - Enable auto &rotation of images - - - - - - - Insert &blank lines between paragraphs - - - - - - - Ignore &tables - - - - - - - Ignore &colors - - + + + + + + + + + &Title: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + gui_title + + + + + + + Change the title of this book + + + + + + + &Author(s): + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + gui_author + + + + + + + + 1 + 0 + + + + Change the author(s) of this book. Multiple authors should be separated by an &. If the author name contains an &, use && to represent it. + + + + + + + Author So&rt: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + gui_author_sort + + + + + + + + 0 + 0 + + + + Change the author(s) of this book. Multiple authors should be separated by a comma + + + + + + + &Publisher: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + gui_publisher + + + + + + + Change the publisher of this book + + + + + + + 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. + + + + + + + &Series: + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + series + + + + + + + + 10 + 0 + + + + List of known series. You can add new series. + + + List of known series. You can add new series. + + + true + + + QComboBox::InsertAlphabetically + + + QComboBox::AdjustToContents + + + + + + + Series index. + + + Series index. + + + Book + + + 1 + + + 10000 + + + + + + + + + + 0 + 0 + + + + Comments + + + + - - - + + + + + + + + + + + + Base &font size: + + + gui_base_font_size + + + + + + + QAbstractSpinBox::PlusMinus + + + pts + + + 1 + + + 2.000000000000000 + + + 20.000000000000000 + + + 0.100000000000000 + + + 10.000000000000000 + + + + + + + Embedded Fonts + + + + - &Preprocess: + &Serif: - preprocess + gui_serif_family - - - - - + + - + 0 0 - - Header - - - - - - &Show header - - - - - - - &Header format: - - - gui_headerformat - - - - - - - - - - px - - - - - - - Header &separation: - - - gui_header_separation - - - - - - - - - - Override<br>CSS - - - - - - - - - - - - - - &Profile: - - - gui_profile - - - - - - - -1 - - - 1 - - + - &Left Margin: + S&ans-serif: - gui_left_margin + gui_sans_family - - - - px + + + + + + + &Monospace: - - 200 + + gui_mono_family - - 20 + + + + + + + + + Source en&coding: + + + gui_encoding + + + + + + + + + + + + + Minimum &indent: + + + gui_minimum_indent + + + + + + + QAbstractSpinBox::PlusMinus + + + pts + + + 1 + + + + + + + &Word spacing: + + + Qt::PlainText + + + gui_wordspace + + + + + + + QAbstractSpinBox::PlusMinus + + + pts + + + 1 + + + 0.000000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 2.500000000000000 + + + + + + + + + Enable auto &rotation of images + + + + + + + Insert &blank lines between paragraphs + + + + + + + Ignore &tables + + + + + + + Ignore &colors + + + + + + + + + &Preprocess: + + + preprocess + + + + + + + + + + + 0 + 0 + + + + Header + + + + + + &Show header - + - &Right Margin: + &Header format: - gui_right_margin + gui_headerformat - + + + + px - - 200 + + + + + + Header &separation: - - 20 + + gui_header_separation - - + + + + + + + Override<br>CSS + + + + + + + + + + + + + + &Profile: + + + gui_profile + + + + + + + -1 + + + 1 + + + + + + + &Left Margin: + + + gui_left_margin + + + + + + + px + + + 200 + + + 20 + + + + + + + &Right Margin: + + + gui_right_margin + + + + + + + px + + + 200 + + + 20 + + + + + + + &Top Margin: + + + gui_top_margin + + + + + + + px + + + 200 + + + 10 + + + + + + + &Bottom Margin: + + + gui_bottom_margin + + + + + + + px + + + 200 + + + 0 + + + + + + + &Convert tables to images (good for large/complex tables) + + + + + + + &Multiplier for text size in rendered tables: + + + gui_text_size_multiplier_for_rendered_tables + + + + + + + false + + + 2 + + + 0.100000000000000 + + + 1.000000000000000 + + + + + + + + + + + Title based detection + + + + - &Top Margin: + &Disable chapter detection + + + + + + + &Regular expression: - gui_top_margin + gui_chapter_regex + + + + + + + + + + Add &chapters to table of contents + + + + + + + Don't add &links to the table of contents + + + + + + + + + + Tag based detection + + + + + + &Page break before tag: + + + gui_page_break_before_tag + + + + + + + + + + &Force page break before tag: + + + gui_force_page_break_before_tag + + + + + + + + + + Force page break before &attribute: + + + gui_force_page_break_before_attr + + + + + + + + + + Detect chapter &at tag: + + + gui_chapter_attr - - - px - - - 200 - - - 10 - - - - - - - &Bottom Margin: - - - gui_bottom_margin - - - - - - - px - - - 200 - - - 0 - - - - - - - &Convert tables to images (good for large/complex tables) - - - - - - - &Multiplier for text size in rendered tables: - - - gui_text_size_multiplier_for_rendered_tables - - - - - - - false - - - 2 - - - 0.100000000000000 - - - 1.000000000000000 - - + - - - - - - Title based detection - - - - - - &Disable chapter detection - - - - - - - &Regular expression: - - - gui_chapter_regex - - - - - - - - - - Add &chapters to table of contents - - - - - - - Don't add &links to the table of contents - - - - - - - - - - Tag based detection - - - - - - &Page break before tag: - - - gui_page_break_before_tag - - - - - - - - - - &Force page break before tag: - - - gui_force_page_break_before_tag - - - - - - - - - - Force page break before &attribute: - - - gui_force_page_break_before_attr - - - - - - - - - - Detect chapter &at tag: - - - gui_chapter_attr - - - - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Help on item - - - - - - - 0 - 0 - - - - - 0 - 60 - - - - - 16777215 - 150 - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'DejaVu Sans';"></p></body></html> - - - - + + + - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - false - - - - + + + + + + + + 0 + 0 + + + + + 0 + 60 + + + + + 16777215 + 120 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + false + + @@ -1079,108 +1046,12 @@ p, li { white-space: pre-wrap; } setCurrentIndex(int) - 184 - 279 + 96 + 120 - 368 - 185 - - - - - gui_disable_chapter_detection - toggled(bool) - gui_chapter_regex - setDisabled(bool) - - - 308 - 74 - - - 308 - 74 - - - - - gui_disable_chapter_detection - toggled(bool) - gui_add_chapters_to_toc - setDisabled(bool) - - - 308 - 74 - - - 308 - 74 - - - - - gui_render_tables_as_images - toggled(bool) - gui_text_size_multiplier_for_rendered_tables - setEnabled(bool) - - - 308 - 74 - - - 308 - 74 - - - - - gui_header - toggled(bool) - gui_headerformat - setEnabled(bool) - - - 345 - 363 - - - 837 - 435 - - - - - gui_disable_chapter_detection - toggled(bool) - gui_chapter_attr - setDisabled(bool) - - - 308 - 74 - - - 308 - 74 - - - - - gui_header - toggled(bool) - gui_header_separation - setEnabled(bool) - - - 261 - 346 - - - 379 - 378 + 539 + 220 diff --git a/src/calibre/gui2/dialogs/metadata_single.py b/src/calibre/gui2/dialogs/metadata_single.py index 4915c87e7d..385e105c3a 100644 --- a/src/calibre/gui2/dialogs/metadata_single.py +++ b/src/calibre/gui2/dialogs/metadata_single.py @@ -11,7 +11,7 @@ from PyQt4.QtGui import QPixmap, QListWidgetItem, QErrorMessage, QDialog, QCompl from calibre.gui2 import qstring_to_unicode, error_dialog, file_icon_provider, \ - choose_files, pixmap_to_data, choose_images + choose_files, pixmap_to_data, choose_images, ResizableDialog from calibre.gui2.dialogs.metadata_single_ui import Ui_MetadataSingleDialog from calibre.gui2.dialogs.fetch_metadata import FetchMetadata from calibre.gui2.dialogs.tag_editor import TagEditor @@ -40,7 +40,7 @@ class AuthorCompleter(QCompleter): all_authors.sort(cmp=lambda x, y : cmp(x[1], y[1])) QCompleter.__init__(self, [x[1] for x in all_authors]) -class MetadataSingleDialog(QDialog, Ui_MetadataSingleDialog): +class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog): def do_reset_cover(self, *args): pix = QPixmap(':/images/book.svg') @@ -164,9 +164,7 @@ class MetadataSingleDialog(QDialog, Ui_MetadataSingleDialog): self.db.remove_format(self.row, ext, notify=False) def __init__(self, window, row, db, accepted_callback=None): - QDialog.__init__(self, window) - Ui_MetadataSingleDialog.__init__(self) - self.setupUi(self) + ResizableDialog.__init__(self, window) self.bc_box.layout().setAlignment(self.cover, Qt.AlignCenter|Qt.AlignHCenter) self.splitter.setStretchFactor(100, 1) self.db = db diff --git a/src/calibre/gui2/dialogs/metadata_single.ui b/src/calibre/gui2/dialogs/metadata_single.ui index b2e2108ec3..7f3a8465a0 100644 --- a/src/calibre/gui2/dialogs/metadata_single.ui +++ b/src/calibre/gui2/dialogs/metadata_single.ui @@ -5,8 +5,8 @@ 0 0 - 923 - 715 + 887 + 740 @@ -28,551 +28,588 @@ true - + - - - Qt::Horizontal + + + QFrame::NoFrame - - + + true + + + + + 0 + 0 + 879 + 700 + + + + + 0 + - - - Meta information + + + + 800 + 685 + - - - - - &Title: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - title - - - - - - - Change the title of this book - - - - - - - Swap the author and title - - - ... - - - - :/images/swap.svg:/images/swap.svg - - - - 16 - 16 - - - - - - - - &Author(s): - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - authors - - - - - - - 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. - - - - - - - Automatically create the author sort entry based on the current author entry - - - ... - - - - :/images/auto_author_sort.svg:/images/auto_author_sort.svg - - - - - - - - - &Rating: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - rating - - - - - - - Rating of this book. 0-5 stars - - - Rating of this book. 0-5 stars - - - QAbstractSpinBox::PlusMinus - - - stars - - - 5 - - - - - - - &Publisher: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - publisher - - - - - - - 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 - - - - - - - - - &Series: - - - Qt::PlainText - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - series - - - - - - - 5 - - - - - - 0 - 0 - - - - List of known series. You can add new series. - - - List of known series. You can add new series. - - - true - - - QComboBox::InsertAlphabetically - - - QComboBox::AdjustToContents - - - - - - - Remove unused series (Series that have no books) - - - ... - - - - :/images/trash.svg:/images/trash.svg - - - - - - - - - false - - - Series index. - - - Series index. - - - Book - - - 1 - - - 10000 - - - - - - - IS&BN: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - isbn - - - - - - - - - - true - - - - - - - - - - - - - Comments - - - - - - - - - - - - Fetch metadata from server - - - - - - - - - - - - 0 - 0 - - - - Available Formats - - + - - - - - - 0 - 0 - - - - - 16777215 - 130 - - - - - 64 - 64 - - - - - - - - Add a new format for this book to the database - - - ... - - - - :/images/add_book.svg:/images/add_book.svg - - - - 32 - 32 - - - - - - - - Remove the selected formats for this book from the database. - - - ... - - - - :/images/trash.svg:/images/trash.svg - - - - 32 - 32 - - - - - - - - Set the cover for the book from the selected format - - - ... - - - - :/images/book.svg:/images/book.svg - - - - 32 - 32 - - - - - - - - - - - - - - - 0 - 10 - - - - Book Cover - - - - - - - 0 - 0 - + + + Qt::Horizontal - - - - - :/images/book.svg - - - true - - - - - - - 6 - - - QLayout::SetMaximumSize - - - 0 - - - - - Change &cover image: - - - cover_path - - - - - - - 6 - - - 0 - + + - - - true + + + Meta information + + + + + &Title: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + title + + + + + + + Change the title of this book + + + + + + + Swap the author and title + + + ... + + + + :/images/swap.svg:/images/swap.svg + + + + 16 + 16 + + + + + + + + &Author(s): + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + authors + + + + + + + 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. + + + + + + + Automatically create the author sort entry based on the current author entry + + + ... + + + + :/images/auto_author_sort.svg:/images/auto_author_sort.svg + + + + + + + + + &Rating: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + rating + + + + + + + Rating of this book. 0-5 stars + + + Rating of this book. 0-5 stars + + + QAbstractSpinBox::PlusMinus + + + stars + + + 5 + + + + + + + &Publisher: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + publisher + + + + + + + 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 + + + + + + + + + &Series: + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + series + + + + + + + 5 + + + + + + 0 + 0 + + + + List of known series. You can add new series. + + + List of known series. You can add new series. + + + true + + + QComboBox::InsertAlphabetically + + + QComboBox::AdjustToContents + + + + + + + Remove unused series (Series that have no books) + + + ... + + + + :/images/trash.svg:/images/trash.svg + + + + + + + + + false + + + Series index. + + + Series index. + + + Book + + + 1 + + + 10000 + + + + + + + IS&BN: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + isbn + + + + + + + + + + true + + + + + + + - - - Browse for an image to use as the cover of this book. - - - ... - - - - :/images/document_open.svg:/images/document_open.svg + + + Comments + + + + + - - - Reset cover to default - + - ... - - - - :/images/trash.svg:/images/trash.svg + Fetch metadata from server - - - - - - - - - Fetch cover image from server - - - - - - - Change the username and/or password for your account at LibraryThing.com - - - Change password - - - - + + + + + + + + 0 + 0 + + + + Available Formats + + + + + + + + + 0 + 0 + + + + + 16777215 + 130 + + + + + 64 + 64 + + + + + + + + Add a new format for this book to the database + + + ... + + + + :/images/add_book.svg:/images/add_book.svg + + + + 32 + 32 + + + + + + + + Remove the selected formats for this book from the database. + + + ... + + + + :/images/trash.svg:/images/trash.svg + + + + 32 + 32 + + + + + + + + Set the cover for the book from the selected format + + + ... + + + + :/images/book.svg:/images/book.svg + + + + 32 + 32 + + + + + + + + + + + + + + + 0 + 10 + + + + Book Cover + + + + + + + 0 + 0 + + + + + + + :/images/book.svg + + + true + + + + + + + 6 + + + QLayout::SetMaximumSize + + + 0 + + + + + Change &cover image: + + + cover_path + + + + + + + 6 + + + 0 + + + + + true + + + + + + + Browse for an image to use as the cover of this book. + + + ... + + + + :/images/document_open.svg:/images/document_open.svg + + + + + + + Reset cover to default + + + ... + + + + :/images/trash.svg:/images/trash.svg + + + + + + + + + + + + + Fetch cover image from server + + + + + + + Change the username and/or password for your account at LibraryThing.com + + + Change password + + + + + + + + + + + @@ -601,30 +638,6 @@ - title - swap_button - authors - author_sort - auto_author_sort - rating - publisher - tags - tag_editor_button - series - remove_series_button - series_index - isbn - comments - fetch_metadata_button - fetch_cover_button - password_button - cover_button - reset_cover - cover_path - add_format_button - button_set_cover - remove_format_button - formats button_box diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index ba59908c9f..63aec8521e 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -134,16 +134,8 @@ class Main(MainWindow, Ui_MainWindow): for f in self.output_formats: self.output_format.addItem(f) self.output_format.setCurrentIndex(self.output_formats.index(prefs['output_format'])) - def change_output_format(x): - of = unicode(x).strip() - if of != prefs['output_format']: - if of not in ('LRF',): - warning_dialog(self, 'Warning', - '

%s support is still in beta. If you find bugs, please report them by opening a ticket.'%of).exec_() - prefs.set('output_format', of) - self.connect(self.output_format, SIGNAL('currentIndexChanged(QString)'), - change_output_format) + self.change_output_format, Qt.QueuedConnection) ####################### Vanity ######################## self.vanity_template = _('

For help visit %s.kovidgoyal.net
')%(__appname__, __appname__) @@ -376,6 +368,15 @@ class Main(MainWindow, Ui_MainWindow): self.action_news.setMenu(self.scheduler.news_menu) self.connect(self.action_news, SIGNAL('triggered(bool)'), self.scheduler.show_dialog) self.location_view.setCurrentIndex(self.location_view.model().index(0)) + + def change_output_format(self, x): + of = unicode(x).strip() + if of != prefs['output_format']: + if of not in ('LRF',): + warning_dialog(self, 'Warning', + '

%s support is still in beta. If you find bugs, please report them by opening a ticket.'%of).exec_() + prefs.set('output_format', of) + def test_server(self, *args): if self.content_server.exception is not None: