This commit is contained in:
Stephen Dranger 2011-02-14 17:54:44 -06:00
parent db64c53bfb
commit 666c2b88c0
7 changed files with 29 additions and 20 deletions

1
TODO
View file

@ -3,7 +3,6 @@ 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?

2
irc.py
View file

@ -26,7 +26,7 @@ class PesterIRC(QtCore.QObject):
self.brokenConnection = False
def closeConnection(self):
self.cli.close()
def setConnectionBroken(self):
def setConnectionBroken(self, broken=True):
self.brokenConnection = True
@QtCore.pyqtSlot(PesterProfile)
def getMood(self, *chums):

BIN
irc.pyc

Binary file not shown.

View file

@ -136,7 +136,15 @@ class pesterTheme(dict):
self.defaultTheme = pesterTheme("pesterchum", default=True)
def __getitem__(self, key):
keys = key.split("/")
v = dict.__getitem__(self, keys.pop(0))
try:
v = dict.__getitem__(self, keys.pop(0))
except KeyError, e:
if hasattr(self, 'inheritedTheme'):
return self.inheritedTheme[key]
if hasattr(self, 'defaultTheme'):
return self.defaultTheme[key]
else:
raise e
for k in keys:
try:
v = v[k]
@ -1658,14 +1666,17 @@ class IRCThread(QtCore.QThread):
irc.IRCConnect()
while 1:
if irc.brokenConnection:
self.finished.emit()
irc.brokenConnection = False
self.restartIRC.emit()
irc.closeConnection()
self.terminate()
irc.IRCConnect()
try:
irc.updateIRC()
except socket.error:
irc.setConnectionBroken()
restartIRC = QtCore.pyqtSignal()
class PesterTray(QtGui.QSystemTrayIcon):
def __init__(self, icon, mainwindow, parent):
QtGui.QSystemTrayIcon.__init__(self, icon, parent)
@ -1734,7 +1745,7 @@ class MainProgram(QtCore.QObject):
self.irc = PesterIRC(self.widget.config, self.widget)
self.connectWidgets(self.irc, self.widget)
self.ircapp = IRCThread(self.irc)
self.connect(self.ircapp, QtCore.SIGNAL('finished()'),
self.connect(self.ircapp, QtCore.SIGNAL('restartIRC()'),
self, QtCore.SLOT('restartIRC()'))
def connectWidgets(self, irc, widget):
@ -1847,12 +1858,6 @@ class MainProgram(QtCore.QObject):
def restartIRC(self):
self.widget.show()
self.widget.activateWindow()
self.irc = PesterIRC(self.widget.config, self.widget)
self.connectWidgets(self.irc, self.widget)
self.ircapp = IRCThread(self.irc)
self.connect(self.ircapp, QtCore.SIGNAL('finished()'),
self, QtCore.SLOT('restartIRC()'))
self.ircapp.start()
self.widget.loadingscreen = LoadingScreen(self.widget)
self.connect(self.widget.loadingscreen, QtCore.SIGNAL('rejected()'),
self.widget, QtCore.SLOT('close()'))

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 B

After

Width:  |  Height:  |  Size: 44 B

View file

@ -6,24 +6,29 @@
"icon": "$path/trayicon.png",
"newmsgicon": "$path/trayicon2.png",
"windowtitle": "PESTERCHUM",
"menu" : { "style": "font-family: 'Courier'; font: bold; font-size: 14px; background-color: #fdb302;border:2px solid #ffff00",
"menuitem": "font-size:14px;" },
"close": { "image": "$path/x.gif",
"loc": [280, 2]},
"minimize": { "image": "$path/m.gif",
"loc": [260, 2]},
"chums": { "loc": [15, 70],
"size": [270, 300]
"loc": [260, 8]},
"chums": { "style": "border:2px solid yellow; background-color: black;color: white;font: bold;font-size:14px;font-family: 'Courier';selection-background-color:#646464; ",
"loc": [15, 70],
"size": [270, 300]
},
"mychumhandle": { "label":
{ "text": "CHUMHANDLE:",
"loc": [12,430],
"loc": [12,415],
"style": "color: black ;font:bold; font-family: 'Courier';"
},
"handle": { "loc": [35,440],
"size": [240, 21] },
"colorswatch": { "loc": [260,440],
"handle": { "loc": [15,435],
"size": [240, 21],
"style": "background-color: black; padding: 3px; padding-left: 20px; color:white; font-family:'Courier'; font:bold; text-align:left;"
},
"colorswatch": { "loc": [260,435],
"size": [30,30],
"text": "C" },
"currentMood": [15, 440]
"currentMood": [15, 435]
},
"addchum": { "style": "background: rgba(255, 255, 0, 100%); border:2px solid #c48a00; font: bold; color: black; font-family:'Courier';",
"loc": [15,380],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 55 B