This commit is contained in:
Stephen Dranger 2011-03-08 13:15:07 -06:00
commit 2953c93463
39 changed files with 109 additions and 154 deletions

10
INSTALL
View file

@ -16,12 +16,12 @@ If you are building on Windows, the setup.py file has some
commented-out lines that should give you a clue as to what you need to
do. Talk to me if you reeeeally want to build on Windows.
Linux users should just install PyQt and pygame and then run the
python. It should be simple; any modern Linux repository will have
it.
On Linux, you need to have the PyQt4 and pygame libraries installed:
Debian/Ubuntu: apt-get install python-qt4 python-pygame
Arch Linux: pacman -S pyqt4 python-pygame
Debian: apt-get install python-qt4 python-pgame
Arch: pacman -S pyqt4 python-pygame
then run ./pesterchum (basically a shell script that runs python pesterchum.py)
The point of all this is that the only person besides myself that I
expect to create builds are the awesome people that volunteer to help

19
TODO
View file

@ -1,19 +1,22 @@
tutorial album:
http://imgur.com/a/jaOIS
http://imgur.com/a/u1NXu
Bugs:
* Windows doesn't show style sheet sometimes?? Maybe related to themes.
* Issues with connecting? Client not closing connection right? People keep getting "nick taken" messages
* Windows XP SP2: sometimes mouse clicks dont register? must be some kinda crash
* don't save pesterClientXXX names
Mac Bugs:
* Mac doesn't show tabs right, display gifs, highlighting thing?
SS: also the background image is broken
SS: in the one-on-one pester it resizes with the window
SS: but the memo one doesn't resize
SS: and the arrows next to the time thing overlap the CLOSE button
Features:
* help menu -- about and forum
* copy quirks between profiles?
* chumList not scaling -- QListView + delegate?
* help button on quirks menu?
* chum list groups
* More complex quirks: by-sound
* change profile only once we have confirmation from server
* log viewer
* pick your own icon
* time codes
* Theme checking
* Spy mode

3
irc.py
View file

@ -220,6 +220,7 @@ class PesterIRC(QtCore.QThread):
namesReceived = QtCore.pyqtSignal(QtCore.QString, PesterList)
channelListReceived = QtCore.pyqtSignal(PesterList)
nickCollision = QtCore.pyqtSignal(QtCore.QString, QtCore.QString)
myHandleChanged = QtCore.pyqtSignal(QtCore.QString)
connected = QtCore.pyqtSignal()
userPresentUpdate = QtCore.pyqtSignal(QtCore.QString, QtCore.QString,
QtCore.QString)
@ -309,6 +310,8 @@ class PesterHandler(DefaultCommandHandler):
self.parent.userPresentUpdate.emit(handle, channel, mode)
def nick(self, oldnick, newnick):
oldhandle = oldnick[0:oldnick.find("!")]
if oldhandle == self.mainwindow.profile().handle:
self.parent.myHandleChanged.emit(newnick)
newchum = PesterProfile(newnick, chumdb=self.mainwindow.chumdb)
self.parent.moodUpdated.emit(oldhandle, Mood("offline"))
self.parent.userPresentUpdate.emit("%s:%s" % (oldhandle, newnick), "", "nick")

View file

@ -736,5 +736,5 @@ class AboutPesterchum(QtGui.QMessageBox):
def __init__(self, parent=None):
QtGui.QMessageBox.__init__(self, parent)
self.setText("P3ST3RCHUM V. 3.14")
self.setInformativeText("Programming by illuminatedwax (ghostDunk), art by Grimlive (aquaMarinist)")
self.setInformativeText("Programming by illuminatedwax (ghostDunk), art by Grimlive (aquaMarinist). Special thanks to ABT and gamblingGenocider.")
self.mainwindow = parent

View file

@ -273,7 +273,20 @@ smiledict = {
":flipout:": "weasel.gif",
":befuddled:": "what.gif",
":pumpkin:": "whatpumpkin.gif",
":trollcool:": "trollcool.gif"}
":trollcool:": "trollcool.gif",
":jadecry:": "jadespritehead.gif",
":ecstatic:": "ecstatic.png",
":relaxed:": "relaxed.png",
":discontent:": "discontent.png",
":devious:": "devious.png",
":sleek:": "sleek.png",
":detestful:": "detestful.png",
":mirthful:": "mirthful.png",
":manipulative:": "manipulative.png",
":vigorous:": "vigorous.png",
":perky:": "perky.png",
":acceptant:": "acceptant.png",
}
reverse_smiley = dict((v,k) for k, v in smiledict.iteritems())
_smilere = re.compile("|".join(smiledict.keys()))

View file

@ -1 +1 @@
{"hideOfflineChums": true, "tabs": true, "soundon": true, "server": "irc.tymoon.eu", "chums": ["unknownTraveler", "tentacleTherapist", "vaginalEngineer", "mechanicalSpectacle", "carcinoGeneticist", "schlagzeugGator", "gamblingGenocider", "gardenGnostic", "centaursTesticle", "arachnidsGrip", "grimAuxiliatrix", "remoteBloodbath", "nitroZealist", "greenZephyr", "arsenicCatnip", "cuttlefishCuller", "rageInducer", "gallowsCalibrator", "caligulasAquarium", "terminallyCapricious", "illuminatedWax", "aquaMarinist", "elegantDiversion", "moirailBunp", "uroborosUnbound", "androidTechnician", "midnightSparrow", "apocalypseArisen", "anguillaNuntia", "oilslickOrchid", "confusedTransient", "pretentiousFantasia", "aquaticMarinist", "lyricalKeraunoscopic", "counterRealist", "ectoBiologist", "percipientPedestrian", "asceticClinician", "doctectiveMiracles", "noSense", "ircMonster", "twinArmageddons", "cannabisHero", "jetRocket", "adiosToreador", "turntechGodhead", "magmaExploiter", "hannaSongstress", "endlessVoid", "grayscaleVisionary", "corruptedInsanity", "stupidlyBrilliant", "artsyGyarados", "obliviousCrafter", "sporadicAgent", "subtleChaotician"], "defaultprofile": "ghostDunk", "block": []}
{"hideOfflineChums": true, "tabs": true, "soundon": true, "server": "irc.mindfang.org", "chums": ["unknownTraveler", "tentacleTherapist", "vaginalEngineer", "mechanicalSpectacle", "carcinoGeneticist", "schlagzeugGator", "gamblingGenocider", "gardenGnostic", "centaursTesticle", "arachnidsGrip", "grimAuxiliatrix", "remoteBloodbath", "nitroZealist", "greenZephyr", "arsenicCatnip", "cuttlefishCuller", "rageInducer", "gallowsCalibrator", "caligulasAquarium", "terminallyCapricious", "illuminatedWax", "aquaMarinist", "elegantDiversion", "moirailBunp", "uroborosUnbound", "androidTechnician", "midnightSparrow", "apocalypseArisen", "anguillaNuntia", "oilslickOrchid", "pretentiousFantasia", "aquaticMarinist", "lyricalKeraunoscopic", "counterRealist", "ectoBiologist", "percipientPedestrian", "asceticClinician", "doctectiveMiracles", "noSense", "ircMonster", "twinArmageddons", "cannabisHero", "jetRocket", "adiosToreador", "turntechGodhead", "magmaExploiter", "hannaSongstress", "endlessVoid", "grayscaleVisionary", "corruptedInsanity", "stupidlyBrilliant", "artsyGyarados", "obliviousCrafter", "sporadicAgent", "subtleChaotician", "nareSolee", "apostateCourier", "nocturnalTherapist", "herpaDerp", "clockworkUtopia", "digitalSamurai", "astronomicalMaster", "slipshodBrisant", "genialDustbuster", "hyperdriveTyphoon", "magnificentMiser", "gentleRuffian", "riskRepeats", "globalsoftPrika", "globalsoftPirka", "devonianCritter", "lethargicSerpent"], "defaultprofile": "ghostDunk", "block": []}

View file

@ -3,7 +3,7 @@
Name "PESTERCHUM3.14a"
; The file to write
OutFile "pesterchum3.14a.3.exe"
OutFile "pesterchum3.148.2.exe"
InstallDir C:\Pesterchum
@ -46,6 +46,7 @@ Section "Pesterchum"
CreateShortcut "$SMPROGRAMS\Pesterchum\Uninstall.lnk" "$INSTDIR\uninstall.exe"
CreateShortcut "$SMPROGRAMS\Pesterchum\Logs.lnk" "$INSTDIR\logs"
SectionEnd

View file

@ -122,14 +122,23 @@ class PesterProfileDB(dict):
fp = open("%s/chums.js" % (self.logpath), 'w')
json.dump(chumdict, fp)
fp.close()
except ValueError:
chumdict = {}
fp = open("%s/chums.js" % (self.logpath), 'w')
json.dump(chumdict, fp)
fp.close()
converted = dict([(handle, PesterProfile(handle, color=QtGui.QColor(c['color']), mood=Mood(c['mood']))) for (handle, c) in chumdict.iteritems()])
self.update(converted)
def save(self):
fp = open("%s/chums.js" % (self.logpath), 'w')
chumdict = dict([p.plaindict() for p in self.itervalues()])
json.dump(chumdict, fp)
fp.close()
try:
fp = open("%s/chums.js" % (self.logpath), 'w')
chumdict = dict([p.plaindict() for p in self.itervalues()])
json.dump(chumdict, fp)
fp.close()
except Exception, e:
raise e
def getColor(self, handle, default=None):
if not self.has_key(handle):
return default
@ -268,7 +277,7 @@ class userConfig(object):
l.pop(l.index(handle))
self.set('block', l)
def server(self):
return self.config.get('server', 'irc.tymoon.eu')
return self.config.get('server', 'irc.mindfang.org')
def port(self):
return self.config.get('port', '6667')
def soundOn(self):
@ -494,7 +503,8 @@ class chumArea(RightClickList):
for c in chums:
c.setColor(color)
def initTheme(self, theme):
self.setGeometry(*(theme["main/chums/loc"]+theme["main/chums/size"]))
self.resize(*theme["main/chums/size"])
self.move(*theme["main/chums/loc"])
if theme.has_key("main/chums/scrollbar"):
self.setStyleSheet("QListWidget { %s } QScrollBar { %s } QScrollBar::handle { %s } QScrollBar::add-line { %s } QScrollBar::sub-line { %s } QScrollBar:up-arrow { %s } QScrollBar:down-arrow { %s }" % (theme["main/chums/style"], theme["main/chums/scrollbar/style"], theme["main/chums/scrollbar/handle"], theme["main/chums/scrollbar/downarrow"], theme["main/chums/scrollbar/uparrow"], theme["main/chums/scrollbar/uarrowstyle"], theme["main/chums/scrollbar/darrowstyle"] ))
else:
@ -839,8 +849,12 @@ class PesterWindow(MovingWindow):
self.aboutAction = QtGui.QAction(self.theme["main/menus/help/about"], self)
self.connect(self.aboutAction, QtCore.SIGNAL('triggered()'),
self, QtCore.SLOT('aboutPesterchum()'))
self.helpAction = QtGui.QAction("HELP", self)
self.connect(self.helpAction, QtCore.SIGNAL('triggered()'),
self, QtCore.SLOT('launchHelp()'))
helpmenu = self.menu.addMenu(self.theme["main/menus/help/_name"])
self.helpmenu = helpmenu
self.helpmenu.addAction(self.helpAction)
self.helpmenu.addAction(self.aboutAction)
@ -976,7 +990,8 @@ class PesterWindow(MovingWindow):
if msg[0:3] != "/me" and msg[0:13] != "PESTERCHUM:ME":
msg = addTimeInitial(msg, memo.times[handle].getGrammar())
memo.addMessage(msg, handle)
self.alarm.play()
if self.config.soundOn():
self.alarm.play()
def changeColor(self, handle, color):
# pesterconvo and chumlist
@ -1178,8 +1193,12 @@ class PesterWindow(MovingWindow):
self.alarm = NoneSound()
self.ceasesound = NoneSound()
else:
self.alarm = pygame.mixer.Sound(theme["main/sounds/alertsound"])
self.ceasesound = pygame.mixer.Sound(theme["main/sounds/ceasesound"])
try:
self.alarm = pygame.mixer.Sound(theme["main/sounds/alertsound"])
self.ceasesound = pygame.mixer.Sound(theme["main/sounds/ceasesound"])
except Exception, e:
self.alarm = NoneSound()
self.ceasesound = NoneSound()
def changeTheme(self, theme):
self.theme = theme
@ -1219,7 +1238,7 @@ class PesterWindow(MovingWindow):
self.show()
else:
if self.isActiveWindow():
self.hide()
self.closeToTray()
else:
self.raise_()
self.activateWindow()
@ -1228,8 +1247,6 @@ class PesterWindow(MovingWindow):
@QtCore.pyqtSlot()
def connected(self):
print "CONNECTED!"
print self.loadingscreen
if self.loadingscreen:
self.loadingscreen.done(QtGui.QDialog.Accepted)
self.loadingscreen = None
@ -1744,6 +1761,9 @@ class PesterWindow(MovingWindow):
self.aboutwindow = AboutPesterchum(self)
self.aboutwindow.exec_()
self.aboutwindow = None
@QtCore.pyqtSlot()
def launchHelp(self):
QtGui.QDesktopServices.openUrl(QtCore.QUrl("http://nova.xzibition.com/~illuminatedwax/help.html", QtCore.QUrl.TolerantMode))
@QtCore.pyqtSlot(QtCore.QString, QtCore.QString)
def nickCollision(self, handle, tmphandle):
@ -1756,7 +1776,12 @@ class PesterWindow(MovingWindow):
if not self.chooseprofile:
h = unicode(handle)
self.changeProfile(collision=h)
@QtCore.pyqtSlot(QtCore.QString)
def myHandleChanged(self, handle):
if self.profile().handle == handle:
return
else:
self.nickCollision(self.profile().handle, handle)
@QtCore.pyqtSlot()
def pickTheme(self):
self.themePicker()
@ -1838,9 +1863,13 @@ class MainProgram(QtCore.QObject):
mobj, QtCore.SLOT('updateMood()'))
self.moodactions[i] = mobj
moodCategories[Mood.revmoodcats[m]].addAction(maction)
miniAction = QtGui.QAction("MINIMIZE", self)
self.trayicon.connect(miniAction, QtCore.SIGNAL('triggered()'),
self.widget, QtCore.SLOT('showMinimized()'))
exitAction = QtGui.QAction("EXIT", self)
self.trayicon.connect(exitAction, QtCore.SIGNAL('triggered()'),
self.widget, QtCore.SLOT('close()'))
self.traymenu.addAction(miniAction)
self.traymenu.addAction(exitAction)
self.trayicon.setContextMenu(self.traymenu)
@ -1905,6 +1934,8 @@ class MainProgram(QtCore.QObject):
'deliverMemo(QString, QString, QString)'),
('nickCollision(QString, QString)',
'nickCollision(QString, QString)'),
('myHandleChanged(QString)',
'myHandleChanged(QString)'),
('namesReceived(QString, PyQt_PyObject)',
'updateNames(QString, PyQt_PyObject)'),
('userPresentUpdate(QString, QString, QString)',
@ -1959,7 +1990,6 @@ class MainProgram(QtCore.QObject):
else:
widget.loadingscreen.hideReconnect()
status = widget.loadingscreen.exec_()
print "exited with status %d" % status
if status == QtGui.QDialog.Rejected:
sys.exit(0)
else:
@ -1977,17 +2007,13 @@ class MainProgram(QtCore.QObject):
self.widget.loadingscreen = None
self.attempts += 1
if hasattr(self, 'irc') and self.irc:
print "tryagain: reconnectIRC()"
self.irc.reconnectIRC()
print "finishing"
self.irc.quit()
else:
print "tryagain: restartIRC()"
self.restartIRC()
@QtCore.pyqtSlot()
def restartIRC(self):
if hasattr(self, 'irc') and self.irc:
print "deleting IRC"
self.disconnectWidgets(self.irc, self.widget)
stop = self.irc.stopIRC
del self.irc
@ -2003,7 +2029,6 @@ class MainProgram(QtCore.QObject):
msg = "R3CONN3CT1NG %d" % (self.attempts)
else:
msg = "CONN3CT1NG"
print "loadingscreen: auto reconnect"
self.reconnectok = False
self.showLoading(self.widget, msg)
else:

View file

@ -5,10 +5,20 @@ Here's some tips to help you get started:
- You can import your old Pesterchum contacts by going to
CLIENT->IMPORT and opening your pesterchum.cfg file. This is usually
in the 2.5 base directory or in Tinychum's data folder.
- The Trollian theme can be confusing if you haven't used the program
already! Some hints: moods are set by clicking the timelines, and you
- Some themes can be confusing if you haven't used the program
already! Some hints:
Trollian: Moods are set by clicking the timelines, and you
can add chums by clicking "Chumproll." Moods correspond to the troll
that would most likely exhibit them.
that would most likely exhibit them. You can go offline by hitting the
"Timelines" menu bar.
Gold: Add chums by hitting the two chumpeoples in the upper left
corner. Go offline by clicking the "CHUMHANDLE:" label.
Enamel: Add chums by hitting the "CHUMROLL" label. Go offline by
clicking the upper left hand corner.
- Right-click is your friend! There are useful right click
options on the chumroll, by clicking the chumhandle in a conversation,
online userlist, or the list of memo browsers.
@ -545,3 +555,15 @@ Here's a list of smilies:
:befuddled:
:pumpkin:
:trollcool:
:jadecry:
:ecstatic:
:relaxed:
:discontent:
:devious:
:sleek:
:detestful:
:mirthful:
:manipulative:
:vigorous:
:perky:
:acceptant:

BIN
smilies/acceptant.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

BIN
smilies/detestful.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

BIN
smilies/devious.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

BIN
smilies/distraught.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

BIN
smilies/ecstatic.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

BIN
smilies/jadespritehead.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

BIN
smilies/manipulative.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

BIN
smilies/mirthful.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

BIN
smilies/perky.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

BIN
smilies/relaxed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

BIN
smilies/sleek.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

BIN
smilies/vigorous.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

BIN
themes/enamel/op.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 661 B

View file

@ -101,7 +101,7 @@
"acceptant": { "icon": "$path/acceptant.gif", "color": "red" },
"protective": { "icon": "$path/protective.gif", "color": "#00ff00" },
"protective": { "icon": "$path/protective.png", "color": "#00ff00" },
"blocked": { "icon": "$path/blocked.gif", "color": "red" }
@ -266,8 +266,7 @@
"systemMsgColor": "#646464"
},
"memos":
{"memoicon": "$path/memo.png",
"style": "background-color: rgba(0,0,0,0); border-width: 5px; border-image:url($path/convobg.png) 5px; font-family: 'Century Gothic'; selection-background-color:#919191; ",
{"style": "background-color: rgba(0,0,0,0); border-width: 5px; border-image:url($path/convobg.png) 5px; font-family: 'Century Gothic'; selection-background-color:#919191; ",
"size": [500,325],
"tabs": {
"style": "",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -1,111 +0,0 @@
{"inherits": "trollian",
"main": {
"moods": [
{ "style": "border:0px;",
"selected": "background-image:url($path/moodcheck1.png); border:0px;",
"loc": [25, 141],
"size": [20, 270],
"text": "",
"icon": "",
"mood": 17
},
{ "style": "border:0px;",
"selected": "background-image:url($path/moodcheck2.png); border:0px;",
"loc": [60, 141],
"size": [20, 270],
"text": "",
"icon": "",
"mood": 9
},
{ "style": "border:0px;",
"selected": "background-image:url($path/moodcheck3.png); border:0px;",
"loc": [95, 141],
"size": [20, 270],
"text": "",
"icon": "",
"mood": 11
},
{ "style": "border:0px;",
"selected": "background-image:url($path/moodcheck4.png); border:0px;",
"loc": [130, 141],
"size": [20, 270],
"text": "",
"icon": "",
"mood": 1
},
{ "style": "border:0px;",
"selected": "background-image:url($path/moodcheck5.png); border:0px;",
"loc": [165, 141],
"size": [20, 270],
"text": "",
"icon": "",
"mood": 16
},
{ "style": "border:0px;",
"selected": "background-image:url($path/moodcheck6.png); border:0px;",
"loc": [200, 141],
"size": [20, 270],
"text": "",
"icon": "",
"mood": 8
},
{ "style": "border:0px;",
"selected": "background-image:url($path/moodcheck7.png); border:0px;",
"loc": [235, 141],
"size": [20, 270],
"text": "",
"icon": "",
"mood": 10
},
{ "style": "border:0px;",
"selected": "background-image:url($path/moodcheck8.png); border:0px;",
"loc": [270, 141],
"size": [20, 270],
"text": "",
"icon": "",
"mood": 14
},
{ "style": "border:0px;",
"selected": "background-image:url($path/moodcheck9.png); border:0px;",
"loc": [305, 141],
"size": [20, 270],
"text": "",
"icon": "",
"mood": 15
},
{ "style": "border:0px;",
"selected": "background-image:url($path/moodcheck10.png); border:0px;",
"loc": [340, 141],
"size": [20, 270],
"text": "",
"icon": "",
"mood": 13
},
{ "style": "border:0px;",
"selected": "background-image:url($path/moodcheck11.png); border:0px;",
"loc": [375, 141],
"size": [20, 270],
"text": "",
"icon": "",
"mood": 12
},
{ "style": "border:0px;",
"selected": "background-image:url($path/moodcheck12.png); border:0px;",
"loc": [410, 141],
"size": [20, 270],
"text": "",
"icon": "",
"mood": 7
},
{ "style": "border:0px;color: rgba(0, 0, 0, 0%);",
"selected": "border:0px; color: rgba(0, 0, 0, 0%);",
"loc": [12, 117],
"size": [435, 18],
"text": "",
"icon": "",
"mood": 2
}
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B