From c0a6406dc9d129aca37f7b224548030b27e90044 Mon Sep 17 00:00:00 2001 From: "beville@gmail.com" Date: Wed, 30 Jan 2013 02:15:16 +0000 Subject: [PATCH] Unicode fix. Added tooltip strigs to table git-svn-id: http://comictagger.googlecode.com/svn/trunk@363 6c5673fe-1810-88d6-992b-cd32ca31540c --- autotagmatchwindow.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/autotagmatchwindow.py b/autotagmatchwindow.py index fd7b3b9..7e12b09 100644 --- a/autotagmatchwindow.py +++ b/autotagmatchwindow.py @@ -26,6 +26,7 @@ from PyQt4.QtCore import QUrl, pyqtSignal, QByteArray from imagefetcher import ImageFetcher from settings import ComicTaggerSettings +from options import MetaDataStyle class AutoTagMatchWindow(QtGui.QDialog): @@ -67,7 +68,7 @@ class AutoTagMatchWindow(QtGui.QDialog): self.twList.selectRow( 0 ) path = self.current_match_set.ca.path - self.setWindowTitle( "Select correct match ({0} of {1}): {2}".format( + self.setWindowTitle( u"Select correct match ({0} of {1}): {2}".format( self.current_match_set_idx+1, len( self.match_set_list ), os.path.split(path)[1] )) @@ -85,6 +86,7 @@ class AutoTagMatchWindow(QtGui.QDialog): item_text = match['series'] item = QtGui.QTableWidgetItem(item_text) + item.setData( QtCore.Qt.ToolTipRole, item_text ) item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled) self.twList.setItem(row, 0, item) @@ -93,6 +95,7 @@ class AutoTagMatchWindow(QtGui.QDialog): else: item_text = u"Unknown" item = QtGui.QTableWidgetItem(item_text) + item.setData( QtCore.Qt.ToolTipRole, item_text ) item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled) self.twList.setItem(row, 1, item) @@ -104,6 +107,7 @@ class AutoTagMatchWindow(QtGui.QDialog): else: item_text += u"????" item = QtGui.QTableWidgetItem(item_text) + item.setData( QtCore.Qt.ToolTipRole, item_text ) item.setFlags(QtCore.Qt.ItemIsSelectable| QtCore.Qt.ItemIsEnabled) self.twList.setItem(row, 2, item) @@ -196,6 +200,8 @@ class AutoTagMatchWindow(QtGui.QDialog): QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor)) md.overlay( cv_md ) success = ca.writeMetadata( md, self.style ) + ca.loadCache( [ MetaDataStyle.CBI, MetaDataStyle.CIX ] ) + QtGui.QApplication.restoreOverrideCursor() if not success: