From 99a49efeed615815edfb59c7120052a06b639dbc Mon Sep 17 00:00:00 2001 From: Stephen Dranger Date: Wed, 9 Feb 2011 23:55:45 -0600 Subject: [PATCH] fdssfa --- TODO | 4 ++-- convo.py | 2 +- convo.pyc | Bin 23317 -> 23317 bytes dataobjs.pyc | Bin 11510 -> 11510 bytes generic.pyc | Bin 3575 -> 3575 bytes irc.pyc | Bin 13203 -> 13203 bytes memos.pyc | Bin 31005 -> 31005 bytes menus.pyc | Bin 20542 -> 20542 bytes oyoyo/__init__.pyc | Bin 333 -> 333 bytes oyoyo/client.pyc | Bin 9728 -> 9728 bytes oyoyo/cmdhandler.pyc | Bin 8312 -> 8312 bytes oyoyo/helpers.pyc | Bin 5013 -> 5013 bytes oyoyo/ircevents.pyc | Bin 5693 -> 5693 bytes oyoyo/parse.pyc | Bin 2869 -> 2869 bytes parsetools.pyc | Bin 6975 -> 6975 bytes pesterchum.js | 2 +- pesterchum.py | 26 ++++++++++++++++++++++++-- 17 files changed, 28 insertions(+), 6 deletions(-) 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 16145e183c4bcce76f0dc06668b5c4c7ef89a02b..d9a88acf7673be8e953367c5279708955adb20d3 100644 GIT binary patch delta 60 zcmbQbjdAKWMz)Kec)41CZ)D?8l_?Qps9|GhW@M;kV@MHXs9|QPVFih#F*As5)>6%8 OX69iO-aJF2)(8L+aSt~D delta 60 zcmbQbjdAKWMz)Kec)6x|Y-Hn5l}Qm~s9|QPVP&XcV@P9W5UXWlC=mm3ni&~3YpG^4 OGYd2FY@VS}YXkuBWDb=8 diff --git a/dataobjs.pyc b/dataobjs.pyc index 50947cf69986bca7d56d215eac10fa258fcec3fa..9eee6041413e782bfd92de18ed4b91f3814184b2 100644 GIT binary patch delta 15 Xcmews`7M&|;wN4%^%EP}KIi}dKT!uk delta 15 Wcmews`7M&|;wN4%am9^nA9Mgat_F$# diff --git a/generic.pyc b/generic.pyc index cc9b4e29bd33bedddb2ec6b068f7f5c5c74311f5..033bd9ad82c6b3e24d80f1c8cfd8c05b670f149f 100644 GIT binary patch delta 16 Ycmew^{au><;wN6NuK9r**+1|C06|#?H2?qr delta 16 Ycmew^{au><;wN6N>6-o<*+1|C06yjh$^ZZW diff --git a/irc.pyc b/irc.pyc index e4a65a510087af4df768c7fa422ef6360a2a92cd..62a8eb1dacfd9b430f6554df3ecd56d0d78e85b6 100644 GIT binary patch delta 16 XcmbQ7J~^HJ;wN6NuK9r**?WuuJx>P5 delta 16 YcmbQ7J~^HJ;wN6NMfU?XviBGR06%gE9smFU diff --git a/memos.pyc b/memos.pyc index 0dd44f5aac5ad0eca9cefb5cbe48b4cb6e642469..78a2e7472310b324221e91d1ed02cc10cc73db05 100644 GIT binary patch delta 17 ZcmbRHiE-{HMz)Kec)8S1Y-AI!1OP~c2R8r! delta 17 ZcmbRHiE-{HMz)Kec)7j`Y-AI!1OQ3E2TcF~ diff --git a/menus.pyc b/menus.pyc index 53c48cf284a8f3e5def281c8dc48cc5ef48bb3d1..a4bfd9e43db4e7752b84f8f599de194f71758089 100644 GIT binary patch delta 17 ZcmdnDfN|dfMz)Kec)8S1Y-F2m`BH2DTS delta 15 WcmdlgwpEPn;wN6NbFmxQ^tk~smj#mm diff --git a/parsetools.pyc b/parsetools.pyc index 3138a62e09e2cca1a15996723194e9e8527ecfe9..ed6fb5beb9f4e20c3e942020d6a62eed17eeb895 100644 GIT binary patch delta 16 XcmdmQw%?5X;wN6N$lpO5*)602JuwD- delta 16 XcmdmQw%?5X;wN6N-oJqx*)602KBNY+ 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,