new smiley pack + fixes

This commit is contained in:
ingvar1995 2016-06-27 19:28:43 +03:00
parent 699fe59706
commit a56693547c
38 changed files with 9 additions and 8 deletions

View File

@ -7,4 +7,4 @@ Install PyInstaller:
``pyinstaller --windowed --icon images/icon.ico main.py``
Don't forget to copy /images/, /sounds/, /translations/, /styles/, to /dist/main/
Don't forget to copy /images/, /sounds/, /translations/, /styles/, /smileys/, /stickers/ to /dist/main/

View File

@ -7,7 +7,7 @@ import profile
from file_transfers import TOX_FILE_TRANSFER_STATE, PAUSED_FILE_TRANSFERS, DO_NOT_SHOW_ACCEPT_BUTTON, ACTIVE_FILE_TRANSFERS, SHOW_PROGRESS_BAR
from util import curr_directory, convert_time, curr_time
from widgets import DataLabel, create_menu
import cgi
import html as h
import smileys
import settings
@ -70,8 +70,7 @@ class MessageEdit(QtGui.QTextBrowser):
self.setLineWrapColumnOrWidth(self.lineWrapColumnOrWidth())
def decoratedText(self, text):
text = text.replace("&", "&")
text = cgi.escape(text) # replace < and >
text = h.escape(text) # replace < and >
exp = QtCore.QRegExp(
'('
'(?:\\b)((www\\.)|(http[s]?|ftp)://)'

View File

@ -423,7 +423,6 @@ class MainWindow(QtGui.QMainWindow):
def send_smiley(self):
self.menu.hide()
if self.profile.active_friend + 1:
if not hasattr(self, 'smiley'):
self.smiley = SmileyWindow(self)
self.smiley.setGeometry(QtCore.QRect(self.x() if Settings.get_instance()['mirror_mode'] else 270 + self.x(),
self.y() + self.height() - 200,

View File

@ -131,11 +131,13 @@ class SmileyWindow(QtGui.QWidget):
inst = smileys.SmileyLoader.get_instance()
self.data = inst.get_smileys()
count = len(self.data)
if not count:
self.close()
self.page_size = int(pow(count / 8, 0.5) + 1) * 8 # smileys per page
if count % self.page_size == 0:
self.page_count = count // self.page_size
else:
self.page_count = int(count / float(self.page_size) + 0.5)
self.page_count = round(count / self.page_size + 0.5)
self.page = -1
self.radio = []
self.parent = parent

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1 @@
{":darthmaul:": "darthmaul.png", ":darthsidious:": "darthsidious.png", ":y-wing:": "y-wing.png", ":samjackson:": "samjackson.png", ":confused:": "confused.png", ":sith:": "sith.png", ":sad:": "sad.png", ":jango:": "jango.png", ":tongue:": "tongue.png", ":wink:": "wink.png", ":chewie:": "chewie.png", ":boba:": "boba.png", ":c3p0:": "c3p0.png", ":stormtrooper:": "stormtrooper.png", ":smile:": "smile.png", ":tape:": "tape.png", ":mad:": "mad.png", ":shocked:": "shocked.png", ":jedi:": "jedi.png", ":jarjarbinks:": "jarjarbinks.png", ":dualsith:": "dualsith.png", ":r2d2:": "r2d2.png", ":grin:": "grin.png", ":x-wing:": "x-wing.png", ":leia:": "leia.png", ":happy:": "happy.png", ":jedi2:": "jedi2.png", ":ackbar:": "ackbar.png", ":deathstar:": "deathstar.png", ":darthvader:": "darthvader.png", ":masteryoda:": "masteryoda.png", ":anim:": "anim.gif"}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1022 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB