diff --git a/memos.py b/memos.py index c825405..d0b9ba5 100644 --- a/memos.py +++ b/memos.py @@ -100,7 +100,7 @@ class TimeGrammar(object): class TimeTracker(list): def __init__(self, time=None): self.timerecord = {"P": [], "F": []} - self.open = {"": ""}# Needs to be a dictionary :) + self.open = {} if time is not None: self.append(time) self.current=0 @@ -548,7 +548,7 @@ class PesterMemo(PesterConvo): def updateColor(self, handle, color): chums = self.userlist.findItems(handle, QtCore.Qt.MatchFlags(0)) for c in chums: - c.setForeground(0, QtGui.QBrush(color)) + c.setForeground(QtGui.QBrush(color)) def addMessage(self, text, handle): if type(handle) is bool: chum = self.mainwindow.profile() diff --git a/oyoyo/cmdhandler.py b/oyoyo/cmdhandler.py index eb40fab..e54b74c 100644 --- a/oyoyo/cmdhandler.py +++ b/oyoyo/cmdhandler.py @@ -102,9 +102,16 @@ class CommandHandler(object): logging.debug('f %s' % f) + # Because more than 5 arguments can be passed by channelmodeis try: - f(*args) + if str(command) == 'channelmodeis': + # This might be stupid :) + f(*args[0:4]) + else: + f(*args) except Exception as e: + #logging.error('command raised '+ command + str()) + logging.error('command args: ' + str([*args])) logging.error('command raised %s' % e) logging.error(traceback.format_exc()) raise CommandError(command) diff --git a/pesterchum.py b/pesterchum.py index 44deca2..5097d12 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -221,16 +221,16 @@ class chumListing(QtWidgets.QTreeWidgetItem): else: self.setIcon(0, icon) try: - self.setTextColor(0, QtGui.QColor(self.mainwindow.theme["main/chums/moods"][self.mood.name()]["color"])) + self.setForeground(0, QtGui.QBrush(QtGui.QColor(self.mainwindow.theme["main/chums/moods"][self.mood.name()]["color"]))) except KeyError: - self.setTextColor(0, QtGui.QColor(self.mainwindow.theme["main/chums/moods/chummy/color"])) + self.setForeground(0, QtGui.QBrush(QtGui.QColor(self.mainwindow.theme["main/chums/moods/chummy/color"]))) def changeTheme(self, theme): icon = self.mood.icon(theme) self.setIcon(0, icon) try: - self.setTextColor(0, QtGui.QColor(self.mainwindow.theme["main/chums/moods"][self.mood.name()]["color"])) + self.self.setForeground(0, QtGui.QBrush(QtGui.QColor((self.mainwindow.theme["main/chums/moods"][self.mood.name()]["color"])))) except KeyError: - self.setTextColor(0, QtGui.QColor(self.mainwindow.theme["main/chums/moods/chummy/color"])) + self.self.setForeground(0, QtGui.QBrush(QtGui.QColor((self.mainwindow.theme["main/chums/moods/chummy/color"])))) def login(self): self.setIcon(0, PesterIcon("themes/arrow_right.png")) self.status = "in"