Don't animate except on current tab

This commit is contained in:
Kiooeht 2011-06-23 00:13:26 -07:00
parent c8752dd29b
commit 124c93b1d4
2 changed files with 10 additions and 4 deletions

View file

@ -11,7 +11,6 @@ Features
* Turn @ and # links on/off?
* "someone has friended you" notifier
* MSPA update notifier option
* Don't animate emotes not in current tab
* Show true bans?
* Colour saving boxes things?

View file

@ -243,9 +243,16 @@ class PesterText(QtGui.QTextEdit):
url = self.urls[movie].toString()
html = unicode(self.toHtml())
if html.find(url) != -1:
self.document().addResource(QtGui.QTextDocument.ImageResource,
self.urls[movie], movie.currentPixmap())
self.setLineWrapColumnOrWidth(self.lineWrapColumnOrWidth())
if self.parent().parent():
i = self.parent().parent().tabIndices[self.parent().title()]
if self.parent().parent().tabs.currentIndex() == i:
self.document().addResource(QtGui.QTextDocument.ImageResource,
self.urls[movie], movie.currentPixmap())
self.setLineWrapColumnOrWidth(self.lineWrapColumnOrWidth())
else:
self.document().addResource(QtGui.QTextDocument.ImageResource,
self.urls[movie], movie.currentPixmap())
self.setLineWrapColumnOrWidth(self.lineWrapColumnOrWidth())
@QtCore.pyqtSlot(bool)
def animateChanged(self, animate):
if animate: