From 85207715abaf6dbe6aadf8b09ccd672612c28661 Mon Sep 17 00:00:00 2001 From: Kiooeht Date: Sun, 4 Dec 2011 22:30:16 -0800 Subject: [PATCH] Don't completely require pygame. Changelog update --- CHANGELOG.mkdn | 9 ++++++++- TODO.mkdn | 3 +++ pesterchum.py | 20 ++++++++++++-------- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.mkdn b/CHANGELOG.mkdn index a941e4b..f0bcd21 100644 --- a/CHANGELOG.mkdn +++ b/CHANGELOG.mkdn @@ -13,7 +13,12 @@ Visit http://nova.xzibition.com/~illuminatedwax/help.html for tutorial. CHANGELOG --------- -### 3.41.2 +## 3.41.4 +* Makefile for Linux installing - Kiooeht [evacipatedBox] +* Bug fixes + * Don't require pygame (it's kind of optional, you just don't get sound) - Kiooeht [evacipatedBox] + +### 3.41.3 * Add group option when adding chum - ghostDunk * OOC Mode - ghostDunk * Improve animated gifs - ghostDunk @@ -40,6 +45,8 @@ CHANGELOG * Refresh theme in options - Kiooeht [evacipatedBox] * Separate tabbed/untabbed windows for conversaions and memos - Kiooeht [evacipatedBox] * Manually rearrange chumroll - Kiooeht [evacipatedBox] (Idea: [turntableAbbess (aka. TA of SGRILL)]) +* Using user data directory for all OSs - Kiooeht [evacipatedBox] +* Lots more user created themes - ghostDunk * Bug fixes * Don't delete random chum when blocking someone not on chumroll - Kiooeht [evacipatedBox] * Openning global userlist doesn't reset OP status of memo users - Kiooeht [evacipatedBox] diff --git a/TODO.mkdn b/TODO.mkdn index b7a67db..df8d545 100644 --- a/TODO.mkdn +++ b/TODO.mkdn @@ -26,6 +26,7 @@ Features * Make toast notifications only on certain chums * Local alisas for chums * Italics/uderline - needed for canon +* Don't make new windows be all in your face and shit Bugs ---- @@ -36,6 +37,8 @@ Bugs * Closing a timeclone doesn't actually cease for everyone else * Kill Zalgo * Random invisible, tiny links to last link at end of every message +* if you change the capitals on a memo name when entering. Userlist goes blank. +* Clicking link to invite-only memo crashes Windows Bugs ------------ diff --git a/pesterchum.py b/pesterchum.py index 7959791..d76639b 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -8,26 +8,29 @@ import logging from datetime import * import random import re -import ostools from time import time import threading, Queue -missing = [] +reqmissing = [] +optmissing = [] try: from PyQt4 import QtGui, QtCore except ImportError, e: module = str(e) - if module[:16] == "No module named ": missing.append(module[16:]) + if module.startswith("No module named ") or \ + module.startswith("cannot import name "): + reqmissing.append(module[module.rfind(" ")+1:]) else: print e try: import pygame except ImportError, e: + pygame = None module = str(e) - if module[:16] == "No module named ": missing.append(module[16:]) + if module[:16] == "No module named ": optmissing.append(module[16:]) else: print e -if missing: +if reqmissing: print "ERROR: The following modules are required for Pesterchum to run and are missing on your system:" - for m in missing: print "* "+m + for m in reqmissing: print "* "+m exit() vnum = QtCore.qVersion() major = int(vnum[:vnum.find(".")]) @@ -40,6 +43,7 @@ if not ((major > 4) or (major == 4 and minor >= 6)): print "You currently have version " + vnum + ". Please ungrade Qt" exit() +import ostools # Placed here before importing the rest of pesterchum, since bits of it need # OSX's data directory and it doesn't hurt to have everything set up before # plowing on. :o) @@ -1588,7 +1592,7 @@ class PesterWindow(MovingWindow): self.mychumcolor.setText("") # sounds - if not pygame.mixer: + if not pygame or not pygame.mixer: self.alarm = NoneSound() self.memosound = NoneSound() self.namesound = NoneSound() @@ -2641,7 +2645,7 @@ class MainProgram(QtCore.QObject): options = self.oppts(sys.argv[1:]) - if pygame.mixer: + if pygame and pygame.mixer: # we could set the frequency higher but i love how cheesy it sounds try: pygame.mixer.init()