fix #20
This commit is contained in:
parent
43d9a41dae
commit
d81e3e781b
@ -25,7 +25,9 @@ class MessageEdit(QtGui.QTextBrowser):
|
||||
self.setOpenExternalLinks(True)
|
||||
self.setAcceptRichText(True)
|
||||
self.setOpenLinks(False)
|
||||
self.setSearchPaths([smileys.SmileyLoader.get_instance().get_smileys_path()])
|
||||
path = smileys.SmileyLoader.get_instance().get_smileys_path()
|
||||
if path is not None:
|
||||
self.setSearchPaths([path])
|
||||
self.document().setDefaultStyleSheet('a { color: #306EFF; }')
|
||||
text = self.decoratedText(text)
|
||||
if message_type != TOX_MESSAGE_TYPE['NORMAL']:
|
||||
|
@ -48,7 +48,7 @@ class SmileyLoader(util.Singleton):
|
||||
print('Smiley pack {} was not loaded. Error: {}'.format(pack_name, ex))
|
||||
|
||||
def get_smileys_path(self):
|
||||
return util.curr_directory() + '/smileys/' + self._curr_pack + '/'
|
||||
return util.curr_directory() + '/smileys/' + self._curr_pack + '/' if self._curr_pack is not None else None
|
||||
|
||||
def get_packs_list(self):
|
||||
d = util.curr_directory() + '/smileys/'
|
||||
|
Loading…
Reference in New Issue
Block a user