diff --git a/convo.py b/convo.py index ad05dc6..030cdf4 100644 --- a/convo.py +++ b/convo.py @@ -259,13 +259,13 @@ class PesterText(QtGui.QTextEdit): for m in self.urls: html = unicode(self.toHtml()) if html.find(self.urls[m].toString()) != -1: - if movie.frameCount() > 1: + if m.frameCount() > 1: m.start() else: for m in self.urls: html = unicode(self.toHtml()) if html.find(self.urls[m].toString()) != -1: - if movie.frameCount() > 1: + if m.frameCount() > 1: m.stop() @QtCore.pyqtSlot(bool) diff --git a/memos.py b/memos.py index 46be764..95e7c38 100644 --- a/memos.py +++ b/memos.py @@ -256,7 +256,9 @@ class MemoText(PesterText): self, QtCore.SLOT('textReady(bool)')) self.urls = {} for k in smiledict: - self.addAnimation(QtCore.QUrl("smilies/%s" % (smiledict[k])), "smilies/%s" % (smiledict[k])); + self.addAnimation(QtCore.QUrl("smilies/%s" % (smiledict[k])), "smilies/%s" % (smiledict[k])) + self.connect(self.mainwindow, QtCore.SIGNAL('animationSetting(bool)'), + self, QtCore.SLOT('animateChanged(bool)')) def initTheme(self, theme): if theme.has_key("memos/scrollbar"): @@ -272,6 +274,11 @@ class MemoText(PesterText): parent = self.parent() window = parent.mainwindow me = window.profile() + if self.mainwindow.config.animations(): + for m in self.urls: + if convertTags(lexmsg).find(self.urls[m].toString()) != -1: + if m.state() == QtGui.QMovie.NotRunning: + m.start() chumdb = window.chumdb if chum is not me: # SO MUCH WH1T3SP4C3 >:] if type(lexmsg[0]) is colorBegin: # get color tag