bluh
This commit is contained in:
parent
f345ecb8fc
commit
db64c53bfb
9 changed files with 25 additions and 5 deletions
1
TODO
1
TODO
|
@ -3,6 +3,7 @@ Bugs:
|
|||
* X and _ buttons move around all crazy like
|
||||
|
||||
Features:
|
||||
* Manual reconnect
|
||||
* help menu -- about and forum
|
||||
* copy quirks between profiles?
|
||||
* shared buddy lists - changes to the buddy list should refresh it?
|
||||
|
|
5
irc.py
5
irc.py
|
@ -24,6 +24,8 @@ class PesterIRC(QtCore.QObject):
|
|||
self.cli.command_handler.mainwindow = self.mainwindow
|
||||
self.conn = self.cli.connect()
|
||||
self.brokenConnection = False
|
||||
def closeConnection(self):
|
||||
self.cli.close()
|
||||
def setConnectionBroken(self):
|
||||
self.brokenConnection = True
|
||||
@QtCore.pyqtSlot(PesterProfile)
|
||||
|
@ -155,6 +157,9 @@ class PesterIRC(QtCore.QObject):
|
|||
helpers.mode(self.cli, c, m, cmd)
|
||||
except socket.error:
|
||||
self.setConnectionBroken()
|
||||
@QtCore.pyqtSlot()
|
||||
def reconnectIRC(self):
|
||||
self.setConnectionBroken()
|
||||
|
||||
def updateIRC(self):
|
||||
self.conn.next()
|
||||
|
|
BIN
irc.pyc
BIN
irc.pyc
Binary file not shown.
|
@ -185,7 +185,8 @@ class IRCClient:
|
|||
if self.socket:
|
||||
logging.info('closing socket')
|
||||
self.socket.close()
|
||||
|
||||
def close(self):
|
||||
self.socket.close()
|
||||
|
||||
class IRCApp:
|
||||
""" This class manages several IRCClient instances without the use of threads.
|
||||
|
|
BIN
oyoyo/client.pyc
BIN
oyoyo/client.pyc
Binary file not shown.
BIN
parsetools.pyc
BIN
parsetools.pyc
Binary file not shown.
|
@ -1 +1 @@
|
|||
{"tabs": true, "soundon": true, "server": "irc.tymoon.eu", "chums": ["unknownTraveler", "tentacleTherapist", "vaginalEngineer", "mechanicalSpectacle", "carcinoGeneticist", "schlagzeugGator", "gamblingGenocider", "gardenGnostic", "superGhost", "centaursTesticle", "arachnidsGrip", "grimAuxiliatrix", "remoteBloodbath", "nitroZealist", "greenZephyr", "arsenicCatnip", "adiosToreador", "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", "obliviousCrafter"], "defaultprofile": "ghostDunk", "block": []}
|
||||
{"tabs": true, "soundon": true, "server": "irc.tymoon.eu", "chums": ["unknownTraveler", "tentacleTherapist", "vaginalEngineer", "mechanicalSpectacle", "carcinoGeneticist", "schlagzeugGator", "gamblingGenocider", "gardenGnostic", "superGhost", "centaursTesticle", "arachnidsGrip", "grimAuxiliatrix", "remoteBloodbath", "nitroZealist", "greenZephyr", "arsenicCatnip", "adiosToreador", "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", "obliviousCrafter", "ircMonster"], "defaultprofile": "ghostDunk", "block": []}
|
|
@ -60,7 +60,7 @@ class PesterLog(object):
|
|||
self.convos = {}
|
||||
def log(self, handle, msg):
|
||||
bbcodemsg = convertTags(msg, "bbcode")
|
||||
html = convertTags(msg, "html")
|
||||
html = convertTags(msg, "html")+"<br />"
|
||||
msg = convertTags(msg, "text")
|
||||
modes = {"bbcode": bbcodemsg, "html": html, "text": msg}
|
||||
if not self.convos.has_key(handle):
|
||||
|
@ -694,6 +694,9 @@ class PesterWindow(MovingWindow):
|
|||
self.idleaction.setCheckable(True)
|
||||
self.connect(self.idleaction, QtCore.SIGNAL('toggled(bool)'),
|
||||
self, QtCore.SLOT('toggleIdle(bool)'))
|
||||
self.reconnectAction = QtGui.QAction(self.theme["main/menus/client/reconnect"], self)
|
||||
self.connect(self.reconnectAction, QtCore.SIGNAL('triggered()'),
|
||||
self, QtCore.SIGNAL('reconnectIRC()'))
|
||||
|
||||
self.menu = QtGui.QMenuBar(self)
|
||||
|
||||
|
@ -704,6 +707,7 @@ class PesterWindow(MovingWindow):
|
|||
filemenu.addAction(userlistaction)
|
||||
filemenu.addAction(self.idleaction)
|
||||
filemenu.addAction(self.importaction)
|
||||
filemenu.addAction(self.reconnectAction)
|
||||
filemenu.addAction(exitaction)
|
||||
|
||||
changetheme = QtGui.QAction(self.theme["main/menus/profile/theme"], self)
|
||||
|
@ -1000,6 +1004,7 @@ class PesterWindow(MovingWindow):
|
|||
self.memoaction.setText(theme["main/menus/client/memos"])
|
||||
self.importaction.setText(theme["main/menus/client/import"])
|
||||
self.idleaction.setText(theme["main/menus/client/idle"])
|
||||
self.reconnectAction.setText(theme["main/menus/client/reconnect"])
|
||||
self.filemenu.setTitle(theme["main/menus/client/_name"])
|
||||
self.changetheme.setText(theme["main/menus/profile/theme"])
|
||||
self.changequirks.setText(theme["main/menus/profile/quirks"])
|
||||
|
@ -1642,6 +1647,7 @@ class PesterWindow(MovingWindow):
|
|||
leftChannel = QtCore.pyqtSignal(QtCore.QString)
|
||||
setChannelMode = QtCore.pyqtSignal(QtCore.QString, QtCore.QString, QtCore.QString)
|
||||
closeSignal = QtCore.pyqtSignal()
|
||||
reconnectIRC = QtCore.pyqtSignal()
|
||||
|
||||
class IRCThread(QtCore.QThread):
|
||||
def __init__(self, ircobj):
|
||||
|
@ -1652,11 +1658,13 @@ class IRCThread(QtCore.QThread):
|
|||
irc.IRCConnect()
|
||||
while 1:
|
||||
if irc.brokenConnection:
|
||||
self.exit(1)
|
||||
self.finished.emit()
|
||||
irc.closeConnection()
|
||||
self.terminate()
|
||||
try:
|
||||
irc.updateIRC()
|
||||
except socket.error:
|
||||
self.exit(1)
|
||||
irc.setConnectionBroken()
|
||||
|
||||
class PesterTray(QtGui.QSystemTrayIcon):
|
||||
def __init__(self, icon, mainwindow, parent):
|
||||
|
@ -1790,6 +1798,10 @@ class MainProgram(QtCore.QObject):
|
|||
QtCore.SIGNAL('setChannelMode(QString, QString, QString)'),
|
||||
irc,
|
||||
QtCore.SLOT('setChannelMode(QString, QString, QString)'))
|
||||
irc.connect(widget,
|
||||
QtCore.SIGNAL('reconnectIRC()'),
|
||||
irc,
|
||||
QtCore.SLOT('reconnectIRC()'))
|
||||
|
||||
# IRC --> Main window
|
||||
irc.connect(irc, QtCore.SIGNAL('connected()'),
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
"userlist": "USERLIST",
|
||||
"import": "IMPORT",
|
||||
"idle": "IDLE",
|
||||
"reconnect": "RECONNECT",
|
||||
"exit": "EXIT"},
|
||||
"profile": {"_name": "PROFILE",
|
||||
"switch": "SWITCH",
|
||||
|
|
Loading…
Reference in a new issue