This commit is contained in:
Dpeta 2021-03-23 22:41:52 +01:00
parent 72cdb844ff
commit d39caf1488
3 changed files with 14 additions and 7 deletions

View file

@ -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()

View file

@ -102,9 +102,16 @@ class CommandHandler(object):
logging.debug('f %s' % f)
# Because more than 5 arguments can be passed by channelmodeis
try:
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)

View file

@ -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"