This commit is contained in:
Stephen Dranger 2011-02-18 02:31:04 -06:00
parent f50c617d6d
commit 7e2cd62752
3 changed files with 13 additions and 10 deletions

2
TODO
View file

@ -1,7 +1,5 @@
Bugs: Bugs:
* heartbeat -- ping IRC occasionally so we pick up on send errors * heartbeat -- ping IRC occasionally so we pick up on send errors
* need memo limit on time
* color swatch text doesnt disappear
* X and _ buttons move around all crazy like * X and _ buttons move around all crazy like
Features: Features:

View file

@ -53,6 +53,11 @@ def txt2delta(txt):
timed = timedelta(0, h*3600+m*60) timed = timedelta(0, h*3600+m*60)
except ValueError: except ValueError:
timed = timedelta(0) timed = timedelta(0)
except OverflowError:
if sign < 0:
return timedelta(min)
else:
return timedelta(max)
return sign*timed return sign*timed
def pcfGrammar(td): def pcfGrammar(td):

View file

@ -1680,12 +1680,12 @@ class IRCThread(QtCore.QThread):
irc.setConnectionBroken() irc.setConnectionBroken()
else: else:
irc.closeConnection() irc.closeConnection()
self.failedIRC.emit() self.failedIRC.emit(str(se))
except StopIteration: except StopIteration:
pass pass
restartIRC = QtCore.pyqtSignal() restartIRC = QtCore.pyqtSignal()
failedIRC = QtCore.pyqtSignal() failedIRC = QtCore.pyqtSignal(QtCore.QString)
class PesterTray(QtGui.QSystemTrayIcon): class PesterTray(QtGui.QSystemTrayIcon):
def __init__(self, icon, mainwindow, parent): def __init__(self, icon, mainwindow, parent):
@ -1757,8 +1757,8 @@ class MainProgram(QtCore.QObject):
self.ircapp = IRCThread(self.irc) self.ircapp = IRCThread(self.irc)
self.connect(self.ircapp, QtCore.SIGNAL('restartIRC()'), self.connect(self.ircapp, QtCore.SIGNAL('restartIRC()'),
self, QtCore.SLOT('restartIRC()')) self, QtCore.SLOT('restartIRC()'))
self.connect(self.ircapp, QtCore.SIGNAL('failedIRC()'), self.connect(self.ircapp, QtCore.SIGNAL('failedIRC(QString)'),
self, QtCore.SLOT('failedIRC()')) self, QtCore.SLOT('failedIRC(QString)'))
def connectWidgets(self, irc, widget): def connectWidgets(self, irc, widget):
irc.connect(widget, QtCore.SIGNAL('sendMessage(QString, QString)'), irc.connect(widget, QtCore.SIGNAL('sendMessage(QString, QString)'),
@ -1890,13 +1890,13 @@ class MainProgram(QtCore.QObject):
status = self.widget.loadingscreen.exec_() status = self.widget.loadingscreen.exec_()
if status == QtGui.QDialog.Rejected: if status == QtGui.QDialog.Rejected:
sys.exit(0) sys.exit(0)
@QtCore.pyqtSlot() @QtCore.pyqtSlot(QtCore.QString)
def failedIRC(self): def failedIRC(self, reason):
self.widget.show() self.widget.show()
self.widget.activateWindow() self.widget.activateWindow()
if not self.widget.loadingscreen: if not self.widget.loadingscreen:
self.widget.loadingscreen = LoadingScreen(self.widget) self.widget.loadingscreen = LoadingScreen(self.widget)
self.widget.loadingscreen.loadinglabel.setText("F41L3D") self.widget.loadingscreen.loadinglabel.setText("F41L3D: %s" % (reason))
self.connect(self.widget.loadingscreen, QtCore.SIGNAL('rejected()'), self.connect(self.widget.loadingscreen, QtCore.SIGNAL('rejected()'),
self.widget, QtCore.SLOT('close()')) self.widget, QtCore.SLOT('close()'))
self.connect(self.widget.loadingscreen, QtCore.SIGNAL('tryAgain()'), self.connect(self.widget.loadingscreen, QtCore.SIGNAL('tryAgain()'),
@ -1905,7 +1905,7 @@ class MainProgram(QtCore.QObject):
if status == QtGui.QDialog.Rejected: if status == QtGui.QDialog.Rejected:
sys.exit(0) sys.exit(0)
else: else:
self.widget.loadingscreen.loadinglabel.setText("F41L3D") self.widget.loadingscreen.loadinglabel.setText("F41L3D: %s" % (reason))
def run(self): def run(self):
self.ircapp.start() self.ircapp.start()