ran black on forgotten files

This commit is contained in:
anne 2023-07-23 20:16:21 +02:00
parent 381631bb39
commit ed81fd60d2
3 changed files with 10 additions and 6 deletions

View file

@ -1455,6 +1455,7 @@ class PesterOptions(QtWidgets.QDialog):
self.randomscheck.setEnabled(False) self.randomscheck.setEnabled(False)
self.themeBox = QtWidgets.QComboBox(self) self.themeBox = QtWidgets.QComboBox(self)
def reset_themeBox(): def reset_themeBox():
avail_themes = self.config.availableThemes() avail_themes = self.config.availableThemes()
PchumLog.debug("Resetting themeself.themeBox") PchumLog.debug("Resetting themeself.themeBox")
@ -1470,6 +1471,7 @@ class PesterOptions(QtWidgets.QDialog):
QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Minimum,
) )
) )
reset_themeBox() reset_themeBox()
self.refreshtheme = QtWidgets.QPushButton("Refresh current theme", self) self.refreshtheme = QtWidgets.QPushButton("Refresh current theme", self)
self.refreshtheme.clicked.connect(parent.themeSelectOverride) self.refreshtheme.clicked.connect(parent.themeSelectOverride)
@ -1480,7 +1482,7 @@ class PesterOptions(QtWidgets.QDialog):
) )
) )
self.themeManager = ThemeManagerWidget(self.config) self.themeManager = ThemeManagerWidget(self.config)
self.themeManager.rebuilt.connect( reset_themeBox ) self.themeManager.rebuilt.connect(reset_themeBox)
# This makes it so that the themeBox gets updated when a theme is installed or removed through the repository # This makes it so that the themeBox gets updated when a theme is installed or removed through the repository
self.ghostchum = QtWidgets.QCheckBox("Pesterdunk Ghostchum!!", self) self.ghostchum = QtWidgets.QCheckBox("Pesterdunk Ghostchum!!", self)
self.ghostchum.setChecked(self.config.ghostchum()) self.ghostchum.setChecked(self.config.ghostchum())

View file

@ -3104,7 +3104,7 @@ class PesterWindow(MovingWindow):
# theme repo url # theme repo url
repourlsetting = self.optionmenu.repoUrlBox.text() repourlsetting = self.optionmenu.repoUrlBox.text()
if repourlsetting != self.config.theme_repo_url(): if repourlsetting != self.config.theme_repo_url():
self.config.set('theme_repo_url', repourlsetting) self.config.set("theme_repo_url", repourlsetting)
# theme # theme
ghostchumsetting = self.optionmenu.ghostchum.isChecked() ghostchumsetting = self.optionmenu.ghostchum.isChecked()

View file

@ -362,7 +362,10 @@ with a backup from: <a href='%s'>%s</a></h3></html>"
return self.config.get("irc_compatibility_mode", False) return self.config.get("irc_compatibility_mode", False)
def theme_repo_url(self): def theme_repo_url(self):
return self.config.get('theme_repo_url', 'https://raw.githubusercontent.com/mocchapi/pesterchum-themes/main/db.json') return self.config.get(
"theme_repo_url",
"https://raw.githubusercontent.com/mocchapi/pesterchum-themes/main/db.json",
)
def force_prefix(self): def force_prefix(self):
return self.config.get("force_prefix", True) return self.config.get("force_prefix", True)
@ -785,7 +788,6 @@ class userProfile:
def getTheme(self): def getTheme(self):
return self.theme return self.theme
def getAutoIdentify(self): def getAutoIdentify(self):
return self.autoidentify return self.autoidentify