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
|
from PyQt4 import QtGui, QtCore
|
||||||
import re
|
import re, ostools
|
||||||
|
|
||||||
from os import remove
|
from os import remove
|
||||||
from generic import RightClickList, RightClickTree, MultiTextDialog
|
from generic import RightClickList, RightClickTree, MultiTextDialog
|
||||||
|
@ -984,13 +984,14 @@ class PesterOptions(QtGui.QDialog):
|
||||||
if self.config.opvoiceMessages():
|
if self.config.opvoiceMessages():
|
||||||
self.memomessagecheck.setChecked(True)
|
self.memomessagecheck.setChecked(True)
|
||||||
|
|
||||||
self.animationscheck = QtGui.QCheckBox("Use animated smilies", self)
|
if not ostools.isOSXBundle():
|
||||||
if self.config.animations():
|
self.animationscheck = QtGui.QCheckBox("Use animated smilies", self)
|
||||||
self.animationscheck.setChecked(True)
|
if self.config.animations():
|
||||||
animateLabel = QtGui.QLabel("(Disable if you leave chats open for LOOOONG periods of time)")
|
self.animationscheck.setChecked(True)
|
||||||
font = animateLabel.font()
|
animateLabel = QtGui.QLabel("(Disable if you leave chats open for LOOOONG periods of time)")
|
||||||
font.setPointSize(8)
|
font = animateLabel.font()
|
||||||
animateLabel.setFont(font)
|
font.setPointSize(8)
|
||||||
|
animateLabel.setFont(font)
|
||||||
|
|
||||||
self.userlinkscheck = QtGui.QCheckBox("Disable #Memo and @User Links", self)
|
self.userlinkscheck = QtGui.QCheckBox("Disable #Memo and @User Links", self)
|
||||||
self.userlinkscheck.setChecked(self.config.disableUserLinks())
|
self.userlinkscheck.setChecked(self.config.disableUserLinks())
|
||||||
|
@ -1121,8 +1122,9 @@ class PesterOptions(QtGui.QDialog):
|
||||||
layout_chat.addWidget(self.timestampBox)
|
layout_chat.addWidget(self.timestampBox)
|
||||||
layout_chat.addWidget(self.secondscheck)
|
layout_chat.addWidget(self.secondscheck)
|
||||||
layout_chat.addWidget(self.memomessagecheck)
|
layout_chat.addWidget(self.memomessagecheck)
|
||||||
layout_chat.addWidget(self.animationscheck)
|
if not ostools.isOSXBundle():
|
||||||
layout_chat.addWidget(animateLabel)
|
layout_chat.addWidget(self.animationscheck)
|
||||||
|
layout_chat.addWidget(animateLabel)
|
||||||
if parent.randhandler.running:
|
if parent.randhandler.running:
|
||||||
layout_chat.addWidget(self.randomscheck)
|
layout_chat.addWidget(self.randomscheck)
|
||||||
# Re-enable these when it's possible to disable User and Memo links
|
# Re-enable these when it's possible to disable User and Memo links
|
||||||
|
|
|
@ -9,7 +9,7 @@ def isWin32():
|
||||||
return platform == "win32"
|
return platform == "win32"
|
||||||
|
|
||||||
def isOSXBundle():
|
def isOSXBundle():
|
||||||
return isOSX() and path.abspath('.').find(".app")
|
return isOSX() and (path.abspath('.').find(".app") != -1)
|
||||||
|
|
||||||
def getDataDir():
|
def getDataDir():
|
||||||
if isOSX():
|
if isOSX():
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import re
|
import re
|
||||||
import random
|
import random
|
||||||
|
import ostools
|
||||||
from copy import copy
|
from copy import copy
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
|
@ -425,6 +426,16 @@ smiledict = {
|
||||||
":acceptant:": "acceptant.png",
|
":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())
|
reverse_smiley = dict((v,k) for k, v in smiledict.iteritems())
|
||||||
_smilere = re.compile("|".join(smiledict.keys()))
|
_smilere = re.compile("|".join(smiledict.keys()))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue