diff --git a/TODO b/TODO index bbfc4d1..891c637 100644 --- a/TODO +++ b/TODO @@ -1,13 +1,13 @@ Features: * Tray doesn't disappear on windows after close -* System tray menu - Moods -* troll colors +* Mood switching shows wrong mood! * ctrl-tab should prefer new convos * Idling * new sound on CEASE and BEGIN? * User commands/stop user from sending commands accidentally * More complex quirks: random, spelling, by-sound * change profile only once we have confirmation from server +* convert hex tags ( or ) * convo backgrounds -- make them more like http://www.mspaintadventures.com/storyfiles/hs2/02546_2.gif * help button on quirks menu? * help menu -- about and forum diff --git a/convo.py b/convo.py index 345ff6c..f90e2c4 100644 --- a/convo.py +++ b/convo.py @@ -236,8 +236,8 @@ class PesterText(QtGui.QTextEdit): window.chatlog.log(chum.handle, convertTags(beginmsg, "bbcode")) self.append(convertTags(beginmsg)) - msg = "%s: %s" % (color, initials, msg) msg = escapeBrackets(msg) + msg = "%s: %s" % (color, initials, msg) self.append(convertTags(msg)) if chum is me: window.chatlog.log(parent.chum.handle, convertTags(msg, "bbcode")) diff --git a/convo.pyc b/convo.pyc index 16145e1..d9a88ac 100644 Binary files a/convo.pyc and b/convo.pyc differ diff --git a/dataobjs.pyc b/dataobjs.pyc index 50947cf..9eee604 100644 Binary files a/dataobjs.pyc and b/dataobjs.pyc differ diff --git a/generic.pyc b/generic.pyc index cc9b4e2..033bd9a 100644 Binary files a/generic.pyc and b/generic.pyc differ diff --git a/irc.pyc b/irc.pyc index e4a65a5..62a8eb1 100644 Binary files a/irc.pyc and b/irc.pyc differ diff --git a/memos.pyc b/memos.pyc index 0dd44f5..78a2e74 100644 Binary files a/memos.pyc and b/memos.pyc differ diff --git a/menus.pyc b/menus.pyc index 53c48cf..a4bfd9e 100644 Binary files a/menus.pyc and b/menus.pyc differ diff --git a/oyoyo/__init__.pyc b/oyoyo/__init__.pyc index 28e3e80..be26c04 100644 Binary files a/oyoyo/__init__.pyc and b/oyoyo/__init__.pyc differ diff --git a/oyoyo/client.pyc b/oyoyo/client.pyc index 9115adc..5ba5325 100644 Binary files a/oyoyo/client.pyc and b/oyoyo/client.pyc differ diff --git a/oyoyo/cmdhandler.pyc b/oyoyo/cmdhandler.pyc index d97b3d1..e9def19 100644 Binary files a/oyoyo/cmdhandler.pyc and b/oyoyo/cmdhandler.pyc differ diff --git a/oyoyo/helpers.pyc b/oyoyo/helpers.pyc index e5b17da..e5c82c4 100644 Binary files a/oyoyo/helpers.pyc and b/oyoyo/helpers.pyc differ diff --git a/oyoyo/ircevents.pyc b/oyoyo/ircevents.pyc index c83999f..1f1ccd6 100644 Binary files a/oyoyo/ircevents.pyc and b/oyoyo/ircevents.pyc differ diff --git a/oyoyo/parse.pyc b/oyoyo/parse.pyc index 9095b24..e67f2ea 100644 Binary files a/oyoyo/parse.pyc and b/oyoyo/parse.pyc differ diff --git a/parsetools.pyc b/parsetools.pyc index 3138a62..ed6fb5b 100644 Binary files a/parsetools.pyc and b/parsetools.pyc differ diff --git a/pesterchum.js b/pesterchum.js index b0ffdad..011e4d6 100644 --- a/pesterchum.js +++ b/pesterchum.js @@ -1 +1 @@ -{"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", "pretentiousFantasia"], "defaultprofile": "ghostDunk", "block": []} \ No newline at end of file +{"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", "pretentiousFantasia", "aquaticMarinist"], "defaultprofile": "ghostDunk", "block": []} \ No newline at end of file diff --git a/pesterchum.py b/pesterchum.py index 897bb76..c2a1391 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -521,6 +521,15 @@ class TrollSlumWindow(QtGui.QFrame): blockChumSignal = QtCore.pyqtSignal(QtCore.QString) unblockChumSignal = QtCore.pyqtSignal(QtCore.QString) +class PesterMoodAction(QtCore.QObject): + def __init__(self, m, func): + QtCore.QObject.__init__(self) + self.mood = m + self.func = func + @QtCore.pyqtSlot() + def updateMood(self): + self.func(self.mood) + class PesterMoodHandler(QtCore.QObject): def __init__(self, parent, *buttons): QtCore.QObject.__init__(self) @@ -549,8 +558,11 @@ class PesterMoodHandler(QtCore.QObject): oldbutton.setSelected(False) except KeyError: pass - newbutton = self.buttons[m] - newbutton.setSelected(True) + try: + newbutton = self.buttons[m] + newbutton.setSelected(True) + except KeyError: + pass newmood = Mood(m) self.mainwindow.userprofile.chat.mood = newmood if self.mainwindow.currentMoodIcon: @@ -1587,6 +1599,16 @@ class MainProgram(QtCore.QObject): self.trayicon.connect(exitAction, QtCore.SIGNAL('triggered()'), self.widget, QtCore.SLOT('close()')) self.traymenu.addAction(exitAction) + moodMenu = self.traymenu.addMenu("SET MOOD") + self.moodactions = {} + for (i,m) in enumerate(Mood.moods): + maction = QtGui.QAction(m.upper(), self) + mobj = PesterMoodAction(i, self.widget.moods.updateMood) + self.trayicon.connect(maction, QtCore.SIGNAL('triggered()'), + mobj, QtCore.SLOT('updateMood()')) + self.moodactions[i] = mobj + moodMenu.addAction(maction) + self.trayicon.setContextMenu(self.traymenu) self.trayicon.show() self.trayicon.connect(self.trayicon,