diff --git a/TODO b/TODO index dd573ce..be2733d 100644 --- a/TODO +++ b/TODO @@ -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? diff --git a/irc.py b/irc.py index f3e87b5..dc6ae08 100644 --- a/irc.py +++ b/irc.py @@ -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): diff --git a/irc.pyc b/irc.pyc index 5a9a877..09faee3 100644 Binary files a/irc.pyc and b/irc.pyc differ diff --git a/pesterchum.py b/pesterchum.py index 8572a33..f645fd5 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -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()')) diff --git a/themes/pesterchum2.5/m.gif b/themes/pesterchum2.5/m.gif index 489abaa..3f6c396 100644 Binary files a/themes/pesterchum2.5/m.gif and b/themes/pesterchum2.5/m.gif differ diff --git a/themes/pesterchum2.5/style.js b/themes/pesterchum2.5/style.js index 66b7874..ed99ec0 100644 --- a/themes/pesterchum2.5/style.js +++ b/themes/pesterchum2.5/style.js @@ -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], diff --git a/themes/pesterchum2.5/x.gif b/themes/pesterchum2.5/x.gif index 41b47e6..6f29624 100644 Binary files a/themes/pesterchum2.5/x.gif and b/themes/pesterchum2.5/x.gif differ