9/9
This commit is contained in:
parent
72cdb844ff
commit
d39caf1488
3 changed files with 14 additions and 7 deletions
4
memos.py
4
memos.py
|
@ -100,7 +100,7 @@ class TimeGrammar(object):
|
||||||
class TimeTracker(list):
|
class TimeTracker(list):
|
||||||
def __init__(self, time=None):
|
def __init__(self, time=None):
|
||||||
self.timerecord = {"P": [], "F": []}
|
self.timerecord = {"P": [], "F": []}
|
||||||
self.open = {"": ""}# Needs to be a dictionary :)
|
self.open = {}
|
||||||
if time is not None:
|
if time is not None:
|
||||||
self.append(time)
|
self.append(time)
|
||||||
self.current=0
|
self.current=0
|
||||||
|
@ -548,7 +548,7 @@ class PesterMemo(PesterConvo):
|
||||||
def updateColor(self, handle, color):
|
def updateColor(self, handle, color):
|
||||||
chums = self.userlist.findItems(handle, QtCore.Qt.MatchFlags(0))
|
chums = self.userlist.findItems(handle, QtCore.Qt.MatchFlags(0))
|
||||||
for c in chums:
|
for c in chums:
|
||||||
c.setForeground(0, QtGui.QBrush(color))
|
c.setForeground(QtGui.QBrush(color))
|
||||||
def addMessage(self, text, handle):
|
def addMessage(self, text, handle):
|
||||||
if type(handle) is bool:
|
if type(handle) is bool:
|
||||||
chum = self.mainwindow.profile()
|
chum = self.mainwindow.profile()
|
||||||
|
|
|
@ -102,9 +102,16 @@ class CommandHandler(object):
|
||||||
|
|
||||||
logging.debug('f %s' % f)
|
logging.debug('f %s' % f)
|
||||||
|
|
||||||
|
# Because more than 5 arguments can be passed by channelmodeis
|
||||||
try:
|
try:
|
||||||
f(*args)
|
if str(command) == 'channelmodeis':
|
||||||
|
# This might be stupid :)
|
||||||
|
f(*args[0:4])
|
||||||
|
else:
|
||||||
|
f(*args)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
#logging.error('command raised '+ command + str())
|
||||||
|
logging.error('command args: ' + str([*args]))
|
||||||
logging.error('command raised %s' % e)
|
logging.error('command raised %s' % e)
|
||||||
logging.error(traceback.format_exc())
|
logging.error(traceback.format_exc())
|
||||||
raise CommandError(command)
|
raise CommandError(command)
|
||||||
|
|
|
@ -221,16 +221,16 @@ class chumListing(QtWidgets.QTreeWidgetItem):
|
||||||
else:
|
else:
|
||||||
self.setIcon(0, icon)
|
self.setIcon(0, icon)
|
||||||
try:
|
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:
|
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):
|
def changeTheme(self, theme):
|
||||||
icon = self.mood.icon(theme)
|
icon = self.mood.icon(theme)
|
||||||
self.setIcon(0, icon)
|
self.setIcon(0, icon)
|
||||||
try:
|
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:
|
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):
|
def login(self):
|
||||||
self.setIcon(0, PesterIcon("themes/arrow_right.png"))
|
self.setIcon(0, PesterIcon("themes/arrow_right.png"))
|
||||||
self.status = "in"
|
self.status = "in"
|
||||||
|
|
Loading…
Reference in a new issue