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? * Turn @ and # links on/off?
* "someone has friended you" notifier * "someone has friended you" notifier
* MSPA update notifier option * MSPA update notifier option
* Don't animate emotes not in current tab
* Show true bans? * Show true bans?
* Colour saving boxes things? * Colour saving boxes things?

View file

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