From a668e609445997c8c829a507ee0f80a9a5744777 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 24 Jun 2009 09:25:28 -0700 Subject: [PATCH] ... --- src/calibre/ebooks/oeb/stylizer.py | 4 ++-- src/calibre/gui2/wizard/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/oeb/stylizer.py b/src/calibre/ebooks/oeb/stylizer.py index 8b0667c8b7..5f923c4311 100644 --- a/src/calibre/ebooks/oeb/stylizer.py +++ b/src/calibre/ebooks/oeb/stylizer.py @@ -169,11 +169,11 @@ class Stylizer(object): if not matches and class_sel_pat.match(text): found = False for x in tree.xpath('//*[@class]'): - if x.get('class').lower() == text[1:].lower(): + if '.'+x.get('class').lower() in text.lower(): matches.append(x) found = True if found: - self.logger.warn('Ignoring case mismatch for CSS selector: %s in %s' + self.logger.warn('Ignoring case mismatches for CSS selector: %s in %s' %(text, item.href)) for elem in matches: self.style(elem)._update_cssdict(cssdict) diff --git a/src/calibre/gui2/wizard/__init__.py b/src/calibre/gui2/wizard/__init__.py index 79da40b7c1..bfd01f58fd 100644 --- a/src/calibre/gui2/wizard/__init__.py +++ b/src/calibre/gui2/wizard/__init__.py @@ -482,7 +482,7 @@ class Wizard(QWizard): self.device_page = DevicePage() self.library_page = LibraryPage() self.finish_page = FinishPage() - bt = self.buttonText(self.FinishButton) + bt = unicode(self.buttonText(self.FinishButton)) t = unicode(self.finish_page.finish_text.text()) self.finish_page.finish_text.setText(t%bt) self.kindle_page = KindlePage()