diff --git a/TODO b/TODO index a7fcb93..1e4b410 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,5 @@ Features: * Tray doesn't disappear on windows after close -* comment history (up button) -* page up/down scrolling * System tray menu * troll colors * ctrl-tab should prefer new convos diff --git a/convo.py b/convo.py index 8ae2d46..345ff6c 100644 --- a/convo.py +++ b/convo.py @@ -2,7 +2,7 @@ from string import Template import re from PyQt4 import QtGui, QtCore -from dataobjs import PesterProfile, Mood +from dataobjs import PesterProfile, Mood, PesterHistory from generic import PesterIcon, RightClickList from parsetools import escapeBrackets, convertTags @@ -277,6 +277,20 @@ class PesterInput(QtGui.QLineEdit): def focusInEvent(self, event): self.parent().clearNewMessage() QtGui.QLineEdit.focusInEvent(self, event) + def keyPressEvent(self, event): + if event.key() == QtCore.Qt.Key_Up: + text = unicode(self.text()) + next = self.parent().history.next(text) + if next is not None: + self.setText(next) + elif event.key() == QtCore.Qt.Key_Down: + prev = self.parent().history.prev() + if prev is not None: + self.setText(prev) + elif event.key() in [QtCore.Qt.Key_PageUp, QtCore.Qt.Key_PageDown]: + self.parent().textArea.keyPressEvent(event) + QtGui.QLineEdit.keyPressEvent(self, event) + class PesterConvo(QtGui.QFrame): def __init__(self, chum, initiated, mainwindow, parent=None): @@ -343,7 +357,7 @@ class PesterConvo(QtGui.QFrame): self.textArea.append(convertTags(msg)) self.mainwindow.chatlog.log(self.title(), convertTags(msg, "bbcode")) self.newmessage = False - self.history = [] + self.history = PesterHistory() def title(self): return self.chum.handle @@ -411,6 +425,7 @@ class PesterConvo(QtGui.QFrame): def focusInEvent(self, event): self.clearNewMessage() self.textInput.setFocus() + def raiseChat(self): self.activateWindow() self.raise_() @@ -457,6 +472,7 @@ class PesterConvo(QtGui.QFrame): text = unicode(self.textInput.text()) if text == "": return + self.history.add(text) # deal with quirks here if self.applyquirks: qtext = self.mainwindow.userprofile.quirks.apply(text) diff --git a/convo.pyc b/convo.pyc index 5444dee..1c73f3b 100644 Binary files a/convo.pyc and b/convo.pyc differ diff --git a/dataobjs.py b/dataobjs.py index bbff459..62a69cf 100644 --- a/dataobjs.py +++ b/dataobjs.py @@ -176,21 +176,30 @@ class PesterProfile(object): class PesterHistory(object): def __init__(self): self.history = [] - self.current = -1 - def next(self): - if self.current == -1: - return "" + self.current = 0 + self.saved = None + def next(self, text): + if self.current == 0: + return None + if self.current == len(self.history): + self.save(text) + self.current -= 1 text = self.history[self.current] - if self.current > 0: - self.current -= 1 return text def prev(self): - if self.current == -1 or self.current == len(self.history) - 1: - return "" self.current += 1 + if self.current >= len(self.history): + self.current = len(self.history) + return self.retrieve() return self.history[self.current] def reset(self): - self.current = len(self.history) - 1 + self.current = len(self.history) + self.saved = None + def save(self, text): + self.saved = text + def retrieve(self): + return self.saved def add(self, text): - self.history.append(text) - self.current = len(self.history) - 1 + if len(self.history) == 0 or text != self.history[len(self.history)-1]: + self.history.append(text) + self.reset() diff --git a/dataobjs.pyc b/dataobjs.pyc index a3409ab..50947cf 100644 Binary files a/dataobjs.pyc and b/dataobjs.pyc differ diff --git a/generic.pyc b/generic.pyc index 033bd9a..cc9b4e2 100644 Binary files a/generic.pyc and b/generic.pyc differ diff --git a/irc.pyc b/irc.pyc index 62a8eb1..e4a65a5 100644 Binary files a/irc.pyc and b/irc.pyc differ diff --git a/logs/chums.js b/logs/chums.js index 2d32949..efaf589 100644 --- a/logs/chums.js +++ b/logs/chums.js @@ -1 +1 @@ -{"macruralAlchemist": {"color": "#700000", "handle": "macruralAlchemist", "mood": "offline"}, "lyricalKeraunoscopic": {"color": "#00c000", "handle": "lyricalKeraunoscopic", "mood": "offline"}, "fireSwallow": {"color": "#80bb9a", "handle": "fireSwallow", "mood": "offline"}, "aquaMarinist": {"color": "#00caca", "handle": "aquaMarinist", "mood": "offline"}, "nitroZealist": {"color": "#ff3737", "handle": "nitroZealist", "mood": "offline"}, "mechanicalSpectacle": {"color": "#0000ff", "handle": "mechanicalSpectacle", "mood": "offline"}, "greyscalePacifist": {"color": "#7f7f7f", "handle": "greyscalePacifist", "mood": "offline"}, "caffeinatedAnalyst": {"color": "#aa0000", "handle": "caffeinatedAnalyst", "mood": "offline"}, "iw": {"color": "#ff0000", "handle": "iw", "mood": "offline"}, "insipidTranscient": {"color": "#145064", "handle": "insipidTranscient", "mood": "offline"}, "pesterClient394": {"color": "#ff3737", "handle": "pesterClient394", "mood": "offline"}, "absoluteTranquility": {"color": "#000033", "handle": "absoluteTranquility", "mood": "offline"}, "centaursTesticle": {"color": "#000056", "handle": "centaursTesticle", "mood": "offline"}, "quintessentialArbalest": {"color": "#999999", "handle": "quintessentialArbalest", "mood": "offline"}, "agogPorphyry": {"color": "#522d80", "handle": "agogPorphyry", "mood": "offline"}, "DocScratch": {"color": "#ffffff", "handle": "DocScratch", "mood": "offline"}, "anguillaNuntia": {"color": "#ff007f", "handle": "anguillaNuntia", "mood": "offline"}, "aceIsm": {"color": "#ffcc66", "handle": "aceIsm", "mood": "offline"}, "apocalypseArisen": {"color": "#a10000", "handle": "apocalypseArisen", "mood": "offline"}, "radicalApologist": {"color": "#ffaa00", "handle": "radicalApologist", "mood": "offline"}, "microMachines": {"color": "#aa00ff", "handle": "microMachines", "mood": "offline"}, "uroborosUnbound": {"color": "#00416a", "handle": "uroborosUnbound", "mood": "offline"}, "arachnidsGrip": {"color": "#005682", "handle": "arachnidsGrip", "mood": "offline"}, "percipientPedestrian": {"color": "#00ffff", "handle": "percipientPedestrian", "mood": "offline"}, "tentacleTherapist": {"color": "#cc66ff", "handle": "tentacleTherapist", "mood": "offline"}, "gamblingGenocider": {"color": "#00ff00", "handle": "gamblingGenocider", "mood": "offline"}, "elegantDiversion": {"color": "#14b40a", "handle": "elegantDiversion", "mood": "offline"}, "moirailBunp": {"color": "#6a3d0f", "handle": "moirailBunp", "mood": "offline"}, "madLurker": {"color": "#000000", "handle": "madLurker", "mood": "offline"}, "testOut": {"color": "#c760cc", "handle": "testOut", "mood": "offline"}, "pesterClient3022": {"color": "#336600", "handle": "pesterClient3022", "mood": "offline"}, "hellerificJefferson": {"color": "#3300ff", "handle": "hellerificJefferson", "mood": "offline"}, "androidTechnician": {"color": "#0000ff", "handle": "androidTechnician", "mood": "offline"}, "recalcitrantDisaster": {"color": "#8b0068", "handle": "recalcitrantDisaster", "mood": "offline"}, "superGhost": {"color": "#800564", "handle": "superGhost", "mood": "offline"}, "arsenicCatnip": {"color": "#006400", "handle": "arsenicCatnip", "mood": "offline"}, "kaleidoscopicMind": {"color": "#ff6666", "handle": "kaleidoscopicMind", "mood": "offline"}, "aquaticMarinist": {"color": "#00caca", "handle": "aquaticMarinist", "mood": "offline"}, "captainCaveman": {"color": "#7c414e", "handle": "captainCaveman", "mood": "offline"}, "sucroseSaboteur": {"color": "#00e700", "handle": "sucroseSaboteur", "mood": "offline"}, "cuttlefishCuller": {"color": "#77003c", "handle": "cuttlefishCuller", "mood": "offline"}, "carcinoGeneticist": {"color": "#999999", "handle": "carcinoGeneticist", "mood": "offline"}, "masterG": {"color": "#77003c", "handle": "masterG", "mood": "offline"}, "plasmaModerator": {"color": "#5685cc", "handle": "plasmaModerator", "mood": "offline"}, "carcinoGenetecist": {"color": "#7f7f7f", "handle": "carcinoGenetecist", "mood": "offline"}, "remoteBloodbath": {"color": "#c70000", "handle": "remoteBloodbath", "mood": "offline"}, "oilslickOrchid": {"color": "#743f7e", "handle": "oilslickOrchid", "mood": "offline"}, "acapellaWaterfall": {"color": "#000099", "handle": "acapellaWaterfall", "mood": "offline"}, "rageInducer": {"color": "#00ffff", "handle": "rageInducer", "mood": "offline"}, "gallowsCalibrator": {"color": "#008282", "handle": "gallowsCalibrator", "mood": "offline"}, "greenZephyr": {"color": "#00ca40", "handle": "greenZephyr", "mood": "offline"}, "lawdEngrish": {"color": "#00ff00", "handle": "lawdEngrish", "mood": "offline"}, "adiosToreador": {"color": "#aa5500", "handle": "adiosToreador", "mood": "offline"}, "maxiumumFatness": {"color": "#3366ff", "handle": "maxiumumFatness", "mood": "offline"}, "schlagzeugGator": {"color": "#61821f", "handle": "schlagzeugGator", "mood": "offline"}, "metaliAggressive": {"color": "#9289d5", "handle": "metaliAggressive", "mood": "offline"}, "midnightSparrow": {"color": "#ff55ff", "handle": "midnightSparrow", "mood": "offline"}, "magmaExploiter": {"color": "#d90000", "handle": "magmaExploiter", "mood": "offline"}, "illuminatedWax": {"color": "#000000", "handle": "illuminatedWax", "mood": "offline"}, "zealousScarecrow": {"color": "#00c882", "handle": "zealousScarecrow", "mood": "offline"}, "gardenGnostic": {"color": "#00ff00", "handle": "gardenGnostic", "mood": "offline"}, "unknownTraveler": {"color": "#006666", "handle": "unknownTraveler", "mood": "offline"}, "utilitarianTurnabout": {"color": "#dd0000", "handle": "utilitarianTurnabout", "mood": "offline"}, "marineAquist": {"color": "#00caca", "handle": "marineAquist", "mood": "offline"}} \ No newline at end of file +{"macruralAlchemist": {"color": "#700000", "handle": "macruralAlchemist", "mood": "offline"}, "lyricalKeraunoscopic": {"color": "#00c000", "handle": "lyricalKeraunoscopic", "mood": "offline"}, "fireSwallow": {"color": "#80bb9a", "handle": "fireSwallow", "mood": "offline"}, "aquaMarinist": {"color": "#00caca", "handle": "aquaMarinist", "mood": "offline"}, "centaursTesticle": {"color": "#000056", "handle": "centaursTesticle", "mood": "offline"}, "mechanicalSpectacle": {"color": "#0000ff", "handle": "mechanicalSpectacle", "mood": "offline"}, "carcinoGeneticist": {"color": "#999999", "handle": "carcinoGeneticist", "mood": "offline"}, "greyscalePacifist": {"color": "#7f7f7f", "handle": "greyscalePacifist", "mood": "offline"}, "aquaticMarinist": {"color": "#00caca", "handle": "aquaticMarinist", "mood": "offline"}, "maxiumumFatness": {"color": "#3366ff", "handle": "maxiumumFatness", "mood": "offline"}, "insipidTranscient": {"color": "#145064", "handle": "insipidTranscient", "mood": "offline"}, "caffeinatedAnalyst": {"color": "#aa0000", "handle": "caffeinatedAnalyst", "mood": "offline"}, "midnightSparrow": {"color": "#ff55ff", "handle": "midnightSparrow", "mood": "offline"}, "absoluteTranquility": {"color": "#000033", "handle": "absoluteTranquility", "mood": "offline"}, "nitroZealist": {"color": "#ff3737", "handle": "nitroZealist", "mood": "offline"}, "quintessentialArbalest": {"color": "#999999", "handle": "quintessentialArbalest", "mood": "offline"}, "agogPorphyry": {"color": "#522d80", "handle": "agogPorphyry", "mood": "offline"}, "androidTechnician": {"color": "#0000ff", "handle": "androidTechnician", "mood": "offline"}, "anguillaNuntia": {"color": "#ff007f", "handle": "anguillaNuntia", "mood": "offline"}, "aceIsm": {"color": "#ffcc66", "handle": "aceIsm", "mood": "offline"}, "apocalypseArisen": {"color": "#a10000", "handle": "apocalypseArisen", "mood": "offline"}, "radicalApologist": {"color": "#ffaa00", "handle": "radicalApologist", "mood": "offline"}, "microMachines": {"color": "#aa00ff", "handle": "microMachines", "mood": "offline"}, "uroborosUnbound": {"color": "#00416a", "handle": "uroborosUnbound", "mood": "offline"}, "arachnidsGrip": {"color": "#005682", "handle": "arachnidsGrip", "mood": "offline"}, "percipientPedestrian": {"color": "#00ffff", "handle": "percipientPedestrian", "mood": "offline"}, "tentacleTherapist": {"color": "#cc66ff", "handle": "tentacleTherapist", "mood": "offline"}, "sucroseSaboteur": {"color": "#00e700", "handle": "sucroseSaboteur", "mood": "offline"}, "illuminatedWax": {"color": "#000000", "handle": "illuminatedWax", "mood": "offline"}, "moirailBunp": {"color": "#6a3d0f", "handle": "moirailBunp", "mood": "offline"}, "madLurker": {"color": "#000000", "handle": "madLurker", "mood": "offline"}, "testOut": {"color": "#c760cc", "handle": "testOut", "mood": "offline"}, "pesterClient3022": {"color": "#336600", "handle": "pesterClient3022", "mood": "offline"}, "hellerificJefferson": {"color": "#3300ff", "handle": "hellerificJefferson", "mood": "offline"}, "DocScratch": {"color": "#ffffff", "handle": "DocScratch", "mood": "offline"}, "recalcitrantDisaster": {"color": "#8b0068", "handle": "recalcitrantDisaster", "mood": "offline"}, "superGhost": {"color": "#800564", "handle": "superGhost", "mood": "offline"}, "arsenicCatnip": {"color": "#006400", "handle": "arsenicCatnip", "mood": "offline"}, "kaleidoscopicMind": {"color": "#ff6666", "handle": "kaleidoscopicMind", "mood": "offline"}, "zealousScarecrow": {"color": "#00c882", "handle": "zealousScarecrow", "mood": "offline"}, "captainCaveman": {"color": "#7c414e", "handle": "captainCaveman", "mood": "offline"}, "gamblingGenocider": {"color": "#00ff00", "handle": "gamblingGenocider", "mood": "offline"}, "cuttlefishCuller": {"color": "#77003c", "handle": "cuttlefishCuller", "mood": "offline"}, "iw": {"color": "#ff0000", "handle": "iw", "mood": "offline"}, "masterG": {"color": "#77003c", "handle": "masterG", "mood": "offline"}, "elegantDiversion": {"color": "#14b40a", "handle": "elegantDiversion", "mood": "offline"}, "plasmaModerator": {"color": "#5685cc", "handle": "plasmaModerator", "mood": "offline"}, "carcinoGenetecist": {"color": "#7f7f7f", "handle": "carcinoGenetecist", "mood": "offline"}, "marineAquist": {"color": "#00caca", "handle": "marineAquist", "mood": "offline"}, "remoteBloodbath": {"color": "#c70000", "handle": "remoteBloodbath", "mood": "offline"}, "oilslickOrchid": {"color": "#743f7e", "handle": "oilslickOrchid", "mood": "offline"}, "acapellaWaterfall": {"color": "#000099", "handle": "acapellaWaterfall", "mood": "offline"}, "rageInducer": {"color": "#00ffff", "handle": "rageInducer", "mood": "offline"}, "gallowsCalibrator": {"color": "#008282", "handle": "gallowsCalibrator", "mood": "offline"}, "greenZephyr": {"color": "#00ca40", "handle": "greenZephyr", "mood": "offline"}, "lawdEngrish": {"color": "#00ff00", "handle": "lawdEngrish", "mood": "offline"}, "pretentiousFantasia": {"color": "#ff66cf", "handle": "pretentiousFantasia", "mood": "offline"}, "schlagzeugGator": {"color": "#61821f", "handle": "schlagzeugGator", "mood": "offline"}, "metaliAggressive": {"color": "#9289d5", "handle": "metaliAggressive", "mood": "offline"}, "pesterClient394": {"color": "#ff3737", "handle": "pesterClient394", "mood": "offline"}, "magmaExploiter": {"color": "#d90000", "handle": "magmaExploiter", "mood": "offline"}, "gardenGnostic": {"color": "#00ff00", "handle": "gardenGnostic", "mood": "offline"}, "unknownTraveler": {"color": "#006666", "handle": "unknownTraveler", "mood": "offline"}, "utilitarianTurnabout": {"color": "#dd0000", "handle": "utilitarianTurnabout", "mood": "offline"}, "adiosToreador": {"color": "#aa5500", "handle": "adiosToreador", "mood": "offline"}} \ No newline at end of file diff --git a/memos.py b/memos.py index 5b0a358..abcff9a 100644 --- a/memos.py +++ b/memos.py @@ -543,6 +543,7 @@ class PesterMemo(PesterConvo): text = unicode(self.textInput.text()) if text == "": return + self.history.add(text) if self.time.getTime() == None: self.sendtime() grammar = self.time.getGrammar() diff --git a/memos.pyc b/memos.pyc index b60595e..0dd44f5 100644 Binary files a/memos.pyc and b/memos.pyc differ diff --git a/menus.py b/menus.py index 765babd..f0acdd1 100644 --- a/menus.py +++ b/menus.py @@ -487,3 +487,10 @@ class LoadingScreen(QtGui.QDialog): self.layout.addWidget(self.loadinglabel) self.layout.addWidget(self.cancel) self.setLayout(self.layout) + +class AboutPesterchum(QtGui.QMessageBox): + def __init__(self, parent=None): + QtGui.QMessageBox.__init__(self, parent) + self.setText("P3ST3RCHUM V. 0.1.2") + self.setInformativeText("Programming by illuminatedwax (ghostDunk), art by Grimlive (aquaMarinist)") + self.mainwindow = parent diff --git a/menus.pyc b/menus.pyc index 2c3ae99..53c48cf 100644 Binary files a/menus.pyc and b/menus.pyc differ diff --git a/oyoyo/__init__.pyc b/oyoyo/__init__.pyc index be26c04..28e3e80 100644 Binary files a/oyoyo/__init__.pyc and b/oyoyo/__init__.pyc differ diff --git a/oyoyo/client.pyc b/oyoyo/client.pyc index 5ba5325..9115adc 100644 Binary files a/oyoyo/client.pyc and b/oyoyo/client.pyc differ diff --git a/oyoyo/cmdhandler.pyc b/oyoyo/cmdhandler.pyc index e9def19..d97b3d1 100644 Binary files a/oyoyo/cmdhandler.pyc and b/oyoyo/cmdhandler.pyc differ diff --git a/oyoyo/helpers.pyc b/oyoyo/helpers.pyc index e5c82c4..e5b17da 100644 Binary files a/oyoyo/helpers.pyc and b/oyoyo/helpers.pyc differ diff --git a/oyoyo/ircevents.pyc b/oyoyo/ircevents.pyc index 1f1ccd6..c83999f 100644 Binary files a/oyoyo/ircevents.pyc and b/oyoyo/ircevents.pyc differ diff --git a/oyoyo/parse.pyc b/oyoyo/parse.pyc index e67f2ea..9095b24 100644 Binary files a/oyoyo/parse.pyc and b/oyoyo/parse.pyc differ diff --git a/parsetools.pyc b/parsetools.pyc index 692c655..3138a62 100644 Binary files a/parsetools.pyc and b/parsetools.pyc differ diff --git a/pesterchum.js b/pesterchum.js index 4d98969..b0ffdad 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"], "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"], "defaultprofile": "ghostDunk", "block": []} \ No newline at end of file diff --git a/pesterchum.py b/pesterchum.py index 639096f..47689fc 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -14,7 +14,7 @@ import pygame from menus import PesterChooseQuirks, PesterChooseTheme, \ PesterChooseProfile, PesterOptions, PesterUserlist, PesterMemoList, \ - LoadingScreen + LoadingScreen, AboutPesterchum from dataobjs import PesterProfile, Mood, pesterQuirk, pesterQuirks from generic import PesterIcon, RightClickList, MultiTextDialog, PesterList from convo import PesterTabWindow, PesterText, PesterInput, PesterConvo @@ -109,25 +109,26 @@ class PesterProfileDB(dict): self.save() class pesterTheme(dict): - def __init__(self, name): + def __init__(self, name, default=False): self.path = "themes/%s" % (name) self.name = name fp = open(self.path+"/style.js") theme = json.load(fp, object_hook=self.pathHook) self.update(theme) fp.close() - defaultfp = open("themes/pesterchum/style.js") # set default - defaultTheme = json.load(defaultfp, object_hook=self.pathHook) - self.defaultTheme = defaultTheme - defaultfp.close() + if not default: + self.defaultTheme = pesterTheme("pesterchum", default=True) def __getitem__(self, key): keys = key.split("/") v = dict.__getitem__(self, keys.pop(0)) for k in keys: try: v = v[k] - except KeyError: - v = self.defaultTheme[k] + except KeyError, e: + if hasattr(self, 'defaultTheme'): + return self.defaultTheme[key] + else: + raise e return v def pathHook(self, d): for (k, v) in d.iteritems(): @@ -136,19 +137,23 @@ class pesterTheme(dict): d[k] = s.safe_substitute(path=self.path) return d def get(self, key, default): - try: - ret = self[key] - except KeyError: - return default - else: - return ret + keys = key.split("/") + v = dict.__getitem__(self, keys.pop(0)) + for k in keys: + try: + v = v[k] + except KeyError: + return default + return v def has_key(self, key): - try: - self[key] - except KeyError: - return False - else: - return True + keys = key.split("/") + v = dict.__getitem__(self, keys.pop(0)) + for k in keys: + try: + v = v[k] + except KeyError: + return False + return True class userConfig(object): def __init__(self): @@ -684,6 +689,14 @@ class PesterWindow(MovingWindow): profilemenu.addAction(changecoloraction) profilemenu.addAction(switch) + self.aboutAction = QtGui.QAction(self.theme["main/menus/help/about"], self) + self.connect(self.aboutAction, QtCore.SIGNAL('triggered()'), + self, QtCore.SLOT('aboutPesterchum()')) + helpmenu = self.menu.addMenu(self.theme["main/menus/help/_name"]) + self.helpmenu = helpmenu + self.helpmenu.addAction(self.aboutAction) + + self.closeButton = WMButton(PesterIcon(self.theme["main/close/image"]), self) self.connect(self.closeButton, QtCore.SIGNAL('clicked()'), self, QtCore.SLOT('closeToTray()')) @@ -923,6 +936,8 @@ class PesterWindow(MovingWindow): self.changecoloraction.setText(theme["main/menus/profile/color"]) self.switch.setText(theme["main/menus/profile/switch"]) self.profilemenu.setTitle(theme["main/menus/profile/_name"]) + self.aboutAction.setText(self.theme["main/menus/help/about"]) + self.helpmenu.setTitle(self.theme["main/menus/help/_name"]) # moods self.moodsLabel.setText(theme["main/moodlabel/text"]) @@ -976,9 +991,7 @@ class PesterWindow(MovingWindow): self.currentMoodIcon.move(*theme["main/mychumhandle/currentMood"]) self.currentMoodIcon.show() else: - print "no mood :(" if hasattr(self, 'currentMoodIcon') and self.currentMoodIcon: - print "hiding..." self.currentMoodIcon.hide() self.currentMoodIcon = None @@ -1475,6 +1488,13 @@ class PesterWindow(MovingWindow): if ret == QtGui.QMessageBox.Cancel: return self.changeProfile() + @QtCore.pyqtSlot() + def aboutPesterchum(self): + if hasattr(self, 'aboutwindow') and self.aboutwindow: + return + self.aboutwindow = AboutPesterchum(self) + self.aboutwindow.exec_() + self.aboutwindow = None @QtCore.pyqtSlot(QtCore.QString, QtCore.QString) def nickCollision(self, handle, tmphandle): diff --git a/themes/pesterchum/style.js b/themes/pesterchum/style.js index 589e99f..697b9bf 100644 --- a/themes/pesterchum/style.js +++ b/themes/pesterchum/style.js @@ -28,6 +28,8 @@ "theme": "THEME", "block": "TROLLSLUM", "quirks": "QUIRKS"}, + "help": { "_name": "HELP", + "about": "ABOUT" }, "rclickchumlist": {"pester": "PESTER", "removechum": "REMOVE CHUM", "blockchum": "BLOCK", diff --git a/trayicon32.icns b/trayicon32.icns new file mode 100644 index 0000000..5cb1b0a Binary files /dev/null and b/trayicon32.icns differ diff --git a/trayicon32.png b/trayicon32.png new file mode 100644 index 0000000..ca094fc Binary files /dev/null and b/trayicon32.png differ