This commit is contained in:
Stephen Dranger 2011-02-10 12:00:06 -06:00
parent 99a49efeed
commit 87cbeca5dd
23 changed files with 25 additions and 19 deletions

6
TODO
View file

@ -1,10 +1,9 @@
Features:
* Tray doesn't disappear on windows after close
* Mood switching shows wrong mood!
* ctrl-tab should prefer new convos
* Idling
* PESTERCHUM:BLOCKED
* new sound on CEASE and BEGIN?
* User commands/stop user from sending commands accidentally
* scroll bar style?
* More complex quirks: random, spelling, by-sound
* change profile only once we have confirmation from server
* convert hex tags (<GFFFFFF> or <GFF0000>)
@ -13,7 +12,6 @@ Features:
* help menu -- about and forum
* dropped messages when chatting ?
-- release alpha
* scroll bar style?
* shared buddy lists - changes to the buddy list should refresh it?
multiple clients share buddy list???
* chumList not scaling -- QListView + delegate?

View file

@ -69,6 +69,12 @@ class PesterTabWindow(QtGui.QFrame):
mods = event.modifiers()
if ((mods & QtCore.Qt.ControlModifier) and
keypress == QtCore.Qt.Key_Tab):
handles = self.convos.keys()
waiting = self.mainwindow.waitingMessages.waitingHandles()
waitinghandles = list(set(handles) & set(waiting))
if len(waitinghandles) > 0:
nexti = self.tabIndices[waitinghandles[0]]
else:
nexti = (self.tabIndices[self.currentConvo.title()] + 1) % self.tabs.count()
self.tabs.setCurrentIndex(nexti)
@ -372,7 +378,7 @@ class PesterConvo(QtGui.QFrame):
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)
msg = self.chum.moodmsg(mood, syscolor, self.mainwindow.theme)
self.textArea.append(convertTags(msg))
self.mainwindow.chatlog.log(self.title(), convertTags(msg, "bbcode"))
if self.parent():
@ -470,7 +476,7 @@ class PesterConvo(QtGui.QFrame):
@QtCore.pyqtSlot()
def sentMessage(self):
text = unicode(self.textInput.text())
if text == "":
if text == "" or text[0:11] == "PESTERCHUM:":
return
self.history.add(text)
# deal with quirks here

BIN
convo.pyc

Binary file not shown.

View file

@ -138,8 +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 moodmsg(self, mood, 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(), mood.name().upper(), theme["main/chums/moods"][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):

Binary file not shown.

Binary file not shown.

BIN
irc.pyc

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -541,7 +541,7 @@ class PesterMemo(PesterConvo):
@QtCore.pyqtSlot()
def sentMessage(self):
text = unicode(self.textInput.text())
if text == "":
if text == "" or text[0:11] == "PESTERCHUM:":
return
self.history.add(text)
if self.time.getTime() == None:

BIN
memos.pyc

Binary file not shown.

BIN
menus.pyc

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -2,7 +2,7 @@ import re
from datetime import timedelta
from PyQt4 import QtGui
_ctag_begin = re.compile(r'<c=(.*?)>')
_ctag_begin = re.compile(r'(?i)<c=(.*?)>')
_ctag_rgb = re.compile(r'\d+,\d+,\d+')
_urlre = re.compile(r"(?i)(http://[^\s<[]+)")
_memore = re.compile(r" (#[A-Za-z0-9_]+)")

Binary file not shown.

View file

@ -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", "aquaticMarinist"], "defaultprofile": "ghostDunk", "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", "pretentiousFantasia", "aquaticMarinist", "ardentAbettor"], "defaultprofile": "ghostDunk", "block": []}

View file

@ -29,6 +29,8 @@ class waitingMessageHolder(object):
self.queue = msgfuncs.keys()
if len(self.queue) > 0:
self.mainwindow.updateSystemTray()
def waitingHandles(self):
return self.queue
def answerMessage(self):
func = self.funcs[self.queue[0]]
func()
@ -1595,10 +1597,6 @@ class MainProgram(QtCore.QObject):
self.trayicon = PesterTray(PesterIcon(self.widget.theme["main/icon"]), self.widget, self.app)
self.traymenu = QtGui.QMenu()
exitAction = QtGui.QAction("EXIT", self)
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):
@ -1608,6 +1606,10 @@ class MainProgram(QtCore.QObject):
mobj, QtCore.SLOT('updateMood()'))
self.moodactions[i] = mobj
moodMenu.addAction(maction)
exitAction = QtGui.QAction("EXIT", self)
self.trayicon.connect(exitAction, QtCore.SIGNAL('triggered()'),
self.widget, QtCore.SLOT('close()'))
self.traymenu.addAction(exitAction)
self.trayicon.setContextMenu(self.traymenu)
self.trayicon.show()

View file

@ -57,7 +57,7 @@
"distraught": { "icon": "$path/distraught.gif", "color": "white" },
"unruly": { "icon": "$path/unruly.gif", "color": "white" },
"pranky": { "icon": "$path/pranky.gif", "color": "white" },
"smooth": { "icon": "$path/smooth.gif", "color": "white" },

View file

@ -54,7 +54,7 @@
"distraught": { "icon": "$path/distraught.png", "color": "#706eba" },
"unruly": { "icon": "$path/unruly.png", "color": "blue" },
"pranky": { "icon": "$path/pranky.png", "color": "blue" },
"smooth": { "icon": "$path/smooth.png", "color": "red" },