derp
This commit is contained in:
parent
b38965126d
commit
4b504a0e98
12 changed files with 107 additions and 20 deletions
|
@ -18,6 +18,7 @@ CHANGELOG
|
||||||
* Quirk ordering - alGore
|
* Quirk ordering - alGore
|
||||||
* # of users in a memo - alGore
|
* # of users in a memo - alGore
|
||||||
* @links to users - illuminatedwax [ghostDunk]
|
* @links to users - illuminatedwax [ghostDunk]
|
||||||
|
* Support for REPORT and ALT to calSprite built in
|
||||||
|
|
||||||
BUG FIXES:
|
BUG FIXES:
|
||||||
* mixer bug fixed
|
* mixer bug fixed
|
||||||
|
|
18
convo.py
18
convo.py
|
@ -8,7 +8,7 @@ from datetime import datetime, timedelta
|
||||||
from PyQt4 import QtGui, QtCore
|
from PyQt4 import QtGui, QtCore
|
||||||
|
|
||||||
from dataobjs import PesterProfile, Mood, PesterHistory
|
from dataobjs import PesterProfile, Mood, PesterHistory
|
||||||
from generic import PesterIcon, RightClickList
|
from generic import PesterIcon
|
||||||
from parsetools import convertTags, lexMessage, splitMessage, mecmd, colorBegin, colorEnd, img2smiley
|
from parsetools import convertTags, lexMessage, splitMessage, mecmd, colorBegin, colorEnd, img2smiley
|
||||||
|
|
||||||
class PesterTabWindow(QtGui.QFrame):
|
class PesterTabWindow(QtGui.QFrame):
|
||||||
|
@ -306,14 +306,7 @@ class PesterText(QtGui.QTextEdit):
|
||||||
self.parent().mainwindow.showMemos(url[1:])
|
self.parent().mainwindow.showMemos(url[1:])
|
||||||
elif url[0] == "@":
|
elif url[0] == "@":
|
||||||
handle = unicode(url[1:])
|
handle = unicode(url[1:])
|
||||||
mw = self.parent().mainwindow
|
self.parent().mainwindow.newConversation(handle)
|
||||||
matchingChums = [c for c in mw.chumList.chums if c.handle == handle]
|
|
||||||
if len(matchingChums) > 0:
|
|
||||||
mood = matchingChums[0].mood
|
|
||||||
else:
|
|
||||||
mood = Mood(0)
|
|
||||||
chum = PesterProfile(handle, mood=mood, chumdb=mw.chumdb)
|
|
||||||
mw.newConversation(chum)
|
|
||||||
else:
|
else:
|
||||||
QtGui.QDesktopServices.openUrl(QtCore.QUrl(url, QtCore.QUrl.TolerantMode))
|
QtGui.QDesktopServices.openUrl(QtCore.QUrl(url, QtCore.QUrl.TolerantMode))
|
||||||
QtGui.QTextEdit.mousePressEvent(self, event)
|
QtGui.QTextEdit.mousePressEvent(self, event)
|
||||||
|
@ -453,10 +446,14 @@ class PesterConvo(QtGui.QFrame):
|
||||||
self.unblockchum = QtGui.QAction(self.mainwindow.theme["main/menus/rclickchumlist/unblockchum"], self)
|
self.unblockchum = QtGui.QAction(self.mainwindow.theme["main/menus/rclickchumlist/unblockchum"], self)
|
||||||
self.connect(self.unblockchum, QtCore.SIGNAL('triggered()'),
|
self.connect(self.unblockchum, QtCore.SIGNAL('triggered()'),
|
||||||
self, QtCore.SLOT('unblockChumSlot()'))
|
self, QtCore.SLOT('unblockChumSlot()'))
|
||||||
|
self.reportchum = QtGui.QAction(self.mainwindow.theme["main/menus/rclickchumlist/report"], self)
|
||||||
|
self.connect(self.reportchum, QtCore.SIGNAL('triggered()'),
|
||||||
|
self, QtCore.SLOT('reportThisChum()'))
|
||||||
|
|
||||||
self.optionsMenu.addAction(self.quirksOff)
|
self.optionsMenu.addAction(self.quirksOff)
|
||||||
self.optionsMenu.addAction(self.addChumAction)
|
self.optionsMenu.addAction(self.addChumAction)
|
||||||
self.optionsMenu.addAction(self.blockAction)
|
self.optionsMenu.addAction(self.blockAction)
|
||||||
|
self.optionsMenu.addAction(self.reportchum)
|
||||||
|
|
||||||
self.chumopen = False
|
self.chumopen = False
|
||||||
self.applyquirks = True
|
self.applyquirks = True
|
||||||
|
@ -629,6 +626,9 @@ class PesterConvo(QtGui.QFrame):
|
||||||
def blockThisChum(self):
|
def blockThisChum(self):
|
||||||
self.mainwindow.blockChum(self.chum.handle)
|
self.mainwindow.blockChum(self.chum.handle)
|
||||||
@QtCore.pyqtSlot()
|
@QtCore.pyqtSlot()
|
||||||
|
def reportThisChum(self):
|
||||||
|
self.mainwindow.reportChum(self.chum.handle)
|
||||||
|
@QtCore.pyqtSlot()
|
||||||
def unblockChumSlot(self):
|
def unblockChumSlot(self):
|
||||||
self.mainwindow.unblockChum(self.chum.handle)
|
self.mainwindow.unblockChum(self.chum.handle)
|
||||||
@QtCore.pyqtSlot(bool)
|
@QtCore.pyqtSlot(bool)
|
||||||
|
|
|
@ -35,7 +35,9 @@ class RightClickList(QtGui.QListWidget):
|
||||||
if event.reason() == QtGui.QContextMenuEvent.Mouse:
|
if event.reason() == QtGui.QContextMenuEvent.Mouse:
|
||||||
listing = self.itemAt(event.pos())
|
listing = self.itemAt(event.pos())
|
||||||
self.setCurrentItem(listing)
|
self.setCurrentItem(listing)
|
||||||
self.optionsMenu.popup(event.globalPos())
|
self.getOptionsMenu().popup(event.globalPos())
|
||||||
|
def getOptionsMenu(self):
|
||||||
|
return self.optionsMenu
|
||||||
|
|
||||||
class MultiTextDialog(QtGui.QDialog):
|
class MultiTextDialog(QtGui.QDialog):
|
||||||
def __init__(self, title, parent, *queries):
|
def __init__(self, title, parent, *queries):
|
||||||
|
|
17
menus.py
17
menus.py
|
@ -610,7 +610,11 @@ class PesterUserlist(QtGui.QDialog):
|
||||||
self.addChumAction = QtGui.QAction(self.mainwindow.theme["main/menus/rclickchumlist/addchum"], self)
|
self.addChumAction = QtGui.QAction(self.mainwindow.theme["main/menus/rclickchumlist/addchum"], self)
|
||||||
self.connect(self.addChumAction, QtCore.SIGNAL('triggered()'),
|
self.connect(self.addChumAction, QtCore.SIGNAL('triggered()'),
|
||||||
self, QtCore.SLOT('addChumSlot()'))
|
self, QtCore.SLOT('addChumSlot()'))
|
||||||
|
self.pesterChumAction = QtGui.QAction(self.mainwindow.theme["main/menus/rclickchumlist/pester"], self)
|
||||||
|
self.connect(self.pesterChumAction, QtCore.SIGNAL('triggered()'),
|
||||||
|
self, QtCore.SLOT('pesterChumSlot()'))
|
||||||
self.userarea.optionsMenu.addAction(self.addChumAction)
|
self.userarea.optionsMenu.addAction(self.addChumAction)
|
||||||
|
self.userarea.optionsMenu.addAction(self.pesterChumAction)
|
||||||
|
|
||||||
self.ok = QtGui.QPushButton("OK", self)
|
self.ok = QtGui.QPushButton("OK", self)
|
||||||
self.ok.setDefault(True)
|
self.ok.setDefault(True)
|
||||||
|
@ -634,7 +638,7 @@ class PesterUserlist(QtGui.QDialog):
|
||||||
self.updateUsers()
|
self.updateUsers()
|
||||||
@QtCore.pyqtSlot()
|
@QtCore.pyqtSlot()
|
||||||
def updateUsers(self):
|
def updateUsers(self):
|
||||||
names = self.mainwindow.namesdb["#pesterchum"]
|
names = self.mainwindow.namesdb["#PESTERCHUM"]
|
||||||
self.userarea.clear()
|
self.userarea.clear()
|
||||||
for n in names:
|
for n in names:
|
||||||
item = QtGui.QListWidgetItem(n)
|
item = QtGui.QListWidgetItem(n)
|
||||||
|
@ -675,8 +679,15 @@ class PesterUserlist(QtGui.QDialog):
|
||||||
if not cur:
|
if not cur:
|
||||||
return
|
return
|
||||||
self.addChum.emit(cur.text())
|
self.addChum.emit(cur.text())
|
||||||
|
@QtCore.pyqtSlot()
|
||||||
|
def pesterChumSlot(self):
|
||||||
|
cur = self.userarea.currentItem()
|
||||||
|
if not cur:
|
||||||
|
return
|
||||||
|
self.pesterChum.emit(cur.text())
|
||||||
|
|
||||||
addChum = QtCore.pyqtSignal(QtCore.QString)
|
addChum = QtCore.pyqtSignal(QtCore.QString)
|
||||||
|
pesterChum = QtCore.pyqtSignal(QtCore.QString)
|
||||||
|
|
||||||
|
|
||||||
class MemoListItem(QtGui.QListWidgetItem):
|
class MemoListItem(QtGui.QListWidgetItem):
|
||||||
|
@ -798,6 +809,6 @@ class LoadingScreen(QtGui.QDialog):
|
||||||
class AboutPesterchum(QtGui.QMessageBox):
|
class AboutPesterchum(QtGui.QMessageBox):
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
QtGui.QMessageBox.__init__(self, parent)
|
QtGui.QMessageBox.__init__(self, parent)
|
||||||
self.setText("P3ST3RCHUM V. 3.14")
|
self.setText("P3ST3RCHUM V. 3.14.1")
|
||||||
self.setInformativeText("Programming by illuminatedwax (ghostDunk), art by Grimlive (aquaMarinist). Special thanks to ABT and gamblingGenocider.")
|
self.setInformativeText("Programming by illuminatedwax (ghostDunk), Kiooeht (evacipatedBox), alGore, art by Grimlive (aquaMarinist). Special thanks to ABT and gamblingGenocider.")
|
||||||
self.mainwindow = parent
|
self.mainwindow = parent
|
||||||
|
|
|
@ -192,6 +192,15 @@ def convertTags(lexed, format="html"):
|
||||||
|
|
||||||
def splitMessage(msg, format="ctag"):
|
def splitMessage(msg, format="ctag"):
|
||||||
"""Splits message if it is too long."""
|
"""Splits message if it is too long."""
|
||||||
|
# split long text lines
|
||||||
|
buf = []
|
||||||
|
for o in msg:
|
||||||
|
if type(o) in [str, unicode] and len(o) > 200:
|
||||||
|
for i in range(0, len(o), 200):
|
||||||
|
buf.append(o[i:i+200])
|
||||||
|
else:
|
||||||
|
buf.append(o)
|
||||||
|
msg = buf
|
||||||
okmsg = []
|
okmsg = []
|
||||||
cbegintags = []
|
cbegintags = []
|
||||||
output = []
|
output = []
|
||||||
|
@ -200,11 +209,7 @@ def splitMessage(msg, format="ctag"):
|
||||||
if type(o) is colorBegin:
|
if type(o) is colorBegin:
|
||||||
cbegintags.append(o)
|
cbegintags.append(o)
|
||||||
elif type(o) is colorEnd:
|
elif type(o) is colorEnd:
|
||||||
print len(cbegintags)
|
cbegintags.pop()
|
||||||
try:
|
|
||||||
cbegintags.pop()
|
|
||||||
except IndexError:
|
|
||||||
print len(cbegintags)
|
|
||||||
# yeah normally i'd do binary search but im lazy
|
# yeah normally i'd do binary search but im lazy
|
||||||
msglen = len(convertTags(okmsg, format)) + 4*(len(cbegintags))
|
msglen = len(convertTags(okmsg, format)) + 4*(len(cbegintags))
|
||||||
if msglen > 400:
|
if msglen > 400:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"hideOfflineChums": false, "time12Format": true, "tabs": true, "showSeconds": false, "server": "irc.mindfang.org", "soundon": true, "showTimeStamps": false, "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", "laughingShisa", "bluntInstrument", "sunilaSeed", "bluntInstrument", "nickServ", "ghostBinoculars", "alGore", "evacipatedBox", "acrylicEmulator", "prettyGemmaiden", "calSprite", "fairytalePorn", "brooklynRage"], "defaultprofile": "testProfile", "block": []}
|
{"hideOfflineChums": false, "time12Format": true, "tabs": true, "soundon": true, "server": "irc.mindfang.org", "showSeconds": false, "showTimeStamps": false, "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", "laughingShisa", "bluntInstrument", "sunilaSeed", "bluntInstrument", "nickServ", "ghostBinoculars", "alGore", "evacipatedBox", "acrylicEmulator", "prettyGemmaiden", "calSprite", "fairytalePorn", "brooklynRage"], "defaultprofile": "testProfile", "block": []}
|
|
@ -26,6 +26,7 @@ from irc import PesterIRC
|
||||||
from logviewer import PesterLogUserSelect, PesterLogViewer
|
from logviewer import PesterLogUserSelect, PesterLogViewer
|
||||||
|
|
||||||
_datadir = QtGui.QDesktopServices.storageLocation(QtGui.QDesktopServices.DataLocation)+"Pesterchum/"
|
_datadir = QtGui.QDesktopServices.storageLocation(QtGui.QDesktopServices.DataLocation)+"Pesterchum/"
|
||||||
|
canon_handles = ["apocalypseArisen", "arsenicCatnip", "arachnidsGrip", "adiosToreador", "caligulasAquarium", "cuttlefishCuller", "carcinoGeneticist", "centaursTesticle", "grimAuxiliatrix", "gallowsCalibrator", "gardenGnostic", "ectoBiologist", "twinArmageddons", "terminallyCapricious", "turntechGodhead", "tentacleTherapist"]
|
||||||
|
|
||||||
if sys.platform == "darwin":
|
if sys.platform == "darwin":
|
||||||
if not os.path.exists(_datadir):
|
if not os.path.exists(_datadir):
|
||||||
|
@ -452,6 +453,7 @@ class chumArea(RightClickList):
|
||||||
if not self.mainwindow.config.hideOfflineChums():
|
if not self.mainwindow.config.hideOfflineChums():
|
||||||
self.showAllChums()
|
self.showAllChums()
|
||||||
self.optionsMenu = QtGui.QMenu(self)
|
self.optionsMenu = QtGui.QMenu(self)
|
||||||
|
self.canonMenu = QtGui.QMenu(self)
|
||||||
self.pester = QtGui.QAction(self.mainwindow.theme["main/menus/rclickchumlist/pester"], self)
|
self.pester = QtGui.QAction(self.mainwindow.theme["main/menus/rclickchumlist/pester"], self)
|
||||||
self.connect(self.pester, QtCore.SIGNAL('triggered()'),
|
self.connect(self.pester, QtCore.SIGNAL('triggered()'),
|
||||||
self, QtCore.SLOT('activateChum()'))
|
self, QtCore.SLOT('activateChum()'))
|
||||||
|
@ -464,13 +466,35 @@ class chumArea(RightClickList):
|
||||||
self.logchum = QtGui.QAction(self.mainwindow.theme["main/menus/rclickchumlist/viewlog"], self)
|
self.logchum = QtGui.QAction(self.mainwindow.theme["main/menus/rclickchumlist/viewlog"], self)
|
||||||
self.connect(self.logchum, QtCore.SIGNAL('triggered()'),
|
self.connect(self.logchum, QtCore.SIGNAL('triggered()'),
|
||||||
self, QtCore.SLOT('openChumLogs()'))
|
self, QtCore.SLOT('openChumLogs()'))
|
||||||
|
self.reportchum = QtGui.QAction(self.mainwindow.theme["main/menus/rclickchumlist/report"], self)
|
||||||
|
self.connect(self.reportchum, QtCore.SIGNAL('triggered()'),
|
||||||
|
self, QtCore.SLOT('reportChum()'))
|
||||||
|
self.findalts = QtGui.QAction("Find Alts", self)
|
||||||
|
self.connect(self.findalts, QtCore.SIGNAL('triggered()'),
|
||||||
|
self, QtCore.SLOT('findAlts()'))
|
||||||
|
|
||||||
self.optionsMenu.addAction(self.pester)
|
self.optionsMenu.addAction(self.pester)
|
||||||
self.optionsMenu.addAction(self.logchum)
|
self.optionsMenu.addAction(self.logchum)
|
||||||
self.optionsMenu.addAction(self.blockchum)
|
self.optionsMenu.addAction(self.blockchum)
|
||||||
self.optionsMenu.addAction(self.removechum)
|
self.optionsMenu.addAction(self.removechum)
|
||||||
|
self.optionsMenu.addAction(self.reportchum)
|
||||||
|
|
||||||
|
|
||||||
|
self.canonMenu.addAction(self.pester)
|
||||||
|
self.canonMenu.addAction(self.logchum)
|
||||||
|
self.canonMenu.addAction(self.blockchum)
|
||||||
|
self.canonMenu.addAction(self.removechum)
|
||||||
|
self.canonMenu.addAction(self.reportchum)
|
||||||
|
self.canonMenu.addAction(self.findalts)
|
||||||
|
|
||||||
self.initTheme(theme)
|
self.initTheme(theme)
|
||||||
self.sortItems()
|
self.sortItems()
|
||||||
|
def getOptionsMenu(self):
|
||||||
|
currenthandle = self.currentItem().chum.handle
|
||||||
|
if currenthandle in canon_handles:
|
||||||
|
return self.canonMenu
|
||||||
|
else:
|
||||||
|
return self.optionsMenu
|
||||||
def addChum(self, chum):
|
def addChum(self, chum):
|
||||||
if len([c for c in self.chums if c.handle == chum.handle]) != 0:
|
if len([c for c in self.chums if c.handle == chum.handle]) != 0:
|
||||||
return
|
return
|
||||||
|
@ -566,6 +590,18 @@ class chumArea(RightClickList):
|
||||||
return
|
return
|
||||||
self.blockChumSignal.emit(self.currentItem().chum.handle)
|
self.blockChumSignal.emit(self.currentItem().chum.handle)
|
||||||
@QtCore.pyqtSlot()
|
@QtCore.pyqtSlot()
|
||||||
|
def reportChum(self):
|
||||||
|
currentChum = self.currentItem()
|
||||||
|
if not currentChum:
|
||||||
|
return
|
||||||
|
self.mainwindow.reportChum(self.currentItem().chum.handle)
|
||||||
|
@QtCore.pyqtSlot()
|
||||||
|
def findAlts(self):
|
||||||
|
currentChum = self.currentItem()
|
||||||
|
if not currentChum:
|
||||||
|
return
|
||||||
|
self.mainwindow.sendMessage.emit("ALT %s" % (currentChum.chum.handle) , "calSprite")
|
||||||
|
@QtCore.pyqtSlot()
|
||||||
def openChumLogs(self):
|
def openChumLogs(self):
|
||||||
currentChum = self.currentItem().text()
|
currentChum = self.currentItem().text()
|
||||||
if not currentChum:
|
if not currentChum:
|
||||||
|
@ -910,15 +946,18 @@ class PesterWindow(MovingWindow):
|
||||||
self.aboutAction = QtGui.QAction(self.theme["main/menus/help/about"], self)
|
self.aboutAction = QtGui.QAction(self.theme["main/menus/help/about"], self)
|
||||||
self.connect(self.aboutAction, QtCore.SIGNAL('triggered()'),
|
self.connect(self.aboutAction, QtCore.SIGNAL('triggered()'),
|
||||||
self, QtCore.SLOT('aboutPesterchum()'))
|
self, QtCore.SLOT('aboutPesterchum()'))
|
||||||
|
self.botAction = QtGui.QAction("CALSPRITE", self)
|
||||||
|
self.connect(self.botAction, QtCore.SIGNAL('triggered()'),
|
||||||
|
self, QtCore.SLOT('loadCalsprite()'))
|
||||||
self.helpAction = QtGui.QAction("HELP", self)
|
self.helpAction = QtGui.QAction("HELP", self)
|
||||||
self.connect(self.helpAction, QtCore.SIGNAL('triggered()'),
|
self.connect(self.helpAction, QtCore.SIGNAL('triggered()'),
|
||||||
self, QtCore.SLOT('launchHelp()'))
|
self, QtCore.SLOT('launchHelp()'))
|
||||||
helpmenu = self.menu.addMenu(self.theme["main/menus/help/_name"])
|
helpmenu = self.menu.addMenu(self.theme["main/menus/help/_name"])
|
||||||
self.helpmenu = helpmenu
|
self.helpmenu = helpmenu
|
||||||
self.helpmenu.addAction(self.helpAction)
|
self.helpmenu.addAction(self.helpAction)
|
||||||
|
self.helpmenu.addAction(self.botAction)
|
||||||
self.helpmenu.addAction(self.aboutAction)
|
self.helpmenu.addAction(self.aboutAction)
|
||||||
|
|
||||||
|
|
||||||
self.closeButton = WMButton(PesterIcon(self.theme["main/close/image"]), self)
|
self.closeButton = WMButton(PesterIcon(self.theme["main/close/image"]), self)
|
||||||
self.connect(self.closeButton, QtCore.SIGNAL('clicked()'),
|
self.connect(self.closeButton, QtCore.SIGNAL('clicked()'),
|
||||||
self, QtCore.SLOT('closeToTray()'))
|
self, QtCore.SLOT('closeToTray()'))
|
||||||
|
@ -1069,6 +1108,16 @@ class PesterWindow(MovingWindow):
|
||||||
if hasattr(self, 'trollslum') and self.trollslum:
|
if hasattr(self, 'trollslum') and self.trollslum:
|
||||||
self.trollslum.updateMood(handle, mood)
|
self.trollslum.updateMood(handle, mood)
|
||||||
def newConversation(self, chum, initiated=True):
|
def newConversation(self, chum, initiated=True):
|
||||||
|
if type(chum) in [str, unicode]:
|
||||||
|
matchingChums = [c for c in self.chumList.chums if c.handle == chum]
|
||||||
|
if len(matchingChums) > 0:
|
||||||
|
mood = matchingChums[0].mood
|
||||||
|
else:
|
||||||
|
mood = Mood(2)
|
||||||
|
chum = PesterProfile(chum, mood=mood, chumdb=self.chumdb)
|
||||||
|
if len(matchingChums) == 0:
|
||||||
|
self.moodRequest.emit(chum)
|
||||||
|
|
||||||
if self.convos.has_key(chum.handle):
|
if self.convos.has_key(chum.handle):
|
||||||
self.convos[chum.handle].showChat()
|
self.convos[chum.handle].showChat()
|
||||||
return
|
return
|
||||||
|
@ -1454,6 +1503,11 @@ class PesterWindow(MovingWindow):
|
||||||
@QtCore.pyqtSlot(QtCore.QString)
|
@QtCore.pyqtSlot(QtCore.QString)
|
||||||
def removeChum(self, chumlisting):
|
def removeChum(self, chumlisting):
|
||||||
self.config.removeChum(chumlisting)
|
self.config.removeChum(chumlisting)
|
||||||
|
def reportChum(self, handle):
|
||||||
|
(reason, ok) = QtGui.QInputDialog.getText(self, "Report User", "Enter the reason you are reporting this user (optional):")
|
||||||
|
if ok:
|
||||||
|
self.sendMessage.emit("REPORT %s %s" % (handle, reason) , "calSprite")
|
||||||
|
|
||||||
@QtCore.pyqtSlot(QtCore.QString)
|
@QtCore.pyqtSlot(QtCore.QString)
|
||||||
def blockChum(self, handle):
|
def blockChum(self, handle):
|
||||||
h = unicode(handle)
|
h = unicode(handle)
|
||||||
|
@ -1613,6 +1667,8 @@ class PesterWindow(MovingWindow):
|
||||||
self, QtCore.SLOT('userListClose()'))
|
self, QtCore.SLOT('userListClose()'))
|
||||||
self.connect(self.allusers, QtCore.SIGNAL('addChum(QString)'),
|
self.connect(self.allusers, QtCore.SIGNAL('addChum(QString)'),
|
||||||
self, QtCore.SLOT('userListAdd(QString)'))
|
self, QtCore.SLOT('userListAdd(QString)'))
|
||||||
|
self.connect(self.allusers, QtCore.SIGNAL('pesterChum(QString)'),
|
||||||
|
self, QtCore.SLOT('userListPester(QString)'))
|
||||||
self.requestNames.emit("#pesterchum")
|
self.requestNames.emit("#pesterchum")
|
||||||
self.allusers.show()
|
self.allusers.show()
|
||||||
|
|
||||||
|
@ -1621,6 +1677,10 @@ class PesterWindow(MovingWindow):
|
||||||
h = unicode(handle)
|
h = unicode(handle)
|
||||||
chum = PesterProfile(h, chumdb=self.chumdb)
|
chum = PesterProfile(h, chumdb=self.chumdb)
|
||||||
self.addChum(chum)
|
self.addChum(chum)
|
||||||
|
@QtCore.pyqtSlot(QtCore.QString)
|
||||||
|
def userListPester(self, handle):
|
||||||
|
h = unicode(handle)
|
||||||
|
self.newConversation(h)
|
||||||
@QtCore.pyqtSlot()
|
@QtCore.pyqtSlot()
|
||||||
def userListClose(self):
|
def userListClose(self):
|
||||||
self.allusers = None
|
self.allusers = None
|
||||||
|
@ -1851,6 +1911,9 @@ class PesterWindow(MovingWindow):
|
||||||
self.aboutwindow.exec_()
|
self.aboutwindow.exec_()
|
||||||
self.aboutwindow = None
|
self.aboutwindow = None
|
||||||
@QtCore.pyqtSlot()
|
@QtCore.pyqtSlot()
|
||||||
|
def loadCalsprite(self):
|
||||||
|
self.newConversation("calSprite")
|
||||||
|
@QtCore.pyqtSlot()
|
||||||
def launchHelp(self):
|
def launchHelp(self):
|
||||||
QtGui.QDesktopServices.openUrl(QtCore.QUrl("http://nova.xzibition.com/~illuminatedwax/help.html", QtCore.QUrl.TolerantMode))
|
QtGui.QDesktopServices.openUrl(QtCore.QUrl("http://nova.xzibition.com/~illuminatedwax/help.html", QtCore.QUrl.TolerantMode))
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
"rclickchumlist": {"pester": "Pester",
|
"rclickchumlist": {"pester": "Pester",
|
||||||
"removechum": "Remove Chum",
|
"removechum": "Remove Chum",
|
||||||
"blockchum": "Block",
|
"blockchum": "Block",
|
||||||
|
"report", "Report",
|
||||||
"addchum": "Add Chum",
|
"addchum": "Add Chum",
|
||||||
"viewlog": "View Pesterlog",
|
"viewlog": "View Pesterlog",
|
||||||
"unblockchum": "Unblock",
|
"unblockchum": "Unblock",
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
"about": "About" },
|
"about": "About" },
|
||||||
"rclickchumlist": {"pester": "Pester",
|
"rclickchumlist": {"pester": "Pester",
|
||||||
"removechum": "Remove Chum",
|
"removechum": "Remove Chum",
|
||||||
|
"report": "Report",
|
||||||
"blockchum": "Block",
|
"blockchum": "Block",
|
||||||
"addchum": "Add Chum",
|
"addchum": "Add Chum",
|
||||||
"viewlog": "View Pesterlog",
|
"viewlog": "View Pesterlog",
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
"about": "ABOUT" },
|
"about": "ABOUT" },
|
||||||
"rclickchumlist": {"pester": "PESTER",
|
"rclickchumlist": {"pester": "PESTER",
|
||||||
"removechum": "REMOVE CHUM",
|
"removechum": "REMOVE CHUM",
|
||||||
|
"report": "REPORT",
|
||||||
"blockchum": "BLOCK",
|
"blockchum": "BLOCK",
|
||||||
"addchum": "ADD CHUM",
|
"addchum": "ADD CHUM",
|
||||||
"viewlog": "VIEW PESTERLOG",
|
"viewlog": "VIEW PESTERLOG",
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
"about": "About" },
|
"about": "About" },
|
||||||
"rclickchumlist": {"pester": "Troll",
|
"rclickchumlist": {"pester": "Troll",
|
||||||
"removechum": "Trash",
|
"removechum": "Trash",
|
||||||
|
"report": "Remove",
|
||||||
"blockchum": "Block",
|
"blockchum": "Block",
|
||||||
"addchum": "Add Chump",
|
"addchum": "Add Chump",
|
||||||
"viewlog": "View Pesterlog",
|
"viewlog": "View Pesterlog",
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
"about": "About" },
|
"about": "About" },
|
||||||
"rclickchumlist": {"pester": "Converse",
|
"rclickchumlist": {"pester": "Converse",
|
||||||
"removechum": "Erase User",
|
"removechum": "Erase User",
|
||||||
|
"report": "Report User",
|
||||||
"blockchum": "Condemn",
|
"blockchum": "Condemn",
|
||||||
"addchum": "Add User",
|
"addchum": "Add User",
|
||||||
"viewlog": "View Pesterlog",
|
"viewlog": "View Pesterlog",
|
||||||
|
|
Loading…
Reference in a new issue