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

@ -1429,7 +1429,7 @@ class PesterOptions(QtWidgets.QDialog):
layout_repo_url = QtWidgets.QHBoxLayout()
self.repoUrlBox = QtWidgets.QLineEdit(self)
self.repoUrlBox.setText(self.config.theme_repo_url())
layout_repo_url.addWidget(QtWidgets.QLabel("Theme repository db URL:"))
layout_repo_url.addWidget(self.repoUrlBox)
@ -1455,6 +1455,7 @@ class PesterOptions(QtWidgets.QDialog):
self.randomscheck.setEnabled(False)
self.themeBox = QtWidgets.QComboBox(self)
def reset_themeBox():
avail_themes = self.config.availableThemes()
PchumLog.debug("Resetting themeself.themeBox")
@ -1470,6 +1471,7 @@ class PesterOptions(QtWidgets.QDialog):
QtWidgets.QSizePolicy.Policy.Minimum,
)
)
reset_themeBox()
self.refreshtheme = QtWidgets.QPushButton("Refresh current theme", self)
self.refreshtheme.clicked.connect(parent.themeSelectOverride)
@ -1480,7 +1482,7 @@ class PesterOptions(QtWidgets.QDialog):
)
)
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
self.ghostchum = QtWidgets.QCheckBox("Pesterdunk Ghostchum!!", self)
self.ghostchum.setChecked(self.config.ghostchum())

View file

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

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)
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):
return self.config.get("force_prefix", True)
@ -785,7 +788,6 @@ class userProfile:
def getTheme(self):
return self.theme
def getAutoIdentify(self):
return self.autoidentify