From 57e216f0c7fba60eb77dad543e45badf72a92406 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 24 Dec 2006 22:23:07 +0000 Subject: [PATCH] More minor bug fixes --- libprs500/gui/main.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/libprs500/gui/main.py b/libprs500/gui/main.py index d95b41f82e..178c82e581 100644 --- a/libprs500/gui/main.py +++ b/libprs500/gui/main.py @@ -40,7 +40,7 @@ from editbook import EditBookDialog DEFAULT_BOOK_COVER = None LIBRARY_BOOK_TEMPLATE = QString(" \ -
Formats: %1 \ Tags: %2
Comments:%3
") + Comments: %3") DEVICE_BOOK_TEMPLATE = QString("\ \ @@ -130,6 +130,7 @@ class Main(QObject, Ui_MainWindow): self.book_cover.setPixmap(cover) self.book_cover.show() self.book_info.show() + self.current_view.scrollTo(current) def formats_added(self, index): if index == self.library_view.currentIndex(): @@ -223,12 +224,14 @@ class Main(QObject, Ui_MainWindow): ebd = EditBookDialog(dialog, _id, self.library_model.db) if dialog.exec_() == QDialog.Accepted: accepted = True - title = str(ebd.title.text()).strip() - authors = str(ebd.authors.text()).strip() + title = unicode(ebd.title.text().toUtf8(), 'utf-8').strip() + authors = unicode(ebd.authors.text().toUtf8(), 'utf-8').strip() rating = ebd.rating.value() - tags = str(ebd.tags.text()).strip() - publisher = str(ebd.publisher.text()).strip() - comments = str(ebd.comments.toPlainText()).strip() + tags = unicode(ebd.tags.text().toUtf8(), 'utf-8').strip() + publisher = unicode(ebd.publisher.text().toUtf8(), \ + 'utf-8').strip() + comments = unicode(ebd.comments.toPlainText().toUtf8(), \ + 'utf-8').strip() pix = ebd.cover.pixmap() if not pix.isNull(): self.update_cover(pix)
Title: %1 \  Size: %2
Author: %3