Theme changes, mostly.
This commit is contained in:
parent
307a45b443
commit
bed5581187
9 changed files with 48 additions and 19 deletions
|
@ -3,6 +3,11 @@
|
|||
|
||||
## [v2.1.0] - 2021-4-4
|
||||
|
||||
### Fixed
|
||||
- Fixed current mood icon not showing up.
|
||||
- Fixed "CHUMHANDLE:" not fitting on some themes.
|
||||
- Fixed console capitalization.
|
||||
|
||||
### Added
|
||||
- Server prompt
|
||||
|
||||
|
|
1
TODO.md
1
TODO.md
|
@ -8,7 +8,6 @@
|
|||
- Any remaining unicode-related crashes.
|
||||
- Exclude unnecessary imports for builds.
|
||||
- Icon is crusty...?
|
||||
- Mood doesn't show up next to handle
|
||||
- "CHUMHANDLE" is cut off on pchum2.5 theme.
|
||||
- Mask & target not being passed to ``_max_msg_len``.
|
||||
- No error message when Pesterchum fails to join a channel. (For example, when the channel name length is over CHANNELLEN)
|
||||
|
|
|
@ -92,7 +92,7 @@ class IRCClient:
|
|||
server_file.close()
|
||||
server_obj = json.loads(read_file)
|
||||
TLS = server_obj['TLS']
|
||||
print("TLS-status is: " + str(TLS))
|
||||
#print("TLS-status is: " + str(TLS))
|
||||
if TLS == False:
|
||||
#print("false")
|
||||
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
|
@ -103,7 +103,7 @@ class IRCClient:
|
|||
self.bare_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
self.socket = self.context.wrap_socket(self.bare_socket)
|
||||
except:
|
||||
print("TLS except.")
|
||||
#print("TLS except.")
|
||||
self.context = ssl.create_default_context()
|
||||
self.context.check_hostname = False
|
||||
self.context.verify_mode = ssl.CERT_NONE
|
||||
|
@ -258,7 +258,7 @@ class IRCClient:
|
|||
# Why does this only work 33% of the time </3
|
||||
|
||||
# Somehow, kinda fixed :')
|
||||
print("QUIT")
|
||||
logging.info("QUIT")
|
||||
self.socket.send(bytes(msg + "\n", "UTF-8"))
|
||||
|
||||
class IRCApp:
|
||||
|
|
|
@ -1156,11 +1156,18 @@ class PesterWindow(MovingWindow):
|
|||
self.menu.setNativeMenuBar(False)
|
||||
self.menu.setObjectName("mainmenu")
|
||||
|
||||
self.console = AttrDict(dict(
|
||||
window = None,
|
||||
action = QtWidgets.QAction("Console".upper(), self),
|
||||
is_open = False
|
||||
))
|
||||
if self.theme.has_key("main/menus/client/console"):
|
||||
self.console = AttrDict(dict(
|
||||
window = None,
|
||||
action = QtWidgets.QAction(self.theme["main/menus/client/console"], self),
|
||||
is_open = False
|
||||
))
|
||||
else:
|
||||
self.console = AttrDict(dict(
|
||||
window = None,
|
||||
action = QtWidgets.QAction("Console", self),
|
||||
is_open = False
|
||||
))
|
||||
self.console.shortcuts = AttrDict(dict(
|
||||
conkey = QtWidgets.QShortcut(QtGui.QKeySequence("Ctrl+`"), self,
|
||||
context=QtCore.Qt.ApplicationShortcut),
|
||||
|
@ -1266,8 +1273,8 @@ class PesterWindow(MovingWindow):
|
|||
|
||||
self.moodsLabel = QtWidgets.QLabel(self.theme["main/moodlabel/text"], self)
|
||||
self.moodsLabel.setObjectName("moodlabel")
|
||||
|
||||
self.mychumhandleLabel = QtWidgets.QLabel(self.theme["main/mychumhandle/label/text"], self)
|
||||
# Padding so it fits. I, don't know how to fix this properly :/
|
||||
self.mychumhandleLabel = QtWidgets.QLabel(self.theme["main/mychumhandle/label/text"] + " ", self)
|
||||
self.mychumhandleLabel.setObjectName("myhandlelabel")
|
||||
self.mychumhandle = QtWidgets.QPushButton(self.profile().handle, self)
|
||||
self.mychumhandle.setFlat(True)
|
||||
|
@ -1282,6 +1289,8 @@ class PesterWindow(MovingWindow):
|
|||
|
||||
self.initTheme(self.theme)
|
||||
|
||||
#self.mychumhandleLabel.setStyleSheet("QLabel {);};")
|
||||
|
||||
self.hide()
|
||||
|
||||
self.waitingMessages = waitingMessageHolder(self)
|
||||
|
@ -1710,6 +1719,17 @@ class PesterWindow(MovingWindow):
|
|||
self.nickServAction.setText(self.theme["main/menus/help/nickserv"])
|
||||
self.helpmenu.setTitle(self.theme["main/menus/help/_name"])
|
||||
|
||||
# Console
|
||||
## if self.theme.has_key("main/menus/client/console"):
|
||||
## self.console.action.setText(self.theme["main/menus/client/console"])
|
||||
## else:
|
||||
## self.console.action.setText("Console")
|
||||
# has_key doesn't work out here for some reason, possibly because of inherits?
|
||||
try:
|
||||
self.console.action.setText(self.theme["main/menus/client/console"])
|
||||
except:
|
||||
self.console.action.setText("Console")
|
||||
|
||||
# moods
|
||||
self.moodsLabel.setText(theme["main/moodlabel/text"])
|
||||
self.moodsLabel.move(*theme["main/moodlabel/loc"])
|
||||
|
@ -1755,7 +1775,9 @@ class PesterWindow(MovingWindow):
|
|||
self.mychumcolor.resize(*theme["main/mychumhandle/colorswatch/size"])
|
||||
self.mychumcolor.move(*theme["main/mychumhandle/colorswatch/loc"])
|
||||
self.mychumcolor.setStyleSheet("background: %s" % (self.profile().colorhtml()))
|
||||
if "main/mychumhandle/currentMood" in self.theme:
|
||||
# I don't know why "if "main/mychumhandle/currentMood" in self.theme:" doesn't work,
|
||||
# But this seems to work just as well :3c
|
||||
if self.theme.has_key("main/mychumhandle/currentMood"):
|
||||
moodicon = self.profile().mood.icon(theme)
|
||||
if hasattr(self, 'currentMoodIcon') and self.currentMoodIcon:
|
||||
self.currentMoodIcon.hide()
|
||||
|
|
|
@ -299,7 +299,7 @@ class userConfig(object):
|
|||
server_file.close()
|
||||
server_obj = json.loads(read_file)
|
||||
server = str(server_obj['server'])
|
||||
print("Server is: " + server)
|
||||
#print("Server is: " + server)
|
||||
return server
|
||||
except:
|
||||
try:
|
||||
|
@ -312,7 +312,7 @@ class userConfig(object):
|
|||
server_file.write(json.dumps(json_server_file, indent = 4) )
|
||||
server_file.close()
|
||||
server = "irc.pesterchum.xyz"
|
||||
print("Failed to read server, defaulting to irc.pesterchum.xyz")
|
||||
#print("Failed to read server, defaulting to irc.pesterchum.xyz")
|
||||
except:
|
||||
return self.config.get('server', "irc.pesterchum.xyz")
|
||||
def port(self):
|
||||
|
@ -324,7 +324,7 @@ class userConfig(object):
|
|||
server_file.close()
|
||||
server_obj = json.loads(read_file)
|
||||
port = str(server_obj['port'])
|
||||
print("Port is: " + port)
|
||||
#print("Port is: " + port)
|
||||
return port
|
||||
except:
|
||||
return self.config.get('port', '6697')
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
"import": "Import",
|
||||
"reconnect": "Reconnect",
|
||||
"idle": "Idle",
|
||||
"exit": "Exit"},
|
||||
"exit": "Exit",
|
||||
"console": "Console"},
|
||||
"profile": {"_name": "Profile",
|
||||
"switch": "Switch",
|
||||
"color": "Color",
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
"import": "IMPORT",
|
||||
"reconnect": "RECONNECT",
|
||||
"idle": "IDLE",
|
||||
"exit": "EXIT"},
|
||||
"exit": "EXIT",
|
||||
"console": "CONSOLE"},
|
||||
"profile": {"_name": "PROFILE",
|
||||
"switch": "SWITCH",
|
||||
"color": "COLOR",
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"mychumhandle": { "label":
|
||||
{ "text": "CHUMHANDLE:",
|
||||
"loc": [12,415],
|
||||
"style": "color: black ;font:bold; font-family: 'Courier';"
|
||||
"style": "color: black; font:bold; font-family: 'Courier';"
|
||||
},
|
||||
"handle": { "loc": [15,435],
|
||||
"size": [240, 25],
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
"import": "import U2;",
|
||||
"reconnect": "Reconnect",
|
||||
"idle": "Idle",
|
||||
"exit": "Abscond"},
|
||||
"exit": "Abscond",
|
||||
"console": "Console"},
|
||||
"profile": {"_name": "View",
|
||||
"switch": "Trolltag",
|
||||
"theme": "Theme",
|
||||
|
|
Loading…
Reference in a new issue