smilies!
2
TODO
|
@ -1,7 +1,5 @@
|
|||
Features:
|
||||
* Tray doesn't disappear on windows after close
|
||||
* memo quirk toggle
|
||||
* mood change system msg
|
||||
* comment history (up button)
|
||||
* page up/down scrolling
|
||||
* System tray menu
|
||||
|
|
9
convo.py
|
@ -350,12 +350,17 @@ class PesterConvo(QtGui.QFrame):
|
|||
def icon(self):
|
||||
return self.chum.mood.icon(self.mainwindow.theme)
|
||||
|
||||
def updateMood(self, mood, unblocked=False):
|
||||
def updateMood(self, mood, unblocked=False, old=None):
|
||||
syscolor = QtGui.QColor(self.mainwindow.theme["convo/systemMsgColor"])
|
||||
if mood.name() == "offline" and self.chumopen == True and not unblocked:
|
||||
msg = self.chum.pestermsg(self.mainwindow.profile(), QtGui.QColor(self.mainwindow.theme["convo/systemMsgColor"]), self.mainwindow.theme["convo/text/ceasepester"])
|
||||
msg = self.chum.pestermsg(self.mainwindow.profile(), syscolor, self.mainwindow.theme["convo/text/ceasepester"])
|
||||
self.textArea.append(convertTags(msg))
|
||||
self.mainwindow.chatlog.log(self.title(), convertTags(msg, "bbcode"))
|
||||
self.chumopen = False
|
||||
elif old and old.name() != mood.name():
|
||||
msg = self.chum.moodmsg(syscolor, self.mainwindow.theme)
|
||||
self.textArea.append(convertTags(msg))
|
||||
self.mainwindow.chatlog.log(self.title(), convertTags(msg, "bbcode"))
|
||||
if self.parent():
|
||||
self.parent().updateMood(self.title(), mood, unblocked)
|
||||
else:
|
||||
|
|
BIN
convo.pyc
|
@ -25,7 +25,6 @@ class Mood(object):
|
|||
name = "chummy"
|
||||
return name
|
||||
def icon(self, theme):
|
||||
|
||||
try:
|
||||
f = theme["main/chums/moods"][self.name()]["icon"]
|
||||
except KeyError:
|
||||
|
@ -139,6 +138,8 @@ class PesterProfile(object):
|
|||
return "<c=%s>-- %s%s <c=%s>[%s]</c> %s --</c>" % (syscolor.name(), handle, suffix, self.colorhtml(), initials, msg)
|
||||
def pestermsg(self, otherchum, syscolor, verb):
|
||||
return "<c=%s>-- %s <c=%s>[%s]</c> %s %s <c=%s>[%s]</c> at %s --</c>" % (syscolor.name(), self.handle, self.colorhtml(), self.initials(), verb, otherchum.handle, otherchum.colorhtml(), otherchum.initials(), datetime.now().strftime("%H:%M"))
|
||||
def moodmsg(self, syscolor, theme):
|
||||
return "<c=%s>-- %s <c=%s>[%s]</c> changed their mood to %s <img src='%s' /> --</c>" % (syscolor.name(), self.handle, self.colorhtml(), self.initials(), self.mood.name().upper(), theme["main/chums/moods"][self.mood.name()]["icon"])
|
||||
def memoclosemsg(self, syscolor, timeGrammar, verb):
|
||||
return "<c=%s><c=%s>%s%s%s</c> %s.</c>" % (syscolor.name(), self.colorhtml(), timeGrammar.pcf, self.initials(), timeGrammar.number, verb)
|
||||
def memoopenmsg(self, syscolor, td, timeGrammar, verb, channel):
|
||||
|
|
BIN
dataobjs.pyc
BIN
generic.pyc
BIN
irc.pyc
20
memos.py
|
@ -318,6 +318,13 @@ class PesterMemo(PesterConvo):
|
|||
self.userlist.optionsMenu.addAction(self.addchumAction)
|
||||
# ban & op list added if we are op
|
||||
|
||||
self.optionsMenu = QtGui.QMenu(self)
|
||||
self.quirksOff = QtGui.QAction(self.mainwindow.theme["main/menus/rclickchumlist/quirksoff"], self)
|
||||
self.quirksOff.setCheckable(True)
|
||||
self.connect(self.quirksOff, QtCore.SIGNAL('toggled(bool)'),
|
||||
self, QtCore.SLOT('toggleQuirks(bool)'))
|
||||
self.optionsMenu.addAction(self.quirksOff)
|
||||
|
||||
self.timeslider = TimeSlider(QtCore.Qt.Horizontal, self)
|
||||
self.timeinput = TimeInput(self.timeslider, self)
|
||||
self.timeinput.setText(timestr)
|
||||
|
@ -387,6 +394,7 @@ class PesterMemo(PesterConvo):
|
|||
|
||||
self.op = False
|
||||
self.newmessage = False
|
||||
self.applyquirks = True
|
||||
|
||||
def title(self):
|
||||
return self.channel
|
||||
|
@ -532,14 +540,17 @@ class PesterMemo(PesterConvo):
|
|||
|
||||
@QtCore.pyqtSlot()
|
||||
def sentMessage(self):
|
||||
text = self.textInput.text()
|
||||
text = unicode(self.textInput.text())
|
||||
if text == "":
|
||||
return
|
||||
if self.time.getTime() == None:
|
||||
self.sendtime()
|
||||
grammar = self.time.getGrammar()
|
||||
# deal with quirks here
|
||||
qtext = self.mainwindow.userprofile.quirks.apply(unicode(text))
|
||||
if self.applyquirks:
|
||||
qtext = self.mainwindow.userprofile.quirks.apply(text)
|
||||
else:
|
||||
qtext = text
|
||||
if qtext[0:3] != "/me":
|
||||
initials = self.mainwindow.profile().initials()
|
||||
colorcmd = self.mainwindow.profile().colorcmd()
|
||||
|
@ -549,12 +560,11 @@ class PesterMemo(PesterConvo):
|
|||
else:
|
||||
clientText = qtext
|
||||
serverText = clientText
|
||||
self.textInput.setText("")
|
||||
self.addMessage(clientText, True)
|
||||
# convert color tags
|
||||
text = convertTags(unicode(serverText), "ctag")
|
||||
serverText = convertTags(unicode(serverText), "ctag")
|
||||
self.messageSent.emit(serverText, self.title())
|
||||
|
||||
self.textInput.setText("")
|
||||
@QtCore.pyqtSlot()
|
||||
def namesUpdated(self):
|
||||
# get namesdb
|
||||
|
|
BIN
memos.pyc
BIN
menus.pyc
BIN
oyoyo/client.pyc
BIN
oyoyo/parse.pyc
|
@ -43,11 +43,8 @@ def convertTags(string, format="html"):
|
|||
string = _urlre.sub(urlrep, string)
|
||||
if format == "html":
|
||||
string = _memore.sub(r" <a href='\1'>\1</a>", string)
|
||||
string = string.replace(" :trollcool:", " <img src='%s' />" % ("themes/pesterchum/trollcool.gif")) # ugh hardcoded, gross i know. but its just 2 smilies
|
||||
string = string.replace(" :cool:", " <img src='%s' />" % ("themes/pesterchum/pccool.gif"))
|
||||
elif format == "bbcode":
|
||||
string = string.replace(" :trollcool:", " [img]http://www.mspaintadventures.com/storyfiles/hs2/scraps/trollcool.gif[/img]")
|
||||
string = string.replace(" :cool:", " [img]http://www.mspaintadventures.com/storyfiles/hs2/scraps/pccool.gif[/img]")
|
||||
for (code, f) in smiledict.iteritems():
|
||||
string = string.replace(" %s" % (code), " <img src='smilies/%s' />" % (f))
|
||||
return string
|
||||
|
||||
def escapeBrackets(string):
|
||||
|
@ -141,3 +138,40 @@ def timeDifference(td):
|
|||
else:
|
||||
timetext = "%d HOURS %s" % (hours, when)
|
||||
return timetext
|
||||
|
||||
|
||||
smiledict = {
|
||||
":rancorous:": "pc_rancorous.gif",
|
||||
":apple:": "apple.gif",
|
||||
":bathearst:" "bathearst.gif"
|
||||
":pleasant:": "pc_pleasant.gif",
|
||||
":blueghost:": "blueslimer.gif",
|
||||
":candycorn:": "candycorn.gif",
|
||||
":cheer:": "cheer.gif",
|
||||
":duhjohn:": "confusedjohn.gif",
|
||||
":datrump:": "datrump.gif",
|
||||
":facepalm:": "facepalm.gif",
|
||||
":bonk:": "headbonk.gif",
|
||||
":mspa:": "mspa_face.gif",
|
||||
":gun:": "mspa_reader.gif",
|
||||
":cal:": "lilcal.png",
|
||||
":amazedfirman:": "pc_amazedfirman.gif",
|
||||
":amazed:": "pc_amazed.gif",
|
||||
":chummy:": "pc_chummy.gif",
|
||||
":cool:": "pccool.gif",
|
||||
":smooth:": "pccool.gif",
|
||||
":distraughtfirman": "pc_distraughtfirman.gif",
|
||||
":distraught:": "pc_distraught.gif",
|
||||
":insolent:": "pc_insolent.gif",
|
||||
":3:": "pckitty.gif",
|
||||
":mystified:": "pc_mystified.gif",
|
||||
":pranky:": "pc_pranky.gif",
|
||||
":tense:": "pc_tense.gif",
|
||||
":record:": "record.gif",
|
||||
":squiddle:": "squiddle.gif",
|
||||
":tab:": "tab.gif",
|
||||
":beetip:": "theprofessor.gif",
|
||||
":flipout:": "weasel.gif",
|
||||
":befuddled:": "what.gif",
|
||||
":pumpkin:": "whatpumpkin.gif",
|
||||
":trollcool:": "trollcool.gif"}
|
||||
|
|
BIN
parsetools.pyc
|
@ -1 +1 @@
|
|||
{"tabs": true, "soundon": false, "chums": ["marineAquist", "unknownTraveler", "tentacleTherapist", "macruralAlchemist", "vaginalEngineer", "mechanicalSpectacle", "carcinoGeneticist", "schlagzeugGator", "gamblingGenocider", "gardenGnostic", "superGhost", "centaursTesticle", "arachnidsGrip", "grimAuxiliatrix", "remoteBloodbath", "nitroZealist", "greenZephyr", "arsenicCatnip", "adiosToreador", "cuttlefishCuller", "rageInducer", "gallowsCalibrator", "caligulasAquarium", "terminallyCapricious", "illuminatedWax", "aquaMarinist", "maxiumumFatness", "elegantDiversion", "moirailBunp", "uroborosUnbound", "androidTechnician", "midnightSparrow", "apocalypseArisen", "acapellaWaterfall", "anguillaNuntia", "oilslickOrchid"], "block": []}
|
||||
{"tabs": true, "soundon": true, "chums": ["marineAquist", "unknownTraveler", "tentacleTherapist", "macruralAlchemist", "vaginalEngineer", "mechanicalSpectacle", "carcinoGeneticist", "schlagzeugGator", "gamblingGenocider", "gardenGnostic", "superGhost", "centaursTesticle", "arachnidsGrip", "grimAuxiliatrix", "remoteBloodbath", "nitroZealist", "greenZephyr", "arsenicCatnip", "adiosToreador", "cuttlefishCuller", "rageInducer", "gallowsCalibrator", "caligulasAquarium", "terminallyCapricious", "illuminatedWax", "aquaMarinist", "maxiumumFatness", "elegantDiversion", "moirailBunp", "uroborosUnbound", "androidTechnician", "midnightSparrow", "apocalypseArisen", "acapellaWaterfall", "anguillaNuntia", "oilslickOrchid", "confusedTransient"], "defaultprofile": "ghostDunk", "block": []}
|
|
@ -364,8 +364,11 @@ class chumArea(RightClickList):
|
|||
return chums
|
||||
def updateMood(self, handle, mood):
|
||||
chums = self.getChums(handle)
|
||||
oldmood = None
|
||||
for c in chums:
|
||||
oldmood = c.mood
|
||||
c.setMood(mood)
|
||||
return oldmood
|
||||
def updateColor(self, handle, color):
|
||||
chums = self.findItems(handle, QtCore.Qt.MatchFlags(0))
|
||||
for c in chums:
|
||||
|
@ -804,9 +807,9 @@ class PesterWindow(MovingWindow):
|
|||
self.chumdb.setColor(handle, color)
|
||||
|
||||
def updateMood(self, handle, mood):
|
||||
self.chumList.updateMood(handle, mood)
|
||||
oldmood = self.chumList.updateMood(handle, mood)
|
||||
if self.convos.has_key(handle):
|
||||
self.convos[handle].updateMood(mood)
|
||||
self.convos[handle].updateMood(mood, old=oldmood)
|
||||
if hasattr(self, 'trollslum') and self.trollslum:
|
||||
self.trollslum.updateMood(handle, mood)
|
||||
def newConversation(self, chum, initiated=True):
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"color": "#ff00ff", "theme": "trollian", "quirks": [], "handle": "ghostDunk"}
|
||||
{"color": "#ff00ff", "theme": "pesterchum", "quirks": [], "handle": "ghostDunk"}
|
BIN
smilies/Smilies.zip
Normal file
BIN
smilies/Thumbs.db
Normal file
BIN
smilies/apple.gif
Normal file
After Width: | Height: | Size: 287 B |
BIN
smilies/bathearst.gif
Normal file
After Width: | Height: | Size: 215 B |
BIN
smilies/blacktear.gif
Normal file
After Width: | Height: | Size: 937 B |
BIN
smilies/blueslimer.gif
Normal file
After Width: | Height: | Size: 459 B |
BIN
smilies/candycorn.gif
Normal file
After Width: | Height: | Size: 144 B |
BIN
smilies/cathearst.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
smilies/cheer.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
smilies/confusedjohn.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
smilies/datrump.gif
Normal file
After Width: | Height: | Size: 279 B |
BIN
smilies/facepalm.gif
Normal file
After Width: | Height: | Size: 344 B |
BIN
smilies/headbonk.gif
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
smilies/lilcal.png
Normal file
After Width: | Height: | Size: 829 B |
BIN
smilies/mspa_face.gif
Normal file
After Width: | Height: | Size: 336 B |
BIN
smilies/mspa_reader.gif
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
smilies/pc_amazed.gif
Normal file
After Width: | Height: | Size: 88 B |
BIN
smilies/pc_amazedfirman.gif
Normal file
After Width: | Height: | Size: 117 B |
BIN
smilies/pc_bemused.gif
Normal file
After Width: | Height: | Size: 93 B |
BIN
smilies/pc_chummy.gif
Normal file
After Width: | Height: | Size: 97 B |
BIN
smilies/pc_distraught.gif
Normal file
After Width: | Height: | Size: 84 B |
BIN
smilies/pc_distraughtfirman.gif
Normal file
After Width: | Height: | Size: 111 B |
BIN
smilies/pc_insolent.gif
Normal file
After Width: | Height: | Size: 89 B |
BIN
smilies/pc_mystified.gif
Normal file
After Width: | Height: | Size: 85 B |
BIN
smilies/pc_pleasant.gif
Normal file
After Width: | Height: | Size: 83 B |
BIN
smilies/pc_pranky.gif
Normal file
After Width: | Height: | Size: 81 B |
BIN
smilies/pc_rancorous.gif
Normal file
After Width: | Height: | Size: 138 B |
BIN
smilies/pc_tense.gif
Normal file
After Width: | Height: | Size: 97 B |
BIN
smilies/pccool.gif
Normal file
After Width: | Height: | Size: 131 B |
BIN
smilies/pckitty.gif
Normal file
After Width: | Height: | Size: 107 B |
BIN
smilies/record.gif
Normal file
After Width: | Height: | Size: 664 B |
BIN
smilies/squiddle.gif
Normal file
After Width: | Height: | Size: 563 B |
BIN
smilies/tab.gif
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
smilies/theprofessor.gif
Normal file
After Width: | Height: | Size: 261 B |
BIN
smilies/trollcool.gif
Normal file
After Width: | Height: | Size: 111 B |
BIN
smilies/weasel.gif
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
smilies/what.gif
Normal file
After Width: | Height: | Size: 82 B |
BIN
smilies/whatpumpkin.gif
Normal file
After Width: | Height: | Size: 264 B |