From 4f3bf4296a1edf496947e7695faa8f01e7a7e7a0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 21 Apr 2013 08:24:26 +0530 Subject: [PATCH 1/4] Fix #1171043 ([ENHANCE] Keyboard access to Restore Defaults) --- src/calibre/gui2/convert/single.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/calibre/gui2/convert/single.py b/src/calibre/gui2/convert/single.py index 469091162b..1a915288a8 100644 --- a/src/calibre/gui2/convert/single.py +++ b/src/calibre/gui2/convert/single.py @@ -75,7 +75,7 @@ class GroupModel(QAbstractListModel): def get_preferred_input_format_for_book(db, book_id): recs = load_specifics(db, book_id) if recs: - return recs.get('gui_preferred_input_format', None) + return recs.get('gui_preferred_input_format', None) def get_available_formats_for_book(db, book_id): available_formats = db.formats(book_id, index_is_id=True) @@ -147,6 +147,7 @@ class Config(ResizableDialog, Ui_Dialog): self.connect(self.groups, SIGNAL('entered(QModelIndex)'), self.show_group_help) rb = self.buttonBox.button(self.buttonBox.RestoreDefaults) + rb.setText(_('Restore &Defaults')) self.connect(rb, SIGNAL('clicked()'), self.restore_defaults) self.groups.setMouseTracking(True) geom = gprefs.get('convert_single_dialog_geom', None) @@ -188,7 +189,6 @@ class Config(ResizableDialog, Ui_Dialog): return cls(self.stack, self.plumber.get_option_by_name, self.plumber.get_option_help, self.db, self.book_id) - self.mw = widget_factory(MetadataWidget) self.setWindowTitle(_('Convert')+ ' ' + unicode(self.mw.title.text())) lf = widget_factory(LookAndFeelWidget) @@ -209,7 +209,8 @@ class Config(ResizableDialog, Ui_Dialog): self.plumber.get_option_help, self.db, self.book_id) while True: c = self.stack.currentWidget() - if not c: break + if not c: + break self.stack.removeWidget(c) widgets = [self.mw, lf, hw, ps, sd, toc, sr] @@ -234,7 +235,6 @@ class Config(ResizableDialog, Ui_Dialog): except: pass - def setup_input_output_formats(self, db, book_id, preferred_input_format, preferred_output_format): if preferred_output_format: From 6cd338ad41b5d850b9a465951fb6eeb3410a594a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 21 Apr 2013 08:44:54 +0530 Subject: [PATCH 2/4] PDF Output: Fix hyperlinks not working when converting an EPUB whose individual files have names with URL unsafe characters. Fixes #1169795 (Private bug) --- src/calibre/ebooks/pdf/render/links.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/pdf/render/links.py b/src/calibre/ebooks/pdf/render/links.py index 97a6551dbd..c9d4d8d43c 100644 --- a/src/calibre/ebooks/pdf/render/links.py +++ b/src/calibre/ebooks/pdf/render/links.py @@ -51,7 +51,7 @@ class Links(object): for link in self.links: path, href, frag = link[0] page, rect = link[1:] - combined_path = os.path.abspath(os.path.join(os.path.dirname(path), *href.split('/'))) + combined_path = os.path.abspath(os.path.join(os.path.dirname(path), *unquote(href).split('/'))) is_local = not href or combined_path in self.anchors annot = Dictionary({ 'Type':Name('Annot'), 'Subtype':Name('Link'), From 6358ff4c412d9f487fe8ac769fb0ffb115790586 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 21 Apr 2013 08:53:00 +0530 Subject: [PATCH 3/4] Fix bug in Danish translation causing books with language Ingush being incorrectly translated as Engelsk --- setup/iso_639/da.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/iso_639/da.po b/setup/iso_639/da.po index 716f4db0cd..fc6300ceb8 100644 --- a/setup/iso_639/da.po +++ b/setup/iso_639/da.po @@ -10253,7 +10253,7 @@ msgstr "" #. name for inh msgid "Ingush" -msgstr "Engelsk" +msgstr "Ingush" #. name for inj msgid "Inga; Jungle" From 81994d99c71013338eb4a8e3768807d4deffaa2e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 21 Apr 2013 15:43:08 +0530 Subject: [PATCH 4/4] ... --- src/calibre/gui2/preferences/adding.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/preferences/adding.ui b/src/calibre/gui2/preferences/adding.ui index b98a476864..8b9b9c0cd1 100644 --- a/src/calibre/gui2/preferences/adding.ui +++ b/src/calibre/gui2/preferences/adding.ui @@ -164,7 +164,7 @@ Author matching is exact. - Ignore files with the following extensions when automatically adding + <b>Ignore</b> files with the following extensions when automatically adding true