Made animated smilies show up as static in OSX bundles so they actually show up
This commit is contained in:
parent
98b681fa56
commit
c0d590759b
3 changed files with 24 additions and 11 deletions
4
menus.py
4
menus.py
|
@ -1,5 +1,5 @@
|
|||
from PyQt4 import QtGui, QtCore
|
||||
import re
|
||||
import re, ostools
|
||||
|
||||
from os import remove
|
||||
from generic import RightClickList, RightClickTree, MultiTextDialog
|
||||
|
@ -984,6 +984,7 @@ class PesterOptions(QtGui.QDialog):
|
|||
if self.config.opvoiceMessages():
|
||||
self.memomessagecheck.setChecked(True)
|
||||
|
||||
if not ostools.isOSXBundle():
|
||||
self.animationscheck = QtGui.QCheckBox("Use animated smilies", self)
|
||||
if self.config.animations():
|
||||
self.animationscheck.setChecked(True)
|
||||
|
@ -1121,6 +1122,7 @@ class PesterOptions(QtGui.QDialog):
|
|||
layout_chat.addWidget(self.timestampBox)
|
||||
layout_chat.addWidget(self.secondscheck)
|
||||
layout_chat.addWidget(self.memomessagecheck)
|
||||
if not ostools.isOSXBundle():
|
||||
layout_chat.addWidget(self.animationscheck)
|
||||
layout_chat.addWidget(animateLabel)
|
||||
if parent.randhandler.running:
|
||||
|
|
|
@ -9,7 +9,7 @@ def isWin32():
|
|||
return platform == "win32"
|
||||
|
||||
def isOSXBundle():
|
||||
return isOSX() and path.abspath('.').find(".app")
|
||||
return isOSX() and (path.abspath('.').find(".app") != -1)
|
||||
|
||||
def getDataDir():
|
||||
if isOSX():
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import re
|
||||
import random
|
||||
import ostools
|
||||
from copy import copy
|
||||
from datetime import timedelta
|
||||
from PyQt4 import QtGui
|
||||
|
@ -425,6 +426,16 @@ smiledict = {
|
|||
":acceptant:": "acceptant.png",
|
||||
}
|
||||
|
||||
if ostools.isOSXBundle():
|
||||
for emote in smiledict:
|
||||
graphic = smiledict[emote]
|
||||
if graphic.find(".gif"):
|
||||
graphic = graphic.replace(".gif", ".png")
|
||||
smiledict[emote] = graphic
|
||||
|
||||
|
||||
|
||||
|
||||
reverse_smiley = dict((v,k) for k, v in smiledict.iteritems())
|
||||
_smilere = re.compile("|".join(smiledict.keys()))
|
||||
|
||||
|
|
Loading…
Reference in a new issue