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
22
menus.py
22
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,13 +984,14 @@ class PesterOptions(QtGui.QDialog):
|
|||
if self.config.opvoiceMessages():
|
||||
self.memomessagecheck.setChecked(True)
|
||||
|
||||
self.animationscheck = QtGui.QCheckBox("Use animated smilies", self)
|
||||
if self.config.animations():
|
||||
self.animationscheck.setChecked(True)
|
||||
animateLabel = QtGui.QLabel("(Disable if you leave chats open for LOOOONG periods of time)")
|
||||
font = animateLabel.font()
|
||||
font.setPointSize(8)
|
||||
animateLabel.setFont(font)
|
||||
if not ostools.isOSXBundle():
|
||||
self.animationscheck = QtGui.QCheckBox("Use animated smilies", self)
|
||||
if self.config.animations():
|
||||
self.animationscheck.setChecked(True)
|
||||
animateLabel = QtGui.QLabel("(Disable if you leave chats open for LOOOONG periods of time)")
|
||||
font = animateLabel.font()
|
||||
font.setPointSize(8)
|
||||
animateLabel.setFont(font)
|
||||
|
||||
self.userlinkscheck = QtGui.QCheckBox("Disable #Memo and @User Links", self)
|
||||
self.userlinkscheck.setChecked(self.config.disableUserLinks())
|
||||
|
@ -1121,8 +1122,9 @@ class PesterOptions(QtGui.QDialog):
|
|||
layout_chat.addWidget(self.timestampBox)
|
||||
layout_chat.addWidget(self.secondscheck)
|
||||
layout_chat.addWidget(self.memomessagecheck)
|
||||
layout_chat.addWidget(self.animationscheck)
|
||||
layout_chat.addWidget(animateLabel)
|
||||
if not ostools.isOSXBundle():
|
||||
layout_chat.addWidget(self.animationscheck)
|
||||
layout_chat.addWidget(animateLabel)
|
||||
if parent.randhandler.running:
|
||||
layout_chat.addWidget(self.randomscheck)
|
||||
# Re-enable these when it's possible to disable User and Memo links
|
||||
|
|
|
@ -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