Fixes for botnames, chumroll & dm colors.
This commit is contained in:
parent
d68c10f1ac
commit
02c0b9e47b
5 changed files with 44 additions and 18 deletions
19
CHANGELOG.md
19
CHANGELOG.md
|
@ -1,13 +1,28 @@
|
|||
# Changelog
|
||||
(This document uses YYYY-MM-DD as per ISO 8601)
|
||||
|
||||
## [v2.1.2] - 2021-4-16
|
||||
|
||||
### Added
|
||||
- Added HOSTSERV and BOTSERV to BOTNAMES.
|
||||
|
||||
### Fixed
|
||||
- Colors in direct messages sometimes not working.
|
||||
- Handles sometimes not showing up in chumroll or trollslum.
|
||||
|
||||
### Removed
|
||||
- Separate handling for canon handles on chumroll because it was buggy and unneeded.
|
||||
|
||||
### Changed
|
||||
- setup.py build description to just "Pesterchum"
|
||||
|
||||
## [v2.1.1] - 2021-4-12
|
||||
|
||||
# Fixed
|
||||
### Fixed
|
||||
- Fixed theme not getting applied correctly to memo.
|
||||
- Fixed sRGB profile in steamchum.
|
||||
|
||||
## Changed
|
||||
### Changed
|
||||
- convo/tabwindow on trollian seems to be used for the general background color, so, I changed it to a value. I'm not use if this was intentional.
|
||||
|
||||
## [v2.1.0] - 2021-4-11
|
||||
|
|
2
convo.py
2
convo.py
|
@ -6,6 +6,7 @@ from time import strftime
|
|||
from copy import copy
|
||||
from datetime import datetime, timedelta
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
import logging
|
||||
|
||||
from mood import Mood
|
||||
from dataobjs import PesterProfile, PesterHistory
|
||||
|
@ -752,6 +753,7 @@ class PesterConvo(QtWidgets.QFrame):
|
|||
self.optionsMenu.removeAction(self.blockAction)
|
||||
|
||||
def updateColor(self, color):
|
||||
logging.debug("convo updateColor: " + str(color))
|
||||
self.chum.color = color
|
||||
def addMessage(self, msg, me=True):
|
||||
if type(msg) in [str, str]:
|
||||
|
|
5
irc.py
5
irc.py
|
@ -196,6 +196,7 @@ class PesterIRC(QtCore.QThread):
|
|||
self.setConnectionBroken()
|
||||
@QtCore.pyqtSlot()
|
||||
def updateColor(self):
|
||||
#logging.debug("irc updateColor (outgoing)")
|
||||
me = self.mainwindow.profile()
|
||||
for h in list(self.mainwindow.convos.keys()):
|
||||
try:
|
||||
|
@ -411,8 +412,10 @@ class PesterHandler(DefaultCommandHandler):
|
|||
colors = msg[7:].split(",")
|
||||
try:
|
||||
colors = [int(d) for d in colors]
|
||||
except ValueError:
|
||||
except ValueError as e:
|
||||
logging.warning(e)
|
||||
colors = [0,0,0]
|
||||
logging.debug("colors: " + str(colors))
|
||||
color = QtGui.QColor(*colors)
|
||||
self.parent.colorUpdated.emit(handle, color)
|
||||
else:
|
||||
|
|
|
@ -202,12 +202,13 @@ from toast import PesterToastMachine, PesterToast
|
|||
import pytwmn
|
||||
from profile import *
|
||||
|
||||
canon_handles = ["apocalypseArisen", "arsenicCatnip", "arachnidsGrip", "adiosToreador", \
|
||||
"caligulasAquarium", "cuttlefishCuller", "carcinoGeneticist", "centaursTesticle", \
|
||||
"grimAuxiliatrix", "gallowsCalibrator", "gardenGnostic", "ectoBiologist", \
|
||||
"twinArmageddons", "terminallyCapricious", "turntechGodhead", "tentacleTherapist"]
|
||||
#canon_handles = ["apocalypseArisen", "arsenicCatnip", "arachnidsGrip", "adiosToreador", \
|
||||
# "caligulasAquarium", "cuttlefishCuller", "carcinoGeneticist", "centaursTesticle", \
|
||||
# "grimAuxiliatrix", "gallowsCalibrator", "gardenGnostic", "ectoBiologist", \
|
||||
# "twinArmageddons", "terminallyCapricious", "turntechGodhead", "tentacleTherapist"]
|
||||
canon_handles = ["",]# Unused, kept to prevent unexpected calls causing a crash.
|
||||
CUSTOMBOTS = ["CALSPRITE", RANDNICK.upper()]
|
||||
BOTNAMES = ["NICKSERV", "CHANSERV", "MEMOSERV", "OPERSERV", "HELPSERV"]
|
||||
BOTNAMES = ["NICKSERV", "CHANSERV", "MEMOSERV", "OPERSERV", "HELPSERV", "HOSTSERV", "BOTSERV"]
|
||||
BOTNAMES.extend(CUSTOMBOTS)
|
||||
|
||||
# Save the main app. From here, we should be able to get everything else in
|
||||
|
@ -414,10 +415,10 @@ class chumArea(RightClickTree):
|
|||
return self.groupMenu
|
||||
else:
|
||||
currenthandle = self.currentItem().chum.handle
|
||||
if currenthandle in canon_handles:
|
||||
return self.canonMenu
|
||||
else:
|
||||
return self.optionsMenu
|
||||
#if currenthandle in canon_handles:
|
||||
# return self.canonMenu
|
||||
#else:
|
||||
return self.optionsMenu
|
||||
|
||||
def startDrag(self, dropAction):
|
||||
## Traceback (most recent call last):
|
||||
|
@ -564,7 +565,8 @@ class chumArea(RightClickTree):
|
|||
def showAllChums(self):
|
||||
for c in self.chums:
|
||||
chandle = c.handle
|
||||
if not len(self.findItems(chandle, QtCore.Qt.MatchContains | QtCore.Qt.MatchRecursive)):
|
||||
if not len(self.findItems(chandle, QtCore.Qt.MatchExactly | QtCore.Qt.MatchRecursive)):
|
||||
#if True:# For if it doesn't work at all :/
|
||||
chumLabel = chumListing(c, self.mainwindow)
|
||||
self.addItem(chumLabel)
|
||||
self.sort()
|
||||
|
@ -672,7 +674,8 @@ class chumArea(RightClickTree):
|
|||
if text.rfind(" (") != -1:
|
||||
text = text[0:text.rfind(" (")]
|
||||
curgroups.append(text)
|
||||
if not self.findItems(chumLabel.handle, QtCore.Qt.MatchContains | QtCore.Qt.MatchRecursive):
|
||||
if not self.findItems(chumLabel.handle, QtCore.Qt.MatchExactly | QtCore.Qt.MatchRecursive):
|
||||
#if True:# For if it doesn't work at all :/
|
||||
if chumLabel.chum.group not in curgroups:
|
||||
child_1 = QtWidgets.QTreeWidgetItem(["%s" % (chumLabel.chum.group)])
|
||||
i = 0
|
||||
|
@ -724,7 +727,8 @@ class chumArea(RightClickTree):
|
|||
if self.mainwindow.config.showOnlineNumbers():
|
||||
self.showOnlineNumbers()
|
||||
else: # usually means this is now the trollslum
|
||||
if not self.findItems(chumLabel.handle, QtCore.Qt.MatchContains | QtCore.Qt.MatchRecursive):
|
||||
if not self.findItems(chumLabel.handle, QtCore.Qt.MatchExactly | QtCore.Qt.MatchRecursive):
|
||||
#if True:# For if it doesn't work at all :/
|
||||
self.topLevelItem(0).addChild(chumLabel)
|
||||
self.topLevelItem(0).sortChildren(0, QtCore.Qt.AscendingOrder)
|
||||
def takeItem(self, chumLabel):
|
||||
|
@ -2125,6 +2129,7 @@ class PesterWindow(MovingWindow):
|
|||
|
||||
@QtCore.pyqtSlot(QString, QtGui.QColor)
|
||||
def updateColorSlot(self, handle, color):
|
||||
logging.debug("updateColorSlot, "+ str(handle) +", " + str(color))
|
||||
h = str(handle)
|
||||
self.changeColor(h, color)
|
||||
|
||||
|
@ -3576,8 +3581,8 @@ Click this message to never see this again.")
|
|||
irc2widget = [('connected()', 'connected()'),
|
||||
('moodUpdated(QString, PyQt_PyObject)',
|
||||
'updateMoodSlot(QString, PyQt_PyObject)'),
|
||||
('colorUpdated(QString, QColor)',
|
||||
'updateColorSlot(QString, QColor)'),
|
||||
('colorUpdated(QString, QtGui.QColor)',
|
||||
'updateColorSlot(QString, QtGui.QColor)'),
|
||||
('messageReceived(QString, QString)',
|
||||
'deliverMessage(QString, QString)'),
|
||||
('memoReceived(QString, QString, QString)',
|
||||
|
@ -3637,6 +3642,7 @@ Click this message to never see this again.")
|
|||
# Main window --> IRC
|
||||
(irc.connected, widget.connected),
|
||||
(irc.moodUpdated, widget.updateMoodSlot),
|
||||
(irc.colorUpdated, widget.updateColorSlot),
|
||||
(irc.messageReceived, widget.deliverMessage),
|
||||
(irc.memoReceived, widget.deliverMemo),
|
||||
(irc.noticeReceived, widget.deliverNotice),
|
||||
|
|
2
setup.py
2
setup.py
|
@ -51,7 +51,7 @@ bdist_mac_options = {
|
|||
'bundle_name': "Pesterchum"
|
||||
}
|
||||
|
||||
description = "Instant messaging client copying the look and feel of clients from Andrew Hussie's webcomic Homestuck."
|
||||
description = "Pesterchum"
|
||||
icon = "pesterchum.ico"
|
||||
|
||||
# See https://stackoverflow.com/questions/15734703/use-cx-freeze-to-create-an-msi-that-adds-a-shortcut-to-the-desktop
|
||||
|
|
Loading…
Reference in a new issue