This commit is contained in:
Kovid Goyal 2009-06-24 09:25:28 -07:00
parent 8fff3d58c0
commit a668e60944
2 changed files with 3 additions and 3 deletions

View File

@ -169,11 +169,11 @@ class Stylizer(object):
if not matches and class_sel_pat.match(text): if not matches and class_sel_pat.match(text):
found = False found = False
for x in tree.xpath('//*[@class]'): 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) matches.append(x)
found = True found = True
if found: 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)) %(text, item.href))
for elem in matches: for elem in matches:
self.style(elem)._update_cssdict(cssdict) self.style(elem)._update_cssdict(cssdict)

View File

@ -482,7 +482,7 @@ class Wizard(QWizard):
self.device_page = DevicePage() self.device_page = DevicePage()
self.library_page = LibraryPage() self.library_page = LibraryPage()
self.finish_page = FinishPage() self.finish_page = FinishPage()
bt = self.buttonText(self.FinishButton) bt = unicode(self.buttonText(self.FinishButton))
t = unicode(self.finish_page.finish_text.text()) t = unicode(self.finish_page.finish_text.text())
self.finish_page.finish_text.setText(t%bt) self.finish_page.finish_text.setText(t%bt)
self.kindle_page = KindlePage() self.kindle_page = KindlePage()